Skip to content

refactor(plugin-sdk): complete awaited GitHub publication migration - #168954

Merged
steipete merged 146 commits into
mainfrom
dbasync/sw7d
Oct 11, 2026
Merged

steipete merged 146 commits into
mainfrom
dbasync/sw7d

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Bundled GitHub publication still reaches synchronous request, recovery, reporting, and runtime adapters after the worker and typed-source prerequisites are available.

User Impact

Shared, personal, and repository publication now await the worker-owned request and lifecycle paths throughout bundled production callers. Startup joins restart confirmation; shutdown joins accepted work; transcript reporting awaits its receipt update. Existing third-party writer methods keep their released arguments and completion timing.

Why This Change Was Made

The shared coordinator, RPC factories, runtime facade, and mutating read paths complete the cutover together. gateway-runtime lazily exposes prepareGitHubPublicationRequesterV2 and preparePersonalGitHubSessionActionV2; adapters forward those host-minted capabilities. Source-bound commands retain their source through destination settlement and check its predicates in the worker transaction. Failed or uncertain operations do not fall back to native execution.

Eight publication reads and connection reads use their existing state worker, replacing duplicate readonly protocols. Receipt lookup and execution-owner observation return absence without creating schema. Startup joins restart confirmation, shutdown joins accepted work, and transcript reporting awaits receipt updates. Regression fixtures seed canonical worktree registry rows and session facts to exercise current authority.

The stack preserves placement facts across worker cloning, separates verified-account admission from login-bound execution, and omits empty connection notifications. Role authority reuses the retained profile catalog in the Gateway, with the existing joined worker query for standalone callers, and retains its profile fence. Personal action checks consume current owner, role, and GitHub login from resident profile authority. Shared execution claims, publishing-fact updates, and deferral use coordinator custody for bookkeeping; the final effect and source guards remain unchanged. Shared async orphan deferral uses the worker’s empty-row check; repository reconciliation returns after its empty list read. Retirement checks once after the final awaited receipt read and holds its reservation through settlement. Checkpoint source preparation reuses the existing action guard. Repository execution checks custody after the complete awaited preparation sequence, avoiding the redundant intermediate check. No new fence, revocation generation, generic batching framework, or reconciliation protocol is introduced. If a checkpoint becomes available or a session is restored after the observation, the user may need a new publication request. A dispatched marker can remain if the final beforeRun effect guard refuses; that marker does not prove an observed GitHub effect. Original content and recorded GitHub effects remain intact. A concurrent invocation can admit the same session/idempotency key during identity preparation while a competing rejection clears the first client’s local selection or attempt. The durable admitted receipt remains worker-owned. This recoverable local bookkeeping race is accepted without a rejection-time reread or a new coordination protocol. The review demonstrated no executed authorization bypass; every further GitHub effect still requires current authority, and no additional live revocation test is claimed.

Reporting and claim deferral each use one fixed worker command and one transaction across the relevant publication kinds; execution-owner reads avoid a duplicate database open. The worker retains durable request, status, instance, digest, and claim predicates. Revocation after acceptance may settle bookkeeping or leave a publishing row for recovery, but it cannot authorize a GitHub effect.

The four legacy request/confirmation methods—requestForSession, requestForClaim, requestPersonalForSession, and confirmPersonal—name their V2 replacements. deferClaimPreparation, deferOrphanedRequests, listUnreportedResults, and markReported name their Async replacements. OAuth cancellation/disconnection retain synchronous adapters alongside awaited replacements. Annotations and migration docs state removed in the next Plugin SDK major, using the existing warning helper bounded by plugin and capability family. Core-only wrappers are removed; the SQLite/SDK registry records the retained writer compatibility boundary.

S10 handoff: the parked w6github work can consume GitHubPublicationRequesterV2, PersonalGitHubSessionActionV2, and GitHubPublicationTransitionAuthority with typed source preparation and insert/claim/checkpoint/effect operations. Retirement uses execution custody without a source reservation. Source-bound commands retain session/lifecycle, profile/connection, workspace, and placement expectations through destination settlement. This PR does not claim that all final synchronous authority guards are removed; that requires complete revocation facts at the relevant owner. No runtime freshness probes are added, and no schema, stored-data, retention, or update migration is required.

Requester lifetime, source and caller aborts use the existing unavailable-error normalization. Repository execution propagates pending-recovery errors instead of recording a terminal failure. The repaired fixtures use the V2 request entry point, retain observed-effect outcomes after revocation, and seed the canonical claim workspace. Focused runtime verification of these repairs is recorded separately.

Immediate repository execution borrows the caller’s branded V2 requester only when its canonical encoded snapshot, including alias bindings, exactly matches the reread row; otherwise it restores a requester, and cleanup releases only the requester execution owns.

All three cold timing exceptions now meet the user’s same-flow warm condition: repository 1.007231831×, shared 1.199174605×, and failed worker-turn preparation 0.572740991×. The original cold results remain reported below. Required follow-up: "pre-warm if a cheap sibling warm-up exists". No product warmup is included.

