refactor: serve live data or an honest error — remove demo-era fixture tiers - #21
Merged
Conversation
- Removed obsolete design-sync files including build scripts, configuration, and documentation to streamline the project. - Updated .gitignore to exclude transient build artifacts and unnecessary directories. - Cleaned up package.json and package-lock.json by removing deprecated Storybook dependencies. - Added a new skill entry in skills-lock.json for batch-grill-me to enhance project capabilities.
…e tiers The competition live demo is over; the app now runs for real users. Remove both stand-in data layers so unavailable data surfaces as an error state instead of canned market data (ADR-0011): - Demo Mode (NEXT_PUBLIC_ANKER_DEMO_MODE): fixture data routes, disabled transaction builders, demo banner, and all related copy/CSS - Snapshot tier (ADR-0004): the committed 2026-07-12 day photograph, legacyOracles parsers, SnapshotBanner, TenorSource row provenance, frozen-clock plumbing, and the capture script - SnapshotQuoteProvider: quoting without an SVI surface now throws instead of inventing non-executable prices - Benchmark recorder records live inputs only; historical 'snapshot' sample rows remain valid in the schema Deterministic Playwright fixtures stay, now gated solely by isDeterministicE2E(); the unit-test market fixture moves to src/test/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…fallback /api/current/usdsui-apr had no in-app consumers — fetchCurrentUsdsuiApr was exported but never called by any component or hook, no E2E test or cron hits the route, and no doc references it. Its failure path also returned a fabricated FALLBACK_CURRENT_APR = 0.08 body, contradicting ADR-0011 (live data or an honest error). The whole module goes: route, server response builder, Current.finance client, and their tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The competition live demo is over and the product now runs for real users, so
the demo-era stand-in data layers are removed. When data cannot be served the
app now returns an error and the UI shows its error/empty state — users are
never shown market data that is not live.
Recorded as ADR-0011.
What is removed
Demo Mode (
NEXT_PUBLIC_ANKER_DEMO_MODE) — fixture market data, thedisabled-transaction kill-switch across all four transaction builders, the
disabled-CTA branches in the portfolio and subscribe flows, the top banner,
and the associated copy in both locales.
The Snapshot tier — the committed 2026-07-12 photograph of 4-16 Legacy
Oracle states that backed day browse when live markets were unreachable
(
daySnapshot.*,legacyOracles.*,SnapshotBanner, the frozen-clockpipeline,
scripts/capture-day-snapshot.mjs, andsourceprovenancethreaded through the curated-oracle API shape). ADR-0004 already called this
"a demo-era stopgap, hand-picked for presentation, not a long-term backstop,"
and the 4-16 oracles it captured expire for good at the end of July 2026.
SnapshotQuoteProvider— invented heuristic pricing when a market had noSVI surface. Quote building now throws instead.
The Current USDsui APR endpoint (
/api/current/usdsui-aprplus its serverbuilder and Current.finance client) — no in-app consumers: the client helper
was exported but never called, no cron or E2E test hit the route, and no doc
referenced it. Its failure path also returned a fabricated 8% APR body, which
is exactly what ADR-0011 forbids.
Behaviour changes
falling through to the photograph; the day group is absent rather than
backfilled, and the client retries on its normal 15s cycle.
non-executable "snapshot pricing".
What is deliberately kept
isDeterministicE2E()— never reachable in production, and the onesanctioned use of invented data.
'snapshot'in the Postgres CHECK constraint andBenchmarkSampleSource,because historical Benchmark Sample rows recorded while the tier existed
still carry that value.
src/test/marketSnapshotFixture.tsso its scope is unambiguous.
Not touched
README.mdis intentionally unchanged — judging is ongoing. Docs will besynced after feature work lands, not during this cleanup.
Verification
Local:
typecheck,lint:guardrails, 421 unit tests,next build, andPlaywright (35 passed / 15 skipped) all green. CI re-runs the full matrix
including the Move contract tests.
One deployment note: if
NEXT_PUBLIC_ANKER_DEMO_MODEis still set in theVercel project, it is now an inert variable and can be deleted.
🤖 Generated with Claude Code