Skip to content

fix(metrics): bind reads to lane and credential lifetimes - #3347

Draft
Chris0Jeky wants to merge 8 commits into
mainfrom
audit/3346-metrics-read-ownership
Draft

Chris0Jeky wants to merge 8 commits into
mainfrom
audit/3346-metrics-read-ownership

Conversation

@Chris0Jeky

@Chris0Jeky Chris0Jeky commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Closes #3346. Related residual: #3352.

Summary

Gives board metrics and forecast independent latest-request owners:

  • newer metrics requests retire only older metrics work;
  • newer forecast requests retire only older forecast work;
  • identity/auth/demo replacement clears both surfaces;
  • same-user token rotation preserves settled dashboard data and suppresses old-token settlement;
  • active null metrics/forecast lanes restart under the new token with the exact captured query;
  • loaded lanes are not refetched merely because the token changed;
  • current failures preserve prior results and existing error/toast/rejection behavior;
  • no mutation is replayed.

Test-first evidence

Initial test-only head 46314c2ec9567cb8eee77ef1eb3bb14d57a440f4 produced 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 on main to all seven original schedules passing after correction.

Loaded-data review-regression head f9f6bc9479ec7d211077b545be95a64cf63e65ae isolated the false-empty reset. Corrected head 8f31b2b72e6941b5e77ab730aea34da8da75e9af passed 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: e57375ebcc7a1528e6f01018ec30a4e9a992b729

Keep 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.

@Chris0Jeky
Chris0Jeky marked this pull request as ready for review September 21, 2026 16:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T17:29:39.629395Z 8f31b2b Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread frontend/taskdeck-web/src/store/metricsStore.ts Outdated
@Chris0Jeky
Chris0Jeky marked this pull request as draft September 21, 2026 16:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Chris0Jeky
Chris0Jeky marked this pull request as draft September 21, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending

Development

Successfully merging this pull request may close these issues.

Metrics and forecast reads lack request and credential ownership

1 participant