fix(metrics): bind reads to lane and credential lifetimes - #3347
Chris0Jeky wants to merge 8 commits into
Conversation
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d7f451950
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f31b2b72e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
|
||
| watch( | ||
| () => session.token, | ||
| invalidateRequests, |
There was a problem hiding this comment.
Restart reads invalidated during token rotation
When a same-user session refresh occurs while the initial metrics/forecast load or a newly selected board/range load is pending, this watcher retires both owners and clears their loading flags, so their eventual results are suppressed. MetricsView.vue:86-92 only starts reads when the board or range changes, leaving either an empty dashboard or data from the previous filter displayed indefinitely under the new selection; in the latter case CSV export remains enabled for a query that does not match the rendered data. Fresh evidence beyond the earlier settled-data report is that the new refresh test preloads existing results before rotating the token, so it never covers a refresh while the desired read is still in flight. Restart the invalidated reads or otherwise preserve their ownership across same-user rotation.
AGENTS.md reference: frontend/AGENTS.md:L6-L6
Useful? React with 👍 / 👎.
Closes #3346. Related residual: #3352.
Summary
Gives board metrics and forecast independent latest-request owners:
Test-first evidence
Initial test-only head
46314c2ec9567cb8eee77ef1eb3bb14d57a440f4produced only the intended ownership failures after lint, typecheck, build and PWA validation passed. A bounded actual-module runner changed from only the independent-lane control passing onmainto all seven original schedules passing after correction.Loaded-data review-regression head
f9f6bc9479ec7d211077b545be95a64cf63e65aeisolated the false-empty reset. Corrected head8f31b2b72e6941b5e77ab730aea34da8da75e9afpassed Smart CI, Extended and the complete Required CI matrix.Issue #3352 then added test-only head
b7425560e7f3c90833dde8bc74d82543d39ff389, covering token rotation while metrics and forecast are still null. A dependency-free actual-module runner changed from one API call per lane with loading false to two calls per lane with old settlement suppressed and fresh results installed.Supplemental execution does not replace hosted qualification.
Current head and remaining gates
Exact final head:
e57375ebcc7a1528e6f01018ec30a4e9a992b729Keep draft until this exact head passes Smart CI, Extended and the complete Required CI matrix on Ubuntu and Windows, followed by fresh-context review.
No API, DTO, route, schema, dependency, workflow or backend change. Green CI is qualification evidence, not merge authorization.