Skip to content

fix(recovery): retain acquisition checkpoints - #126

Merged
lamemustafa merged 13 commits into
masterfrom
tapish-codex/recovery-scanner-ownership
Aug 4, 2026
Merged

fix(recovery): retain acquisition checkpoints#126
lamemustafa merged 13 commits into
masterfrom
tapish-codex/recovery-scanner-ownership

Conversation

@lamemustafa

@lamemustafa lamemustafa commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

Restores fail-closed ownership for artifact-acquisition checkpoints: the global download reconciler no longer consumes them into a singleton session summary.

Root Cause / Decision Record

  • Checkpoints are target-scoped, but the session flow summary records only one target.
  • A later global scan could replace that summary after clearing the prior target's checkpoint, leaving that target repeatable.
  • MV3 worker globals cannot provide restart-safe ownership, so a transient live-ID set cannot solve the persistence mismatch.
  • The minimal safe correction is to retain every acquisition checkpoint for the existing target-scoped foreground guard. Durable automatic completion remains deferred to Design durable completion proof across browser restart or extension update #121.

Scope

  • Runtime: remove scanner-side acquisition-checkpoint consumption and its orphaned enumeration helpers.
  • Tests: prove repeated global scans preserve multiple exact-ID checkpoints and direct artifacts do not join the global observer registry.
  • Explicitly out of scope: fiscal-year acquisition, portal selectors, permissions, storage schema, durable automatic completion, and public copy.

Pack Workflow Preflight

  • node scripts/check-pack-workflow-preflight.mjs passed on the committed branch.
  • This PR is opened from a Pack branch, not master.
  • Latest master Pack AGENTS guidance was reviewed before implementation.
  • PR body keeps the required Pack privacy/review/verification checklist visible.
  • pnpm workflow:preflight is blocked locally because pnpm cannot verify its registry signature; the underlying repository script passed.

Sanchika Adoption Gate

  • This PR does not consume @sanchika/* packages or copied Sanchika guidance.
  • This PR does not import parent or Sanchika source paths.

Privacy And Data-Flow Impact

  • No new browser permissions, host permissions, network calls, analytics, or telemetry.
  • No credential, OTP, CAPTCHA, cookie, token, GST file, or taxpayer-data capture.
  • Public copy and privacy declarations are unchanged.

Sensitive Surface Review

  • Exact-ID target binding and non-empty completion evidence remain required.
  • A retained checkpoint routes to the existing target-scoped foreground guard, which fails closed rather than repeating a portal action.
  • No taxpayer data, local paths, raw URLs/referrers, or portal HTML are in the diff.

Chrome Web Store Impact

  • No Chrome Web Store listing scope or full-fiscal-year claim changes.
  • PR title follows Conventional Commits.

Verification

  • Focused recovery and direct-delivery tests: 86 passed.
  • TypeScript, lint, formatting, WXT build, package verification, git diff --check, and the underlying workflow-preflight script passed.
  • Full Vitest: 102 files / 1,526 tests passed; two Chrome Web Store asset-export tests are blocked because this environment lacks the Playwright Chromium headless-shell executable.
  • Authenticated live QA remains pending; start the explicit live-evidence protocol before treating this runtime recovery change as release-ready.

Artifact Evidence

  • Build package policy verification: passed.
  • ZIP artifact: not applicable until CI completes.
  • Clean source head SHA: 2923025.

PR Review Follow-Up

  • The two P1 review threads were fixed, replied to, and resolved in 2923025.
  • Latest-head automated review and review gate are pending.
  • CI currently has a dependency-audit failure; it introduces no dependency change in this PR and needs separate dependency triage.
Thread/comment Disposition Commit or evidence
#123 fixed 2923025: two completed checkpoints remain target-bound across repeated global scans
#124 fixed 2923025: scanner no longer consumes foreground or recovered acquisition checkpoints

Screenshots

Not applicable: background recovery-only change.

DCO

  • Existing commit has no Signed-off-by trailer; this repository does not currently enforce DCO.

@lamemustafa

Copy link
Copy Markdown
Owner Author

@codex review

@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: 6068170218

ℹ️ 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 src/background/filed-returns-durable-download-reconciler.ts Outdated
Comment thread src/background/artifact-download.ts Outdated
@lamemustafa lamemustafa changed the title fix(recovery): preserve foreground and multi-target checkpoint proof fix(recovery): retain acquisition checkpoints Aug 4, 2026
@lamemustafa

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 2923025256

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

@lamemustafa
lamemustafa marked this pull request as ready for review August 4, 2026 06:54

@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: 2923025256

ℹ️ 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 src/background/filed-returns-durable-download-reconciler.ts
Comment thread src/background/filed-returns-durable-download-reconciler.ts
Comment thread src/background/filed-returns-durable-download-reconciler.ts
@lamemustafa

Copy link
Copy Markdown
Owner Author

@codex review

@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: e3a6f059e3

ℹ️ 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 src/background/artifact-acquisition-state.ts Outdated
Comment thread src/background/artifact-acquisition-state.ts Outdated
Comment thread src/background/filed-returns-flow-runner.ts Outdated
Comment thread src/background/filed-returns-flow-runner.ts
Comment thread src/background/filed-returns-flow-runner.ts

@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: 4ac93d3a96

ℹ️ 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 src/background/artifact-acquisition-state.ts Outdated
Comment thread src/background/artifact-acquisition-state.ts
Comment thread src/entrypoints/popup/recovery-actions.tsx Outdated

@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: 61b0cf94b6

ℹ️ 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 src/entrypoints/popup/run-summary.tsx
Comment thread src/background/filed-returns-flow-runner.ts
Comment thread src/background/artifact-acquisition-state.ts

@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: debf7ff786

ℹ️ 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 src/background/filed-returns-target-review.ts Outdated
Comment thread src/entrypoints/popup/run-summary.tsx
Comment thread src/background/filed-returns-target-review.ts Outdated

@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: 5156395fd0

ℹ️ 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 src/background/filed-returns-target-review.ts

@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: 2da593652b

ℹ️ 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 src/background/filed-returns-target-review.ts Outdated
Comment thread src/entrypoints/popup/run-summary.tsx Outdated

@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: c55f685b02

ℹ️ 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 src/background/artifact-acquisition-state.ts
Comment thread src/entrypoints/popup/run-summary.tsx
Comment thread src/entrypoints/popup/run-summary.tsx Outdated

@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: 512c55d486

ℹ️ 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 src/background/filed-returns-target-review.ts
Comment thread src/background/filed-returns-flow-runner.ts
@lamemustafa
lamemustafa merged commit 93171b4 into master Aug 4, 2026
11 checks passed
@lamemustafa
lamemustafa deleted the tapish-codex/recovery-scanner-ownership branch August 4, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant