Repository navigation
refactor: reduce Gateway database work for profile labels and sharing - #167520
Conversation
Prepare account-owner labels with personal summaries and move bundled session-share identity cohorts into the existing shared-state reader. Retain foreign freshness, selected-session disclosure guards, physical source custody and released synchronous SDK contracts. Revalidate every prepared cohort at final publication. No schema, durability, retention or permission changes.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThe branch prepares account labels and shared-session identities in database workers, reuses read-admission freshness, and delays worker garbage collection until a quiet interval. Review scores
ProductKind: Performance · Worth it: Yes Merge readiness✅ Ready for maintainer review This PR retains useful work absent from current main. Both earlier findings remain resolved, and no new actionable patch defect was identified; CI remains red with recorded baseline-failure evidence. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway presents account labels and shared-session pages from SQLite profile and session data. Database workers prepare display facts, while the sharing owner checks current access and physical source identity before returning results. flowchart TD
A[Account or shared-session request] --> B[Existing database reader worker]
B --> C[SQLite profiles and identities]
C --> D[Prepared display facts]
D --> E[Current source and sharing checks]
E --> F[Account labels or shared-session page]
Technical reviewBest possible solution: Keep preparation with the existing database readers while preserving released SDK contracts, foreign-commit freshness, and final sharing checks. Do we have a high-confidence way to reproduce the issue? Not applicable as a performance refactor; source and recorded paired comparisons establish repeated synchronous database work without a reviewer-executed reproduction. Is this the best way to solve the issue? Yes: the implementation reuses the existing reader and sharing owners, cuts bundled callers over together, and preserves shipped compatibility paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2b007df256af. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +823, Tests +743, Docs +56, Other 0. Total +1622 across 40 files. Added test files: 3. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (5 earlier review cycles)
Reviewed October 8, 2026, 9:45 PM ET / October 9, 2026, 01:45 UTC (Revision 6). |
…ation Merge main without rebasing. Keep combined account labels on the independent read worker, retain each host snapshot guard through aggregate publication, and include the extracted schema helper in the PR wrapper inventory. Preserve the released synchronous SDK contracts.
Use payload finalization for the worker memory reclamation receipt. Bun supports collection but does not emit Node perf_hooks GC entries, which left the existing fixture waiting indefinitely. Preserve the heap, checksum, thread-reuse, and resource-limit assertions.
Preserve both catalog-identity capture and the newly landed meeting-transcript export capture. Focused reader tests pass and the integrated candidate has a clean P2 review.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…openclaw#167520) * perf(profiles): prepare catalog identity reads in workers Prepare account-owner labels with personal summaries and move bundled session-share identity cohorts into the existing shared-state reader. Retain foreign freshness, selected-session disclosure guards, physical source custody and released synchronous SDK contracts. Revalidate every prepared cohort at final publication. No schema, durability, retention or permission changes. * fix(profiles): preserve session listing contracts during preparation * refactor(profiles): enforce exhaustive worker read dispatch * perf(state): share retained read admission with consumption * perf(workers): defer forced collection until idle * refactor(profiles): declare stateless catalog assertion callbacks * refactor(state): extract shared reader schema admission * refactor(talk): keep voice effect type private * test(infra): observe worker payload collection across runtimes Use payload finalization for the worker memory reclamation receipt. Bun supports collection but does not emit Node perf_hooks GC entries, which left the existing fixture waiting indefinitely. Preserve the heap, checksum, thread-reuse, and resource-limit assertions.
Repair eager reader backedges introduced by 34cb8f7 (#167520) and ab5fd51 (#167238). Move physical-source validation and transcript presence queries to existing narrow owners, migrate every caller, and remove the broad exports. Preserve identity checks, query semantics, and snapshot ownership. The unchanged import regression passes with the fix and fails with both original edges when only the production diff is reversed. Core types and the import-cycle gate pass.
Repair eager reader backedges introduced by e414045 (openclaw#167520) and 23c7173 (openclaw#167238). Move physical-source validation and transcript presence queries to existing narrow owners, migrate every caller, and remove the broad exports. Preserve identity checks, query semantics, and snapshot ownership. The unchanged import regression passes with the fix and fails with both original edges when only the production diff is reversed. Core types and the import-cycle gate pass.
Builds on the landed auth worker owner in #166183; coordinates with #166703.
What Problem This Solves
Chat account-label projection can lazily admit profile schema and read native SQLite. Session Share repeatedly resolves profile and GitHub identities while projecting source and receiver pages.
User Impact
Personal-account labels and Session Share identities preserve their behavior while doing less synchronous database work on the Gateway. Schemas, stored bytes, permissions, durability, retention, and released synchronous APIs are unchanged; no operator action is required.
Why This Change Was Made
The existing shared-state read worker now prepares public account-owner labels with the personal-account summary and portable identity cohorts. Account-label preparation stays independent of unrelated queued writes. Bundled projection consumes those prepared facts. Released synchronous SDK facades remain available.
Design and compatibility
Identity cohorts share one admitted read scope and a bounded connection-owned cache. Local writes, foreign commits, schema changes, physical replacement and disposal invalidate the appropriate facts. Ordered conversion failures preserve page projection behavior. Source and receiver paths retain live authority through awaited work and final publication, including aggregate host responses.
The SDK additions preserve released synchronous actor/linker signatures. Awaited preparation helpers and optional session-list parameters preserve full fields, default participant hydration, deterministic order and canonical sibling validation when omitted. Session Share explicitly omits unused derived participants and counts. Physical-source assertions witness identity; final sharing guards remain native because raw SDK and foreign-process writers cannot publish complete revocation facts. The worker-access guide records their next-SDK-major retirement condition.
No schema, stored-byte, permission, durability, retention or released synchronous API changes. No new storage owner. Profile writes, FIFO and accepted-work settlement retain the existing owner.
Retained agent reads share admission and consumption within one synchronous freshness scope, removing a duplicate
data_versionprobe while still observing each foreign commit on a new use. Worker heap collection now waits for one quiet second and is cancelled by another task. The existing 32 MiB threshold, automatic GC, worker heap limits, inspector lifetime, and task settlement remain unchanged. Heap can remain through a task burst until a quiet interval. This scheduling repair claims no SQL or request saving.A separate diagnostic (
bb110fe5eb2a→60fc5ae87a69, before the later main integration) recorded a successful 40.212 ms worker collection overlapping 8.697 ms of a 9.031 ms cold request send-to-receive gap. The inspector post returned in 0.084 ms; the longer collection interval was asynchronous. The candidate sample recorded a 0.167 ms gap and no target-worker GC events. Worker termination omitted the diagnostic exit marker, so logger lifecycle coverage is incomplete. These two samples are excluded from all gates and do not attribute the entire cold-window improvement to GC.Approved catalog-operation cost
The coordinator approved the non-turn source-list cost on October 8, conditional on no added per-turn or per-message work. The added cold statements prepare current display facts in the worker and refresh final sharing authority after the await. Catalog refreshes and explicit history pages can repeat this cost; it is not startup-only. Source history batches distinct sender profile IDs once per page.
The new catalog-identity command is absent from every shared-workload trace. A final-head read-only audit verifies that all six relevant source/catalog/identity modules remain byte-identical to the earlier audited implementation and that producer/consumer sets and command-gated dispatch are unchanged. Bundled reachability confines the command to catalog list/read preparation; chat sending and message append do not call it. The hot-path gates below retain their normal requirements.
All 66 local samples are retained: nine alternating pairs each for chat and source list, five each for source history and both receiver flows. These compare
1339b6fd3e73with measuredefa1dce122776; the final-head non-runtime cleanups are qualified in the shared-workload section. Counts reconcile exactly against raw phase/thread/SQL and request records, with zero native SQL failures. Warm rows are per operation across ten calls. Fixture and lifecycle rows remain visible; “unmeasured” means no elapsed-time gate exists for that row, not omitted SQL.The local chat merged-profile duration remains invalid at 1.510451×. Cold and warm source-list duration flags are 1.643111× and 2.284318×, respectively; both remain raw flags under the approved source-list operation exception. No general latency pass is claimed for those rows. The final chat comparison below runs separately on a clean remote host; the local samples are retained and are not pooled across hosts.
Local operation wall times, milliseconds: medians [min–max]
Touched statement and request classes
These fixtures execute the production entrypoints in a Vitest MAIN process, not a listening network Gateway. Source fixtures contain twenty durable sessions or transcript rows; receivers use real profile storage with mocked node transport. All samples retain one counted, unmatched catalog-admission send.
Chat cold MAIN 402→22 removes exactly 380 statements in every local sample: 379 lazy native admission/connection/ownership statements and one owner-metadata SELECT. The all-thread median falls by 379 because of one additional candidate median WAL checkpoint. Warm and missing-owner paths remove two native cache/admission observations, two ownership inspections and one metadata SELECT (10→5); merged owners remove two metadata SELECTs with the same four observations (18→12). Commands remain 2→2:
userProfiles.modelAccount.selectionreplaces.summary, alongside the unchangeduserModelAccounts.catalog. Teardown removes five native connection/WAL statements and one state-readcloseResourcesend; worker cleanup remains counted.Source history cold 71→50 removes 21 statements: native acquisitions 10→1 save nine, GitHub SELECTs 10→1 save nine, a worker display SELECT adds one, and final selected-entry validation replaces five cache/scan/participant reads with one (−4). Warm 42→18 removes ten repeated GitHub SELECTs, nine acquisitions and five session reads. Final live sharing validation remains counted.
Receiver-list cold 15→4 removes twelve native admission/schema/content observations and one native open, adds two worker acquisitions and one display query, and reduces GitHub SELECTs 2→1. Warm 7→1 replaces six native observations plus the GitHub SELECT with one worker freshness observation. Receiver-history catalog admission 8→3 removes a native open and six observations, adding worker freshness and display queries; cold 7→3 makes the same replacement without the open. Its GitHub SELECT moves threads count-neutrally. Warm 7→1 saves six statements through retained worker facts. MAIN becomes zero for these receiver operations.
The new
catalogIdentityrequests remain visible: source list/history 0→1; receiver-list cold 0→2 and warm 0→1; receiver-history admission, cold and warm 0→1. They prepare page/history cohorts through the existing owner. They are absent from the shared chat corpus and are not automatic per-turn/message calls.Approved source-list cold 33→35 adds one worker display SELECT and one post-await sharing-freshness observation. GitHub acquisition and the identity SELECT move threads count-neutrally; omitted unused participant hydration pays for final selected-entry validation. MAIN drops 33→32, requests/frames rise 0→1. Warm 6→5 uses a retained worker page with one freshness observation instead of native freshness plus the repeated GitHub SELECT; session cache/participant reductions pay for the final sharing check. MAIN drops 6→4. The 0.2 upper-range variation is WAL maintenance on both sides.
Source-list setup/admission work is not claimed as separate optimization: per-run combined setup+admission medians are 4201→4202, requests 88→88, with the one extra statement an unchanged PASSIVE WAL checkpoint. Source-history preparation differs by one fewer WAL checkpoint. The empty-label source-list row retains one baseline and two candidate PASSIVE checkpoints from the observer/marker boundary; none is reassigned or dropped.
The local checker naturally hit its full-tree Knip timeout during this series; its production/script scans passed. No cancellation signal reached it or the measurement process. The resulting load change and all samples remain recorded. Timing-segment diagnostics are not exclusive CPU/SQL attribution, and independent segment medians are not added. The clean-host chat proof remains separate.
Final-head clean-host chat comparison
Five alternating main/candidate pairs on the same AWS Linux host compare exact base
1339b6fd3e73fb5eb0b3f96913be56f83f8df413with finalf55c3db1c265fe3ffa77e0129e5edf234ecc61be. Both sides used Nodev24.19.0, SQLite3.53.3, Linux x64 and the same executable. Every duration ratio passes; these samples resolve the local chat timing uncertainty without pooling across hosts. The complete invocation took 144 seconds.Before the first pair, a transport-only overlay added explicit runtime-version receipts to the private invocation driver. Its executed SHA-256 is
722e27eabba01e52a2bcd2413144eadf012371e7cc9aa0f1930bbc0e38688ace; the upload succeeded before chat began. All sampler, fixture, observer and analyzer bytes remain unchanged. The original driver and overlay receipt are retained, rather than describing this as the original payload.Clean-host chat wall times
All ten samples conserve native statements exactly by phase, thread and SQL, and logical requests reconcile to the independent observer records. Source pins, installed adapter/observer hashes, runtime receipts, and M,C execution order are verified. There are zero native SQL failures and no duration flags; no exception is used for chat.
Cold chat removes exactly 379 statements in every sample: 273 maintenance/schema-inventory statements, 105 other lazy native schema/connection/ownership admission statements, and one owner-metadata SELECT. MAIN falls 401→22 while worker SQL remains 9→9. Twelve worker schema-admission statements merely move from the extracted read-connection module to read-schema and receive no saving credit. The macOS baseline has one additional
checkpoint_fullfsyncPRAGMA, explaining its 402 MAIN count. Warm/missing calls remove four admission/ownership probes and one metadata SELECT; merged calls remove those four probes plus two metadata SELECTs. Production requests remain 2→2, with selection replacing summary as in the local corpus.The first pair's larger request ranges are all esbuild
runCallSync/transformSynccalls through tsx: bootstrap 7/7, fixture setup 1675/1681 extra sends, profile admission 286/288, and cold chat 23/23. Every extra is attributed, counted, and retained in the ranges. They are compiler IPC, not a claimed production-request reduction. Teardown still removes the five native cleanup statements and onecloseResourcesend. These clean-host results remain separate from the local series and its raw timing flags. Each sample also retains one counted catalog-hydration send whose target mapping is unresolved; there is no missing native SQL context, and no claim to count every physical IPC frame.Evidence: shared workload
Five complete alternating main/candidate pairs on one macOS host compare exact base
1339b6fd3e73with measured candidateefa1dce122776. The final candidatef55c3db1c265additionally extracts two unchanged schema-admission helper bodies into a sibling module and makes one unused internal type module-private. The helper bodies compare exactly after normalizing their export prefixes; the type edit changes no runtime code. Final-head validation is recorded below. Measurements retain their original pins.Every shared median duration ratio is valid. All ten classifications reconcile successful statements exactly by phase, thread and SQL, with zero missing SQL contexts. All workload, RPC, turn and shutdown receipts succeed. The shared workload and SQL observer are unchanged; the local series was admitted with at least 15 GiB free disk.
All values are side medians [min–max]. Warmed counts and requests are per turn; warmed wall time covers the complete ten-turn window.
Adjacent combined windows
Boot+connect+first-turn is conditional: only deferred-startup statements (cron start, delivery recovery, catalog refresh, health startup, memory/backfill kickoff) with PR-untouched stacks qualify, and that combined median must not increase. The first turn remains strict for everything else; the warmed-turn gate is unchanged. Other combined-window tolerance still needs unchanged-owner/background attribution.
Statement and request attribution
First-turn and warmed columns below are exact in every sample. Second-session columns are side medians and retain their one-statement variation.
session-entry-readcanonical main-key lookupsession-entry-readfused freshness observationhistory-pagefused freshness observationsession-runtime-targetfused freshness observationThe admitted retained read carries canonical-key and connection facts into its synchronous consumer, removing repeated observations. New unpinned uses still observe foreign commits. The fused freshness statement is
SELECT data_version, CASE WHEN ...with conditional schema/user-version subqueries. These are all-thread savings; moving an unchanged query between threads earns no reduction credit.Exactly 235 statements are removed over the first plus ten warmed turns in every sample: 25 + (21 × 10). The measured warmed decrease of 21.1 comprises 21 removed statements and 0.1 residual variation. The first-turn decrease of 87 comprises 25 removed statements and 62 statements of startup/cache timing variation. Second-session phase-median samples are main1/candidate3: 4534→4483, selected cohorts 128→84 (−44), residuals 4406→4399 (−7). Separate cohort medians are 128→85; they select a different candidate sample.
The all-phase median samples main1/candidate1 account for the measured 286-statement decrease as selected cohorts 642→364 (−278) plus residuals 25784→25776 (−8). The selected-cohort vectors are main
[642,641,651,642,642]and candidate[364,373,363,364,364]; 278 is a median-cohort reduction, not a constant per-workload saving.Connect 295→364 (+69) is deferred startup work landing before the first-turn boundary. The complete startup window falls 5574→5547 (−27), with requests 508→508. The actual connect median samples reconcile +69: bootstrap prune +4; channel-ingress health/pressure +4/+4; cron load/mutate/plan/schedule +3/+6/+1/+8; delivery failed-count/media-retention/tombstone-prune +6/+9/+7; device identity +3; HTML provenance +3; managed-image entries/original IDs +3/+3; plugin-state entries/sweep +2/+6; outbound delivery −1 and unassigned −2. These existing startup owners leave the first-turn window. Per-run whole-startup totals conserve the bootstrap, cron, media-retention, tombstone, identity, managed-image and plugin-sweep cohorts; health/notifier scheduling variation remains counted.
Compaction 575→603 (+28) and shutdown 1037→1000 (−37) share existing memory settlement. Combined SQL falls 1608→1600 (−8). In their median samples, memory tombstones +10, transcript statistics +13 and native admission +13 move into compaction and out of shutdown; outbound delivery −3, WAL −1 and plugin entries −4 offset part of compaction, with another lower WAL tick at shutdown. Stable combined cohorts retain their schema, corpus, tombstone, source-state, transcript, domain-close and plugin-state work. Candidate2's combined 2084 remains an explicit outlier: existing live run admission contributes 190 freshness reads, 95 transcript-anchor SELECTs and three other statements. Main3 has the same owner in cron (224/112 plus six). The median and combined-window rules apply; no outlier is discarded and this is not a claimed memory-work saving.
No deterministic worker-request elimination is claimed. Warmed logical requests/frames rise 0.2 per turn: one existing device-pair notifier sweep adds two
pluginState.entriessends across ten turns. Row-facts +0.1 and shared-facts −0.1 cancel. Main2's low 302.3 requests/turn reflects one fewer resident transcript worker receiving the unchangedcloseResourcesbroadcast (460 versus 560 messages over ten turns). The all-phase request increase of four reconciles to existing scheduling/maintenance: cron load/recovery +1/+1, outbound +2, plugin entries +2, maintenance metadata/prepare/release +2/+1/+1, placement projection +1, row facts −3, placement snapshot −1 and worktree-owner lookup −3. No new profile preparation is on the turn path: zerouserProfiles.catalogIdentitysends across all ten shared traces.Logical requests count initial sends, including lifecycle commands. Request-side frames additionally count continuation/protocol-response sends once. Reverse worker/admission controls and replies remain separate; this counts recognized census protocols, not all physical IPC.
Native failure vectors are main
[0,0,0,0,0], candidate[1,0,1,0,0]: both are existing post-ready plugin-lifecycle lease cleanupBEGIN IMMEDIATE: database is lockedrefusals. All workload receipts succeeded. Failed attempts remain in diagnostics and are excluded from successful-statement totals by the unchanged harness. Each run retains two boot-only unmatched target mappings (workerEnvironments.snapshot,userProfiles.catalog); their sends remain counted. No complete originating-caller or physical-IPC claim is made.Inventory and census
node scripts/database-worker-inventory.mjs --jsonran in both exact checkouts (1339b6fd3e73→ finalf55c3db1c265): T1 781 → 781, T2 375 → 375, T3 250 → 250, W 1072 → 1072; 2478 calls in 623 distinct files on both sides. Earlier inventory baselines are superseded by upstream changes and are not savings attributed to this PR. Shared lexical consumers remain for released synchronous SDK and other retained paths.Lane proof at f55c3db
Fresh Codex P2 review of the complete integrated migration and helper extraction was scoped-clean; the subsequent one-line internal type cleanup also received a fresh scoped-clean Codex P2 review. The final integration resolved imports only, preserving the landed auth worker handler and this lane's delegated profile reader. The validation table below covers the exact final candidate.
Regression coverage exercises cold, merged, missing and foreign-updated account labels through chat metadata under a main-thread SQL trap; secondary GitHub identities; zero-request empty linking; ordered malformed-row failures and corrupt-reader retirement without host fallback; physical replacement, sharing revocation, earlier transcript senders and earlier hosts at aggregate disclosure. Listing tests retain default participant fields and canonical sibling validation. Retained-reader tests enforce one freshness observation per new use and visibility of foreign commits across ordinary/snapshot paths. The GC regression fails before the scheduling repair and retains actual heap-reclamation coverage.
Owner-published changes invalidate stale attribution. A foreign commit after an accepted identity read preserves that page's attribution snapshot; the next preparation observes it. Attribution never grants access.
pnpm test <17 files> --maxWorkers=1pnpm buildpnpm check:changed --base 1339b6fd3e73fb5eb0b3f96913be56f83f8df413pnpm check:madge-import-cyclespnpm deadcode:knipnode scripts/database-worker-inventory.mjs --jsonpnpm plugin-sdk:api:diff --base 1339b6fd3e73fb5eb0b3f96913be56f83f8df413 --head f55c3db1c265fe3ffa77e0129e5edf234ecc61bepnpm test:docker:published-driver-updateThe focused command's 218 seconds is the measured runner wall cost for the 17-file invocation, not a projection of every CI shard. The full changed-file gate's authoritative exit-0 receipt was downloaded before its Testbox expired. Its final verbose log tail could not be retrieved after SSH admission closed; the receipt, exact source/tree pins and partial logs are retained. The subsequent AWS stage reuses that individual passing gate, not the incomplete overall Testbox run. An earlier local full-tree Knip timed out at its configured 600-second limit (605 reported); the remote full gate supersedes that failed local attempt. The final standalone Madge, Knip and inventory results are reused only after matching the final source/tree and log hashes.
SDK diff digest:
70cf870cbebd5153e767a12bea073a570a764951ef18c6ead3d7b45ddfd348a1. No entrypoints were added or removed. The 131 changed reachable export closures reduce to nine distinct declaration groups: optional admission callback and list options, prepared account facts, awaited helpers, a redundant inferred union member, and unused internal exports. This count is not 131 direct API additions. Released synchronous actor/linker signatures remain unchanged, and default list behavior is covered by regression tests.The real published 2026.9.9 updater completed against candidate 2026.9.9 at f55c3db. It recorded a finished update, returned
readyz=200, verified the running candidate, preserved durable session state, and passed the incognito-state contract checks. The candidate package inventory and tarball integrity checks passed. The package build also reported a Control UI startup-gzip warning (373676 bytes against a 373454-byte enforcement limit); this PR changes no UI files, and the build/update commands exited 0. This is recorded as a diagnostic, not a clean UI performance claim.Remote final proof: AWS lease
cbx_d4acf79f0dc9, standardc7a.8xlarge, run record. The remote command, archive download and controller all exited 0; the lease was released. Focused tests and the full changed-file gate ran earlier on Linux Testbox run 37837871853; that lease also has a successful cleanup receipt. No proof leases remain held by this lane.The final AWS lease waited about 67 minutes for a campaign proof slot, then provisioned in 40.329 seconds. Only one lease was held at a time. Source review and final static checks continued during the capacity wait. The final remote command was the task-owned pinned proof driver under
proof-slot.sh, using the existingscripts/crabbox-wrapper.mjs; it ran the table's repository commands without changing the shared harness.Size
The integrated diff adds 1045 and removes 222 production lines across 25 files (net +823), adds one wrapper-inventory tooling line, adds 829 and removes 86 test/support lines across 11 files, adds 56 documentation lines, and removes one obsolete mock-baseline entry. The growth carries the existing worker owner, ordered profile errors, foreign freshness, physical replacement, and multi-host/page disclosure guards; regressions also preserve released default listing behavior. The read-worker dispatcher, schema-admission helpers and SDK listing test are extracted into coherent modules to keep existing line caps without dropping coverage. A one-line unused internal voice-effect type export cleanup fixes an inherited dead-export gate without changing runtime code. The two census lanes share the same profile preparation and disclosure lifecycle, so they remain one PR. The four-file GC repair supports the cold-request latency gate and retains a real heap-reclamation regression.
Census edges cut over
src/state/user-profile-mutation.ts:45:10additional:src/state/user-profiles-internal.ts:277:47src/state/user-profile-github-identity.ts:124:16src/state/user-profiles-internal.ts:203:5These are runtime-edge retirements, not retirement of all shared lexical sites.
Landing integration and repairs
Integrated head:
6039fa9575b2870b5a09c021471073b6d2a5870b.Merged main at
7e80556f503d26ddde64e274bfb50cbbec7830f5without rebasing. The account-reader conflict preserves #167447: the combined private summary/public label operation uses the existing independent shared-state read worker, keeping the same SQL kernel and removing its obsolete writer registration. The existing startup contention regression failed before this integration repair withdatabase is lockedand passes afterward.Addressed ClawSweeper's P2 aggregate-lifecycle finding: every successful host retains its exact snapshot-current check through final publication, including hosts without identity linking. The existing multi-host regression now covers snapshot retirement as well as profile changes. Its new retirement case returned stale alpha rows before the fix and passes afterward. Also added the extracted schema helper to the native PR wrapper dependency inventory.
Final local proof: 99 tests across 10 files passed in 323.82 seconds (four routed shards; the tooling summary is emitted twice and counted once). This includes account metadata, personal accounts, profile cohorts, retained readers, Session Share, wrapper closure, standalone runtime build graph, shared-state worker imports, and reply import boundaries. Core production types, all 21 source-test type shards, extension production/test types, and four root-test shards passed. Madge passed with no cycles. Fresh full-candidate Codex P2 autoreview is scoped-clean. The new retirement test body took 291 ms in the passing local run; no hosted CI-time estimate is claimed.
Released-contract check: compared the synchronous actor/linker and runtime listing contracts with
v2026.9.9andv2026.10.1-beta.1. Released signatures remain compatible; the renamed account-selection kernel is internal and was absent from both released contracts. The existing API-diff report remains recorded above.The existing paired SQL proof is reused under the approved landing policy. The integration repair relocates the unchanged combined account-selection SQL to the existing independent reader; the publication fix adds no SQL. No new environment variables, schema changes, stored-byte changes, retention changes, or permission changes were introduced.
Scoped core/extension/test lint and formatting passed. Line-cap, max-lines, assertion-safety, and SQLite worker ratchets passed; no T1 count growth. Exact-head CI: run 37862073560, pending at this update.
CI fixture repair at 565726b
Fixture-repair head:
565726be3893bd909a47992b509acb9d719dfc06. The first integrated CI run exposed a PR-caused Bun test-fixture timeout: Bun supports inspector heap collection but does not emit the Nodeperf_hooksGC entries used by the new receipt. The fixture now observes the allocated payload withFinalizationRegistry; production GC and all heap, checksum, worker-reuse, and resource-limit assertions are unchanged. Pinned Bun reproduced the original 120-second timeout. After the repair, both focused tests passed on pinned Bun and Node 26.10.0; wrapper wall times were 107.60s and 137.84s respectively, with memory-test bodies of 2.127s and 3.381s. Infra test types, scoped lint, formatting, and a fresh isolated P2 review passed.That CI run also reported
SubagentRegistryMutationRejectedError: Subagent terminal execution changedin the unchangedsubagent-registry.persistence.test.tsinterrupted-recovery case. Inspection located the refusal at the lifecycle ownership recheck after a predecessor await, before mutation dispatch. The generic session-read path can affect timing, so source equality alone does not prove independence. The latest scheduled main failure and eleven failed node jobs from two earlier scheduled main runs did not contain this failure. Its attribution remains unresolved; it is not being treated as an inherited-failure waiver, and a later passing run would not prove a fix. No unrelated production change was made for it.The fresh integrated Plugin SDK report completed successfully for
7e80556f503d→6039fa9575b28: acknowledgement digest8772ecc1, 148 affected reachable export closures, eight changed declaration groups. These are closures, not 148 direct API additions. The subsequent commit changes only the two memory fixture files, so SDK/runtime inputs remain identical. Released synchronous actor/linker signatures and default session listing remain preserved.Final integration and inherited CI disposition
Landing candidate:
8c9f16022105d3f8463d9e3e96049edf9add291c, integrating mainac61a4059edda7bb5189b072b8b300c7f2c14702. The sole manual conflict keeps both catalog-identity capture and main's meeting-transcript export capture. No new SQL path was introduced by that resolution. Reader/cohort tests passed (36 tests, 107.79s); core production types, all 27 selected test graphs, extension production types and Madge passed on the integrated PR tree. Its fresh P2 review is scoped-clean.CI run 37867477802 completed with exactly two failed jobs plus the aggregate gate. The maintainer-authorized native inherited-failure exception is being used with complete head-bound evidence:
check-guards-architecture: main commit811d442afa2c1introduced the static cycle betweenprepared-model-catalog-fingerprints.tsandprepared-model-catalog-worker.tsafter the PR's local integration. Both files are unchanged by this PR, and the same Madge check independently fails on main3f76fe021990df309bfcd0905030520bb30f81f4with that exact cycle.checks-node-changed-4: the first Codex auth product-proof case times out at 180000ms. Clean mainac61a4059edda7bb5189b072b8b300c7f2c14702, without this PR, reproduced the same named timeout on Linux/Node24.19.0 in Testbox run 37867633283. Its test, migration/mock-server/receipt and instance inputs match the CI baseline and tested merge byte-for-byte. The baseline's second case also reported a thread-binding conflict; this is retained as an additional main diagnostic, not a claimed PR-CI failure. The first timeout's exact awaited phase remains unknown.The tested CI merge is
b8f32a8740ca6af4a02fc26e06a8239bddb870c1, with ordered parents12752ea59c735117d1d277ff359bff75921974bdand the landing candidate. The native evidence records both root job IDs, the failed aggregate, source equality, complete logs, independent baseline receipts and passing scoped proof. CI remains red; no failed or skipped coverage is relabeled green, and security/review/authority gates remain enforced.The diagnostic Testbox lease
tbx_01m4f2t51js5hvfhajqj6xk5ajwas stopped after its artifacts were collected. Its comparison stopped after the independent main failure, per the approved landing policy. Local attempts had stopped at the managed-Gateway preparation fence before test execution and are not counted as reproductions.