fix(gst): stabilize filed-return downloads and recovery#78
Conversation
This reverts commit 1644651.
|
@codex review Please review exact current head Please focus on singular/item result metadata versus plural results surfaces, multi-class surface recognition, complete labeled-period month validation, and the ownership split between DOM candidates and pure result identity parsing. |
There was a problem hiding this comment.
💡 Codex Review
When a results table includes both Return Filing Period (value Monthly) and a later Month/Tax Period column, this broad header match selects the cadence cell as the explicit period. resultRowPeriodMatch treats Monthly as an invalid explicit month, so the correct filed row is rejected even though the month column matches the target. Prefer Tax Period/Month over Return Filing Period, or exclude cadence headers from result-period identity.
ℹ️ 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".
|
@codex review Please review exact current head Please focus on semantic nested cards versus unlabeled section cards, labeled results-surface boundaries, incidental en-dash dates versus labeled FY evidence, and the split between DOM selection and pure identity parsing. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fd143c759
ℹ️ 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: 7059c58c18
ℹ️ 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: 0537507f74
ℹ️ 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: 73b299f0a8
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ab030fea7
ℹ️ 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".
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85b31b8357
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Stabilizes Pack's local-first GST filed-return download workflow across GSTR-1, GSTR-2B, and GSTR-3B, including target-bound portal navigation, captured artifact validation, staged fiscal-year ZIP reconciliation, durable recovery state, and a clearer accessible popup workflow.
This PR is ready for review, but it does not claim merge readiness or release readiness until GitHub Actions and current-head automated review complete.
Root Cause / Decision Record
Scope
Out of scope:
Pack Workflow Preflight
tapish-codex/pack-save-dialog-diagnostics, notmaster.fe74834d5f8fcb6a2f114d88f5bf2256703e22df.pnpm workflow:preflightwas run; its wrapper stalled locally, so the exact underlyingnode scripts/check-pack-workflow-preflight.mjsrepository check was run directly and passed againstmaster.Sanchika Adoption Gate
@sanchika/*package or sibling-repository source import was added.Privacy And Data-Flow Impact
Sensitive Surface Review
webRequest, native messaging, telemetry, backend behavior, or remote code was added.debuggerpermission.Chrome Web Store Impact
offscreenpermission is explicitly retained by user-approved design decision, documented in issue docs(privacy): approve narrowly scoped offscreen permission #79 and commite55bfed; it is used only for local artifact staging/ZIP assembly.Verification
Completed on the committed branch head before publication:
./node_modules/.bin/prettier --check ../node_modules/.bin/eslint . --max-warnings 0./node_modules/.bin/tsc --noEmit./node_modules/.bin/vitest run— 925/925 non-exporter tests passed; the known Chrome Web Store asset-exporter test passed separately with normal macOS Mach-service access, yielding 926/926 effective coverage onfe74834../node_modules/.bin/wxt buildnode scripts/verify-extension-package.mjs .output/chrome-mv3node scripts/verify-extension-browser.mjs .output/chrome-mv3git diff --checknode scripts/run-dependency-audit.mjs— no known vulnerabilities.pnpm exec wxt zipandnode scripts/verify-extension-zip.mjs— intentionally not run; this is not a release lane.Artifact Evidence
.output,.wxt, ZIPs, downloads, browser profiles, screenshots, and live evidence are excluded from commits.downloads,offscreen,scripting, andstorage; optional permissions are empty and no debugger permission is present.Exploratory Live Evidence Boundary
Redacted exploratory outcomes supported the implementation and regression loops, including successful full-year runs for the supported formats on the tested build. These runs do not establish formal release readiness, clean-profile evidence, browser-restart durability, or Store readiness.
No raw portal evidence or sensitive taxpayer/session/download data is included.
PR Review Follow-Up
ab36980; durable pre-export ledger and resume regression.ab36980; cleanup precedes destructive recovery-state removal.e55bfed; exact manifest/package verification.d4a139a; all captures use the extension-private result path.ab36980; missing staging remains an explicit retry target.ab36980; ZIP failures retain resumable OPFS staging.d4a139a; direct capture path preserves reviewed XLS/XLSX extension.d4a139a; durable completion precedes OPFS clear, with call-order regression.d4a139a; chunk accumulator and transfer protocol removed.d4a139a; nowindow.postMessageartifact transfer; regression asserts zero page messages.d4a139a; same-scope retained ZIP summary survives generic ledger summarization.e3985ad; retained staging keeps ledger ownership across scope changes.e3985ad; durabledownloaded-cleanup-pendingphase remains blocked until OPFS clear succeeds.e3985ad; target review ownership is checked before every normal start.e3985ad; portal-independent ZIP/cleanup retry is enabled and scope-locked in the popup.e3985ad; staged artifact signals prevent implicit ledger replacement.ec44b7f;export-pendingis persisted as blocked before the final browser download.ec44b7f; local durable phase reconstructs cleanup-only recovery without session state.ec44b7f; portal-independent retry uses an explicit signal allowlist.ec44b7f; zero-artifact reconciliation never starts or reports a ZIP download.ec44b7f; durable export phases reconstruct restart recovery from local storage.ec44b7f; legacy staged signals retain ownership until cleanup.ec44b7f; current-state and retry paths prioritize unresolved target review.df7eb5d; rejection clears the ephemeral staged ledger before offscreen close.df7eb5d; GST origin evidence is required before observation or trusted-ID promotion.df7eb5d; the live-evidence type and validator share the supported endpoint class.df7eb5d; action and data rejection signals use the actual target return type.1f11562; validator and template enforce runtime diagnostic families.a0ac796; untrusted blob/data events cannot be observed or promoted by origin alone.a0ac796; confirmed ZIP plus retained staging remains blocked.a0ac796; synchronous throws settle through the complete restore path.1f11562; each downloaded target requires a downloaded evidence entry.6a695f5; exact-click and derived-object binding leaves delayed prior page downloads untouched.6a695f5; the executor adds bounded restoration headroom with a deadline regression.daa2ad3; unique periods, artifact identities, and action IDs are required.daa2ad3; unknown is invalid for downloaded or pass evidence.6a695f5; resume confirmation overrides running status unless a live run signal exists.6a695f5; matching reviews clear during retry while unrelated reviews retain ownership.6a695f5; stale summaries are discarded and the incomplete/cleanup step is persisted.daa2ad3; pass evidence rejects unresolved per-download statuses.acd974d; exact-click fetch/XHR response blobs retain causality through their asynchronous handoff and restore cleanly.6a9bc81; generator and validator require distinct PDF and Excel proof for every downloaded period.acd974d; canonical full-year scope renders one-ZIP completion copy.acd974d; durabledownload-startedstate is persisted after the browser download ID and before observation.5a2b1e1; GSTR-2B reuses the shared scoped pending-search state and generic wait signal.5a2b1e1; the runner enters detail readiness through the shared navigation contract.5a2b1e1; dashboard search pending uses the portal-navigation settle cadence.5a2b1e1; readiness and capture share the server-config scope guard.ffe3bc4; all remaining local paths and the protected logout route were replaced with redacted classifications.589b19a; both DOM worlds select and verify the blank placeholder before Search.589b19a; markers include FY/period scope and clear after filter changes.a3a10d9; the listener precedes popup navigation and accepts only the exact extension worker.0057f21; all-not-filed passes emit no fabricated downloaded rows and counts reconcile exactly.0057f21; templates use capture-first portal endpoint/path classes.d1f8c82; only an exact FY/period search marker can release the target-bound View, and unscoped rows fail closed.556557e; waiting, unavailable, and thrown outcomes clear the same-scope isolated marker.d1f8c82; server scope, labelled scope, or exact visible statement identity is required; incidental and ambiguous text fails closed.52f6fd2; visible labels and structured statement identity can no longer be bypassed by server scope.52f6fd2; replacement, mutation, stable-observation, no-result expiry, and hard-timeout regressions pass.52f6fd2; GSTR-1 and GSTR-2B flows retain their exact scope IDs.4f2d1e7adds the exact download-started/unconfirmed regression.4f2d1e7; opaque durable ownership is written before staging and cleared across success, failure, abandonment, and explicit reset.4f2d1e7; unchanged controls route to explicit recovery while genuinely mutated results use bounded settlement.d0d9fe0; the same pre-Search View node is never auto-released, regardless of nearby mutations.d0d9fe0; the origin-wide Downloads API cancellation listener was removed.d0d9fe0; safe opaque IDs are cleared first and unsafe malformed records fail closed.d0d9fe0; cleanup-failed ZIPs cannot create or complete a generic manual review.d0d9fe0; explicit non-artifact data/Blob/fetch/XHR content stays in the page world.20a25ec; octet-stream workbooks require XLS/XLSX byte validation and GSTR-2B structure checks.20a25ec; hidden/template controls fail the shared visibility guard.20a25ec; retained cleanup IDs block before lease acquisition or ledger writes.20a25ec; only the exact synchronous HTTPS anchor action is suppressed; no global listener.e089a7b; portal handlers run while native navigation is suppressed, with propagation and dispatch-result regressions.e089a7b; visible-only local text and sibling scoping prevent unrelated View activation.e089a7b; every malformed stored ledger blocks replacement and explicit reset clears extension-private staging safely.e089a7b; captured blob URLs retain exact-action binding through delayedwindow.open.e089a7b; durable per-artifact signals survive the running-state persistence boundary.7c48841; one target-bound fallback, no-details guard, and recursion guard regressions.5ad5f6c; manifest-only demo and explicit synthetic-download action with truthful browser completion checks.7c48841; README records the opaque, short-lived, non-sensitive ledger identifier.7c48841; supported-value validation and typo regression.7c48841; only an explicitly approved pending retry bypasses other blocked targets.56b8ad3; text-aware target-scoped settlement, bounded same-scope trust, and explicit retry for unchanged ambiguous results.56b8ad3; labeled period/FY conflict checks preserve unrelated filing-date text and debugger re-resolution.f7e797f; every labeled period is evaluated, recognized cadence values are ignored, and explicit conflicts or malformed labels fail closed.f7e797f; slash/hyphen/en-dash FY values are canonicalized and conflicting, mixed, or malformed values are rejected.f7e797f; row candidates retain filter-bound provenance across auto-click expiry and debugger re-resolution.90b7120; structural resolution uses the outermost single-View card before identity validation.90b7120; full-row evidence overrides a matching dedicated FY cell.90b7120; a GSTR-1-only content-world marker is required before trusted input.90b7120; full-row period conflicts and malformed labels fail closed.90b7120; every parsed GSTR identity must belong to the requested return.90b7120; visibility walks the complete ancestor chain.90b7120; quarterly conflicts with monthly GSTR-1 while exact GSTR-3B cadence remains supported.ae39057; accepted month aliases are tokenized while conflicting months fail closed.ae39057; bare date continuations are ignored while labeled malformed FY evidence is rejected.ae39057; semantic cards and established cards stop before surrounding results surfaces.ae39057; protocol v31 forces reinjection of already-open stale content scripts.6154a95; candidate item/card/row metadata is distinct from exact plural results-surface names.6154a95; every month in the complete bounded field value is validated without a length cap.4fd143c; incidental en-dash dates are excluded while labeled malformed FY remains fail-closed.4fd143c; unlabeled section cards contribute identity around non-semantic View wrappers.0537507; semantic outer-card, hidden-ancestor, and GSTR-2B quarter-conflict regressions.73b299f; cleanup-only retry, stale OPFS signal removal, protocol-v31 response ownership, and fake-window document support.4ab030f; exact GSTR-1 option identity, timer-to-microtask action binding, and conflicting GSTR-2B statement rejection.3f1913a; finally cleanup, truthful cleanup failure, owned stale-sentinel recovery, and foreign sentinel preservation.3f1913a; timeout vetoes generic fallback and persists explicit target review.3f1913a; local mark/cancel/reset remains visible while portal-dependent destructive restart stays disabled.3f1913a; PDF+Excel scope remains bound and incomplete ZIPs cannot be manually completed.3f1913a; no-details evidence overrides coincident timeout review classification.85b31b8; explicit recovery owns partial as well as blocked summaries.85b31b8; durable download-started phase is independently portal-free.85b31b8; retained OPFS ownership blocks a new run until explicit local-data cleanup instead of repeating portal work.fe74834; README, privacy QA, and publication readiness distinguish transient ZIP memory from recoverable temporary OPFS source staging.All 125 inline review threads currently present were validated, answered with evidence, and resolved across both GraphQL pages. Five local Codex review/rectify passes were completed before commit for this privacy batch; each finding was validated against runtime truth, and the final checklist inconsistency was fixed within the configured cap. Final verification on
fe74834covered 926/926 effective tests, dependency audit, formatting, lint, TypeScript, WXT build, package verification, manifest inspection, and diff checks. Review-thread inspection is paginated because this PR exceeds 100 threads. A fresh exact-current-head Codex review is still pending and required before merge readiness is claimed.Screenshots
Not included. GST Portal screenshots and raw live evidence are intentionally excluded by the repository privacy protocol.
DCO
Some commits include
Signed-off-bytrailers, but this PR does not claim that every historical commit in the accumulated branch satisfies DCO until the repository check confirms it.