Repository navigation
refactor(github): share transaction-local publication transitions - #168950
Conversation
Preserve existing branch history while carrying reviewed S7 repairs.
Preserve existing branch history while carrying reviewed S7 repairs.
Preserve existing branch history while carrying reviewed S7 repairs.
…pairs Preserve existing branch history and stage-specific ownership contracts.
Preserve existing branch history and stage-specific ownership contracts.
Preserve existing branch history and stage-specific ownership contracts.
Preserve branch history and carry reviewed API, fixture, and static-gate repairs at their owning slice.
Preserve branch history and carry reviewed API, fixture, and static-gate repairs at their owning slice.
Preserve branch history and carry reviewed API, fixture, and static-gate repairs at their owning slice.
Preserve existing history and carry the reviewed repair at its owning slice.
Preserve existing history and carry the reviewed repair at its owning slice.
Reuse native settlement and retain only consumed connection notifications.
Reuse native settlement and retain only consumed connection notifications.
|
🦞👀 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: blocked before merge. What this changesThis PR extracts transaction-local GitHub publication operations and makes the executor await persistence callbacks. Example: A publication callback records a push before GitHub transport starts.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this maintainer-authored prerequisite open; the extraction preserves publication ownership, and no concrete introduced defect was found. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherGateway publication coordinators bind requests to accounts and workspaces, execute GitHub operations, and persist fenced receipts in the shared SQLite database before notifying observers. flowchart TD
A[Publication request] --> B[Coordinator and live authority]
B --> C[Publication executor]
C --> D[Git and GitHub transport]
C --> E[Transaction-local receipt operations]
E --> F[Committed facts and observers]
Technical reviewBest possible solution: Retain the existing publication owner and complete the recorded upgrade gate before landing this extraction. Do we have a high-confidence way to reproduce the issue? This PR proposes an internal extraction rather than a reported runtime defect; no target code was executed during this read-only review. Is this the best way to solve the issue? The extraction keeps synchronous adapters and canonical receipt staging under their existing owners while preparing ordered asynchronous persistence without introducing a competing store. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4db95aa552f7. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +173, Tests 0, Docs 0. Total +173 across 10 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label 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 HistoryReviewed October 11, 2026, 6:37 AM ET / 10:37 UTC (Revision 4). |
# Conflicts: # docs/reference/database-schemas/worker-access-inventory.md
Security-sensitive guard clearedCurrent revision: This PR no longer changes files in the maintainer security-review tier. Separate CODEOWNERS requirements still apply to security policy and enforcement files. |
# Conflicts: # docs/reference/database-schemas/worker-access-inventory.md
…ync/sw7d-kernels # Conflicts: # docs/reference/database-schemas/worker-access-inventory.md
|
Merged via squash.
|
…enclaw#168950) * refactor(plugin-sdk): share legacy persistence warning budgets * refactor(github): move personal connection authority to workers * fix(github): publish connection and receipt revocation facts * refactor(github): share transaction-local publication transitions * fix(github): propagate reviewed connection authority repairs Preserve existing branch history while carrying reviewed S7 repairs. * fix(github): propagate reviewed connections compatibility and gate repairs Preserve existing branch history and stage-specific ownership contracts. * fix(github): propagate reviewed connections gate repairs Preserve branch history and carry reviewed API, fixture, and static-gate repairs at their owning slice. * fix(github): propagate reviewed facts focused repairs Preserve existing history and carry the reviewed repair at its owning slice. * refactor(github): simplify publication bookkeeping settlement Reuse native settlement and retain only consumed connection notifications. * perf(github): reuse the state worker for role authority * perf(github): reuse state worker for connection reads * perf(github): reuse resident role authority * fix(github): defer source authority exports to their consumer slice * fix(github): defer worker exports until operation registration
First-parent upstream 069a5b8..75df19c (17 commits, including openclaw#169043 entry lifecycle queries, openclaw#169034, openclaw#169058 memory index facts, openclaw#168950, openclaw#169019 telegram queued history replies, openclaw#168790/openclaw#168756/ openclaw#168759/openclaw#168739 Solid UI ports, openclaw#168813 codex metadata/startup lifecycles, openclaw#168981, openclaw#168992 agent preparation SQLite work). Only conflict: worker-access inventory, regenerated (631 files, 2436 calls). Auto-merged files carrying our overlay, reviewed: snapshot.ts (upstream's block-reply reconcile reads through index-1; our per-part continuation-marker strip in extractAssistantStreamSnapshot unchanged), codex side-question.ts (upstream's request-scoped client lease; our disableContinuationTools and the extracted dynamic-tool-call helper unaffected), subagent-registry-restore.ts, session-sharing-store.native.ts. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
Worker-owned publication writes need to reuse personal and repository state transitions without opening a second database owner or duplicating receipt policy.
User Impact
This internal refactor preserves the existing publication behavior while making its native transitions callable on an already-owned transaction connection. It does not yet move the running publication coordinator onto workers.
Why This Change Was Made
Personal and repository transitions used by current native callers accept the transaction’s database. The executor awaits effect callbacks so the worker adapter can preserve their ordering. Future-only exports, transition bodies, and worker event capture arrive with their first consumers in the worker-registration slice. The mutable execution-facts type remains private.
Durable authority facts remain with S4b’s canonical
githubPublicationReceipts.stageRowowner and its transaction/savepoint semantics. Schema fast paths reuse the admission owner’s recorded table facts. Existing restart-confirmation and stale-receipt wrappers remain until their callers migrate in subsequent slices. Released writer/callback completion contracts are preserved; bundled cutover adds the relevant deprecation diagnostics. No schema, stored-data, retention, or update migration is required.S10 handoff after the complete stack: the parked
w6githublane can use host-mintedGitHubPublicationRequesterV2andPersonalGitHubSessionActionV2, withGitHubPublicationTransitionAuthorityand typed source/transition operations. This slice is a prerequisite; the complete-stack handoff includes canonical receipt installation before observers and does not claim removal of every final synchronous guard.Stack dependency: S7 slice 3/7, head
6eac6df7365960ce4be236dd45329de0ff3760cb, basemain. Parent slice merged asa9dac67f437ace0e43692e594b7d23e0b94c225c. The original implementation base remainsa6a6f479647b0832be8610a521ab8c28950bc534; the current integration base is6e06137f85ef3262f47dae63626d97f14c2f1ca1.Evidence
Original complete-stack proof source:
f33795fc32205414b436f84f06dcd5e924255704, tree7e949f3b906ebc5e0f70dfa483b22c018c43c3cb. Its tree matches reviewed repairf33795fc32205414b436f84f06dcd5e924255704. post-runtime-repair-deb8cf38/source-relation.json — workerAwaitCorrection: exact twelve unnecessary awaits removed from one worker test; production and every other file equal b6. Actual proof heads retained. Slice1LandingIntegration records the separate remote-verified integrated successor; complete-stack f337 proof remains historical for that successor. Complete-stack results below do not claim a separate execution of this intermediate head.Current pushed head
6eac6df7365960ce4be236dd45329de0ff3760cb(treeac31f3f521c86c5e30aaa55b735af65bf20049c8) is a conflict-only integration of main6e06137f85ef3262f47dae63626d97f14c2f1ca1; only the generated inventory conflicted. All nine family production and three focused test files are independently verified byte-identical to actual tested9a619f6851eb3f0ff74ee83492e837b19205e54a. The current diff defers unused worker exports, transition bodies and event capture to their first consumers in slice 5, retains native callers, and keeps the mutable execution-facts type private. It adds no code warm-up or fencing. Original implementation and timing-proof identities remain unchanged.Scoped proof is complete at its actual heads: core lint, source contracts and mock ratchet pass at 6eac; the 52 focused assertions and published-driver 2026.10.1 update cell pass at 9a and are explicitly reused through the authorized twelve-file identity relation. The native cell exited 0 in 538.892 seconds, installed the expected candidate build, completed activation and returned readyz 200 without CLI errors. Package SHA256:
6fa05fb867a975d8d7d254e6b50b48e76780ec4946a4a6cdccfaf904fdcde56d. It was not executed at 6eac. The earlier 53a candidate’s post-update cleanup failure remains recorded and did not recur.Final Knip remains failed only on three production and two full-tree diagnostics reproduced exactly on captured main
6e06137f85ef3262f47dae63626d97f14c2f1ca1; all four reported source files are byte-identical, with no candidate-only or GitHub-family findings. This is an inherited-static disposition, not a passing Knip invocation. The latest lead read reports the PR mergeable, security checks passing and hosted CI pending with no failed jobs; it does not establish completed hosted CI.Original implementation diff at
53a293ea16cb81b0a4db248d3361cf819a7d3e4arelative toa6a6f479647b0832be8610a521ab8c28950bc534: production +745/−443 (1188 changed lines); tests +17/−10 (27 changed lines); docs +5/−5 (10 changed lines).The recorded GitHub-style comparison uses observed
mainrevision6e06137f85ef3262f47dae63626d97f14c2f1ca1and merge base6e06137f85ef3262f47dae63626d97f14c2f1ca1: production +614/−441 (1055 changed lines); tests +4/−4 (8 changed lines); docs +16/−16 (32 changed lines). This is a pinned comparison, not a claim about current main.7a695a0f91db5de010a402c9452527b3623a17cc— 12-query census;14 committed-file hash matches. No escaped legacy caller, runtime alias, mutating read or retired route. Source proof only.9a619f6851eb3f0ff74ee83492e837b19205e54a— Attribution 11, workflows 32 and shared events 9: 52/52, zero failures, stable source.9a619f6851eb3f0ff74ee83492e837b19205e54a— Published driver 2026.10.1 → actual candidate/harness 9a. Native exit0; update succeeded, activation complete, readyz200, correct build, no CLI errors. Original 53a cleanup error did not recur.6eac6df7365960ce4be236dd45329de0ff3760cb— Type-aware core lint, source contracts/export collisions and native mock ratchet pass with stable source and native environments.6eac6df7365960ce4be236dd45329de0ff3760cb— Three production and two full-tree diagnostics exactly reproduced on captured main; all four source files hash-identical, no candidate-only or family findings.6e06137f85ef3262f47dae63626d97f14c2f1ca1— Same native pnpm deadcode:exports command reproduces every candidate rule/path/export; stable source.53a293ea16cb81b0a4db248d3361cf819a7d3e4a— Published 2026.10.1 driver, original53a candidate and5e6 harness: activation/readiness succeeded, but updater post-update cleanup exited1 importing a removed runtime-cleanup module. Historical failure remains; later9a cell passes.f33795fc32205414b436f84f06dcd5e924255704— Node 11/11 and Bun 11/11; zero failed/pending/skipped/todo. Exact final source remained stable. Validates the twelve synchronous-read await removals.7a695a0f91db5de010a402c9452527b3623a17cc— Shared 23/23 and boundary 36/36 passed; includes unbranded legacy writer/callback paths. Both suites and production are unchanged through f337.a7c683b6829e50b595848a8357a6521557cd1e94— 58/58: repository 43 and requester aliases 15 at a7. The repository suite includes the legacy callback that observes the publishing transaction. Later 7a bookkeeping tests are separate.f0b9308c8af2f3211f1c2fe357baed96bc596f0d— 14/14 tests across user-channel-identities and user-profiles-multi-account; native single invocation. Historical exact-f0 result.b6e39b6b5f2c4769ee6ec8d232e02c581eed1ff9— 50/50, zero failed/pending/skipped/todo. Includes executed legacy personal-writer cases; validates the teardown correction. Source remained exact throughout.22b70997d7b0a5f7c85229b51f5a938f48739a32— Bun wrapper 1/1 is type-only; f0 SDK test typecheck 54.002s validates its assertions. Legacy runtime coverage is listed separately; no universal parity or inherited-reader claim.7a695a0f91db5de010a402c9452527b3623a17cc— Core types, SDK declarations, Madge, configured Knip files/dependencies and canonical all-exports passed. SDK declarations match all 298 original f0 path/hash entries without normalization. git diff --check also passed.f0b9308c8af2f3211f1c2fe357baed96bc596f0d— Original 951a→f0 comparison: no entrypoint additions/removals, 7 added exports, 182 reachable changes. Exact 7a declarations equal original f0; b6 is test-only. No new API-diff run.7a695a0f91db5de010a402c9452527b3623a17cc— Common:a0→7a, 3 pairs, accepted under attributed turn noise floor/non-turn tolerance. Failure:2c32→7a, 5 pairs, 40/40 tests; cold worker-turn preparation has a user-approved exception after same-flow warm ratio 0.572741; original cold ratio retained. Actual bases, counts and all timings below.deb8cf386e59daf7c84825a0a1b3fe57d7380842— Original deb8: 131 passed/1 failed. Personal observation failure resolved by 22b7 selected cases (6 passed/44 skipped, 67.978s); full personal suite now passes 50/50 at b6. Original four-file run remains failed.7a695a0f91db5de010a402c9452527b3623a17cc— Original7a run stopped at counted-line cap1002>1000; later steps did not run. The b6 correction passed the line cap, but this original run remains failed.b6e39b6b5f2c4769ee6ec8d232e02c581eed1ff9— Original b6 run:31 stages passed, then exactly12 worker-test await-thenable errors stopped lint; later stages did not run in that invocation. Reviewed f337 removed those awaits; the accepted cumulative row records the successful continuation without relabeling this failure.f33795fc32205414b436f84f06dcd5e924255704— Lead accepted 31 successful prefix stages at b6 plus all11 native suffix stages at f337. Native command environments preserved; core0 errors/19 warnings, extension/script0 errors, cycles0. Production unchanged; neither original failed run is relabeled as passing.CI seconds were not measured. Earlier f0 Gateway verification failed (383 passed/10 failed; 991.429s), leading to requester-abort, pending-recovery and fixture repairs. The deb8 failure and selected 22b7 resolution above retain that history. Executed legacy coverage includes unbranded shared/boundary writer paths at 7a and the repository callback at a7 and the personal writer at b6. The full b6 personal suite executes legacy writer cases with V2 fields stripped; synchronous connection cancel/disconnect fixture shapes were source-inspected. Branded V2 requesters called through old method names are not evidence of legacy behavior. The dedicated SDK fixture is type-only; this evidence does not claim universal writer/callback parity or inherited status-reader compatibility. Full b6 check:changed stopped at twelve await-thenable errors after its preceding type/dead-export stages passed; later checks are now covered by the corrected f337 suffix; the b6 invocation remains failed. Prior7a worker fixture results were Node11/11 in30.596s and Bun11/11 in28.199s; current f337 Node/Bun reruns now pass as listed above. The suffix attempt at
f33795fc32205414b436f84f06dcd5e924255704failed as tooling after 397.502812829s: the external runner dropped native command.env, promoting 19 untouched max-lines warnings to errors. Zero await-thenable errors remained. The corrected runner preserved native plan/environment and all11 suffix steps passed; that tooling failure remains recorded, with no source change. Evidence:renewal-f33795fc/evidence/results/changed/changed.log. Final scoped checks and the published-driver cell are complete at their recorded heads. The final Knip failure is proven inherited by the same-command captured-main run; hosted CI is pending in the latest lead read. The original 53a cell remains failed, and the successful 9a cell is reused explicitly rather than relabeled.Current source applicability accepted. Edge
a6a6f479647b0832be8610a521ab8c28950bc534→53a293ea16cb81b0a4db248d3361cf819a7d3e4ahas the same source patch and before/after blobs as the previously audited edge: both endpoints inherit the identical two-file role patch. The lead acceptedresident-role-sql-source-bridge-7914382e.mdand its JSON. Prior scoped neutrality and historical measurements below retain their original limits and tested SHAs; no new SQL execution is claimed.Historical measurements accepted through the prior source bridge. Previously bridged edge
b785023b076ce9c8282f496b4b86dee68abaff45→a039db39853e03e887dfaf7c11eb259eae1e60d1has the exact same kernel source patch as measuredfb4128e732df6ab3fd2fbb65bd51f1e97817a7e8→4ab65d622fb4fbd1f3c83618385c3e0525bcf488: all 12 changed source entries have identical before/after blobs. Parent changes are inherited on both sides. The lead accepted the scoped applicability incurrent-sql-source-bridge-5737ec7b.mdand its JSON; this is not a new execution or a whole-tree identity claim. The following counts and timings retain their original measured source.4 alternating common-workload pairs and 3 alternating owner-flow pairs completed with valid durations. Common medians:
First-turn +9 (+0.3665%) is accepted under the ≤0.5% noise floor: its exact median decomposition attributes every added statement to unchanged owners, including the final +1 native memory contribution. Warmed mean falls by 2.5.
edge3-first-turn-owner-audit.mdpreserves attribution and conservation.Cron +111 (+9.083%) does not meet isolated phase tolerance. Existing memory indexing and plugin-state lease work move from second-session into cron. Adjacent second-session + control + cron sums are base
[5162, 5294, 5422, 5172], candidate[5246, 5238, 5270, 5284]; medians 5233 → 5258, +25 (+0.478%), accepted under the combined-window rule. All 31 native memory stack groups and 97 positive cron SQL groups occur in baseline; touched GitHub native reads stay exactly 8 per sample. Other small increases are unchanged delivery polling, prewarm/cron scheduling, device/restart/plugin maintenance, busy-timeout observation, or session backfill, itemized inedge3-nonturn-owner-audit.md.Attribution limits: raw per-event worker/timestamp joins were not retained. One +0.5 combined-window schema-marker key matches baseline SQL and owner but not the exact baseline request label. This is not fully reconstructed request-level correlation.
Whole-workload medians remain +12 statements/+8 requests; the escalation pair remains +122/+19. These are not equal/lower totals. Acceptance is the maintainer's noise-floor and unchanged-owner combined-window disposition.
Owner-flow medians:
| Owner flow | Base → candidate all-thread SQL median | Requests | Duration ratio |
| --- | ---: | ---: | ---: | ---: |
| shared.publish | 2378 → 1832 | 16 → 16 | 0.8974 |
| shared.publish-second | 2234 → 1716 | 16 → 16 | 0.7947 |
| personal.publish | 12764 → 12435 | 22 → 22 | 0.9681 |
| personal.publish-second | 12114 → 11786 | 22 → 22 | 0.9414 |
| repository.publish | 1209 → 1200 | 7 → 7 | 0.9266 |
| repository.publish-second | 1131 → 1116 | 7 → 7 | 0.9553 |
Receipts:
hetzner-prioritized-2c32aa6b-v7/checkpoints/results/matrix/03-kernels/common-comparison.jsonandhetzner-prioritized-2c32aa6b-v7/checkpoints/results/matrix/03-kernels/flow-comparison.json. Flow SHA256:b74574c28240881e846885befc9cb5c366e4c61c7b52b3802b55a794b0bc674d. This acceptance covers this edge’s statement evidence; final executable gates and other edges remain separate.The compatibility claim covers released writer/callback forms. Inherited status-reader limitations are recorded in the final stack PR; this slice does not establish whole-family reader compatibility.
Published-driver × candidate update cell: PASS (reused). Published driver 2026.10.1 updated to actual candidate
9a619f6851eb3f0ff74ee83492e837b19205e54a; the native cell exited 0, the candidate was ready, and package activation completed. Reuse at the conflict-only successor is authorized and supported by the twelve-file source identity check above. The earlier original-candidate cleanup failure remains historical evidence. Schema admission changes trigger this cell even though DDL text and schema version are unchanged.