Repository navigation
refactor(gateway): finish GitHub publication worker cutover - #169581
Conversation
|
🦞👀 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. |
|
Codex review: needs changes before merge. What this changesThis PR moves remaining GitHub publication persistence into state workers and makes legacy coordinator methods reject with async or V2 migration guidance. Example: A plugin calls githubPublicationService.requestForSession to publish session work.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: the owner-directed worker cutover remains useful, but the previously reported compatibility diagnostic defect is still unresolved. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherGateway coordinators accept authorized publication requests, persist receipts through state workers, execute guarded GitHub operations, and return publication outcomes. flowchart LR
A[Session publication request] --> B[Gateway coordinator]
B --> C[Requester and workspace authority]
B --> D[State worker]
D --> E[SQLite receipts]
C --> F[GitHub executor]
F --> G[Push and pull request]
F --> D
Technical reviewBest possible solution: Complete the worker cutover with accurate legacy compatibility warnings and registry guidance while preserving the retained effect guards. Do we have a high-confidence way to reproduce the issue? Calling a retired publication method reaches the shared helper's continued-support warning and then rejection; source establishes this contradiction without executing target code. Is this the best way to solve the issue? The existing state worker is the appropriate persistence owner, and the remaining repair should correct diagnostics without restoring native execution or redundant rereads. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e14e91921b10. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -935, Tests +156, Docs -2. Total -781 across 61 files. Added test files: 1. View PR surface stats
Review metrics
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 HistoryReview history (3 earlier review cycles)
Reviewed October 12, 2026, 3:23 AM ET / 07:23 UTC (Revision 4). |
|
Merged via squash.
|
|
Landed under the relaxed landing policy with final-head CI green. Remaining P3 follow-up from review: give retired publication methods accurate compatibility-warning text and update the publication compatibility registry guidance, while preserving the separate OAuth compatibility guarantee. The methods already fail explicitly with their async/V2 replacement names, and the migration guide documents that behavior; this is a diagnostic inconsistency, not an additional execution path. |
Retired GitHub publication methods warned that their legacy contract remained supported immediately before failing. Supply accurate migration diagnostics at all retired entry points and align compatibility registry and policy text, preserving the separate personal OAuth synchronous guarantee. Adds a coordinator regression for the failure, replacement warning, and per-plugin warning budget. SQL, worker ownership, authority, and API signatures are unchanged. Follow-up to #169581; triage of the 70 merged campaign PRs is recorded in #169750.
…#169581) * refactor(gateway): finish GitHub publication worker cutover * fix(gateway): retain lazy publication schema in worker * test(gateway): complete publication worktree fixture * fix(gateway): preserve publication recovery through async cutover * fix(gateway): align publication fixtures and revocation results * test(gateway): remove retired publication reread assertions
…9750) Retired GitHub publication methods warned that their legacy contract remained supported immediately before failing. Supply accurate migration diagnostics at all retired entry points and align compatibility registry and policy text, preserving the separate personal OAuth synchronous guarantee. Adds a coordinator regression for the failure, replacement warning, and per-plugin warning budget. SQL, worker ownership, authority, and API signatures are unchanged. Follow-up to openclaw#169581; triage of the 70 merged campaign PRs is recorded in openclaw#169750.
What Problem This Solves
GitHub publication still opened SQLite on the Gateway main thread through synchronous stores and coordinator APIs, despite having worker-owned replacements. Shared, personal, and repository publication now use the existing worker owner throughout; bundled callers await the async/V2 APIs. The worker owns durable changes and returns receipts; the coordinator retains active execution and workspace exclusion.
All 42 assigned T1 call sites are removed: personal store 9, shared store 12, repository store 14, coordinator methods 5, coordinator 1, repository kernel 1. SQL implementations live in explicit
.worker.tsmodules. The superseded internal stores are deleted. Ten public synchronous coordinator methods retain deprecated signatures and emit the existing SDK warning before directing callers to their async/V2 replacement; no synchronous fallback remains. The migration guide lists the replacements. First-use lazy schema creation remains worker-owned.Credential, requester, session disclosure, and external-effect authority checks remain. No schema version, stored format, retention, update, or durability contract changes. Native incognito paths remain outside this cutover.
Removed checks and accepted edges
Tests tied only to the removed rereads are removed. Credential-revocation proof remains at the actual external-effect boundaries.
SQL measurement
Shared live Gateway workload, isolated synthetic state and ports; baseline
943da4fc9366, candidatecc5ae26e9c6f/ test-only successor72f25a88d018. Final head adds the obsolete-test deletion and a conflict-free main merge. Only the copied harness output directory was relocated; the shared harness was not edited.Values are all-thread per-turn averages over each run's ten warmed turns; MAIN is shown separately. Two alternating pairs were run because the first pair's request delta was ambiguous.
Across run averages, warmed median [min–max]: statements 339.95 [318.2–361.7] → 338.45 [320.5–356.4]; requests 105.95 [99.7–112.2] → 107.10 [100.6–113.6]; MAIN 0.1 [0–0.2] → 0.1 [0–0.2]. Warm duration ratios were 1.125 and 1.284.
No warmed query saving is claimed. The completed extra pair had identical publication operation totals and no publication operations in its warmed windows. Its small global rise comes from untouched session/domain-publication, plugin-state, and maintenance work. The initial pair ran one additional existing publication-poll round on the candidate (same statements per operation). The measured result of this PR is the T1 cutover, with no demonstrated increase in publication operation cost.
The extra pair passed the full harness, calibration, and SQL/request census reconciliation. The initial candidate passed all 13 turns, cron, compaction, and shutdown, but the wrapper failed on an unrelated
mentions.dismissreturningUNAVAILABLEin the control-plane phase; its counts are disclosed above, not represented as a full harness pass.Evidence
git diff --check.pnpm test src/state/github-publication.worker.test.ts --maxWorkers=1, 44.27 seconds wall time. Subsequent test and static validation runs in PR CI.386ac1a9fb6b: production/test types, lint, Knip/source contracts, Madge/architecture, SDK/runtime guards, T1/dialect ratchets, and all scheduled test shards.LOC against main: production +1,149 / −2,084 (net −935); tests/support +932 / −776; docs +31 / −33. CI previously identified stale fixture imports/authority setup and two obsolete reread assertions; those are fixed. The final-head run is green, including the build-artifact smoke that had failed in the prior run.