The SDK surface budget includes the named GitHub additions: five V2 types and two host preparation factories, totaling +7 public exports and +2 public functions while preserving main’s additions. The generated inventory and compatibility registry are refreshed through the repository tooling.

Stack dependency: S7 slice 7/7, head 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5, base main. Parent slice merged as c5ccf14ac77cb7dbbd05c4e9c64a0ba411d36e2f. The original implementation base remains a0eaf5e32865e1cc775adae6db9ce6e817970ad6; the current integration base is c5ccf14ac77cb7dbbd05c4e9c64a0ba411d36e2f.

Evidence

Original complete-stack proof source: f33795fc32205414b436f84f06dcd5e924255704, tree 7e949f3b906ebc5e0f70dfa483b22c018c43c3cb. Its tree matches reviewed repair f33795fc32205414b436f84f06dcd5e924255704. 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.

Current landing candidate: 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5, tree d7dbe62655e874daa066f87bd1dfa8ecc8227636, integrated with captured main c5ccf14ac77cb7dbbd05c4e9c64a0ba411d36e2f after S6 merged. The full 60-path comparison finds 58 paths byte-identical to d3b9 and two inherited upstream changes: startup now receives the activated placement instead of rereading it, and the compatibility registry adds placement-read warnings while preserving the GitHub warning. The three generic read adapters match d3b9 exactly; the 84 retired lines remain removed. Final native T1, type-aware core/scripts lint, source contracts, mock-export ratchet and SDK surface checks pass, as do seven fresh SDK runtime guardrail assertions. T1 falls from raw 621 to 616 and normalized 619 to 614. Knip exits 1 with 59 production and 35 full-tree findings reproduced on exact base c5cc; all 38 implicated sources are identical.

Actual proof remains attributed to its executed source: 252 authority/catalog assertions and seven SDK guardrail assertions at d3b9; 25 transcript assertions and the completed native suffix at 1901; SDK declaration/API/type-fixture and published-driver update-cell evidence at 1e61. The final 505-file mock census identifies 18 required tests, with all 427 cases backed by exact-byte passing reports: 315 at 1e61, 87 at d3b9 and 25 at 1901. These overlap the broader suites listed below and are not added to their counts; no fresh 427-test invocation is claimed. A separate final source census covers 108 production files and 79 symbols, including generic dispatch and facades, with no migration gap or freshness probe found. The update cell has passed; a review statement that it remained pending is superseded by the native completion receipt. That cell did not rerun on this successor.

Historical cold timing exceptions — user-approved warm conditions met. These are the original measurements, not timings of the current landing head.

Flow First-use seconds base → candidate Cold ratio Same-flow warm seconds base → candidate Warm ratio
repository.publish 0.671544942 → 1.581530125 2.355062 0.532329882 → 0.536179602 1.007231831
shared.publish 1.517890779 → 2.351212913 1.549000 0.103586268 → 0.124218022 1.199174605
repository.fail-preparation.worker-turn 0.066537728 → 0.588903527 8.850671 0.020428784 → 0.011700402 0.572740991

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 f33795fc32205414b436f84f06dcd5e924255704 relative to a0eaf5e32865e1cc775adae6db9ce6e817970ad6: production +1069/−599 (1668 changed lines); tests +1223/−324 (1547 changed lines); docs +261/−16 (277 changed lines).

The recorded GitHub-style comparison uses observed main revision c5ccf14ac77cb7dbbd05c4e9c64a0ba411d36e2f and merge base c5ccf14ac77cb7dbbd05c4e9c64a0ba411d36e2f: production +1246/−595 (1841 changed lines); tests +1208/−330 (1538 changed lines); docs +264/−19 (283 changed lines). This is a pinned comparison, not a claim about current main.

