Refresh the market seed to each region's settled close, with per-row as-of - #8
Merged
Conversation
Refreshes prices/changes/market caps for symbols corroborated in
.superpowers/refresh-2026-08-07-{us,kr}.md: 21 US mega-caps + 3 US
indices (Thu 2026-08-06 settled close — Friday's session hadn't closed
when the research ran) and 18 of 20 priority KR stocks + all 5 KR
index/FX benchmarks (Fri 2026-08-07 KRX close). Kakao (auction-window
timestamp, not verified equal to the close) and NAVER (unexplained
-7.08% move) were deliberately left alone. Dow uses the directly-fetched
Yahoo figure (-464.02 -> 53,885.10) over a search-synthesis figure that
disagreed. VIX, ES/NQ/YM futures, gold/oil, and crypto were not touched
(no settled-close or full-batch corroboration).
Adds a per-row `AssetMeta.asOfISO` override (types.ts) so a refreshed
seed row carries its own as-of instead of inheriting the region's bulk
snapshot. Un-refreshed rows resolve to a new `US_PREV_ASOF_ISO`/
`KR_PREV_ASOF_ISO` fallback in engine.ts, not the bumped
`SNAPSHOT.asOfISO`/`krAsOfISO` — otherwise moving those forward would
silently claim the new close for the ~85% of rows this pass didn't
re-verify, the same defect P11 fixed for KR-vs-US rows, reintroduced
per-row instead of per-region. Verified live: /#/stock/NVDA reads
"기준 8월 6일", /#/stock/KO (unrefreshed) still reads "기준 8월 4일".
Replaces GENERAL_NEWS/KR_GENERAL_NEWS with the sourced 08-06/08-07
stories. Updates SNAPSHOT's asOfISO/krAsOfISO/closeLabel*/todayISO and
sentiment (mild risk-off on the new US session vs. the prior optimistic
read). validate-data.ts's anchor assertion and a new per-row invariant
(a row's as-of must equal either its region's current or previous
anchor, never later) are added; a dedicated regression test
(engine.asof-refresh.test.ts) pins the override behavior and was
verified to fail when the fallback is reverted to the bumped snapshot.
npm run check passes end to end.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…on, document per-row as-of override Review found two Minor gaps in the 2026-08-07 seed refresh: 1. MARKET_SUMMARY/EXPLORE_CARDS (content.ts) and KR_MARKET_SUMMARY/ KR_EXPLORE_CARDS (content.kr.ts) still narrated the old 08-04/08-05 sessions while GENERAL_NEWS/KR_GENERAL_NEWS directly beneath them on the same page already read 08-06/08-07 — two different trading days on one screen, undoing the provenance discipline the per-row as-of override exists to enforce. Rewrote both regions' summary items and explore cards against the same research files, corroborated-close figures only. US now covers 6 summary items / 7 explore cards from Thursday 2026-08-06 (fewer explore cards than before — 7 corroborated stories, not padded back to the old count of 10). KR covers 7 summary items / 6 explore cards from Friday 2026-08-07, matching the prior per-array counts. Verified live: the US market home no longer contains "Palantir Surges"/"ASML" and does contain the new Dow/Airbnb copy; the KR market home (?region=kr) no longer contains "3.76% 급등" and does contain the new SK하이닉스/삼성전자 copy. Removing the old 'ms-btc' summary id leaves two existing `.find(id === 'ms-btc')` call sites (CryptoPage.tsx, answers.ts) resolving to undefined; both were already `if (x)`-guarded, so this is a graceful "nothing to show" rather than a regression — consistent with crypto staying out of scope for this refresh. 2. ARCHITECTURE.md's P11 section documented the pre-refresh anchors (2026-08-04/05) and said nothing about the per-row `AssetMeta.asOfISO` override added in the prior commit. Added three paragraphs: the updated anchors, why bumping SNAPSHOT.asOfISO/krAsOfISO for display would silently forward-date unrefreshed rows without the override, how US_PREV_ASOF_ISO/KR_PREV_ASOF_ISO fix that, and why crypto is deliberately excluded from the mechanism. npm run check passes end to end (validate:tokens literals: 0). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Refreshes the market seed to the most recent settled close per region, and adds the per-row as-of that makes a partial refresh honest.
The two dates differ, and that is the finding
The request was "update everything to today," 2026-08-07. Research established that Friday's US session had not closed: every directly-fetched source timestamps the last close as Thursday 2026-08-06 16:00 EDT and shows 08-07 only as a ~4:20 AM EDT pre-market quote — before the jobs report, before the open.
KRX closes at 15:30 KST, so Korea does have a settled Friday 08-07 close.
2026-08-06T16:00:00-04:002026-08-07T15:30:00+09:00One session apart — the same relationship the seed already modelled, and why
asOfISOandkrAsOfISOare separate fields.Worth recording: several aggregators label that same Thursday data as an "August 7 close." Those labels were found and refused. Taken at face value they would have shipped day-old figures stamped with today's date.
The problem a partial refresh creates
Research corroborated 21 of 187 US rows and 18 of 159 KR rows. Seed rows carried no date, and one snapshot as-of covered every row in a region — so moving the anchor forward would have made ~300 un-refreshed rows claim a close they do not have. That is precisely the defect P11 fixed, when Korean rows carried the US as-of and the stock page misstated when their data was from.
AssetMetanow takes an optional per-rowasOfISO. Refreshed rows carry their own; un-refreshed rows fall back toUS_PREV_ASOF_ISO/KR_PREV_ASOF_ISO— the previous anchor, not the bumped one. Bumping the snapshot therefore cannot silently relabel anything.Visible on the stock page, verified in the running app:
NVDAKO005930035720What was deliberately left alone
Also refreshed
GENERAL_NEWS(8 US, Thursday) andKR_GENERAL_NEWS(7 KR, Friday), plusMARKET_SUMMARYandEXPLORE_CARDSin both regions — the last of those because review caught the summary still narrating the 08-04 session directly above a news feed reading 08-06, two trading days on one screen.ARCHITECTURE.mddocuments the override, the fallback, and why the fallback points at the previous anchor rather than the bumped one.Verification
npm run checkexit 0 — 64 files / 289 tests,validate:tokensliterals: 0, every gate PASS. Version stays 1.13.0.All 47 refreshed figures were traced value-for-value against the research files in review, with zero mismatches, and each flagged trap was confirmed honoured.
engine.asof-refresh.test.tswas proven a real guard by reverting the fallback to the bumped anchor and watching three of five tests fail with the correct diagnostics.Known limits
10 of the 18 refreshed KR stocks rest on a single after-hours-close proxy with no independent cross-check of the exact won figure;
finance.naver.comandm.finance.daum.netwere both unreachable from this environment. Futures sit further above their refreshed cash indices than the seed's intended basis, since they were not re-derived.336 of 383 rows still carry their previous close. Hand-refreshing a seed does not scale to a daily cadence — the app already ships the whole provider layer (Alpaca, Finnhub, Coinbase, quality gate, provenance, circuit breaker) in
server/market/, unconfigured. One API key retires this workflow.🤖 Generated with Claude Code