Skip to content

fix(audit): bind history to query and credential lifetimes - #3345

Open
Chris0Jeky wants to merge 8 commits into
mainfrom
audit/3344-audit-read-ownership
Open

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

Conversation

@Chris0Jeky

@Chris0Jeky Chris0Jeky commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Closes #3344. Related residual: #3352.

Summary

Binds the one shared Activity history surface to one current query and session lifetime:

  • board, entity and user reads share one latest-request owner;
  • a newer query retires every older query kind from committing entries, error, toast, loading or final state;
  • identity/auth/demo replacement clears history;
  • same-user token rotation preserves settled history and suppresses old-token settlement;
  • an active empty query restarts under the new token with its exact board/entity/user parameters and limit;
  • loaded history is not refetched merely because the token changed;
  • no mutation is replayed.

Test-first evidence

Initial test-only head 3980e1e3e234a251cd89cad270b8d0ab86c3e5f2 produced five intended ownership failures. Review-regression head 93c20b679888394200354d80040e7f3c7dd5c353 ran canonical Ubuntu/Windows frontend qualification; Ubuntu JUnit recorded 7,156 tests, exactly 2 failures, 0 errors, both loaded-history preservation cases.

Issue #3352 added test-only head 85cf369ddd11dfe0a91052eb1523efbddf904a7c, covering token rotation during an empty initial history read. A dependency-free actual-module runner changed from one API call with loading false after rotation to two calls with old settlement suppressed and the fresh-token result installed.

Supplemental execution does not replace hosted project qualification.

Current head and remaining gates

Exact final head: 99bd34e749e995104032e9b4a5c54df875845d46

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 transport cancellation, API/DTO/route/schema/dependency/workflow or server-authorization change. Green CI is qualification evidence, not merge authorization.

@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-21T20:32:37.586097Z 4835ffe Manual request
ℹ️ 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: c4277303ec

ℹ️ 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".

}

function retryEmptyActiveRead(): void {
const retry = currentRead && entries.value.length === 0 ? currentRetry : null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Retry the active query despite retained prior rows

When board A's rows remain in entries while a request for board B is pending, a same-user token rotation makes this condition skip the retry solely because the old rows are nonempty. invalidateCurrentRead() then retires B's request, so its eventual result cannot commit; because handleFetchClick already changed the route and loading becomes false, the Activity surface indefinitely renders board A's audit rows under board B's selection. Track whether the retained rows belong to the active query, or retry every active read while preserving settled rows.

Useful? React with 👍 / 👎.

@Chris0Jeky
Chris0Jeky force-pushed the audit/3344-audit-read-ownership branch from c427730 to 4835ffe Compare September 21, 2026 20:16
@Chris0Jeky

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact current head 4835ffe against base fb830ed. This is the one current-head review request after the main-base requalification. Focus on the PR's changed ownership and stale-settlement behavior, and report only merge-blocking correctness or security defects.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 4835ffe048

ℹ️ 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".

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.

Activity history reads lack latest-query and credential ownership

1 participant