Check Result Tested source and scope Wall / CI seconds Evidence
Final native scoped static gates PASS 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5 — T1, type-aware core/scripts lint, source contracts, mock-export ratchet and canonical SDK surface. T1 raw 621 → 616; normalized 619 → 614. T1 3.739; core 33.502; scripts 44.322; contracts 92.721; mock 17.557; surface 6.646 (parallel) / not measured landing-7701bb6c/results/static-results.json; database-worker-ratchet.log
Final SDK runtime guardrail PASS 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5 — Seven fresh passing assertions; zero failures. This is separate from the 427 required cases reused at their actual prior heads. 28.23980031000002 / not measured landing-7701bb6c/results/completion.json; sdk-guardrail-vitest.json
Final native Knip export scan FAIL (inherited) 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5 — 59 production and 35 full-tree findings exactly match captured base c5ccf14; all 38 implicated source files are identical. Candidate 105.326; baseline 109.456 / not measured slice7-7701bb6c-inherited-knip.json; baseline-exports-c5ccf14a/completion.json
Hosted UI types baseline reproduction FAIL (inherited) 38f456226f626dd3868c2a4e754e75bf37b59e68 — Direct native pnpm tsgo:ui exits 2 with identical full diagnostic stdout to the candidate CI production-types job: six UI errors, matching file/line/column/code/message. All six failing type jobs report that same error set; production core types passed. 16.698358041000006 / not measured slice7-7701-inherited-ui-types.json; baseline-ui-38f45622/completion.json; slice7-ui-type-qualification.json
Final migration and call-graph closure PASS 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5 — Fresh full-tree source census: 108 production files, 79 symbols, five generic read commands. No unexpected nonfamily deprecated-method caller, worker-error native fallback, or runtime freshness probe found. Includes generic dispatch/validation, facades, aliases and session-deletion callers. Source-only audit; status/materialization reads and final-effect guards remain. not measured / not measured s7-migration-closure-7701bb6c-final.json
Final test-selection and reuse gate PASS 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5 — 505-file changed-export mock census identifies 18 required test files: 17 changed tests plus ci-node-test-plan. All 427 cases have exact-byte prior passing reports: 315 at 1e61, 87 at d3b9, 25 at 1901. Seventeen changed tests and five support files match d3b9. This is a source/reuse gate, not a fresh 427-test invocation. Prior invocation timings below; no combined timing / not measured slice7-final-test-reuse-7701bb6c.json
Current resident profile authority/catalog suites REUSED d3b9e09286cd18407cd59e6d21db0a7a4a530171 — 13 suites, 252 passing assertions; zero failures. Covers merged resident-profile authority. 216.93853211900205 / not measured prelanding-d3b9e092/results/completion.json; focused-gateway-vitest.json; reuse: Final 60-path comparison: 58 exact d3b9 paths and two accounted inherited upstream deltas. All relevant test blobs match final 7701; no rerun is claimed. Source receipt: s7-final-main-integration-7701bb6.json.
Prior integrated SDK runtime guardrail and surface REUSED d3b9e09286cd18407cd59e6d21db0a7a4a530171 — Runtime guardrail 7/7; canonical SDK surface check passes. Guardrail 25.983; surface 6.306 / not measured prelanding-d3b9e092/results/completion.json; static-results.json; reuse: Final 60-path comparison: 58 exact d3b9 paths and two accounted inherited upstream deltas. All relevant test blobs match final 7701; no rerun is claimed. Source receipt: s7-final-main-integration-7701bb6.json.
Transcript fixture repair REUSED 1901d6d45afe9b8ee9aabeba5282c6d727e07a45 — 25/25 transcript assertions pass; repairs the missing awaited markReportedAsync fixture exposed by the earlier 1e61 run. 74.50692887300102 / not measured repair-1901d6d4/results/completion.json; transcript-vitest.json; reuse: Exact transcript-test blob matches final 7701; complete source relation records 58 identical paths and two inherited deltas.
Integrated SDK compatibility, declarations and API diff REUSED 1e61d044c4c746da0e09d9210777c3d7d66baf31 — Released writer type fixture, generated exports and declarations pass. API comparison: 7 added exports, 184 reachable changes, no direct removals or entrypoint additions/removals. Canonical surface: 3668 exports, 2129 functions, 158 deprecated. Fixture 15.934; declarations 118.189; API 329.394; surface 6.940 / not measured sdk-1e61d044/results/completion.json; reuse: Lead-approved semantic reuse: later forwarder syntax preserves explicit public signatures; fixtures, conflict corrections and inventory updates do not change the released writer contract.
Integrated dependency and cycle checks REUSED 1e61d044c4c746da0e09d9210777c3d7d66baf31 — Madge passes. Configured Knip files/dependencies remains an inherited failure, listed separately below. Madge 21.428 / not measured sdk-1e61d044/results/completion.json; reuse: Lead accepts prior cycle proof through syntax-only forwarder and unchanged family source; final integrated static is separate.
Integrated configured Knip files/dependencies FAIL (inherited) 1e61d044c4c746da0e09d9210777c3d7d66baf31 — Configured files/dependencies scan fails with reproduced inherited findings; this invocation is not relabeled green. 75.408 / not measured slice7-1e61d044-inherited-knip-files.json; sdk-1e61d044/results/completion.json
Integrated check:changed cumulative coverage REUSED 1901d6d45afe9b8ee9aabeba5282c6d727e07a45 — 25 successful prefix stages at actual 1e61 plus 17 passing native suffix stages at 1901; one inherited Knip export failure remains. This is cumulative coverage, not an uninterrupted all-green single-head invocation. Suffix command sum 1674.027; prefix failure elapsed 245.736 / not measured slice7-1901d6d4-cumulative-check-changed.json; repair-1901d6d4/results/changed-suffix-results.json; repair-1901d6d4-remainder/results/changed-suffix-results.json; reuse: Lead accepts the cumulative source relation; final 7701 integrated static/T1 and exact-report test reuse supply the separate current-head gates.
Integrated original check:changed failure FAIL (resolved) 1e61d044c4c746da0e09d9210777c3d7d66baf31 — Original run passed 25 stages, then core-test typecheck failed on the transcript mock. Corrected 1901 core-test types pass; original invocation remains failed. 245.73559411899987 / not measured sdk-1e61d044/results/completion.json; slice7-1901d6d4-cumulative-check-changed.json
Integrated original broad runtime invocation FAIL (resolved) 1e61d044c4c746da0e09d9210777c3d7d66baf31 — Gateway 481 pass/1 fail; other suites 127 pass; SDK guardrail 7 pass. Transcript failure resolves at 1901; resident authority suites are superseded by fresh d3b9 proof. No all-green claim for this original invocation. Gateway 498.923; other 137.786; guardrail 26.298 / not measured landing-1e61d044/results/completion.json
Published-driver update cell REUSED 1e61d044c4c746da0e09d9210777c3d7d66baf31 — Published driver 2026.10.1; candidate and harness both actual 1e61. readyz 200, activation complete, no CLI errors; repeated maintenance and durable/incognito checks pass. Package 395.227; native 548.1047832119984 / not measured cell-1e61d044/published-update/completion.json; reuse: Lead explicitly accepts reuse through conflicts, fixtures, inventory and semantically identical SDK forwarder syntax; no later lifecycle behavior change and no fresh successor cell run is claimed.
Integrated original source-contract failure FAIL (resolved) 1e61d044c4c746da0e09d9210777c3d7d66baf31 — Two SDK forwarder exported-name collisions failed the original native source-contract check. The 1901 namespace-forwarding repair preserves explicit signatures; final 7701 native source contracts now pass. This original invocation remains failed. 93.19927380799999 / not measured landing-1e61d044/results/static-results.json; slice7-repair-test-matrix-1901d6d4.json
Migration closure REUSED 7a695a0f91db5de010a402c9452527b3623a17cc — 12-query census;14 committed-file hash matches. No escaped legacy caller, runtime alias, mutating read or retired route. Source proof only. not measured / not measured post-runtime-repair-deb8cf38/source-relation.json — latestMigrationSourceAudit; reuse: Two reviewed test-only corrections leave production unchanged: b6 personal teardown and f337 worker read awaits. Actual executed head retained; affected worker tests/types rerun separately.
Worker fixture — Node and Bun PASS 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. Node 30.823; Bun 28.180561 / not measured renewal-f33795fc/evidence/results/runtime/runtime-results.json; bun/runtime-results.json; both worker-fixture-vitest.json reports
Shared-publication tests REUSED 7a695a0f91db5de010a402c9452527b3623a17cc — Shared 23/23 and boundary 36/36 passed; includes unbranded legacy writer/callback paths. Both suites and production are unchanged through f337. 86.953 / not measured renewal-7a695a0f/evidence/results/runtime/runtime-results.json; bun/runtime-results.json; reuse: Shared/boundary inputs are unchanged through both test-only corrections; actual7a head retained.
Repository/requester aliases PASS 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. 211.293 / not measured renewal-a7c683b6/evidence/results/runtime/runtime-results.json; focused-gateway.log
Identity/profile focused tests PASS f0b9308c8af2f3211f1c2fe357baed96bc596f0d — 14/14 tests across user-channel-identities and user-profiles-multi-account; native single invocation. Historical exact-f0 result. 46.381 / not measured renewal-f0b9308c/evidence/results/runtime/runtime-results.json; state-focused.log
Personal publication — full suite REUSED b6e39b6b5f2c4769ee6ec8d232e02c581eed1ff9 — 50/50, zero failed/pending/skipped/todo. Includes executed legacy personal-writer cases; validates the teardown correction. Source remained exact throughout. 141.705 / not measured renewal-b6e39b6b/evidence/results/runtime/runtime-results.json; focused-gateway-vitest.json; reuse: F337 changes only the separate worker test. Personal suite and all production files are byte-identical to b6; actual executed head retained.
Dedicated SDK type fixture REUSED 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. 2.703 / not measured renewal-22b70997/evidence/results/bun/runtime-results.json; renewal-f0b9308c/evidence/results/runtime/sdk-test-types.log; reuse: Lead accepted the unchanged SDK fixture through the later source corrections; its actual executed head remains 22b7.
Types, declarations, cycles and dead code REUSED 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. core 63.085; dts 105.468; Madge 19.095; Knip 69.662; exports 84.721; diff 0.048 / not measured renewal-7a695a0f/evidence/results/runtime/runtime-results.json; sdk-declaration-comparison.json; exports/runtime-results.json; reuse: Two reviewed test-only corrections leave production unchanged: b6 personal teardown and f337 worker read awaits. Actual executed head retained; affected worker tests/types rerun separately.
SDK API comparison REUSED 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. 547.025 / not measured renewal-f0b9308c/evidence/results/runtime/sdk-api.json; sdk-api-evidence.json; renewal-7a695a0f/evidence/results/runtime/sdk-declaration-comparison.json; f0-sdk-declarations-baseline.json; reuse: Lead and metadata verification independently matched all 298 path/hash entries to original f0, including original source-receipt/runtime-results and baseline snapshot hashes. Original API comparison remains applicable to 7a.
Common workload and failure behavior REUSED 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. Per-phase/per-flow durations below; no total-suite timing claim / not measured renewal-7a695a0f/evidence/results/common7/comparison.json; failure/comparison.json; failure/*/vitest.json; reuse: Two reviewed test-only corrections leave production unchanged: b6 personal teardown and f337 worker read awaits. Actual executed head retained; affected worker tests/types rerun separately.
Earlier Gateway failure FAIL (resolved) 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. 521.34 / not measured renewal-deb8cf38/evidence/results/runtime/runtime-results.json; focused-gateway.log; renewal-22b70997/evidence/results/runtime/runtime-results.json
Full check:changed — earlier failure FAIL 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. 6.623 / not measured renewal-7a695a0f/evidence/results/changed/runtime-results.json; changed.log
Full check:changed — lint failure FAIL 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. 2623.708 / not measured renewal-b6e39b6b/evidence/results/changed/changed.log; runtime-results.json; lint-diagnostics.json
Check:changed — cumulative completion PASS 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. suffix elapsed982.658; command sum979.211; b6 prefix stages timed in original log / not measured renewal-b6e39b6b/evidence/results/changed/changed.log; renewal-f33795fc/evidence/results/changed-native/runtime-results.json; runtime-completion.json; native-plan.json
Same-flow warm timing conditions PASS f33795fc32205414b436f84f06dcd5e924255704 — Shared and failed worker-turn preparation: three alternating pairs each, all native assertions/same-process checks pass. Warm ratios 1.199174605/0.572740991. Repository original repeat ratio 1.007231831 retained. This satisfies the user’s cold-exception condition; cold ratios are not relabeled. Shared median 0.103586268→0.124218022; failure median 0.020428784→0.011700402 / not measured warm-repeat-f33795fc/completion.json; reuse-and-worker-lifecycle-audit.json

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 f33795fc32205414b436f84f06dcd5e924255704 failed 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. The current integrated evidence above supersedes only its named suites and gates; older complete-stack results below remain historical. Test reuse does not turn a prior failed invocation into a passing run. The 25-stage prefix and 18-stage suffix comprise 17 suffix passes plus an explicit inherited Knip failure, not a single all-green check:changed run. The accepted concurrent selection-rejection tradeoff is recorded in slice7-review-disposition.md and #168954 (comment); no executed bypass or additional live GitHub revocation proof is claimed. The final S7 disposition explicitly corrects the stale pending-cell claim: the published-driver cell passed at actual 1e61. Additional live GitHub revocation coverage remains a follow-up; no concrete bypass was demonstrated by the review. Final 7701 native checks and seven fresh SDK guardrail cases pass; the 427 required prior cases retain their actual 1e61/d3b9/1901 report identities. These counts overlap broader historical suites and are not summed with them. Current Knip inheritance is proven against exact base c5cc, not inferred from an earlier base.

Current-head CI run 38144916341 remains red: production-types job 114486503360 and all five core-test-type shards report the same six UI declaration/JSX errors. There are six failing type jobs, no cancellations, and no separate runtime-test failure in this set. Production core typechecking passed. The aggregate gate is job 114488316523.

The exact tested CI merge is 4e6e109a1be48f969e1e28a789bf2e39f2564bd2, with ordered parents 89564fa3a101b437a485fbe501dd99281c9402ba and candidate 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5. Its entire UI tree matches that main parent; the four affected source files also match captured later main 38f456226f626dd3868c2a4e754e75bf37b59e68. A direct native pnpm tsgo:ui invocation on that captured main exits 2 in 16.698 seconds and reproduces identical complete diagnostic stdout: the same six file/line/column/code/message errors. The inherited UI static failure is therefore reproduced, not merely inferred from unchanged files.

Evidence: slice7-ui-type-qualification.json, slice7-7701-inherited-ui-types.json (SHA256 e97caea09c9289b91e68201d8ec34bf90fdd0c4f71ab8d6f1b13f0486d754aeb), baseline-ui-38f45622/completion.json (SHA256 bf120633e009388018af8b404ff6f07270f47a4e0b86d5c7f43208fff5f11294), and slice7-7701-prod-types.log. Prior cb73 CI run 38143426826 succeeded but remains prior-head evidence. The ordinary native merge route refused before creating an intent; the lead is using the native admin route for this reproduced inherited static failure. Current hosted CI is not green, and no successful merge is claimed.

Common7 PASS: a0eaf5e32865e1cc775adae6db9ce6e817970ad6 → 7a695a0f91db5de010a402c9452527b3623a17cc, three alternating pairs, all durations valid. Lead accepted warmed +5 SQL/turn (+0.49687%) under the attributed 0.5% noise floor and non-turn increases under tolerance; first-turn −24.

Phase All-thread SQL base→candidate Requests base→candidate Duration ratio
01.boot 2316→2317 61→66 1.001041
01.connect 1204→1187 60→57 1.003325
02.first-turn 2572→2548 351→346 1.012287
04.second-session 3819→3826 662→660 1.009044
05.control-plane 37→38 6→6 0.995463
06.cron 1394→1386 214→218 1.003517
07.compaction 403→402 83→83 1.007391
08.shutdown 195→195 15→14 0.995502
03.warmed-mean 1006.3→1011.3 195.2→196.1 1.001511

Warm median samples are 3-main→1-candidate, not a paired-run subtraction: ten turns 10063→10113 SQL / 1952→1961 requests.

Unchanged owner SQL delta Request delta
Memory worker publication/setup +46 +9
Memory plugin-state lock cleanup +13 +2
Host memory lease rollback +2 +0
Device-pairing scheduled entries +4 +2
Remaining unchanged readers/admission -15 -4
Total +50 +9

All six first/warm origin files contain zero publication/connection commands; unchanged userProfiles.githubAttribution.resolve occurs once/turn. The only changed tracked warm-origin file has the unchanged placement-preservation callback (startup.ts 435→437), 10 requests/20 SQL every run. 240 other tracked origin files have identical blobs; three generated bundles are not delta owners. Boot +1 is deliveryQueue; S7 relocation is +16 worker/−16 host SQL (net 0). Second-session +7 is unchanged metadata/setup +14, auth +3, remaining −10. Control +1 is the existing PASSIVE checkpoint; delivery +1/mentions −1 cancel.

Whole medians 21991→21997 SQL (+6), 3403→3409 requests (+6) are not a redistribution claim. The attributed warm increase is below the noise floor, so no RAW extra pair was required. Earlier a7 failed RAW proof remains historical: four-pair whole 22030.5→22221 SQL (+190.5), 3400.5→3439.5 requests (+39). Evidence: respective renewal-7a695a0f/renewal-a7c683b6 evidence/results/common7/comparison.json and six current origin files.

Publication owner7: a0eaf5e32865e1cc775adae6db9ce6e817970ad6 → 7a695a0f91db5de010a402c9452527b3623a17cc, five alternating pairs, ten invocations ×9/9 = 90/90. No SQL increases; cold shared publication has a user-approved exception with same-flow warm proof below.

Flow All-thread SQL base→candidate Requests base→candidate Seconds base→candidate Ratio Disposition
shared.publish 1832→1703 16→26 1.517890779→2.351212913 1.549000 cold exception; warm condition met
personal.publish 12442→10185 22→39 5.546195727→4.779159210 0.861700 accepted
repository.publish 1186→1186 26→26 1.441727081→0.576107057 0.399595 accepted
connection.disconnect 21→18 3→2 0.137994576→0.132309449 0.958802 accepted
shared.claim-defer 13→12 0→1 0.005769434→0.007404955 1.283480 accepted
repository.recover 754→752 16→17 0.308517573→0.306075898 0.992086 accepted
repository.retire 111→109 9→10 0.050880414→0.051052101 1.003374 accepted
repository.orphan-defer 20→20 3→3 0.009608451→0.009931386 1.033609 accepted
shared.status 29→29 2→2 0.015092129→0.014194068 0.940495 accepted
shared.report 21→14 0→4 0.007531139→0.007836702 1.040573 accepted

Evidence: renewal-7a695a0f/evidence/results/owner7/comparison.json. Claim deferral does not prove live claim admission; reporting times coordinator list/acknowledge, not transcript append delivery. Earlier a7 SQL and defer/report timing regressions are resolved by this result without relabeling them.

Failure paths: 2c32aa6bfa7f9e1dc087d24c5f1cb810d50aebb1 → 7a695a0f91db5de010a402c9452527b3623a17cc, five alternating pairs, ten native invocations ×4/4 = 40/40. SQL/requests decrease in all four flows; cold worker-turn preparation retains its invalid raw ratio; its user-approved exception now has confirmed same-flow warm proof below.

Flow All-thread SQL base→candidate Requests base→candidate Seconds base→candidate Ratio Disposition
repository.fail-preparation.worker-turn 62→33 10→6 0.066537728→0.588903527 8.850671 cold exception; warm condition met
repository.fail-preparation.remote-exec 60→31 10→6 0.048278770→0.030740179 0.636722 accepted
repository.retire.archive 209→109 11→10 0.099715206→0.055456752 0.556151 accepted
repository.retire.reset 205→101 11→10 0.095833510→0.052448064 0.547283 accepted

Synthetic transport; only prepareClaimWorkspace and resumeSessionRequests are timed, excluding setup/verification. The actual baseline is prior 2c32, not the slice parent. Original fixture import failure was fixed by external-support-first ordering, without assertion/production changes. Evidence: renewal-7a695a0f/evidence/results/failure/comparison.json and ten native reports. The original cold delta is +0.522365799 s. Direct same-flow repeats now confirm that first-use cost is amortized; the warm timing and worker-attribution limit are recorded below.

First-use timing caveat: owner6/7 call the coordinator directly with a synthetic client, without real Gateway startup; owner7 orders shared→personal→repository in one process. Older exact a7 worker IDs show target/exact startup in candidate shared publication (~268/249 ms), then ~0.2 ms for those workers in repository; base first use is repository (~247/258 ms). Exact 7a per-run sums for those three publication windows give medians 8.516258→7.690622 s, 15460→13074 SQL, 64→91 requests. They exclude setup and are not whole-workload proof or a gate override. Gateway startup hydrates projectionLane but does not guarantee targetDiscovery warmth. These are compiled-JavaScript workers, not TypeScript compilation. No pool/routing workaround is planned; the user conditionally approved the cold exceptions, requiring same-flow warm ratios <=1.5. All three conditions are now met: repository 1.007232, shared 1.199175, and failed preparation 0.572741. Direct repeats amortize first-use cost; the source audit and attribution limits are recorded below. Required follow-up: "pre-warm if a cheap sibling warm-up exists".

Inherited cold6 timing exception: actual f9c477e→a0eaf5e3 cold SQL 1200→1186, requests 7→26, seconds 0.671544942→1.581530125, ratio 2.355062. Its other four owner flows and accepted common6 proof are recorded in slice6; the cold exception condition is met by repository repeat at ratio 1.007232.

User-approved cold timing exceptions — warm conditions met. Repository repeat remains the original five-pair f9c477e3387116c0b9e7dc35cecfb1f52addf786 → a0eaf5e32865e1cc775adae6db9ce6e817970ad6 result: 0.532329882→0.536179602 s, ratio 1.007231831. Three new alternating pairs compare shared a0eaf5e32865e1cc775adae6db9ce6e817970ad6 → f33795fc32205414b436f84f06dcd5e924255704 and failed worker-turn preparation 2c32aa6bfa7f9e1dc087d24c5f1cb810d50aebb1 → that same f337 head. All native assertions and same-process checks pass.

Same-flow warm operation Median seconds base→candidate Ratio
shared publication 0.103586268→0.124218022 1.199174605
failed worker-turn preparation 0.020428784→0.011700402 0.572740991

The new campaign also records supplementary cold samples: shared 0.568831818→1.150739805 s (2.022987759×) and failed preparation 0.024539257→0.350373265 s (14.278071459×). These do not replace the original five-pair cold numbers above and are not ordinary duration-gate passes. Direct same-flow repeats amortize first-use work; the source audit confirms that the pool remains alive between repeats. This campaign did not retain task-worker IDs, so it does not assign every millisecond to a specific worker. Prior repository/older shared evidence attributes first-use cost to existing compiled-JavaScript inventory and exact-sharing pools. Setup is excluded; this is synthetic coordinator evidence, not live GitHub or whole-Gateway timing. No new SQL measurement is claimed.

Evidence: warm-repeat-f33795fc/completion.json (SHA256 6dec994d872f40d296a2f34774becf313db58bf566cecb58f5c01a110c64e40c) and warm-repeat-f33795fc/reuse-and-worker-lifecycle-audit.json. Required follow-up: "pre-warm if a cheap sibling warm-up exists". No product warmup is included.

Released SDK limitation inherited from the implementation base: sharedStatus and latestShared became asynchronous in 5e1839ed224de (#161214), and personalStatus gained its required fourth argument in 124ddc0a49fe0 (#161124). Both changes already exist at base 951a75d4bf57; v2026.9.8/v2026.9.9 expose the earlier contracts. This S7 stack preserves the released writer/callback forms while adding worker-owned replacements, and its compatibility fixture covers those writer forms. It does not claim whole-family compatibility for the inherited status-reader changes. Follow-up belongs to the status-reader SDK owner: reconcile those signatures with the released compatibility contract and provide explicit replacement/deprecation paths.

Published-driver × candidate update cell: PASS (reused). The actual candidate and harness were 1e61d044c4c746da0e09d9210777c3d7d66baf31, using published driver 2026.10.1; no cell run on this successor is claimed. The lead accepts reuse because later changes are merge corrections, fixtures, inventory classification and semantically identical lazy-forwarder syntax, without lifecycle behavior changes. Gateway service lifecycle changes: startup awaits restart-confirmation readiness, runtime operations join readiness, and shutdown drains readiness/accepted operations before closing the publication scope. The compat registry only records deprecation diagnostics, not plugin loading. Schema admission moves out of old read paths, providing an additional schema-owner reason for coverage.

Include the reviewed requester context and conservative source revocation repairs.
Install canonical worker authority receipts before observers and ordinary replies.
Finish bundled V2/async routing, released SDK deprecations, migration documentation, and compatibility proof. Keep absent receipt and execution-owner reads free of schema writes.
Consume the corrected worker receipt and source contracts.
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.
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.
Keep synchronous cancellation and disconnection through explicit compatibility adapters while bundled RPCs await named worker-owned replacements. Share transition kernels and canonical postcommit facts. Split publication owners within existing boundaries and keep connection types acyclic. Update released-SDK coverage, migration guidance, and generated worker inventory.
…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 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 runtime bodies and branch history.
Preserve existing runtime bodies and branch history.
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 11, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 11, 2026
Base automatically changed from dbasync/sw7d-lifecycle to main October 11, 2026 13:48
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 7701bb6ccc0b2f3704eb2b1f131ffdd55a7626a5
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/server-methods/github-personal-authorization.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer disposition under the agreed landing policy: the reported concurrent selection-rejection case is an accepted, recoverable UI bookkeeping edge case. A competing invocation can admit the same key during identity preparation while another invocation emits a stale selection-rejection hint, clearing that client's local attempt. The worker's durable receipt remains intact. We are deliberately not adding a rejection-time reread or coordination protocol for this interleaving.

Final authority guards remain required before GitHub effects. The review explicitly reports no demonstrated bypass; the existing authority/publication tests retain their synthetic-transport scope, with no new live GitHub revocation claim. Additional live revocation coverage is a follow-up.

The published-driver update cell is no longer pending: [email protected] successfully updated to candidate 1e61d04, with readiness, exact build identity, activation, repeat maintenance, durable state, and incognito checks passing. Its reuse and actual tested head are documented in the final body; this is not a claim that the cell reran on the final landing head.

@steipete
steipete merged commit aec8993 into main Oct 11, 2026
139 of 147 checks passed
@steipete
steipete deleted the dbasync/sw7d branch October 11, 2026 14:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…penclaw#168954)

* 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.

* refactor(github): execute publication commands in state workers

Install canonical worker authority receipts before observers and ordinary replies.

* refactor(plugin-sdk): complete awaited GitHub publication migration

Finish bundled V2/async routing, released SDK deprecations, migration documentation, and compatibility proof. Keep absent receipt and execution-owner reads free of schema writes.

* refactor(github): await personal and repository publication lifecycle

Consume the corrected worker receipt and source contracts.

* test(github): exercise publication reads without optional state

* fix(github): admit worker reads and avoid empty connection writes

* fix(github): propagate reviewed connection authority repairs

Preserve existing branch history while carrying reviewed S7 repairs.

* docs(sqlite): refresh GitHub authority inventory locations

* fix(github): preserve released personal OAuth completion contracts

Keep synchronous cancellation and disconnection through explicit compatibility adapters while bundled RPCs await named worker-owned replacements. Share transition kernels and canonical postcommit facts. Split publication owners within existing boundaries and keep connection types acyclic. Update released-SDK coverage, migration guidance, and generated worker inventory.

* fix(github): propagate reviewed connections compatibility and gate repairs

Preserve existing branch history and stage-specific ownership contracts.

* refactor(github): keep publication worker contracts acyclic

* refactor(github): propagate reviewed worker type-cycle repair

Preserve existing runtime bodies and branch history.

* fix(github): repair publication source binding and compatibility fixtures

* 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 session mutation rights during publication

Treat publication as a non-run mutation while preserving default agent-run authorization for other prepared callers. Align real Git fixtures with canonical registry and session rows, retain lifecycle identity in status reads, and verify exact cancellation settlement.

Validation: all 50 personal publication tests pass (166.83s Vitest, 175.20s wrapper); core types, canonical worker inventory, and scoped P1 review pass.

* 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): preserve publication admission and committed source facts

Normalize placement projections across worker cloning, keep stable-account receipt admission separate from login-bound execution, and omit empty connection authority publications. Repair bundled workflow fixtures for the versioned requester surface.

Existing regression probes pass: four in-turn checkpoints, three merge-retirement cases, and accepted pre-claim login drift. Scoped P1 review has no actionable findings; cumulative remote validation remains pending.

* docs(sqlite): refresh GitHub profile writer evidence

* 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

* refactor(github): simplify execution bookkeeping authority

* perf(github): reuse state worker for connection reads

* refactor(github): reuse publication worker for lifecycle reads

* perf(github): avoid redundant checkpoint and orphan preparation

* perf(github): reuse resident profile role authority

* perf(github): reuse resident role authority

* refactor(github): check custody after publication preparation

* refactor(github): check custody after repository preparation

Remove the redundant intermediate custody check; retain the check after
the awaited receipt read and the existing effect authority checks.

* fix(github): preserve retryable publication authority failures

* fix(github): normalize publication requester revocation

Carry the reviewed publication runtime repair through its owning slice.
Preserve existing authority checks and pending recovery outcomes.

* test(github): inspect persisted failure after profile merge

* refactor(github): reuse matching prepared publication requester

* refactor(github): reuse matching prepared publication requester

* perf(github): simplify publication bookkeeping admission

* test(github): simplify personal publication cleanup

* test(github): keep durable publication reads synchronous

* 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

* fix(github): settle deferrals through authority receipts

* test(github): expect host-minted publication requester

* fix(github): align SDK forwarders and async transcript fixture

* fix(sqlite): classify GitHub worker-only publication operations

* fix(github): preserve migrated publication read dispatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts security-sensitive-changed size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant