Skip to content

fix(recovery): reconcile completed acquisition checkpoints - #117

Merged
lamemustafa merged 14 commits into
masterfrom
tapish-codex/durable-acquisition-reconcile
Aug 2, 2026
Merged

fix(recovery): reconcile completed acquisition checkpoints#117
lamemustafa merged 14 commits into
masterfrom
tapish-codex/durable-acquisition-reconcile

Conversation

@lamemustafa

@lamemustafa lamemustafa commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

PR #117 ships the verified core: startup and popup-summary reconciliation of exact, checkpoint-backed browser completions. It deletes the entire durable completion-marker family.

Root Cause / Decision Record

  • The per-target marker's pre-start consumer and scanner lease-release consumer were both removed in earlier rounds. Its remaining summary rewrite could surface unrelated historical completion state, worse than master.
  • Checkpoint inspection remains the only proof path: canonical target ownership, an exact browser download ID, completed state, non-empty file, and safe danger classification.
  • Legacy pack:filed-returns-target-review:completion:* keys are deleted at reconciler installation. Cleanup creates no state and leaves no record behind.
  • Harden corrupted durable completion marker recovery with a reachable exit #120 is closed as moot because the marker family no longer exists. #121 tracks any future browser-restart/update proof design, including a per-target read, fail-closed start boundary, and its own live QA.
  • #122 tracks the separate prior-round cancellation/component-selection regressions; it receives no mechanism in this final deletion round.

Scanner Record Model

The scanner upgrades proven completions; it does not own the recovery surface. Legacy :completion:* keys are startup-deleted only and are not scanner records.

Checkpoint inspection Scanner action
Canonical, allow-listed, target-owned download-observing checkpoint with exact ID and complete, non-empty, danger-safe browser item Mark matching target review, persist completion summary, clear matching checkpoint, then clear that review at its expected revision.
Any other checkpoint state, malformed/noncanonical data, ownership mismatch, incomplete/unsafe/empty browser item, or read failure Not this scanner's concern; surfaced by next-run reconciliation.

