fix(state): reject duplicate metadata CAS keys (W33) - #54
Conversation
૮ >ﻌ< ა ci reviewran on e5d3656 — fix(runtime): bind checkpoint custody to active turn owners
|
| Package | Before | After |
|---|---|---|
| brace-expansion (nested under @electron/asar) | 1.1.12 |
1.1.18 |
| @electron/get | 2.0.3 |
5.1.0 |
| brace-expansion (nested under @eslint/config-array) | 1.1.12 |
1.1.18 |
| brace-expansion (nested under @eslint/eslintrc) | 1.1.12 |
1.1.18 |
| brace-expansion (nested under dir-compare) | 1.1.12 |
1.1.18 |
| electron | 40.10.2 |
41.10.3 |
| brace-expansion (nested under eslint-plugin-react) | 1.1.12 |
1.1.18 |
| brace-expansion (nested under eslint) | 1.1.12 |
1.1.18 |
| brace-expansion (nested under glob) | 1.1.12 |
1.1.18 |
| js-yaml | 4.3.1 |
4.3.2 |
| ➕ @electron-internal/extract-zip | — | 1.0.5 |
| ➕ env-paths (nested under @electron/get) | — | 3.0.0 |
| ➕ undici (nested under @electron/get) | — | 7.29.0 |
| ➖ semver (nested under @electron/get) | 6.3.1 |
— |
| ➖ @types/yauzl | 2.10.3 |
— |
| ➖ extract-zip | 2.0.1 |
— |
| ➖ fs-extra | 8.1.0 |
— |
| ➖ pend | 1.2.0 |
— |
| ➖ yauzl | 3.4.0 |
— |
| ➖ @vitest/expect | 4.1.10 |
— |
| ➖ @vitest/mocker | 4.1.10 |
— |
| ➖ @vitest/pretty-format | 4.1.10 |
— |
| ➖ @vitest/runner | 4.1.10 |
— |
| ➖ @vitest/snapshot | 4.1.10 |
— |
| ➖ @vitest/spy | 4.1.10 |
— |
| ➖ @vitest/utils | 4.1.10 |
— |
| ➖ vitest | 4.1.10 |
— |
| ➖ @vitest/expect | 4.1.10 |
— |
| ➖ @vitest/mocker | 4.1.10 |
— |
| ➖ @vitest/pretty-format | 4.1.10 |
— |
| ➖ @vitest/runner | 4.1.10 |
— |
| ➖ @vitest/snapshot | 4.1.10 |
— |
| ➖ @vitest/spy | 4.1.10 |
— |
| ➖ @vitest/utils | 4.1.10 |
— |
| ➖ vitest | 4.1.10 |
— |
| ➖ @vitest/expect | 4.1.10 |
— |
| ➖ @vitest/mocker | 4.1.10 |
— |
| ➖ @vitest/pretty-format | 4.1.10 |
— |
| ➖ @vitest/runner | 4.1.10 |
— |
| ➖ @vitest/snapshot | 4.1.10 |
— |
| ➖ @vitest/spy | 4.1.10 |
— |
| ➖ @vitest/utils | 4.1.10 |
— |
| ➖ vitest | 4.1.10 |
— |
scripts/whatsapp-bridge/package-lock.json
| Package | Before | After |
|---|---|---|
| @emnapi/runtime | 1.11.2 |
1.11.3 |
| @img/sharp-darwin-arm64 | 0.35.3 |
0.35.4 |
| @img/sharp-darwin-x64 | 0.35.3 |
0.35.4 |
| @img/sharp-freebsd-wasm32 | 0.35.3 |
0.35.4 |
| @img/sharp-libvips-darwin-arm64 | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-darwin-x64 | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-linux-arm | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-linux-arm64 | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-linux-ppc64 | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-linux-riscv64 | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-linux-s390x | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-linux-x64 | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-linuxmusl-arm64 | 1.3.2 |
1.3.3 |
| @img/sharp-libvips-linuxmusl-x64 | 1.3.2 |
1.3.3 |
| @img/sharp-linux-arm | 0.35.3 |
0.35.4 |
| @img/sharp-linux-arm64 | 0.35.3 |
0.35.4 |
| @img/sharp-linux-ppc64 | 0.35.3 |
0.35.4 |
| @img/sharp-linux-riscv64 | 0.35.3 |
0.35.4 |
| @img/sharp-linux-s390x | 0.35.3 |
0.35.4 |
| @img/sharp-linux-x64 | 0.35.3 |
0.35.4 |
| @img/sharp-linuxmusl-arm64 | 0.35.3 |
0.35.4 |
| @img/sharp-linuxmusl-x64 | 0.35.3 |
0.35.4 |
| @img/sharp-wasm32 | 0.35.3 |
0.35.4 |
| @img/sharp-webcontainers-wasm32 | 0.35.3 |
0.35.4 |
| @img/sharp-win32-arm64 | 0.35.3 |
0.35.4 |
| @img/sharp-win32-ia32 | 0.35.3 |
0.35.4 |
| @img/sharp-win32-x64 | 0.35.3 |
0.35.4 |
| qs | 6.15.3 |
6.16.0 |
| sharp | 0.35.3 |
0.35.4 |
website/package-lock.json
| Package | Before | After |
|---|---|---|
| baseline-browser-mapping | 2.10.43 |
2.11.20 |
| browserslist | 4.28.6 |
4.28.8 |
| caniuse-lite | 1.0.30001806 |
1.0.30001810 |
| colord | 2.9.3 |
2.9.4 |
| electron-to-chromium | 1.5.392 |
1.5.418 |
| fast-uri | 3.1.5 |
3.1.6 |
| joi | 17.13.4 |
17.13.6 |
| js-yaml | 4.3.1 |
4.3.2 |
| node-releases | 2.0.51 |
2.0.54 |
| qs | 6.15.3 |
6.16.0 |
| svgo | 3.3.4 |
3.3.5 |
| update-browserslist-db | 1.2.3 |
1.3.2 |
| ➕ nanoid | — | 3.3.18 |
| ➖ nanoid (nested under postcss) | 3.3.17 |
— |
How to fix:
Add the ci-reviewed label after verifying the version changes are expected.
debug info
CI timings
CI timings · View report · View job
Wall time 6m8s vs 9m31s (-35.6%). 17 job(s) slower, 22 faster, 1 unchanged.
- Python tests / Run tests slice 1/12: -91.0s
- Python tests / Run tests slice 5/12: +58.0s
- Python tests / Run tests slice 3/12: +46.0s
- Python tests / Run tests slice 4/12: +45.0s
- Python tests / Run tests slice 11/12: -42.0s
W33 source checkpoint —
|
W33 source checkpoint —
|
W33 source checkpoint —
|
W33 checked claim — source-only progressCommit Adds a separate This checked entrypoint does not prove source-file integrity or goal semantics, authorize downstream effects, or qualify later publish/refresh/transition mutations. It is not integrated private-client adoption or actual context-compaction qualification. Controller validation at the committed HEAD executed the canonical four-file focused selection: 104 passed, 0 failed, including 24 new admission tests. Separate-process barriers exercise session/lease/goal drift, matched success, rollback without partial generation, and preserved takeover/ABA fences. These are disposable local SessionDB fixtures, not a live adoption test. The pre-commit seven-file affected selection reported 393 passed, 1 failed. Its full cumulative eight-path set, bytes and modes were verified against the committed content. The retained failure is Only |
W33 private file-bound checked-claim client — source-only progressCommit Adds Caller-selected initial inventories and expected digests bind observations; they do not authenticate authority or completeness. This does not establish an atomic filesystem/database snapshot, hostile same-UID process resistance, downstream effect authority, or qualification of later refresh/publish/transition mutations. Controller validation at the committed HEAD executed the canonical five-file focused selection: 127 passed, 0 failed, including 23 client cases. The earlier pre-commit eight-file affected selection reported 416 passed, 1 failed. Its complete cumulative ten-path set, bytes and modes were verified against the committed content, and every changed test was included. The retained failure is Only the three named paths changed in this commit. Prior checkpoint/CAS/transition/observer/admission slices retain their history. No live store, goal, service, runtime activation, memory repair or merge occurred in this slice. PR remains draft. W00/W33, real coordinator adoption and native readback, compaction/restart, security and final integrated qualification remain open. Earlier-head hosted checks do not certify this new head. |
W33 existing-session claim dispatcher — source progress onlyCommit Adds an explicit pooled This slice changes only Controller-executed canonical affected selection: 1,051 passed, 1 failed across nine files, including 55 passing direct-dispatch cases. The complete cumulative 13-path source denominator and file hashes match the final affected-run manifest; every changed test was selected. Focused Ruff and diff checks passed. The retained failure is Tests exercise the actual registry, pooled dispatcher and disposable native SQLite store, including selected-session/store rejection, exactly one concurrent claimant, transaction-time identity/lease/goal changes, no automatic retry after uncertain outcomes, and native readback. Added review-requested selected-agent/native-binding interposition tests pass. These are not socket/login authentication E2E, an actual model turn, live adoption, or compaction qualification. The selected public and cognitive-scientist reviewers inspected the narrow source/claim boundary; local affected counts above are controller-run results, not a claim of independent reproduction. Earlier-head hosted checks do not certify this candidate. PR remains draft. No merge, runtime activation, live custody adoption, historical-goal mutation or memory repair is included. W00/W33, live transport/model/compaction integration, security/dependency and final packet gates remain open. |
FTS observer-only repairCommit Corrects test instrumentation only and retains assertions for zero/one/two cumulative context-query counts, pooled and writer-fallback paths, a positive-control detector, and callback cleanup. Only The 2026-09-16 local canonical validation record reports: RED reproduced (one failure); focused GREEN (two passed); complete nine-file affected selection (1,053 passed, zero failed). The full 14-path cumulative PR source manifest was checked against committed bytes. Historical failed runs remain retained; they are not rewritten as passes. This is not an all-suite, security, release, custody, or live-adoption claim. Current-head hosted checks and bootstrap merge/activation qualification remain separate gates. The PR remains draft. |
W33 checkpoint bootstrap — source checkpoint, not merge-readyDependency checkpoint: Source scopeThe PR preserves the SessionDB-owned checkpoint/CAS, explicit source-transition recording, read-only resume observer, checked claim admission, file-bound client, and pooled Subsequent test-only commits repair the FTS trace observer to follow the borrowed SQLite connection and respect the safety-selected journal mode. Earlier failed runs remain historical failures; they were not rewritten. This dependency slice changes only 13 dependency paths (manifests, lockfiles and the matching lazy-install pin). It reuses scoped work from #53 commits Local validation record
Local tests used isolated homes; the serial retry used one Vitest worker, a 3 GiB memory cap and a 512 MiB swap cap. Earlier interrupted runs, timeouts, missing build/socket prerequisites and the failed website build remain retained. Website qualification with its generation prerequisites is still pending at this checkpoint. No live external messaging was exercised. These are controller-executed results, not independent reproduction or full product qualification. The previous head's hosted CI does not certify this new dependency head. Fresh hosted CI, current security/review disposition, protected merge, managed activation, live native custody and actual compaction/restart witnesses remain required. The PR remains draft; no merge, activation, historical-goal mutation, memory repair or W00/W33 completion is claimed. |
|
Source checkpoint Addresses the Codex-reported import-boundary findings on the disposable enforcement PR #55 (wheel omission, psutil import); they also applied to this candidate.
Current-head CI and real transport requalification still follow. The old head's passing CI/smoke evidence is not promoted to this changed head. No main merge, activation, live run custody, security clearance, or W00/W33/packet completion is claimed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 422658c13e
ℹ️ 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".
|
Source checkpoint Adds the explicit Local validation on matching source:
This addresses the refresh duplication and packaging-test findings at source level. Still blocked: the real Electron test at the parent snapshot reproduced custody remaining active after Stop and |
|
Source checkpoint Adds private turn-bound checkpoint handles with authenticated The owning turn's finally releases checkpoint custody before its native session-turn lease. Gateway finalization/teardown now requests cancellation and defers closure while that turn is live; pending intent is consumed after the turn settles. The child interrupt path also uses the shared Stop routine to wake child-owned clarification waits. Cancellation-like post-commit exceptions are classified unknown and require reconciliation, not automatic replay. Verified local evidence on source bytes matching this commit:
The retained earlier failures include the reproduced missing owner/routing/Stop behavior, the premature-finalization race, cancellation classification, and test-fixture corrections. These are not erased by the later passing runs. This addresses the reported gateway-owned release and isolated-routing findings at source/local qualification level. Fresh hosted checks, current review disposition, main merge, managed activation, live custody adoption, and full W00/W33/packet qualification remain separate. No universal cancellation or production-readiness guarantee is made. |
Source checkpoint
e5d365606c84c6d5d8254ec3198b1059d54c3fea, parent5430100655b69b883b406bc7ceb8747ecf1048d7.Adds private turn-bound checkpoint handles with authenticated
claim,refresh, andreleaseoperations. Tokens remain in the executing agent; isolated turns use the existing compute-host control path rather than a gateway-local/prewarmed owner. Refresh is caller-explicit before TTL expiry—no new renewal timer, scheduler, or database.The owning turn's finally releases checkpoint custody before its native session-turn lease. Gateway finalization/teardown now requests cancellation and defers closure while that turn is live; pending intent is consumed after the turn settles. The child interrupt path also uses the shared Stop routine to wake child-owned clarification waits. Cancellation-like post-commit exceptions are classified unknown and require reconciliation, not automatic replay.
Verified local evidence on source bytes matching this commit:
The retained earlier failures include the reproduced missing owner/routing/Stop behavior, the premature-finalization race, cancellation classification, and test-fixture corrections. These are not erased by the later passing runs.
This addresses the reported gateway-owned release and isolated-routing findings at source/local qualification level. Fresh hosted checks, current review disposition, main merge, managed activation, live custody adoption, and full W00/W33/packet qualification remain separate. No universal cancellation or production-readiness guarantee is made.
Earlier source-checkpoint record (historical)
Source checkpoint
5430100655b69b883b406bc7ceb8747ecf1048d7, parent422658c13e46b5e55651d9b33bc2b30ccdf2bcb6.Adds the explicit
SessionDBRunCustodyRefreshV1storage envelope. Its checkpoint reference points to an earlier full V1 checkpoint; the predecessor digest may identify a compact record and intentionally retains the immutable history chain. Refreshes use the existing native head CAS and transaction owner—no second mutable lease authority or expiry-only takeover.Local validation on matching source:
state_metavalue bytes before versus 8,657 after. This is not physical database growth, disk savings, or a workload-performance benchmark. Metadata history still grows per refresh; the API's 10,000-generation read bound remains.422658cread full V1 records and rejected the new compact format withINTEGRITY_SCHEMA. This is an explicit version boundary, not a general backward-compatibility claim. Existing V1 row bytes are retained.This addresses the refresh duplication and packaging-test findings at source level.
Still blocked: the real Electron test at the parent snapshot reproduced custody remaining active after Stop and
ACTIVE_AGENT_REQUIREDwith turn isolation enabled. Gateway-owned release/refresh lifecycle and isolated compute-host routing are not repaired by this slice. Fresh current-head hosted qualification also remains separate. No main merge, runtime activation, live run custody adoption, or W00/W33/packet completion is claimed.Earlier source-checkpoint record (historical)
Source checkpoint
422658c13e46b5e55651d9b33bc2b30ccdf2bcb6, parent757d59b567a4a063ded713f309b69c5c267f2dc4.Addresses the Codex-reported import-boundary findings on the disposable enforcement PR #55 (wheel omission, psutil import); they also applied to this candidate.
py-modulesallowlist; it does not package the scripts directory wholesale.psutiloptional for ordinary state-store imports. The tested process/custody boundaries raiseRunCustodyErrorwith codePROCESS_INSPECTION_UNAVAILABLEwhen that dependency is absent; no process-identity fallback is supplied..pthfiles. The corrected RED run reproduced all five failures before the repair.uv lock --check --offlinepassed. Tested source bytes match this commit. Earlier failed probes remain retained.Current-head CI and real transport requalification still follow. The old head's passing CI/smoke evidence is not promoted to this changed head. No main merge, activation, live run custody, security clearance, or W00/W33/packet completion is claimed.
Earlier source-checkpoint record (historical)
W33 checkpoint bootstrap — source checkpoint, not merge-ready
Dependency checkpoint:
757d59b567a4a063ded713f309b69c5c267f2dc4, parent33d65e6a12a42fce5735ed2bb82654b7ef2120f8; cumulative base370e3621bd90249e4492b4bac1d3e0046b828ae3.Source scope
The PR preserves the SessionDB-owned checkpoint/CAS, explicit source-transition recording, read-only resume observer, checked claim admission, file-bound client, and pooled
session.run_checkpoint.claimdispatcher. The dispatcher borrows the selected live agent's existing writable store and lease; claiming does not authorize resume or execute downstream effects. Caller-supplied digests and file observations are not an atomic source snapshot or proof of initial inventory completeness.Subsequent test-only commits repair the FTS trace observer to follow the borrowed SQLite connection and respect the safety-selected journal mode. Earlier failed runs remain historical failures; they were not rewritten.
This dependency slice changes only 13 dependency paths (manifests, lockfiles and the matching lazy-install pin). It reuses scoped work from #53 commits
208cf07f1d9af6d250264d4ce758d7d687f3c7d1,778a62e37bd76c6b93dd3ced20a14b8a621fc697, and811522d205633e565e368e0242068c019555f391, then applies the narrower current-advisory updates including Electron 41.10.3, Vitest 4.1.11 and brace-expansion 1.1.18. It does not import #53 application changes.Local validation record
uv lock --checkpassed in the supplied local records.Local tests used isolated homes; the serial retry used one Vitest worker, a 3 GiB memory cap and a 512 MiB swap cap. Earlier interrupted runs, timeouts, missing build/socket prerequisites and the failed website build remain retained. Website qualification with its generation prerequisites is still pending at this checkpoint. No live external messaging was exercised.
These are controller-executed results, not independent reproduction or full product qualification. The previous head's hosted CI does not certify this new dependency head. Fresh hosted CI, current security/review disposition, protected merge, managed activation, live native custody and actual compaction/restart witnesses remain required. The PR remains draft; no merge, activation, historical-goal mutation, memory repair or W00/W33 completion is claimed.