refactor(downloads): isolate observation ownership - #234
Conversation
|
Codex Review: Didn't find any major issues. Breezy! 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". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48cde4b6c7
ℹ️ 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: a2a99ec489
ℹ️ 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".
f95ae3f to
7d35fc3
Compare
|
@codex review Please review the current exact head |
|
Codex Review: Didn't find any major issues. 👍 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". |
|
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
Addresses #172 by extracting the existing live download-ownership helpers into an import-free leaf. The observer and staged-ZIP module import the leaf directly; the durable reconciler re-exports the existing helper API and shares the same singleton sets.
Draft only. Authenticated live qualification is missing, and this PR is not merge-ready or release-ready.
Root Cause / Decision Record
Scope
Pack Workflow Preflight
pnpm workflow:preflightwas run before editing/push, or the skip reason is documented.Base:
214aabdf77dd3884a44db62878bab4345a2da970. Preflight passed before editing and was rerun after the initial commits.Sanchika Adoption Gate
@sanchika/*packages or copied Sanchika guidance, Iread
sanchika/docs/adoption-pack.mdin the coordinated parent worktree.and records the Sanchika commit or copied guidance used.
../sanchika,sanchika/packages/*/src, or parentsource paths.
The first two items are not applicable: no Sanchika consumption or copied guidance.
Privacy And Data-Flow Impact
No new capture or storage is introduced. Existing transient ownership state remains transient, and persisted checkpoints remain the recovery authority. Existing public claims are unchanged. Cycle diagnostics now use repository-relative paths.
Sensitive Surface Review
The extraction preserves the single shared ownership state used by the inline observer and durable listener. Focused tests cover claim-before-search, pending-ID races, and reconciliation after inline ownership ends. Mandatory local security/privacy review is being finalized on the exact head; authenticated live qualification is not performed.
Chrome Web Store Impact
docs/PUBLICATION_READINESS.mdis checked.No Store or public-copy change. No publication-readiness claim.
Verification
pnpm install --frozen-lockfilepnpm audit --audit-level highpnpm exec wxt preparepnpm exec prettier --check .pnpm exec eslint . --max-warnings 0pnpm exec tsc --noEmitpnpm exec vitest runpnpm exec wxt buildnode scripts/verify-extension-package.mjs .output/chrome-mv3pnpm exec wxt zipnode scripts/verify-extension-zip.mjsnode scripts/write-release-provenance.mjsnode scripts/verify-github-release-assets.mjs --tag <tag> --zip <zip> --checksum <sha256> --provenance <json>when release assets existnode scripts/publish-chrome-web-store.mjs --zip .output/<zip> --provenance .output/pack-release-provenance.v1.json --publisher-id <id> --dry-run truegit diff --checkpnpm review:gate -- --strict-head-review --wait-head-review-ms 180000before merge/readiness claim; a missing Codex review blocks readiness:Focused verification passed: four files, 88 tests. Type/lint/format checks were rerun after the test-only privacy correction. The final-head full suite passed: 126 files, 2123 tests. Build and package verification passed with the same runtime source. Final full-suite lines:
Mutation proof: each old import edge was restored separately and confirmed in source, then the entire five-test graph file was run. Each mutation produced exactly one intended cycle failure and four passing neighboring tests. Diagnostics contained repository-relative cycle paths. Both mutations were reverted before final verification.
Graphify refresh was unavailable because this checkout has neither graph data nor the referenced refresh script. The AST guard supplies the local structural proof; no graph artifact is claimed.
Release-only commands were not run locally. Hosted Pack CI passed its build, package, ZIP creation, exact-ZIP verification, and checksum steps. No authenticated live run was attempted. Exact-head external review and strict review-gate clearance remain missing; the ordinary hosted review gate passed without supplying that stricter evidence.
Artifact Evidence
11ccc05785f69e61cf7cd734fe59d24b9de472fc; ordinary review gate 32926694942 also successful. CodeQL, Conventional PR Title, and GitGuardian checks passed.11ccc05785f69e61cf7cd734fe59d24b9de472fc.PR Review Follow-Up
11ccc05785f69e61cf7cd734fe59d24b9de472fc; relative-path regression and both edge mutation runsExternal review has not yet occurred. The existing #172 remains the tracking issue. Missing authenticated live qualification and required exact-head review are explicit blockers to merge/readiness.
Screenshots
Not applicable: no UI change. Tests use synthetic fixtures only.
Post-update alias-guard follow-up
gh pr update-branchafter PR fix(recovery): restore initial observing summary outcomes #233 merged; this produced merge commit2a23683(no rebase, amend, or force-push).7ae790a2c477b0636a5dc58bd9b5329677f867f3(test(downloads): resolve configured background aliases).ts.resolveModuleName; resolved files outsidesrc/background/**are excluded.Review-thread disposition register (current head)
7d35fc3already requires bothimportClauseand at least one named binding; original thread resolved.7d35fc3already requires at least one named export; original thread resolved.7ae790auses the roottsconfigplusts.resolveModuleName, confines results tosrc/background/**, and the review thread is resolved.Verification (current head)
tests/background/background-module-graph.test.tshad exactly1 failed | 7 passed (8); the configured-alias cycle resolved tonull.return nullreproduced exactly1 failed | 7 passed (8); restoration produced1 passed (1)and9 passed (9), including both empty import/re-export regressions.pnpm workflow:preflight,pnpm exec tsc --noEmit,pnpm exec eslint . --max-warnings 0,pnpm exec prettier --check .,pnpm exec wxt build, andnode scripts/verify-extension-package.mjs .output/chrome-mv3.pgrep -f [v]itestprocesses); this is recorded as host state only and makes no timing or stability claim.This update is ready for a fresh exact-head review; no merge-readiness claim is made while hosted checks and that review are pending.