Repository navigation
fix(console): correct desk completeness, presentation and next run - #1170
Conversation
todaySummary now keeps the runtime-daily reader's read_summary decision instead of rebuilding a weaker one, so an accepted projection with an incomplete outer read is never a known-null last run or a covered zero. Legacy bodies without read_summary keep their reconstruction. Desk runs-today keeps read_failed as its own outcome. A missing weekend record is no longer verified-empty tape coverage. Tape and ribbon freshness keep the stored observation of every record that was read and never substitute the request time. When every displayed account fact is stale, Overview freshness keeps their age. The ribbon's next_run is now an opt-in schedule projection through the existing reader: known only when every account has a future next_due_at, partial for the earliest observed candidate, unknown otherwise. Expected and pending counts stay null. No additional storage reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recent Signals shows the newest five runs, distinguishes a loading ribbon from an empty one and keeps partial or stale qualification on a populated list. A stale NAV is shown with its stale label and age. Performance renders the requested window, first stored date, return basis per target and truncation note even without a curve. The live N1 path no longer calls the benchmark route, which is outside the approved sources; fixture pages keep their synthetic comparison. The shared top bar shows the ribbon next_run in its known, stale, partial and unknown states, treats a past time as unknown and hides it behind the access lock. The Logs next-run copy now reads "earliest observed scheduled run". v2_asset_map.js is regenerated by the build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Independent end-of-batch verdict: FAIL Head: This is an owner-requested independent session review, posted through the connected account. It is not an official Codex GitHub App receipt or owner approval. The supported receipt fields above record this review's exact head, complete coverage and one unresolved finding. The native governance action authenticates reviewer identity separately. Blocking finding B1 (P2): nextScheduledRun can choose a later instant and the wrong target. At application/desk/ribbon.js:182–184, candidates are sorted lexically. The shared instant normalizer removes
Expected earliest: target0 at I reproduced this through the source schedule-instant validator → todaySummary schedule opt-in → nextScheduledRun. The validator explicitly accepts fractional instants; this is not malformed input. No production data was read. Fix with numerical instant comparison and a target-id tie breaker for equal instants; use chronological ordering for oldest observations too. Add known/partial mixed-precision regressions, then obtain review on the new exact head. Other required areas
Implementation deviations 0–6
These accepted deviations do not waive B1. Verification actually rerun PASS: runtime_today_incomplete, desk_n1_projection, console_desk_overview, console_desk_n1; full Local console_deploy_safety fails at the missing release-source ancestry check. Confirmed shallow checkout and absent source object. Hosted JS job explicitly logs that suite PASS, corroborating the environmental explanation. The independent mixed-precision probe reproduces B1 despite the green suites. Browser visual/production acceptance was not performed. Governance observation Inspected merged #1168's receipt and #1169's receipt: official App This PR now also has an official exact-head receipt, and The full local report contains the per-area evidence, complete deviation judgments, tests and next-batch proposal. That proposal requires owner approval: #7 cash-flow semantics; #8/#19 runtime-state reads; #9/#10 Q1 saved/platform comparison; #12 decisions; all class-C data prerequisites; LogsPage/BenchmarkPanel and fixture binding additions; mixed-currency freshness, unknown coverage and cross-date timestamp presentation. It authorizes no new source, collection, production read, backfill, execution or deployment. B1 must be fixed before accepting this batch. |
Normalized instants keep nonzero milliseconds, so lexical order is not chronological within a second (19:30:00.500Z sorted before 19:30:00Z). Order next-run candidates and the oldest stored observation by epoch time, keeping the target id only as an exact-tie breaker. Add known, partial, tie, offset, sub-second past-time and one-read regressions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tape entries and the tape's oldest observation were ordered as strings. Normalized instants keep nonzero milliseconds, so "…:00.500Z" sorted before "…:00Z", which put entries out of order within a second, made truncation drop the wrong entry, could pick the wrong Overview "newest five" and gave the wrong oldest observed_at. Both now sort by epoch time; the entry id still breaks an exact tie. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Normalized instants keep nonzero milliseconds, so the Overview last run, runs-today observation time and snapshot time now order by epoch time instead of string order. Exact ties keep their existing behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daily reader validates observed_at but returns it raw, so whole and fractional seconds and UTC offsets mix. The runtime today summary as_of now picks the earliest epoch instead of the first string. Exact instant ties and values outside the reader's instant grammar keep the previous string pick; no time is invented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent re-review verdict: PASS WITH RESIDUALS Repository: QuantStrategyLab/QuantRuntimeSettings — PR #1170 This is an owner-requested independent session review, prepared for verbatim posting by the coordinator. It is not an official Codex GitHub App receipt or owner approval. Reviewer identity is authenticated separately by native governance. B1 and all four fix rounds: PASS.
The original round-1 probe exits 1 because its obsolete “known defect must reproduce” assertion now sees actual equal expected. A separate post-fix expectation version passes the original validator → summary → schedule chain, including partial coverage, default-output control, one-read semantics and midnight controls. B1 no longer reproduces. I independently restored each former comparison in a throwaway exact-head copy. Nine experiments failed at their corresponding regression assertions: both schedule selectors, both tape selectors, tape rendering, all three Overview selectors and operations Performance ordering: ACCEPTED RESIDUAL, not blocking this batch. performance.js:202 still selects a newest observation lexically. Synthetic qualified inputs reproduce the wrong equity/four-risk observation and a one-second stale-age discrepancy. However, the current stored-history reader sets Other report-only sites remain separately scoped: runtime-instance Full-diff scope: PASS. Exactly the same approved 16 files. Fix rounds touch only six of those files. Full source/test/documentation diff reviewed; all 45 generated frontend assets, HTML and build identifier independently rebuilt and byte-equal to tracked output. No schema/fixture/lockfile, new source, flow wiring, collection, authority or execution change. Diff whitespace and inspected secret/resource patterns pass. Actual validation: PASS for Carried residuals: LogsPage still omits candidate status/coverage/age and uses a separate snapshot; BenchmarkPanel still conflates intentionally unrequested comparison with failure/loading; mixed-currency aggregate freshness remains limited; cross-date timestamp presentation and UTC/NY overlap documentation need clarification. Unknown schedule coverage denominator remains an optional decision. Production schedule/history/flow/count/age evidence remains unverified. Round-1 deviations 0–6 remain accepted with these limits. The refreshed next-batch draft carries all prior contract decisions and evidence prerequisites, adds Performance and other timestamp investigations, and remains a proposal requiring owner approval. It grants no production read, collection, backfill, notification, execution or deployment authority. No current-head hosted CI or official App review state was re-read here; prior-head statuses are not reused as proof. Native R2 governance and required checks remain separate. No remote write, label, issue edit, merge or deployment was attempted. Full report: |
Owner merge approval (recorded by coordinator)The repository owner approved merging this PR in the coordinator chat on 2026-11-14 19:14 SGT, after the independent re-review returned PASS WITH RESIDUALS with zero blocking findings for this exact head.
Recorded by Muse (coordinator agent) on the owner's instruction. The |
|
@codex review The head has advanced through four bounded fix rounds since the last review (current |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…#1171) * fix(desk): complete S2 desk observation, freshness and next-run fixes Completion round for the SAME-S2 Desk corrections (review of #1170). - Performance: the last qualified day's observation is the chronologically newest normalized instant, not the lexically last string; a missing or unusable instant still leaves no time basis. - Overview: displayed-observation freshness no longer depends on aggregatability. Mixed-currency cohorts keep unavailable totals (no FX) but report the displayed facts' age. The degraded golden changes accordingly. - Logs: the next-run line keeps status, coverage, the stored observation instant and stale age; a passed candidate expires on a local clock; times carry their UTC date across UTC midnight. The page keeps one ribbon read per open and makes no added read. - TopBar: a next run on another UTC day shows its UTC date. - Contract: correct the UTC-day/NY-day overlap statement and make the todaySummary compatibility claim precise (shape unchanged, values intentionally corrected). Comment-only change in operations.js. The BenchmarkPanel state item is not included: it needs a PerformancePage.tsx change outside the approved binding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(desk): report unrequested benchmark reads as not requested A live Performance page never reads the benchmark source, yet it reported that intentional non-read as "failed" (fetch-failed copy beside the contained copy) and briefly as "loading". - Add a `not_requested` BenchmarkState; loadBenchmarks returns it when the source allows no read, without calling the API. - The page starts in `not_requested` and sets `loading` only when a read will be made; PerformanceView shows a disallowed source as `not_requested` whatever state it holds. - BenchmarkPanel renders `not_requested` with the contained copy only. - Tests cover live/mock phases, both languages, and the unchanged zero-call and single api.benchmarks( pins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
AI assistance
Claude Code, model Claude Opus 5.5 (
claude-opus-5-5), working as the single implementing writer for the SAME-S2 batch against an independent audit (sections 2, 3, 4 and 6).What changed
Block 1: shared completeness (#2/#3/#4).
todaySummary(application/console_api/operations.js) now keeps the runtime-daily reader's ownread_summary.statusdecision. An accepted projection whose outer read is incomplete stayspartial/incomplete, so it can no longer become a known-nulllast_runor a covered zero. Legacy bodies withoutread_summarykeep the existing reconstruction, which now also checks the record's own incompletekind/status. A missing or malformedread_summaryon a body that does carry the field counts as incomplete.Block 2: coverage, failure reasons, observation time (#3/#23/F1).
runsTodaykeepsread_failedas its own outcome: a summary of only failed rows isunknown/read_failed. It is neversource_unavailableand never verified-empty. Mixed coverage recordsread_failedamong the coverage reasons.runRowCoveredno longer treats a missing weekend record (non_trading_weekend) as covered, so the tape is never verified-empty on that basis.as_ofof every record that was read, stale incomplete ones included. The tapeobserved_atno longer falls back to request time; without a stored instant it isunknown/time_basis_unavailable.unavailable. Totals are unchanged: no partial or stale facts become a total.Block 3: presentation (#4/F2/F3). Recent Signals shows the newest five runs, newest first. A loading ribbon shows a loading note instead of "no signals". A populated partial or stale list keeps its coverage or age note. A stale NAV is marked stale on the figure and shows its stale label and age.
Block 4: Performance (F4/F5). The minimum-set metadata is now always rendered: requested window, first stored date, portfolio and per-target return basis, and the truncation note. This applies whether or not a curve exists. The live N1 path never calls
api.benchmarks()(/api/market-benchmark/performance), even when a curve becomes available. The gate isbenchmarkReadAllowed(source), true only for fixture (mock) pages. Live pages show a note that the comparison is not read.Block 5: #6 option 1/1a, next scheduled observation.
todaySummary(..., { schedule: true })is an explicit opt-in that addsschedule(state,business_date,timezone,next_due_at) to each row. The default output is unchanged.worker.jsonly passes the option throughdeskN1Deps().runtimeDay: no interception, no wrapping, no second read.nextScheduledRunreturns:next_due_atis still after request time;runs_today.expected/pendingstay null.docs/desk-n1-read-projection-contract.md.Bound files changed (16):
web/strategy-switch-console/application/console_api/operations.jsweb/strategy-switch-console/application/desk/overview.jsweb/strategy-switch-console/application/desk/ribbon.jsweb/strategy-switch-console/worker.jsweb/strategy-switch-console/frontend/src/desk/DeskApp.tsxweb/strategy-switch-console/frontend/src/desk/shell/DeskShell.tsxweb/strategy-switch-console/frontend/src/desk/shell/TopBar.tsxweb/strategy-switch-console/frontend/src/desk/pages/OverviewPage.tsxweb/strategy-switch-console/frontend/src/desk/pages/PerformancePage.tsxweb/strategy-switch-console/frontend/src/desk/i18n/en.tsweb/strategy-switch-console/frontend/src/desk/i18n/zh-CN.tsweb/strategy-switch-console/v2_asset_map.js(regenerated bynpm run build+npm run sync:v2-assets, not hand-edited)docs/desk-n1-read-projection-contract.mdtests/runtime_today_incomplete_validation.mjstests/desk_n1_projection_validation.mjstests/console_desk_n1_validation.mjsHow verified
Dependencies installed with
npm ciinweb/strategy-switch-console/andweb/strategy-switch-console/frontend/.package.jsonand the lockfiles are unchanged.node --experimental-strip-types tests/console_desk_overview_validation.mjsnode tests/runtime_today_incomplete_validation.mjsnode tests/desk_n1_projection_validation.mjsnode --experimental-strip-types tests/console_desk_n1_validation.mjsnpx tsc --noEmit -p web/strategy-switch-console/frontendnpm run build --prefix web/strategy-switch-console/frontendnpm run sync:v2-assets --prefix web/strategy-switch-console/frontendnode tests/console_v2_assets_validation.mjsnpm run test:operations --prefix web/strategy-switch-consolenpm run check:style-guards --prefix web/strategy-switch-console/frontenddisplay_names,candidate_readiness,acceptance_budget,kv_directory,source_quota,current_strategies_kv_dedup,inbox_requests,v2_i18n,account_state,catalog_release,presentation,strategy_display_identitynode tests/strategy_switch_worker_validation.mjs--experimental-default-type, which local Node 24 rejects)fe8a_runtime_today,runtime_today_request_reuse,runtime_daily_worker,runtime_daily_multi_target,runtime_daily_health_integration,console_api_worker,console_grouping_runs,console_gap_contract,console_design_apipython3 scripts/check_style.py;build_display_names.py --check;build_config.py --check;runtime_settings.py validateCould not pass locally:
node tests/console_deploy_safety_validation.mjsfails atgit merge-base --is-ancestor 9722414a…because this checkout is shallow and lacks that release-source commit. That is environmental and unrelated to these files. CI with full history is authoritative.Why
The independent audit found that
todaySummarydiscarded the reader's completeness decision, that a missing weekend record and failed-only summaries were misreported, and that tape freshness substituted request time. It also found that Overview dropped newest-signal order, loading, partial/stale and stale-NAV qualifications, that Performance hid its minimum-set metadata and held a latent non-approved benchmark read, and that available schedule evidence was lost before the Ribbon. The owner approved this file binding and #6 option 1/1a on 2026-11-14.Risk
externalFlowstays unwired), [codex] Improve open source documentation governance #8/Allow LongBridge and IBKR multi-market strategies #19, Add authenticated strategy switch console #9/Support GitHub organization admin access #10, Refine strategy switch console options #11, Simplify strategy switch auth controls #12, Guard strategy choices by account domain #18, Harden and polish strategy switch console #21 and Read current strategy status concurrently #28.todaySummaryoutput is unchanged without the opt-in; the N1 schemas and golden fixtures are unchanged.LogsPage.tsx(unbound) prints any non-unknownnext_runwithout its read status. Instead of changing it or its pinned wiring test, the boundlogs.runs.nextcopy now reads "Earliest observed scheduled run …", which is true for known, partial and stale reads. Showing the stale age and partial coverage on Logs needs a later binding.unavailableas before; the golden fixture outside this binding pins it.risk-gateis authoritative; no changed path is in the governancer2_paths.🤖 Generated with Claude Code