Scope

  • Runtime: checkpoint-only completion reconciliation and startup deletion of legacy marker keys.
  • Tests: verified checkpoint recovery, legacy-key cleanup at worker startup, Clear local without marker handling, and disclosure coverage.
  • Docs/governance: remove obsolete marker storage disclosures and update this record model.
  • Explicitly out of scope: durable proof across a browser restart or extension update (Design durable completion proof across browser restart or extension update #121), portal QA, permissions/hosts/CSP, and release readiness.

Pack Workflow Preflight

  • pnpm workflow:preflight passed on the committed final head before push.
  • This PR was opened from a Pack branch, not master.
  • I checked latest master Pack AGENTS guidance or recorded the stale-guidance warning.
  • PR body keeps the required Pack privacy/review/verification checklist visible.

Sanchika Adoption Gate

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

Privacy And Data-Flow Impact

  • No new browser permissions, host permissions, network calls, analytics, telemetry, ads, or session replay.
  • No credential, OTP, CAPTCHA, cookie, token, GST file, or taxpayer-data capture.
  • README and Privacy QA remove the deleted key family and accurately disclose the surviving base target-review completion proof.
  • Legacy cleanup only deletes matching local keys; it does not persist a replacement record.

Sensitive Surface Review

  • Current tab / portal target binding is unchanged.
  • Download completion remains evidence-backed and fail-closed: exact ID, terminal complete, non-empty, and danger-safe.
  • Ambiguous or unproven checkpoints remain untouched for the existing next-run guard; reconciliation does not repeat a portal action.
  • Service-worker recovery is checkpoint-only; no durable marker is read or written.
  • Real taxpayer data, local paths, raw URLs/referrers, and portal HTML are absent from the diff.

Chrome Web Store Impact

  • This PR does not expand the Chrome Web Store V0 listing.
  • Full fiscal year remains source-build alpha and is not part of the Chrome Web Store V0 listing.
  • README and Privacy QA were reviewed for the storage-behavior change.
  • CI ZIP creation, provenance, and protected publishing remain release evidence, not manual store-submission sign-off.
  • PR title uses Conventional Commits so Release Please can bump Pack after merge.

Verification

  • pnpm install --frozen-lockfile not run; dependency graph unchanged.
  • pnpm audit --audit-level high not run; dependency graph unchanged.
  • pnpm exec wxt prepare not run separately; WXT build passed.
  • pnpm exec prettier --check .
  • pnpm exec eslint . --max-warnings 0
  • pnpm exec tsc --noEmit
  • pnpm exec vitest run run twice; each exposed only the known missing-local-Chromium asset failures but did not emit an aggregate footer.
  • Focused final-core suite: 5 files / 75 tests passed.
  • pnpm exec wxt build
  • node scripts/verify-extension-package.mjs .output/chrome-mv3
  • pnpm exec wxt zip release-only, not run.
  • node scripts/verify-extension-zip.mjs release-only, not run.
  • node scripts/write-release-provenance.mjs release-only, not run.
  • GitHub release-asset verification and Chrome Web Store dry-run are release-only, not run.
  • git diff --check
  • pnpm review:gate is not a release/readiness claim.

Artifact Evidence

  • Clean source head: 2b4077fd87697c4ab9895d55881f618382717e82.
  • Built directory: /Users/tapishkhandelwal/Desktop/dev/pack-wt/durable-acquisition-reconcile/.output/chrome-mv3.
  • background.js SHA-256: c47da5a3f3e7a337f78dbdde501be3f3d5b4e6c62baeb4f0a14b687c7b817f68.
  • ZIP artifact: not produced; non-release change.

PR Review Follow-Up

  • GitHub Actions completed for the final pushed head.
  • Current-head review threads will be dispositioned after the final push.
  • No claim of review cleanliness is made.
Thread/comment Disposition Commit or evidence
Seven prior review threads Resolved Marker-only reports are obsolete after 2b4077f; two independent prior-round regressions are tracked in #121 and #122.

Screenshots

Not applicable; no UI change.

DCO

  • Commits include Signed-off-by: trailers.

Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>
@lamemustafa
lamemustafa marked this pull request as ready for review August 1, 2026 17:50

@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: 6b7bc881d1

ℹ️ 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-durable-download-reconciler.ts Outdated
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

@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: 3b3eb6f8ab

ℹ️ 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-acquisition-state.ts Outdated
Comment thread src/background/filed-returns-durable-download-reconciler.ts Outdated
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

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

ℹ️ 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-active-run.ts Outdated
Comment thread src/background/filed-returns-durable-download-reconciler.ts Outdated
Comment thread src/background/artifact-acquisition-state.ts Outdated
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

@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: 8239e06c92

ℹ️ 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/artifact-acquisition-state.ts Outdated
Comment thread src/background/filed-returns-durable-download-reconciler.ts Outdated
Comment thread src/background/filed-returns-durable-download-reconciler.ts Outdated
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

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

ℹ️ 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-active-run.ts Outdated
Comment thread src/background/filed-returns-durable-download-reconciler.ts Outdated
Comment thread src/background/artifact-acquisition-state.ts
Comment thread src/background/filed-returns-durable-download-reconciler.ts
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

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

ℹ️ 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/background/filed-returns-current-state.ts Outdated
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

@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: 5e876817f8

ℹ️ 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-current-state.ts Outdated
Comment thread src/background/filed-returns-current-state.ts Outdated
Comment thread src/background/filed-returns-single-period-flow.ts Outdated
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

@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: 3c4f17adc0

ℹ️ 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-single-period-flow.ts Outdated
Comment thread src/background/filed-returns-target-review.ts Outdated
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

@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: 3923d98e0b

ℹ️ 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/filed-returns-single-period-flow.ts Outdated
Comment thread src/background/filed-returns-target-review.ts Outdated
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

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

ℹ️ 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/background.ts Outdated
Comment thread src/entrypoints/background.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: 8c80102ab5

ℹ️ 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/filed-returns-durable-download-reconciler.ts Outdated
Comment thread src/background/local-data.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: ef9d816337

ℹ️ 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 Outdated
Comment thread src/background/filed-returns-target-review.ts
Comment thread src/background/artifact-acquisition-state.ts
Comment thread src/background/local-data.ts Outdated
Comment thread src/background/filed-returns-full-fiscal-year-staging.ts
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

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

ℹ️ 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/artifact-acquisition-state.ts
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>

@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

const missingArtifactTypes = concreteFiledReturnsArtifactTypesForSelection(
scope.returnType,
scope.artifactType,
).filter(

P1 Badge Admit JSON staging failures into durable signals

For a GSTR-2B all-formats fiscal-year target with JSON missing, this selection-aware enumeration emits full-fiscal-year-artifact-not-staged:JSON, but isDurableFiledReturnsSignal still accepts that signal only for PDF or Excel. markFullFiscalYearTargetTerminal therefore replaces the target's staged-artifact evidence with filed-return-durable-status-rejected; an approved retry sees no retained PDF/Excel progress and selects PDF again, repeating an already staged acquisition. Extend the durable missing-artifact signal family to the canonical JSON-inclusive selection.

AGENTS.md reference: AGENTS.md:L41-L47

ℹ️ 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
@lamemustafa
lamemustafa merged commit 61b63fd into master Aug 2, 2026
11 of 14 checks passed
@lamemustafa
lamemustafa deleted the tapish-codex/durable-acquisition-reconcile branch August 2, 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