Repository navigation
fix(ci): repair SQLite exclusion proof and orphaned media exports - #199571
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review Summary: ✅ CompletedThis 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. |
|
@clawsweeper review Please review final head |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR corrects the SQLite exclusion test oracle and removes unused media notifications and a Gateway test helper. Example: A UTF-16le database preserves the session key agent:main:a\uFFFE.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR is a focused repair of inherited check failures; the pinned diff introduces no actionable correctness or security findings, and exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherSession maintenance reads SQLite rows and filters excluded keys before selecting cleanup candidates; the separate media registry tracks process-local generation activity and completion ownership. flowchart TD
A[SQLite session rows] --> B[Maintenance candidate owner]
C[Excluded key set] --> B
B --> D[Surviving session candidates]
A --> E[Independent native SELECT oracle]
C --> E
E --> F[Encoding regression assertions]
D --> F
Technical reviewBest possible solution: Retain exact returned-key exclusion semantics and complete the obsolete notification cleanup as this patch does. Do we have a high-confidence way to reproduce the issue? Source confirms the orphaned exports and the runtime-dependent hardcoded expectation; the author supplies focused red/green results, which were not rerun during this read-only review. Is this the best way to solve the issue? The patch is the smallest complete repair: use an independent native-row oracle, retain encoding coverage, and delete notifications and fixture code whose consumers were intentionally retired. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8f9bd10825ff. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -12, Tests -29. Total -41 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 15, 2026, 6:14 AM ET / 11:14 UTC. |
|
Merged via squash.
|
What Problem This Solves
Repairs inherited main failures in the SQLite exact-exclusion test and the unused-export gate, reproduced on
3bbf67501123a640c4634f782ba56aac6050dd3c.Why This Change Was Made
The exclusion contract is exact membership in the keys returned by SQLite. #138470 (
93450a667d2ab1e747db303de86ab02737c18dda) introduced an expectation that every UTF-16 database replaces U+FFFE/U+FFFF; #179786 (08d77cab4373900582329c2ddb2992c3fb224900) moved that assertion unchanged. Node 26.12.1 / SQLite 3.54.1 preserves those characters, so the owner correctly excludes two rows the test expected to retain. Keep the test, compare against an independent native SELECT plus exact Set membership, and restore UTF-16be to the table. The original PR explicitly preserves returned-key membership; no retention behavior was intentionally removed or needs changing.#199529 (
e6265d6f2a8c36448a0f07f611aada8b4022cb09) intentionally removed the cron media wait and continuation tests. That leftonMediaGenerationOperationChangedandinvokeGatewaySuspendPreparewith no callers. Remove the unused listener registration/state/notifications and test helper, and update the fixture's state-reset inventory. No test cases or behavior assertions are deleted.The initially reported #199338 export is already fixed by #199553 (
8d04ce01ad17844fde652145fa5ddac5ec90e161) on this base; this PR does not duplicate that UI repair. The two new unused exports are separately attributed main regressions.User Impact
Restores the existing checks without changing session retention, stored data, media ownership, completion delivery, configuration, or schema. The test still rejects incorrect exclusions across all three encodings. Production LOC decreases by 12; test/support LOC decreases by 29. No assertions, skips, budgets or scan configuration are weakened.
Evidence
pnpm test src/config/sessions/session-accessor.sqlite-exact-read.test.tsfails only the UTF-16le case (30 passed, 1 failed). Direct native SQLite probes confirm intact noncharacters and exact exclusion of those returned keys. History identifies the assertion's introduction/move; this is not a claim to have bisected the first SQLite runtime version changing conversion.pnpm dlx --package [email protected] knip --config config/knip.all-exports.config.ts --no-progress --reporter compact --include exports,nsExports,types,nsTypes,enumMembers,namespaceMembers --no-config-hints: two unused symbols before, zero after.pnpm test src/config/sessions/session-accessor.sqlite-exact-read.test.ts src/config/sessions/session-accessor.sqlite-maintenance-cap.test.ts src/agents/media-generation-activity.test.ts src/gateway/server-methods/agent.test.ts src/gateway/server-methods/suspend.test.ts: 435 passed across five files/three shards; no skips.pnpm check:changed: passed, including all type graphs, all three zero-export scans, lint/format and policy guards. The final fixture delta also passed separate lint/format.git diff --checkpassed.d2f119d92d27dd9c009209928f572f77f930415d. No reruns or inherited-infrastructure exception were needed.The first post-fix focused run caught a real incomplete fixture cleanup: the reset helper still named the deleted listener set. The final patch removes that entry and strengthens its guard to the remaining Map state; the failure is retained as evidence, not labeled inherited.