Repository navigation
Conversation
Factor the canonical personal and repository kernels around admitted shared-state connections, preserving synchronous runtime callers until the complete cutover. Register inactive worker/read commands and retain exact mutation and deletion receipts through commit fencing, native settlement, and owner publication. Preserve lazy schemas, row codecs, branch lineage, and accepted-result custody. Return the actual personal claim postimage, including its update timestamp.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs changes before merge. Reviewed October 2, 2026, 9:12 AM ET / 13:12 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch extracts GitHub publication database kernels, registers worker reads and writes, and adds exact commit and deletion receipts while preserving existing runtime callers. Merge readiness⛔ Needs changes before merge - 1 item remains The staged patch remains useful and has no actionable correctness finding. The updated draft plan resolves the earlier staging-choice concern; current main does not contain this publication cutover. Likely related people: steipete, a recent publication-area contributor (high-confidence routing). Priority: P2 Review scores
Verification
How this fits togetherGitHub publication stores track requests, execution ownership, and outcomes for personal and repository publishing. This patch prepares those SQLite operations for workers whose committed results return to the Gateway for publication. flowchart TD
A[Publication requests] --> B[Existing Gateway callers]
B --> C[Publication store kernels]
D[Staged worker scope] --> E[Live admission checks]
E --> C
C --> F[Shared SQLite database]
F --> G[Exact commit receipts]
G --> D
Before merge
Agent review detailsSecurityNone. PR surfaceSource +758, Tests +575. Total +1333 across 21 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: One publication owner should serve all runtime callers through the existing worker broker, preserving live authority, FIFO settlement, and exact committed facts. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a staged internal refactor. Source confirms the synchronous runtime path remains; no tests were executed during this read-only review. Is this the best way to solve the issue? Yes for the staged extraction: sharing existing kernels avoids competing store implementations. The planned caller cutover must complete before the branch achieves its operational goal. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 94cbbecd46cc. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Closing as superseded rather than landing; nothing here is lost. This draft carried two halves of the GitHub publication worker move, and both now live elsewhere:
Landing this branch now would create a second owner for the same modules beneath that lane, and Knip already flags the inactive scope as unused. The branch head |
Status
Draft: the inactive scaffolding has been reviewed. The SQL-free grant audit passed, all 11 focused worker/lifecycle tests passed in 139.48 seconds after integrating main, and ClawSweeper found no actionable issues on the original head. This same PR will carry ghpub 3/4 (activation of all callers) once ghpub 2/4 (foreign-writer exclusion) lands. Landing the scaffolding with its runtime consumers will remove the Knip unused-file finding without an exception.
What Problem This Solves
Personal and repository GitHub publication stores still perform runtime SQLite work on the Gateway thread. The cutover needs admitted-connection kernels and exact mutation receipts before authority consumers can move together.
Why This Change Was Made
Factor the existing kernels without switching runtime callers. Register typed shared-state worker commands and independent read operations, preserve lazy schema admission and codecs, and return exact lifecycle-deletion tombstones. Add an inactive lexical publication scope that fences before COMMIT, rechecks live authority, preserves owner FIFO through settlement/publication, reconciles retained COMMIT receipts after reply loss, and drains accepted work on close.
Mutation admission checks retained action/result custody rather than recursively calling its own pending-fenced guard. Commit receipts use the existing native settlement channel.
The broker remains unchanged. Raw worker reads may observe newly committed rows before host publication; host authority must consume the fenced owner's facts. Unknown outcomes stay unavailable and are never blindly replayed.
User Impact
No user-visible activation or main-thread SQL reduction is claimed in PR1. No schema, retention, durability, public SDK, GitHub network, or update behavior changes; no migration or operator action is required. Personal claims now return their exact stored postimage, including updated_at_ms.
This PR contains reviewed stage 1 and will include stage 3 of the cutover sequence before it is ready to land.
Four-PR plan
Evidence
27592c2d0a9f6104e533a97d66600e4ebb189fb1.node scripts/worktree-setup.mjs gateway: passed, including build stamps and built-module checks.pnpm test src/state/github-publication.worker.test.ts --maxWorkers=1: 7 passed; final measured wall time 66.50 s, including worker-fixture compilation (about 3 s in the cases). Real worker admission, native COMMIT receipts, reply loss, worker exit, and close drainage require this boundary; the suite reuses its isolated database/actor except when a case intentionally retires the worker.pnpm test src/gateway/github-personal-publication.lifecycle.test.ts --maxWorkers=1passed all 4 cases in 62.13 s. This existing full lifecycle fixture proves native foreign-write admission, reset/archive retention, and permanent deletion.node scripts/check-changed.mjs --base 27592c2d0a9f6104e533a97d66600e4ebb189fb1: passed, including core and all 27 test-typecheck shards, full lint, unused exports, and architecture/authentication guards.pnpm check:madge-import-cycles: 0 cycles.pnpm check:database-worker-ratchet --base 27592c2d0a9f6104e533a97d66600e4ebb189fb1: passed; no T1 growth, and no reduction claimed for inactive PR1.a1566b2dbfde(including refactor(sessions): plan lifecycle artifact cleanup in workers #163269) locally without conflicts; the PR patch ID remained unchanged. The publication worker and personal-publication lifecycle suites passed 11/11 tests in 139.48 s against that combined tree.src/state/github-publication-worker.tsunused in production Knip. This PR-caused gate will be resolved by adding its runtime consumers in this PR; no Knip exception will be added.