Repository navigation
refactor(github): prepare typed publication source authority - #168951
Merged
Merged
Conversation
Include the reviewed requester context and conservative source revocation repairs.
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.
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 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 branch history and carry reviewed API, fixture, and static-gate repairs at their owning slice.
Keep agent-run admission separate from publication mutation authority and preserve the reviewed fixture repairs at their owning boundary.
Preserve existing history and carry the reviewed repair at its 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.
Reuse native settlement and retain only consumed connection notifications.
Carry reviewed S7 source and inventory through the existing stack.
…ync/sw7d-kernels # Conflicts: # docs/reference/database-schemas/worker-access-inventory.md
# Conflicts: # docs/reference/database-schemas/worker-access-inventory.md # src/gateway/server-methods/github-personal-authorization.ts # src/state/openclaw-state.worker.ts
Contributor
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
…sw7d-source # Conflicts: # docs/reference/database-schemas/worker-access-inventory.md
…sw7d-source # Conflicts: # docs/reference/database-schemas/worker-access-inventory.md
…sw7d-source # Conflicts: # docs/reference/database-schemas/worker-access-inventory.md
…ync/sw7d-source # Conflicts: # docs/reference/database-schemas/worker-access-inventory.md
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 12, 2026
…w#168951) * 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 * refactor(github): prepare typed publication source authority Include the reviewed requester context and conservative source revocation repairs. * 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): preserve publication policy in source slice Keep agent-run admission separate from publication mutation authority and preserve the reviewed fixture repairs at their owning boundary. * 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. * refactor(github): simplify failed publication bookkeeping Carry reviewed S7 source and inventory through the existing stack. * 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): normalize publication requester revocation Carry the reviewed publication runtime repair through its owning slice. Preserve existing authority checks and pending recovery outcomes. * fix(github): defer source authority exports to their consumer slice * fix(github): defer worker exports until operation registration * refactor(github): stage source authority with its consumers * fix(github): preserve bounded deferral authority projection * test(github): expect host-minted publication requester
scribe-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Oct 19, 2026
First-parent upstream 5ed6a30..cb1b6cd (21 commits, including openclaw#168999 state query reduction and worker moves, openclaw#169075, af03aa0 ACP owner settlement, openclaw#168837 plugin metadata/reload ownership, openclaw#168776, openclaw#168951, openclaw#169039 runtime-only server builds, openclaw#169092 test batch d050, openclaw#168860 memory index publication writes into workers, openclaw#168991 session read lifetimes and reconciliation scheduling, openclaw#169091 tool/replay prompt prefixes, openclaw#168762 Solid chat leaf elements, openclaw#168941). Conflicts: - test/vitest/vitest.unit-fast-paths.mjs: upstream stopped forcing the two ACP translator files into the fast lane; kept that and our reply-turn-admission module-identity entry. - worker-access inventory: regenerated (634 files, 2429 calls). openclaw-state-worker-contract.ts auto-merged: upstream's GitHub publication-source operations next to our continuation custody operations. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Opaque requester callbacks cannot supply serializable, transaction-local source authority for worker-owned GitHub publication writes.
User Impact
Internal preparation captures a source capability for the selected session and current caller and observes connection revocation. Typed requester, coordinator, and public SDK cutovers follow in later slices; existing released publication entry points remain available.
Why This Change Was Made
Preparation captures durable session, lifecycle, profile/connection, workspace, and placement expectations and subscribes to owner revocation. Revocation consumes S4b’s canonical
githubPublicationReceiptsfacts, including absent and unknown facts. Host policy is checked during preparation, and source facts remain bound to the admitted physical database lifetime.This slice installs the connection-authority observer and projection at their first consumer. The host uses changed-owner and retired-profile receipt facts to invalidate retained source capabilities before notifying profile-retirement observers.
Shared-request deferral returns only the 31 authority columns needed by the canonical receipt owner, excluding large title, body, and next-action text. It stages each returned receipt directly without accumulating an unused row array.
Publication preparation explicitly requests session-mutation authority with
authorizesAgentRun: false. The shared policy still defaults totruefor send/control callers, so publishing an existing workspace does not require authority to start an agent run. Placement facts are projected into plain objects before crossing the worker boundary so their equality checks survive structured cloning.This slice supplies source-fact reads and connection-authority preparation. Source-worker fences and validation arrive with registered commands in slice 5. Typed requester/action brands, host binding, and pending-write settlement arrive with their first consumers in slice 6; the personal V2 factory and public facade follow in slice 7. Released opaque-callback signatures remain available through their deprecation window. 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.Requester lifetime, source and caller aborts now pass through the existing unavailable-error normalization, with the same live policy and caller-authority checks.
Stack dependency: S7 slice 4/7, head
65a7df81d548712b49beed6e7a60f83110919c37, basemain. Parent slice merged as9598e67a995d476b8164793cc6f7a65a3f524c7d. The original implementation base remains53a293ea16cb81b0a4db248d3361cf819a7d3e4a; the current integration base is27adc42c7c2aefc48eb59d1f4e6d3aa5a1b66a75.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 landing candidate:
65a7df81d548712b49beed6e7a60f83110919c37, tree2923a121f0280f97c287a8b0e029d7ebf5658338, integrated with captured main27adc42c7c2aefc48eb59d1f4e6d3aa5a1b66a75. This merge preserves main’s resident user-profile authority and updates the users-github fixture. Thirteen affected publication/authority suites pass 251 assertions in207.140seconds, including55 fresh users-github assertions. Another96 unchanged assertions are explicitly reused at their actual executed heads, for347 passing assertions across scoped coverage.Current type-aware core/scripts lint, source contracts and the mock-export ratchet pass. Knip exits1 with31 production/19 full-tree findings; its entire log is byte-identical to the captured-main27adc run, and all17 implicated source files match. Separate hosted-CI caveats below remain unresolved where stated.
The original935 bounded-projection failure remains recorded:42,512 text bytes exceeded the <2,048 budget. The repair selects31 authority columns and removes unused row accumulation; fresh804 SQLite proof passed. Prior804CI’s seven stale handler assertions were fixed by the six-line V2 fixture update and verified atd4. These original invocations are not relabeled as passing.
Historical cold timing exceptions — user-approved warm conditions met. These are the original measurements, not timings of the current landing head.
Repository and older shared evidence attribute first-use cost to existing compiled-JavaScript inventory/exact-sharing pools. Same-flow repeats amortize the cost; retained pool lifecycle is source-audited. The newer warm campaign did not retain task-worker IDs, so it does not assign every millisecond of shared/failure preparation to a specific worker. All warm ratios are ≤1.5; original cold values remain outside the ordinary duration gate. These are synthetic coordinator timings with setup excluded, not live GitHub or whole-Gateway measurements. Required follow-up: "pre-warm if a cheap sibling warm-up exists". No product warmup is included.
Original implementation diff at
37d22f58b38199326348d275fef2466c58d819cfrelative to53a293ea16cb81b0a4db248d3361cf819a7d3e4a: production +1413/−335 (1748 changed lines); tests +12/−14 (26 changed lines); docs +8/−7 (15 changed lines).The recorded GitHub-style comparison uses observed
mainrevision27adc42c7c2aefc48eb59d1f4e6d3aa5a1b66a75and merge base27adc42c7c2aefc48eb59d1f4e6d3aa5a1b66a75: production +1057/−346 (1403 changed lines); tests +47/−14 (61 changed lines); docs +7/−6 (13 changed lines). This is a pinned comparison, not a claim about current main.65a7df81d548712b49beed6e7a60f83110919c37— 13 suites,251assertions; zero failures/skips. Covers resident user-profile authority integration and55fresh users-github cases. Plus96explicit reused assertions yields347scoped passes, not one347-test invocation.d4ec2a9a76ea3ff6b5cef37111c3d5e1d1045fdc— sessions-github17/17 atd4; six fixture lines supply exactV2fields. Verifies the seven stale-fixture assertions exposed by prior804CI.804899b82a77ae33b5f6db9be475a709df85a099— 3/3 assertions; bounded shared deferral projection now passes, zero failures/skips.935ff538115d283b28760185a8017ce22bf18a5f— 76 passing assertions at935: owner-continuation9, aliases15, requester44, catalog8. Together with handler17 atd4 and SQLite3 at804, this is96 reused assertions. Changed users-github cases are freshly covered at65.65a7df81d548712b49beed6e7a60f83110919c37— Type-aware core/scripts lint, source contracts and mock-export ratchet.65a7df81d548712b49beed6e7a60f83110919c37— 31 production/19 full-tree findings; native log byte-identical to capturedmain27adc, with all17 implicated source files identical.7a695a0f91db5de010a402c9452527b3623a17cc— 12-query census;14 committed-file hash matches. No escaped legacy caller, runtime alias, mutating read or retired route. Source proof only.935ff538115d283b28760185a8017ce22bf18a5f— Six files: 132 pass/1 fail of 133 at the original head. Shared deferral returned 42,512 text bytes, exceeding the <2,048 budget. Resolved by the fresh 804 SQLite run below; this original run 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. Current S4 verification is251fresh assertions at65 plus96explicit reused cases. Earlierc118 coverage remains historical. Knip is an inherited failing invocation. Hosted disposition and unresolved coverage follow below.Prior d4 hosted CI failed in two unchanged test paths. The model-auth case
evicts a shared handle after row corruptionis now reproduced on captured main2c1f8c167747805bee91c55970f1b5f5fd0665f5: the sameinjected=falseassertion fails at line 215, with 0 passing/1 failing selected case and 19 filtered siblings in 36.469 seconds. The test bytes match d4 (evidence:baseline-model-auth-2c1f8c16/completion.json).The
build-artifactsfailure remains unproven on main. Its built-CLI session/transcript lifecycle test reaches an ordinary turn whereagent.waitreturnsstatus: "error"despite the expected visible reply. This is a runtime assertion failure; the test and assertion helper are unchanged. The lead’s main census found no matching failure and a sampled main build succeeded (evidence:slice4-d4-fail-build-native.log). The lead classifies this as unrelated ordinary-chat coverage under the authorized CI disposition, with that coverage explicitly unresolved. The347 scoped passing assertions do not establish a passing built-CLI lifecycle check, and no all-green CI or successful merge is claimed.Native admission refused the failed CI before creating a merge intent. After the recorded admission stall, the user authorized a head-pinned REST fallback once final static checks completed. Those checks are now complete as recorded above; no fallback submission or merge outcome is claimed here.
Current-head CI run 38139030366 remains red. Compact-small13 job 114469097157 repeats the model-auth line 215
injected=falsefailure already reproduced on captured main 2c1. Build-artifacts job 114469096412 repeats the unresolved ordinary-chatagent.waiterror despite the expected visible reply; inheritance is still unproven. Check-guards job 114469096686 reports that the main-addedworker-heap-flag.mjsis outside the duplicate-scan targets. That file is byte-identical on captured main 27adc and 65; the exact-base nativenode scripts/check-duplicates.mjs --coverageinvocation reproduces the same failure, exiting 1 in 0.370 seconds with stable source. Evidence:baseline-dup-27adc42c/completion.json(SHA25683ab8fe8d4db97dfc5d82dbcdb9575d4d79fae3f3802a17f5334fd2bf9b34eb5),slice4-65a7-compact.log,slice4-65a7-build.log, andslice4-65a7-guards.log. The 347 scoped passing assertions do not close the unresolved built-CLI coverage gap; no all-green CI or merge is claimed.Current target edge:
53a293ea16cb81b0a4db248d3361cf819a7d3e4a→37d22f58b38199326348d275fef2466c58d819cf. The lead acceptedrepair-source-bridge-16e1cb02.mdfor successful/common paths: requester signal checks are in memory; common6 excludes both changed production paths in all eight samples. Exceptional aborted/pending-recovery behavior is not claimed SQL-neutral. Completed failure-path behavioral proof is recorded at actual2c32aa6bfa7f9e1dc087d24c5f1cb810d50aebb1→7a695a0f91db5de010a402c9452527b3623a17cc: 40/40 across five alternating pairs (renewal-7a695a0f/evidence/results/failure/comparison.json). The original cold worker-turn preparation timing remains recorded; its user-approved exception is now satisfied by the same-flow warm ratio 0.572741. This does not claim a fresh measurement of this intermediate edge. All prior measured source identities below remain historical.Current source applicability accepted. Edge
53a293ea16cb81b0a4db248d3361cf819a7d3e4a→79ab1a4673bf04244ccba3f481ecd66676669507has 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
a039db39853e03e887dfaf7c11eb259eae1e60d1→21010f514a7685cd1d84e05bcce24be071eccd78preserves the reachable source SQL measured at4ab65d622fb4fbd1f3c83618385c3e0525bcf488→0f6905e8de94f7bc1852fe8d029fd9c179509633. Of 31 changed source entries, only three added modules differ: the in-memory observer consumes the new receipt shape, a type-only retirement selector is removed, and its unused inverse-currentness branch disappears. Fresh caller inspection confirms that measured/current bundled requesters do not select that branch. The lead accepted this bounded relation incurrent-sql-source-bridge-5737ec7b.mdand its JSON. Parent changes are inherited; the following counts and timings remain historical measurements, not current whole-tree execution.3 alternating common-workload pairs and 3 alternating owner-flow pairs completed with valid durations. Common medians:
First-turn falls by 60. Warmed mean +4 (+0.3931%) is accepted under the noise floor: auth-profile reads +0.9, memory domains +1.4, session admission −0.5, session/transcript reads +2.4, other state/control −0.2. All recorded operation caller files are unchanged; native/unassigned SQL contributes zero. Nothing in +4 is left unattributed.
Connect +32 (+2.7444%) is unchanged bootstrap, cron, delivery/media cleanup, plugin sweep, HTML provenance and session-listing work; native +2 is baseline-matching busy-timeout reads during plugin lease release. Adjacent boot + connect sums are base
[3513, 3485, 3469], candidate[3505, 3516, 3530]; medians 3485 → 3516, +31 (+0.8895%), duration ratio 0.9970. Second-session +26 (+0.6799%) comes from unchanged auth, memory, session and transcript owners. Both meet non-turn tolerance. Every other non-turn median is flat or lower.Whole-workload medians remain +13 statements/−1 request; this is not a workload-reduction claim.
edge4-common-owner-audit.mdrecords exact median selections, full conservation and matching native stacks. The new source-facts command never executes in the common workload; publication-table SQL stays fixed at 20 boot and 3 cron statements per run.Owner-flow medians:
| Owner flow | Base → candidate all-thread SQL median | Requests | Duration ratio |
| --- | ---: | ---: | ---: | ---: |
| shared.publish | 1832 → 1832 | 16 → 16 | 0.9831 |
| shared.claim-defer | 13 → 13 | 0 → 0 | 1.0867 |
Receipts:
hetzner-prioritized-2c32aa6b-v7/checkpoints/results/matrix/04-source/common-comparison.jsonandhetzner-prioritized-2c32aa6b-v7/checkpoints/results/matrix/04-source/flow-comparison.json. Flow SHA256:b30ad4ae3ebc76041e7cd16b6169fc1cd7ee61d996d7fbb79274597dc22edf6c. 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: not required (v4). Typed requester/source preparation and operation-scoped source-reader cleanup. openclaw-state.worker.ts closes the added reader on operation/backend cleanup; this does not change Gateway service startup/shutdown, migrations/schema, plugin loading, update, or Doctor.