Repository navigation
fix(github): publish connection authority after account changes - #168949
Conversation
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 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.
Reuse native settlement and retain only consumed connection notifications.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: needs maintainer review before merge. What this changesThis PR adds changed-owner IDs to connection commit receipts and routes credential-retirement notifications through those receipts. Example: Alice’s profile merges into Bob’s profile while both have personal GitHub connection state.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open as a useful maintainer-authored prerequisite for the GitHub worker migration; no concrete introduced code defect was found, and the earlier conflict is resolved. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherPersonal GitHub connection and profile writers commit shared-state changes, return nonsecret receipts to the Gateway, and notify the OAuth lifecycle about retired credential profiles. flowchart TD
A[GitHub RPC or profile merge] --> B[Existing state writer]
B --> C[SQLite transaction]
C --> D[Committed connection receipt]
D --> E[Gateway receipt validation]
E --> F[Credential retirement observers]
Technical reviewBest possible solution: Land the receipt prerequisite once required CI failures are attributed, and introduce source-capability invalidation with its consumer slice. Do we have a high-confidence way to reproduce the issue? This preparatory slice has no separate reported user-visible failure to reproduce; source inspection confirms receipt production and the absence of a changed-owner consumer. Is this the best way to solve the issue? Using the existing writer and commit-receipt owners is a coherent approach that avoids a competing publisher and preserves current authorization checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e65bd3be4134. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +55, Tests +34, Docs 0, Other -2. Total +87 across 14 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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, 5:49 AM ET / 09:49 UTC (Revision 4). |
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
…claw#168949) * refactor(plugin-sdk): share legacy persistence warning budgets * refactor(github): move personal connection authority to workers * fix(github): publish connection and receipt revocation facts * 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
First-parent upstream facdd3c..fd0fc62 (7 commits: openclaw#168789 subagent and runner bookkeeping, e65bd3b cold actor append retry, openclaw#168747 worker environment lifecycle, openclaw#169037, 7fb80f6, openclaw#168949, fd0fc62). openclaw#168789 removes retrySubagentCleanup: accepted-run termination is now a single attempt that resolves when the stop is confirmed (or the session provably belongs to a successor) and rejects when it is not. Conflicts: - subagent-spawn-cleanup.ts: took upstream's single-attempt form. Kept our hasFrozenSessionIdentity arms on both deletion paths: the abort-miss fallback rejects instead of deleting by key alone, and the waited provisional delete is skipped without a frozen identity. Dropped our retry option and isSettledAbortResponse (upstream's isDefinitiveAbortMiss already covers it in preserve mode); the continuation guard call-site contract still pins the identity guard. - Our boolean consumers adapted to the rejecting contract, keeping their pre-merge outcomes: the accepted-spawn sweep and spawn rollback map a rejection to "not terminated"; the collector's launch-failure path keeps rollback custody for the sweeper and settles once (pinned by subagent-registry.rollback-custody-restart.test.ts); its registration-changed path releases the acceptance hold in a finally. - subagent-spawn.test.ts: upstream's new "holds an unconfirmed collector slot for shutdown" expects no settlement; ported to the fork's custody contract (one abort, no second dispatch, settled once). - subagent-spawn-cleanup.test.ts: our cases ported to the new contract, plus two pins for the identity arms (RED with the arms removed). - subagent-registry-restore.ts: kept our armed-row skip next to upstream's restart-recovery/kill skip. - subagent-registry.test.ts: our extracted restore test kept; upstream's "reconcile on the next explicit restore" change ported into subagent-registry.restore-retry.test-support.ts. - worker-access inventory regenerated. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
What Problem This Solves
A retained publication source must observe committed personal GitHub connection changes before it can authorize more work.
User Impact
Committed connection mutations now report changed owners and retired profiles while preserving delivery to existing retirement observers. The following source-authority slice uses these facts to revoke retained publication sources.
Why This Change Was Made
Each connection commit carries changed owner IDs and retired profile IDs. A profile merge identifies both affected owners in the same receipt; credentials, refresh material, and unused selection postimages are excluded. This slice produces the receipt facts and retains retirement delivery. The authority observer and connection projection arrive with their first consumer in the source-authority slice.
Publication-deletion tombstones remain with S4b’s canonical
github-publication-receipts.tsowner. This slice adds no competing deletion publisher and does not change released writer entry points or their completion timing. The final slice completes the V2/Async facade and 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 2/7, head
a9a4633ced0dc7ba9b8656ae0d0f08be7a955a2f, basemain. Parent slice merged asbc1d2b9bc71e935a37838db806c9d327d84a1657. The original implementation base remains4c299f5f656f66b565e51e85e3fc8934925e6940; the current integration base isce5b795128e359ebebd9df80bdcfaf0258659a5a.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.Final f337 worker Node/Bun fixtures pass 11/11 each. Lead accepted cumulative check coverage: 31 successful b6 prefix stages plus 11 native f337 suffix stages, retaining actual heads and original failures. All three user-approved cold exceptions now satisfy the same-flow warm ratio <=1.5 condition (repository 1.007232, shared 1.199175, failed preparation 0.572741). Integrated slice 1 static/tests pass at 5e6 and are reused through the one-line baseline-only 8fd successor. The hosted dispatch failure remains unresolved under the lead’s relaxed-v4 focused-pass disposition; targeted baseline and candidate runs both pass.
Current slice 2 head
a9a4633ced0dc7ba9b8656ae0d0f08be7a955a2f(tree82a74cfb48a94cbb1cff99a25a1b40c468e44e22) incorporates captured maince5b795128e359ebebd9df80bdcfaf0258659a5aand the reviewed observer/projection deferral. Main’s bookkeeping simplification, background-image merge and existing expiry helpers are preserved. The current slice produces changed-owner/retirement receipts and retains retirement delivery; source invalidation arrives at its first consumer in slice 4. Exact-head proof passes all four test files (85 assertions), core/scripts lint, source contracts and the mock ratchet. Original timing/source pins remain unchanged.The Knip command remains failed: all 18 production and 10 full-tree diagnostics reproduce on captured main
ce5b795128e359ebebd9df80bdcfaf0258659a5a, with byte-identical native logs and all 12 reported source files verified identical. There are no candidate-only or GitHub-family findings. This is an inherited-static disposition, not a passing Knip run. ClawSweeper reviewed the earlier 298 head with no findings; the conflict-resolution request is complete, and the deferral has a separate P1 scoped-clean review. Hosted CI run 38128804209 has two failed test jobs. The three catalog-queue failures in job 114438872508 concern missing model/provider overrides through directsessions.patchManycalls. The test and mutation owner are byte-identical to captured main, and the affected session/model paths are unchanged by this PR. The lead accepts these as unrelated failures under relaxed-v4; same-test failure on main was not reproduced. Job 114438872533 repeats the pending-dashboard-title deletion uncertainty: prior targeted baseline and candidate runs both passed, so it is neither proven inherited nor claimed fixed. All scoped gate requirements are satisfied through the authorized relaxed-v4 disposition and the exact-head focused/static proof. No hosted failure was rerun or repaired by this classification, and this body does not claim all hosted CI is green. Evidence:slice2-ci-a9-disposition.json.Original implementation diff at
a6a6f479647b0832be8610a521ab8c28950bc534relative to4c299f5f656f66b565e51e85e3fc8934925e6940: production +189/−71 (260 changed lines); tests +184/−119 (303 changed lines); docs +9/−9 (18 changed lines).The recorded GitHub-style comparison uses observed
mainrevisionce5b795128e359ebebd9df80bdcfaf0258659a5aand merge basece5b795128e359ebebd9df80bdcfaf0258659a5a: production +124/−71 (195 changed lines); tests +113/−79 (192 changed lines); docs +10/−10 (20 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.a9a4633ced0dc7ba9b8656ae0d0f08be7a955a2f— user-background 17, user-channel-identities 8, user-profiles-multi-account 6 and users-github 54: 85/85, no failures/pending/todo, stable source.a9a4633ced0dc7ba9b8656ae0d0f08be7a955a2f— Type-aware core/scripts lint, source contracts/export collisions and native mock ratchet pass with native environments and stable source.a9a4633ced0dc7ba9b8656ae0d0f08be7a955a2f— 18 production and 10 full-tree diagnostics exactly match captured main; no candidate-only or GitHub-family findings. Native logs byte-identical, all 12 reported source files independently hash-verified.ce5b795128e359ebebd9df80bdcfaf0258659a5a— Same native pnpm deadcode:exports command; identical rule/path/export diagnostics as a9, stable source. Establishes the inherited-static disposition.29825607928a840fa96825bb5c78a9a339cde5ad— Four files: user-background 17, user-channel-identities 8, user-profiles-multi-account 6 and users-github 54. All 85 assertions pass; source stable. Actual 298 head retained.29825607928a840fa96825bb5c78a9a339cde5ad— Core/scripts lint, source contracts/export collisions and mock ratchet pass with native environments and stable source; Knip is recorded separately.29825607928a840fa96825bb5c78a9a339cde5ad— Earlier 298 scan failed on four exports. The GitHub observer/projection findings are removed by the reviewed a9 deferral; the current scan has only captured-main findings, recorded separately. Original execution remains failed.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 a9 Knip is explicitly FAIL (inherited), supported by the exact captured-main comparison; the successful focused run does not relabel any historical failed invocation. Both hosted jobs have the lead’s authorized relaxed-v4 disposition as documented above; the dispatch uncertainty remains unresolved and the catalog-queue failure is not claimed reproduced on main.Current source applicability accepted. Edge
4c299f5f656f66b565e51e85e3fc8934925e6940→a6a6f479647b0832be8610a521ab8c28950bc534has 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.Prior-edge source audit accepted for existing bundled paths. Previously bridged edge
fd8535cdb4dd35d8a82402bf0a5cdf3f345887ab→b785023b076ce9c8282f496b4b86dee68abaff45is SQL-neutral for valid existing connection/profile entrypoints. This is a source comparison, not a new measurement or correctness test.The complete nine-owner production diff preserves kernel reads, secret writes, mutation selection, transactions and commit admission. The connection worker operation body is byte-identical after its callback variable rename. Receipt owners/retirements derive from IDs already held by the mutation; validation and publication add only in-memory work, and empty batches remain omitted. A fresh immutable-head source census finds no production subscriber to the new connection-authority observer. The existing OAuth retirement subscriber receives the same nonempty IDs.
current-sql-source-bridge-5737ec7b.mdand its JSON bind the inspected diff and caller census to the current manifest. The lead accepted this bounded neutrality claim. Later source-authority subscribers are outside its scope; receipt validation, ordering, rollback and settlement still require separate correctness evidence.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: not required (v4). Connection and profile commits publish in-process authority facts; no update, Doctor, migration/schema, plugin loading, or service lifecycle change.