Skip to content

feat(drips): flag-gated slices for spikes 655/656/657/660 (#517 #518 #520 #523) - #573

Merged
Darkvader-ship-it merged 1 commit into
PHASE-STELLAR:mainfrom
dimka90:feat/drips-wave-517-518-520-523-slices
Oct 17, 2026
Merged

Darkvader-ship-it merged 1 commit into
PHASE-STELLAR:mainfrom
dimka90:feat/drips-wave-517-518-520-523-slices

Conversation

@dimka90

@dimka90 dimka90 commented Oct 17, 2026

Copy link
Copy Markdown

Summary

Four flag-gated partial slices for the assigned extreme spikes, following the existing phase-154 convention (documented in PROJECT_ARCHITECTURE.md §10). Each slice is self-contained lib/ logic with unit tests, a new feature flag (default off), and a rollback row. No production route wiring is added, so behavior is unchanged until a flag is enabled.

  • lib/soroban-read-coalescer.ts + flag phase-158
  • lib/owner-batch-loader.ts + flag phase-159
  • lib/web-vitals-budgets.ts + flag phase-160
  • lib/phase-error-taxonomy.ts + flag phase-161

Issues

Issue 517: Spike 655 — Soroban RPC request batching plus dedupe for simulation storms

Problem: Repeated/identical simulations (same get_config/balance/owner_of within a request) each hit simulateTransaction, so duplicate reads and 429/5xx retry storms multiply RPC load.
Resolution: lib/soroban-read-coalescer.ts — process-local coalescer that shares one in-flight promise for identical (contractId, method, args) reads and memoizes results for a short TTL, with optional stale-on-error fallback and closed-label metrics (lib/__tests__/soroban-read-coalescer.test.ts). Flag phase-158. Follow-ups: JSON-RPC array batching / cross-process cache.
Closes #517

Issue 518: Spike 656 — N+1 elimination in explore, world and profile reads with DataLoader batching

Problem: Explore/world/profile issue one owner_of(id) simulation per token (N+1), multiplying round-trips on every listing page.
Resolution: lib/owner-batch-loader.ts — a DataLoader-style per-tick coalescing loader with key dedupe, maxBatchSize chunking, cross-tick memoization, and per-key error results (lib/__tests__/owner-batch-loader.test.ts). Flag phase-159. Follow-ups: route wiring, index pushdown, sidecar mget.
Closes #518

Issue 520: Spike 657 — Web Vitals budgets with CI gates plus RUM pipeline

Problem: No per-route performance budget exists, so route regressions go unnoticed; the app only ships a page-view beacon.
Resolution: lib/web-vitals-budgets.ts — per-route LCP/INP/CLS budget table with dynamic-segment matching, evaluateVital good/needs-improvement/poor rating, and summarizeVitals worst-per-vital pass/fail summary (lib/__tests__/web-vitals-budgets.test.ts). Flag phase-160. Follow-ups: live collector, RUM transport, PR-blocking gate.
Closes #520

Issue 523: Spike 660 — Public TypeScript SDK for the PHASE protocol with error taxonomy

Problem: The SDK-facing error surface is free-form strings (parsePhaseContractErrorCode + humanizePhaseHostErrorMessage), so consumers cannot branch on a stable enum.
Resolution: lib/phase-error-taxonomy.ts — a code-stable PhaseError taxonomy mirroring contract discriminants 1..39 with retryable hints and userMessageKeys, plus mapPhaseContractError that converts a raw host error into a typed descriptor (lib/__tests__/phase-error-taxonomy.test.ts). Flag phase-161. Follow-ups: Horizon/RPC transport taxonomy, retry/circuit policy, dual CJS/ESM packaging.
Closes #523

Verification

  • npx vitest run lib/__tests__/{soroban-read-coalescer,owner-batch-loader,web-vitals-budgets,phase-error-taxonomy}.test.ts → 26 passed / 26.
  • npx tsc --noEmit → no errors in touched files (pre-existing errors elsewhere on main).
  • Full npx vitest run still has unrelated pre-existing failures (phase-142/143/146/147 AI suites, artist-profile-client import); none touch this change.

Flags / rollback

All four flags default off. Rollback = unset NEXT_PUBLIC_FEATURE_PHASE_158..161 / FEATURE_PHASE_158..161 (or set 0) and restart; no persisted state. Documented in PROJECT_ARCHITECTURE.md §10 and docs/TECHNICAL.md §9.1.

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@dimka90 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Darkvader-ship-it
Darkvader-ship-it merged commit f33c4b2 into PHASE-STELLAR:main Oct 17, 2026
ExcelDsigN-tech added a commit to ExcelDsigN-tech/Phase that referenced this pull request Oct 18, 2026
Resolve lib/feature-flags.ts: keep the restored phase-146..153, editions
and timed-drops members alongside upstream phase-158..161. The spike flags
move to their own branches.
ExcelDsigN-tech added a commit to ExcelDsigN-tech/Phase that referenced this pull request Oct 18, 2026
…api-versioning-deprecation

Keep both flag rows in the docs and re-add phase-163 to lib/feature-flags.ts.
ExcelDsigN-tech added a commit to ExcelDsigN-tech/Phase that referenced this pull request Oct 18, 2026
…to feat/docs-api-playground

Keep both flag rows in the docs and re-add phase-162/phase-163 to lib/feature-flags.ts.
ExcelDsigN-tech added a commit to ExcelDsigN-tech/Phase that referenced this pull request Oct 18, 2026
Upstream PHASE-STELLAR#573 assigned phase-159 to the batched owner-key loader.
ExcelDsigN-tech added a commit to ExcelDsigN-tech/Phase that referenced this pull request Oct 18, 2026
…animation-scroll-jank-purge

Keep both flag rows in the docs; feature-flags.ts takes the baseline and adds phase-164.
ExcelDsigN-tech added a commit to ExcelDsigN-tech/Phase that referenced this pull request Oct 18, 2026
Upstream PHASE-STELLAR#573 assigned phase-161 to the typed contract-error taxonomy.
ExcelDsigN-tech added a commit to ExcelDsigN-tech/Phase that referenced this pull request Oct 18, 2026
…creator-cli

Keep both flag rows in the docs; feature-flags.ts takes the baseline and adds phase-165.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment