Skip to content

chore(test): trim low-value session creation coverage - #207118

Merged
vincentkoc merged 5 commits into
mainfrom
test/creation-value-pilot-20261128
Nov 28, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
test/creation-value-pilot-20261128

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Creation tests repeat low-value option matrices, mock wiring and private-state observations. This maintainer-approved VALUE pilot removes selected coverage while retaining protected authority/ownership, data-loss, race/TOCTOU, privacy, release-integrity and witnessed user-visible regression guards.

User Impact

Internal test maintenance only; production behavior is unchanged. Coverage reduction is intentional. Focused validation and required exact-head CI passed. Fresh hosted review has zero source findings. Vincent explicitly approved the bounded floor exception for this single 381-net-line pilot on November 27, 2026.

Why This Change Was Made

VALUE decides KEEP/CUT; uniqueness is not a retention reason. All authority-distinct variants, including same/different backend, must retain equivalent proof. Keep one happy path per public method actually under test; observing/settling RPCs do not justify whole extra journeys.

APPROVED FLOOR EXCEPTION: Vincent explicitly approved landing this single 381-net-test-line pilot below the prior ≥2,000-net floor on November 27, 2026. The exception applies only to this PR; do not pad or widen scope.

Related: #139428

Freeze 4b752bd16f1d551a61824397af622d0cb213cfa4. Exactly28 original Creation roots, 12,144→11,763 LOC in 26 receivers. Discovery20 excluded. Changed:17 original test files (15 modified,2 removed), +432/−813; two necessary test-selector references +2/−2. Whole patch +434/−815. Production0; shared test-support0. Local fixture reductions are test LOC, not extra behavior-CUT credit.

Evidence

  • Frozen base 4b752bd16f1d551a61824397af622d0cb213cfa4; current candidate 69aed47648eba5d90b40da66ddfc2e7db66e3bcb. Full delta SHA-256 (11-character Git object abbreviations): 77d44da57b36139a1ebe544e056704dbcad6ec02af06ab505a0452a9f0721ff7.
  • Prior whole-ledger VALUE and repaired-byte static review passed on checkpoint 07045665458da4ff1b4a4b3813ff571e36fc66f3; subsequent checkpoints apply formatting and restore protected guards identified by local/hosted review and the finite remaining-CUT provenance audit. Inspection is separate from runtime proof.
  • Qualified physical frozen install passed with pnpm 12.15.0 and Node 26.13.1 on macOS arm64. Free disk: 64.15 GiB before, 64.09 GiB after; all 1,484 packages reused, none downloaded.
  • Scoped core/script/tooling lint passed; final affected-file lint and scoped formatter checks also passed after the two layout corrections.
  • Targeted type graphs passed: core-test-gateway-server(11.0s),scripts(14.0s),test-root-tooling(10.9s). After final provenance repairs, all five affected files passed scoped type-aware lint/format and the gateway-server type graph passed again in5.4s; other graph inputs are unchanged.
  • Actual Node validation passed: 19 files / 317 tests combined, with OPENCLAW_VITEST_RUNTIME=node and one worker. Initial gateway-server proof:14 files/165 tests (407.93s). Prior guard repairs replaced lifecycle18→19 and workspace14→16; the final provenance repair reran all five changed files: 108/108 tests,220.90s, replacing their103-case prior result. The nine other gateway files are unchanged:173 final gateway-server cases. Projects DB-worker:1/18 (95.93s); retained parent-fork:1/12 (15.40s); authenticated clone identity:1/9 (100.86s;296.81s command including E2E preparation); selector integration/sibling:2/105 (158.68s). Intermediate reruns and duplicate reporter summaries count once. These are validation costs, not a speedup comparison.
  • Both production and full-tree Knip unused-file scans passed with zero entries. Reused after the guard restorations: they only add test cases and imports to existing modules; no files or exports were removed, so these additions cannot create a newly unreachable file.
  • Complete-range Codex autoreview on the formatted checkpoint found two valid P1 coverage losses: the rejecting main-reset commit fence and distinct initial-input custody identities across profile owners. Both were restored, B110/B120 corrected, and lifecycle tests/lint/types passed. Exact callback-count checking stays removed. No unresolved local-review findings remain; the earlier review did not return clean.
  • First hosted ClawSweeper review at 41ebb88cc97bce892e5c5bcf0b36866e4b5bb78b found one P2: B196 missed the witnessed requested-directory diagnostic from P178664. Tracing the other diagnostic past the same test split also confirmed P140251 for B202. Both are now KEEP, with their actual bug/fix provenance below. The focused guards and original portable non-Git fixture are restored; workspace-policy16 cases, scoped type-aware lint/format and gateway type graph (3.0s) passed. No production changes.
  • Second hosted ClawSweeper review at a4f4f6bae048a9bb0b828f64fce0562dfdc97ef0 returned needs-human / one P2: B190.file was the witnessed regular-file cwd regression from P131955. The file fixture, typed refusal and no-row assertion are restored. A finite audit checked remaining CUTs against source and earlier history, following splits/folds where they obscured original witnesses: restored the P165989 shared deadline/no-catalog hang witnesses, P127661/P165929 blank explicit owner authority, P132112 reported large-fork success, P97332 fresh-child context/usage reset, and rejected-commit category nonpublication. B109 is now KEEP in the already-restored reset guard; removing a callback count is not a behavior cut. Remaining CUT reasons cite actual provenance and retained proof where relevant. No production changes. All five affected files then passed108cases,lint,format and scoped types; the subsequent exact-head result is recorded below.
  • Current exact-head native preparation passed with proof selection exact-head: CI, Build Artifacts Testbox, and Workflow Sanity, all success at 69aed47648eba5d90b40da66ddfc2e7db66e3bcb. Aggregate CI gate also passed:63success/75skipped/1neutral, no pending/failing required checks. Native preparation retained the same source head; it did not rebase or add source changes.
  • Final ClawSweeper review, reviewed 69aed47648eba5d90b40da66ddfc2e7db66e3bcb: 0 source findings, all previous findings repaired. The report returned needs-human solely for the 381-versus-2,000-line floor decision, with no source findings. Vincent explicitly approved that bounded exception on November 27, 2026, resolving the sole owner decision. Hosted review workflow46100749962 completed successfully; source and inventory are unchanged since that review.
  • git diff --check passed; no tracked references remain to either retired suite filename. No production or shared test-support changes. No baseline runtime comparison or speedup claim.

ClawSweeper review focus

Explicitly approved VALUE-based coverage reduction. Preserve every protected guard class and ALL authority-distinct variants. Challenge each enumerated CUT for hidden guarded-class/authority/bug coverage, invalid duplicate premise or collection/isolation breakage; challenge each KEEP for generic uniqueness, field echo, call shape or redundant happy-path reasoning. No uniqueness-only veto and no neighbor-name-only equivalence claim. The current exact-head review has zero source findings; its needs-human verdict concerned only the floor decision, now explicitly approved by Vincent for this single PR.

Guard and behavior counts

215 original inventory rows map to 248 stable child-expanded rows:227 KEEP /21 CUT /0 PENDING. Children are used where one original matrix has mixed outcomes. Counts are inventory decisions, not collected test counts. Retained class counts overlap: authorization120; data-loss61; happy-path3; ownership90; privacy37; race40; release-integrity14; security10; user-visible28. Retained cases may carry multiple classes.

— below means no linked bug found in inspected history, not a claim that none exists. Retention still needs its named protected contract. History lookup reaching a test split/refactor is not product-bug provenance. B186 was corrected to KEEP after introduction d0b8dbe proved a privacy/visible regression.

Per-file evidence and current receiver map

26 test entry files remain. Two source-compatible folds retain all moved behavior; this is not a proof that26 is the minimum. Frozen-base LOC and behavior anchors refer to the original28 files. Removed files contribute zero post LOC; moved bodies are counted in their receivers, never as deleted behavior.

File Base→post LOC +/− KEEP/CUT rows Receiver
src/gateway/server.sessions.create.account-authority.test.ts 633→629 4/8 20/0 self
src/gateway/server.sessions.create.accounts.test.ts 448→445 1/4 8/0 self
src/gateway/server.sessions.create.attachments.test.ts 147→110 1/38 2/1 self
src/gateway/server.sessions.create.auth-policy.test.ts 246→246 0/0 2/0 self
src/gateway/server.sessions.create.authority.test.ts 687→645 2/44 12/2 self
src/gateway/server.sessions.create.clone-identity.e2e.test.ts 224→224 0/0 3/0 self
src/gateway/server.sessions.create.communication.test.ts 349→349 2/2 5/0 self
src/gateway/server.sessions.create.disk-full.test.ts 190→190 0/0 2/0 self
src/gateway/server.sessions.create.dispatch.test.ts 915→939 165/141 15/3 self
src/gateway/server.sessions.create.durability.test.ts 478→467 3/14 8/2 self
src/gateway/server.sessions.create.firstbirth.test.ts 170→170 0/0 2/0 self
src/gateway/server.sessions.create.fork-search.test.ts 189→310 122/1 4/1 self
src/gateway/server.sessions.create.forks.test.ts 924→891 34/67 20/4 self
src/gateway/server.sessions.create.incognito.test.ts 296→296 0/0 8/0 self
src/gateway/server.sessions.create.lifecycle.test.ts 827→797 3/33 19/2 self
src/gateway/server.sessions.create.member-sandbox.test.ts 183→183 0/0 4/0 self
src/gateway/server.sessions.create.projects.test.ts 1010→1000 0/10 21/2 self
src/gateway/server.sessions.create.reload.test.ts 97→0 0/97 1/0 C09 dispatch
src/gateway/server.sessions.create.repositories.test.ts 245→235 0/10 5/1 self
src/gateway/server.sessions.create.repository-required.test.ts 321→321 0/0 3/0 self
src/gateway/server.sessions.create.reset-fork.test.ts 132→0 0/132 3/0 C12 fork-search
src/gateway/server.sessions.create.resolved-model.test.ts 356→356 0/0 6/0 self
src/gateway/server.sessions.create.sandbox-project.test.ts 502→502 0/0 7/0 self
src/gateway/server.sessions.create.spawn.test.ts 505→505 0/0 8/0 self
src/gateway/server.sessions.create.titles.test.ts 434→424 57/67 10/0 self
src/gateway/server.sessions.create.workspace-policy.test.ts 678→664 3/17 17/1 self
src/gateway/server.sessions.create.worktree-selection.test.ts 381→288 35/128 6/2 self
src/gateway/server.sessions.create.worktrees.test.ts 577→577 0/0 6/0 self

Necessary test infrastructure: scripts/lib/ci-policy-test-watch.mts +1/−1 and test/scripts/ci-changed-node-test-plan.integration.test.ts +1/−1 point the existing parent-fork owner watch/assertion to the fork-search receiver. Existing observed timing weights are unchanged; no runtime improvement is claimed without measurement.

Constructive consolidation and isolation

  • C18 reload→C09 dispatch and C21 reset-fork→C12 fork-search use the same connected creation fixture/mocks. Only imports and redundant fixture registration disappear; moved bodies and authority variants remain. Parent-fork changed-test selection follows its receiver.
  • C07 communication and C13 forks now use existing setupSessionCreateHandlerTestHarness: same canonical resource/reset and creation mocks, with startServer:false. Neither suite opens a socket or calls rpcReq; gatewayConnect in C13 constructs direct-request authority metadata. Two unnecessary suite Gateway starts are removed in source; execution/time impact is unmeasured.
  • B057 repository publication folds into B065 generated-key WebSocket row. Warm list precedes create; repository URL/ref is admitted with create, and FIRST post-ACK RPC lists committed workspace ID/URL/ref/branch. Existing selected-owner and junction variants remain. C19 direct handler/reopen flushes events and cannot replace this barrier.
  • B180.delete folds into retained stronger B058 real WebSocket pending-title deletion/no-resurrection guard. B180.drain retains its remote-metadata drain positive. B207 cwd and B208 selected source remain folded into C27's two existing real checkout cases, with both model/runtime/account/title variants preserved.
  • C03 retains real CSV attachment bytes through admission/worktree/sandbox preparation; initial message is empty. B064 fake image forwarding is CUT. This is not image-capability proof.
  • Dedicated C17 database-worker and C06 isolated E2E routes remain. Separate hoisted title/project/repository/sandbox mock worlds remain separate; no resetModules/doMock isolation assumption or new harness framework. No external shared-helper implementation changed.

Complete behavior ledger

One source header per original file; @ anchors are frozen-base lines. Every original behavior ID appears directly or through stable children. KEEP includes explicit receiver folds; CUT is intentional approved VALUE reduction. Helper/assertion-only trims do not inflate behavior CUT counts.

src/gateway/server.sessions.create.account-authority.test.ts

  • B001 KEEP @115 — Actor replacement cannot donate a captured personal account grant. [authorization; —]
  • B002 KEEP @133 — Email relink during preparation cannot move account authority to another profile. [authorization; —]
  • B003 KEEP @133 — A later relink cannot authorize a commit captured for another actor. [authorization,race; —]
  • B004 KEEP @239 — All six human/agent and none/default/explicit account grants remain. No-selection creation completes even with catalog loading held forever; only zero-call mock observations are trimmed. [authorization,user-visible; P165989]
  • B005 KEEP @239 — Session selection cannot rewrite account links or creator identity. [authorization,ownership; —]
  • B006 KEEP @282 — Disconnect ends the captured default-account request's custody. [authorization,race; —]
  • B007 KEEP @282 — Explicit-account request has its own captured capability/disconnect boundary. [authorization,race; —]
  • B008 KEEP @309 — Session-only scope cannot select another personal account capability. [authorization; —]
  • B009 KEEP @315 — Claimed scopes cannot impersonate recorded router admission. [security,authorization; —]
  • B010 KEEP @364 — Deadline/disconnect must not leave a late row or consume a retry. [race,data-loss; —]
  • B011 KEEP @400 — The reported New Session hang must share one monotonic 20-second catalog deadline across consecutive reads despite forward/backward wall-clock jumps; the held optional thinking read also cannot block creation. [race,user-visible; P165989]
  • B012 KEEP @443 — A running tool consumes its captured role policy rather than later edits. [authorization; —]
  • B013 KEEP @455 — Copied or unadmitted capability objects cannot mint creation authority. [security,authorization; —]
  • B014 KEEP @473 — Synthetic provenance cannot acquire an operator's personal default account. [authorization; —]
  • B015 KEEP @483 — Session creation never grants personal-account management operations. [authorization; —]
  • B016 KEEP @527 — Every permission-mode row represents a distinct allowed/denied authority boundary. [authorization; P193751]
  • B017 KEEP @548 — Configured Full cannot elevate a nonwriter or create a row. [authorization; P193751]
  • B018 KEEP @556 — Committed permission/account must match the admitted writer/admin grant. [authorization; —]
  • B019 KEEP @556 — Changed permission-default target cannot commit with stale captured facts. [authorization,race; —]
  • B020 KEEP @615 — Adoption cannot silently change any stored permission boundary. [authorization,ownership; —]

src/gateway/server.sessions.create.accounts.test.ts

  • B021 KEEP @115 — Raw service provenance/scopes cannot mint a fresh personal-account capability. [authorization; —]
  • B022 KEEP @143 — An explicit personal account pin remains bound across default changes/adoption. [authorization,ownership; —]
  • B023 KEEP @143 — A collaborator cannot donate its own account default to a fork. [authorization,privacy; —]
  • B024 KEEP @177 — Direct and routed provider endpoints have distinct credential-binding authority. [authorization; —]
  • B025 KEEP @177 — Keep actual pre-first-dispatch account snapshot/persistence/credential integrity; cut only fake responder's runStarted echo. [authorization,ownership; —]
  • B026 KEEP @322 — Unpinned adoption/fork cannot borrow the caller's personal default. [authorization; —]
  • B027 KEEP @347 — Foreign/unidentified/synthetic actors fail before naming/allocation and cannot mutate a row. [authorization,privacy; —]
  • B028 KEEP @397 — Keep committed old-profile naming and new-profile persistence; cut fake displayName/branch-format echoes. [authorization,privacy; —]

src/gateway/server.sessions.create.attachments.test.ts

  • B029 CUT @35 — Only waitForCreatedSessionRun test-support cleanup is exercised; manually injected terminal-persistence/source state is not a product creation guard (P201623 is fixture repair). [test-infrastructure; —]
  • B030 KEEP @74 — Initial/follow-up file bytes cross real sandbox/worktree preparation; initial request now has an empty message. [data-loss; P186572]
  • B031 KEEP @74 — Prepared relative media paths and completed worktree prevent missing/misdirected files. [ownership,data-loss; P186572]

src/gateway/server.sessions.create.auth-policy.test.ts

  • B032 KEEP @34 — Actual config application closes sockets after durable creation; both retained/revoked grants still dispatch committed input. [authorization,data-loss; P202513]
  • B033 KEEP @34 — Already-admitted inference survives later token revocation with one input/provider call. [authorization,data-loss; P204249]

src/gateway/server.sessions.create.authority.test.ts

  • B034 KEEP @39 — Guest sandbox requirement and system-owner exemption are authority-distinct. [authorization; —]
  • B035 CUT @39 — Unsupported sandbox property fails the closed patch schema before sandbox authority; real sandboxMode guard remains. [wiring; —]
  • B036 KEEP @102 — Captured member allowlist governs new writes while preserving existing authorized adoption. [authorization; P199413]
  • B037 KEEP @188 — Local/tunnel/default-role variants must retain the member's agent ceiling. [authorization; P199413]
  • B038 KEEP @188 — Existing access remains usable; only a later actual agent grant permits new creation. [authorization; —]
  • B039 CUT @297 — No-op assertCurrent spy plus category echo exercises call wiring, not changed/denied authority or a rejected commit. [mock-shape; —]
  • B040 KEEP @323 — Membership loss during queued fork cannot publish child or transcript. [authorization,race,data-loss; —]
  • B041.owner KEEP @430 — Explicit agent, qualified key and retired parent must not select an unconfigured owner; only prepareLifecycle spy observations are removed. [authorization,ownership; P127661]
  • B041.blank KEEP @430 — Explicit blank owner must be rejected both alone and beside a configured parent; parent-derived authority cannot silently replace invalid explicit owner intent. [authorization,ownership,user-visible; P127661,P165929]
  • B042 KEEP @459 — Plugin creation/patch/parent linkage must respect the actual plugin owner. [ownership,authorization; —]
  • B043 KEEP @512 — Foreign fork/link/adopt surfaces are independent authority entrypoints. [authorization,ownership; —]
  • B044 KEEP @570 — Reserved harness key forms cannot bypass create/patch/reset ownership. [authorization; —]
  • B045 KEEP @607 — Locked harness cannot be adopted while permitted unlocked adoption remains available. [authorization; —]
  • B046 KEEP @651 — Locked parent must not produce linked/fork/reset children. [authorization; —]

src/gateway/server.sessions.create.clone-identity.e2e.test.ts

  • B047 KEEP @45 — Clone/refresh/default-base each consume the selected authenticated source identity. [authorization,ownership; P196889]
  • B048 KEEP @45 — Retired credential source must stop each Git/network/dispatch entrypoint. [authorization; P196889]
  • B049 KEEP @45 — Rotated credential source must stop each distinct Git operation. [authorization; P196889]

src/gateway/server.sessions.create.communication.test.ts

  • B050 KEEP @148 — New versus adopted collaborator session retains the rightful creator/communication policy. [authorization,ownership; —]
  • B051 KEEP @195 — Collaborator/creator/admin mutation variants represent distinct authority grants. [authorization; —]
  • B052 KEEP @195 — Reset/reopen must not erase communication policy or replace its owner. [authorization,data-loss; —]
  • B053 KEEP @275 — Sparse defaults must project correct communication permissions without rewriting stored rows. [authorization; —]
  • B054 KEEP @275 — Partial policy override cannot erase retained metadata/effective permissions across reopen. [authorization,data-loss; —]

src/gateway/server.sessions.create.disk-full.test.ts

  • B055 KEEP @89 — Real transcript SQLITE_FULL must report terminal failure without phantom accepted input. [data-loss,user-visible; P176998]
  • B056 KEEP @89 — Distinct placement-admission pager failure must terminalize and remain retryable. [data-loss,user-visible; P176998]

src/gateway/server.sessions.create.dispatch.test.ts

  • B057 KEEP @148 — P161124 immediate WebSocket repository publication is folded into B065 generated-key row: first RPC after ACK lists committed workspace ID, URL/ref/branch; direct-handler reopen is not equivalent. [race,user-visible,ownership; P161124]
  • B058 KEEP @192 — Deletion joins actual reply custody and late title cannot recreate the deleted row. [race,data-loss; —]
  • B059.reply KEEP @257 — One held-reply case proves naming before startup/progress. [race,user-visible; P170794]
  • B059.empty CUT @257 — P170794 empty outcome executes only in finally after the same pre-dispatch title assertions; B059.reply retains the actual reported ordering witness. [permutation; P170794]
  • B059.error CUT @257 — P170794 error outcome executes only in finally after the same pre-dispatch title assertions; no outcome-specific guard is asserted. [permutation; P170794]
  • B060 CUT @257 — P170794 ALS is entered only in finally after title assertions and unsubscribe, so this setup cannot witness context isolation. B059 retains real before-progress ordering. [wiring; P170794]
  • B061 KEEP @314 — A failed title retries after the actual reply settles. [user-visible; P170794]
  • B062 KEEP @361 — Both physical owner/scope variants deliver mentions only to the intended recipient. [privacy,authorization,ownership; —]
  • B063 KEEP @429 — Stale mention selection cannot create a row or disclose wrong recipient data. [privacy,authorization; —]
  • B064 KEEP @451 — Empty-message attachment-only admission now reaches real prepared input/bytes in C03; cut only image-forwarding mock wrapper. [data-loss,happy-path; —]
  • B065 KEEP @483 — Generated-key and junction variants preserve physical store ownership/publication. [ownership,race; —]
  • B066 KEEP @542 — Bare global key cannot change fixed owner and conflicting agent is refused. [ownership,authorization; —]
  • B067 KEEP @600 — Selected global parent must consume the correct agent's model and hooks. [ownership; —]
  • B068 KEEP @651 — Selected global history must never disclose main-store history. [privacy,ownership; —]
  • B069 KEEP @685 — Pending work blocks its own physical owner rather than unrelated agents. [race,ownership; —]
  • B070 KEEP @744 — Selected global task executes and persists only in its captured store. [ownership,data-loss; —]
  • B071 KEEP @792 — All qualified-parent authority/store variants keep history and lineage in the authorized destination. [ownership,authorization,data-loss; —]
  • B072 KEEP @792 — Ordinary child creation must not acquire unintended fork/history relationship. [privacy,ownership; —]

src/gateway/server.sessions.create.durability.test.ts

  • B073 KEEP @214 — Concurrent accepted inputs and participant writes must all persist and dispatch. [data-loss,race; —]
  • B074.before-input CUT @286 — P166891 explicitly permits creation-only state before initial-input acceptance. This generic pre-input throw is an extra unaccepted-input fault permutation; actual transaction/commit refusal and exact retry remain. [edge-combination; P166891]
  • B074.after-preparation CUT @286 — P166891 prepared-hook throw is another pre-acceptance failure permutation; retain actual transaction/commit faults, cancellation after preparation and idle-chat commit ownership. [edge-combination; P166891]
  • B074.transaction KEEP @286 — Refused transaction must leave no accepted input and allow exact retry. [data-loss; —]
  • B074.commit KEEP @286 — Refused commit must leave no phantom input or dispatch and permit exact retry. [data-loss; —]
  • B074.revoked KEEP @286 — An actually cancelled admitted source cannot commit its queued input. [race,authorization; —]
  • B074.idle-commit KEEP @286 — Idle chat commit refusal must remain retryable without consuming source identity. [data-loss; —]
  • B075 KEEP @286 — Another agent's model-catalog write must survive the targeted input fault. [data-loss,ownership; —]
  • B076 KEEP @421 — Lost worker reply after durable commit must not duplicate dispatch/input. [data-loss,race; —]
  • B077 KEEP @448 — Redaction must not alter the user's committed execution/history bytes. [data-loss,privacy; —]

src/gateway/server.sessions.create.firstbirth.test.ts

  • B078 KEEP @42 — Both new/interrupted stores must enter schema admission before physical discovery/write. [release-integrity,ownership; —]
  • B079 KEEP @42 — Unadmitted reads cannot bypass the worker/database owner before first row persistence. [release-integrity,ownership; —]

src/gateway/server.sessions.create.fork-search.test.ts

  • B080 KEEP @30 — Explicit API fork must retain/search history beyond native/CLI prompt caps. [data-loss,release-integrity; P205671]
  • B081 KEEP @30 — Fork must copy the right event branch while resetting child-owned usage/visibility/workspace facts. [data-loss,ownership,privacy; P205671]
  • B082.cli KEEP @30 — Forked CLI child needs its own resume/fork binding while parent stays independent. [release-integrity,ownership; P205671]
  • B082.storage CUT @30 — Whether a public derived flag is physically stored is an internal representation constraint. [internal-state; —]
  • B083 KEEP @30 — Continuing a fork must never mutate parent transcript bytes. [data-loss; P205671]

src/gateway/server.sessions.create.forks.test.ts

  • B084 KEEP @45 — Ordinary New must not inherit implicit Home identity/model as its parent. [ownership,user-visible; P203694]
  • B085.syntax CUT @96 — P112535 adds positive spawn lineage, retained in fork/spawn keepers. Missing-parent/depth/flag combinations are extra malformed-option rows and do not witness the reported positive fork-depth failure. [edge-combination; P112535]
  • B085.owner KEEP @96 — A qualified missing parent must not redirect to another owner's/default session. [authorization,ownership; —]
  • B085.same-session KEEP @96 — Child creation must never overwrite its own parent identity. [data-loss,ownership; —]
  • B086.fallback KEEP @142 — Agent spawn must not borrow another provider's capacity when its source is unresolved. [ownership,data-loss; P132112,P205671]
  • B086.large KEEP @142 — Retain the reported 391,869-token parent admitted by the inherited 922K child model; rejected/clamped cases cannot prove large-fork success. [user-visible,data-loss; P132112]
  • B086.small CUT @142 — P132112 extra 150K/128K numeric rejection uses the same resolved-capacity refusal as B086.clamp. Keep reported large-fork success, provider fallback and actively selected window rejection. [permutation; P132112]
  • B086.clamp KEEP @142 — Explicit selected window must clamp larger provider metadata at the actual fork boundary. [data-loss; —]
  • B086.cli KEEP @142 — CLI-native fork has a different bounded history contract from explicit API fork. [release-integrity,authorization; P205671]
  • B086.native-missing KEEP @142 — Native runtime without its own capacity must not use API inventory authority. [release-integrity,ownership; —]
  • B086.native-unknown KEEP @142 — Warm API capacity cannot supply the native runtime's unknown capacity. [release-integrity,ownership; —]
  • B086.authored KEEP @142 — Explicit operator-authored native capacity is a distinct trusted source. [authorization,release-integrity; —]
  • B087 KEEP @328 — Active fork/prefix budget and Draft audience fences protect live/private parent content. [race,data-loss,privacy; P186828]
  • B088 KEEP @455 — Catalog/CLI/cold/disabled plugin choices have distinct owner-controlled locks. [authorization,release-integrity; —]
  • B089 KEEP @455 — Metadata must not start a cold runtime; locked patch and allowed deletion are distinct grants. [authorization,release-integrity; —]
  • B090.caller KEEP @554 — Caller-supplied key cannot cross catalog-owned identity; rejected request leaves existing owner unchanged. [ownership,authorization; —]
  • B090.unavailable CUT @554 — A mock returning undefined for research only echoes UNAVAILABLE; no real catalog/agent authorization is exercised. Keep real enabled/disabled catalog locks and B092 authority cells. [mock-outcome; —]
  • B091.selection KEEP @599 — Explicit versus automatic account/model provenance controls which durable selection a child inherits; preserve all native/runtime/profile source distinctions. [authorization,ownership; —]
  • B091.counters KEEP @599 — A fresh parent-linked child must clear the parent's stale resolved model/context budget and usage, with fresh zero totals. This is the reported 128K-versus-1M dashboard regression; explicit history-copy forks exercise a different path. [ownership,user-visible; P97332]
  • B091.fast CUT @599 — Extra Fast Mode override create is redundant with retained C15/C13 actual authority and selection boundaries; no distinct bug found. [permutation; —]
  • B092 KEEP @599 — Automatic fallback account/model pins are not inherited as user authority. [authorization,ownership; —]
  • B093 KEEP @733 — New-selection and exact no-op writer grants remain allowed across every authority variant. [authorization; —]
  • B094 KEEP @733 — Every actual model/profile/alias/thinking/Fast Mode mutation requires its admin grant. [authorization; —]
  • B095 KEEP @733 — Authorized selection change must retire stale context-window facts. [authorization,ownership; —]

src/gateway/server.sessions.create.incognito.test.ts

  • B096 KEEP @78 — Incognito must remain memory-only, private and correctly parented across its own backend. [privacy,ownership; —]
  • B097 KEEP @78 — Durable/shaped/subagent keys cannot launder incognito ownership. [authorization,privacy; —]
  • B098 KEEP @78 — Incognito delete/reset must forget without archival and reject foreign key classes. [privacy,ownership; —]
  • B099 KEEP @160 — A vanished agent cannot recreate hidden durable state or dispatch. [privacy,ownership; —]
  • B100 KEEP @203 — Direct inherited-incognito creation still requires the administrator grant. [authorization,privacy; —]
  • B101 KEEP @232 — Identityless owner-equivalent keyed reads/events cannot turn into discoverable listing. [authorization,privacy; —]
  • B102 KEEP @232 — Every writer-denied/admin-allowed incognito child entrypoint has a distinct authority boundary. [authorization,privacy; —]
  • B103 KEEP @232 — Reader/admin/writer disclosure grants must stay correct for keyed reads and events. [authorization,privacy; —]

src/gateway/server.sessions.create.lifecycle.test.ts

  • B104 KEEP @104 — Unrelated-writer progress during runtime preparation is a race regression. [race; P166059]
  • B105 KEEP @104 — The same race must preserve unrelated-row writes and drain coherently. [race; P166059]
  • B106 KEEP @192 — Rejecting the creation participation/commit fence must leave no category in the shared group catalog; a refused actor cannot publish group metadata. Keep the actual thrown fence and catalog outcome, trim callback count. [authorization,privacy; P123276]
  • B107 CUT @209 — The extra successful category-normalization/catalog/event journey repeats sessions.create success for a feature option; its exact broadcast/callback counts are wiring. B106 retains refused-commit nonpublication. [wiring; P123276]
  • B108.identity KEEP @230 — Concurrent same-key creates must share one durable identity and persist that same generation. [race,data-loss; P114477]
  • B108.sql CUT @230 — P169164 explicitly records that this attempted cold-SQL negative control also passed on the buggy base. Its session_nodes spelling filter cannot prove the performance fix; canonical concurrent identity remains B108.identity. [internal-state; P169164]
  • B109 KEEP @249 — A supplied rejecting creation commit fence must actually reach main-session reset. The rejection and unchanged durable session remain in B110; removing the exact callback count does not count as a behavior cut. [authorization; —]
  • B110 KEEP @261 — A rejecting source commit fence must reach main-session reset and leave the persisted session unchanged; exact callback-count assertion removed. [authorization,data-loss; —]
  • B111 KEEP @268 — Draft replay must not change an existing session's audience. [privacy; —]
  • B112 KEEP @288 — Selected tool capabilities must persist before execution and conflicting replay must fail. [security; —]
  • B113 KEEP @344 — Reset must clear stale node execution ownership before Gateway execution. [ownership; —]
  • B114 KEEP @370 — Writer/admin Fast Mode permissions and creator provenance are distinct authority guards. [authorization; —]
  • B115 KEEP @388 — Concurrent state change must not let a writer reset with changed privileged Fast Mode. [authorization,race; —]
  • B116 KEEP @436 — FIFO/drain race must refuse before cleanup or placement damage. [authorization,race,ownership; —]
  • B117 KEEP @509 — Reset retains the recorded permission and workspace boundary. [authorization,ownership; —]
  • B118 KEEP @521 — Reset cannot change creation-only visibility of the existing session. [privacy; —]
  • B119 KEEP @528 — Restart replay, no duplicated initial work and conflict refusal protect durable idempotency; cut only forwarded-param shapes. [data-loss; P190862]
  • B120 KEEP @528 — Replay cannot bypass scope downgrade or cross profile owners; reused public keys retain distinct initial-input custody identities across owners. [authorization,ownership; P190862]
  • B121 KEEP @605 — Durable replay must resolve the correct live incarnation without new label claims. [data-loss,ownership; P190862]
  • B122 KEEP @665 — Warm cache must follow the replacement receipt across new/reset incarnations. [data-loss,ownership; P190862]
  • B123 KEEP @736 — Parallel New preserves busy parent; worktree restriction and no-reset-hook outcome remain. [race,user-visible; P191372]

src/gateway/server.sessions.create.member-sandbox.test.ts

  • B124 KEEP @25 — Tunnel/default-role metadata cannot replace the persisted member's authority. [authorization; P199413]
  • B125 KEEP @25 — Creator and enforced sandbox follow the admitted role/runtime authority. [authorization,ownership; —]
  • B126 KEEP @25 — Unavailable/host execution must not silently bypass required sandbox enforcement. [authorization,user-visible; —]
  • B127 KEEP @25 — Fork/spawn must preserve the distinct host/operator source grants. [authorization; —]

src/gateway/server.sessions.create.projects.test.ts

  • B128 KEEP @184 — All ready/abort/retry, sandbox/worktree and image outcome cells stay; trim mock materialize credential/signal and assertSelected call shapes only. Authenticated source-owner proof remains C06. [authorization,security,user-visible; —]
  • B129 KEEP @184 — Provisioning secrets stay private while accepted durable work intent remains recoverable. [privacy,data-loss; —]
  • B130 KEEP @184 — Accepted initial media bytes and one user event survive delayed provisioning. [data-loss; P186572]
  • B131 KEEP @184 — Stop must cancel the exact accepted run/source without duplicate dispatch. [race,ownership; —]
  • B132 KEEP @184 — Authentication/network failure must remain durably visible instead of silently dropping work. [user-visible; C30ec4a1]
  • B133 KEEP @184 — Retry must preserve session identity and isolate old URL-only work from a new source. [ownership,data-loss; —]
  • B134 KEEP @184 — Accepted source/checkpoint must determine copied bytes and worktree ownership. [ownership,data-loss; —]
  • B135 KEEP @509 — Concurrent/aborted sends cannot create competing final owners or lose accepted files. [race,data-loss,ownership; —]
  • B136.sources KEEP @617 — Raw URL cannot compete with project-ID/cwd source authority. [authorization,ownership; —]
  • B136.missing-turn CUT @617 — Missing initial message is an extra malformed project-option combination. [edge-combination; —]
  • B136.blank CUT @617 — Blank URL is an extra lexical-input permutation without a linked incident found. [edge-combination; —]
  • B136.file-url KEEP @617 — Remote preparation must never consume a local file URL. [security,privacy; —]
  • B136.credential-url KEEP @617 — Credential-bearing URL must fail before Git or dispatch can expose it. [security,privacy; —]
  • B136.existing KEEP @617 — Remote preparation must not repurpose an already existing target session. [ownership,data-loss; —]
  • B137 KEEP @649 — Corrupt stored intent cannot dispatch in the unrelated default workspace. [ownership,user-visible; —]
  • B138 KEEP @685 — An outside remote source must stay isolated from host/sandbox data. [authorization,ownership; —]
  • B139 KEEP @725 — Both alias forms must bind to the same canonical physical source. [ownership; —]
  • B140 KEEP @757 — Cross the actual100-record retention boundary; accepted checkpoint/bytes survive GC/new HEAD. [data-loss,release-integrity; —]
  • B141 KEEP @843 — Competing project-ID/raw/node selectors and unknown identity cannot redirect work. [authorization,ownership; —]
  • B142 KEEP @866 — A stale project must fail truthfully rather than redirect to another source. [ownership,user-visible; —]
  • B143 KEEP @880 — Repository child has an independent accepted checkpoint without premature host checkout. [ownership,data-loss; —]
  • B144 KEEP @880 — Child override/refusal cannot change parent bytes or accept the wrong checkpoint. [ownership,data-loss; —]
  • B145 KEEP @880 — Parent replacement during preparation must fence every child completion. [race,ownership; —]

src/gateway/server.sessions.create.reload.test.ts

  • B146 KEEP @14 — Admin/operator grants retain first input through unrelated topology add/removal; body folded unchanged into C09 connected dispatch fixture. [authorization,race,data-loss; P169249]

src/gateway/server.sessions.create.repositories.test.ts

  • B147 KEEP @41 — Cloud repository identity survives reopen/replay/list without local checkout or dispatch. [ownership,happy-path; —]
  • B148.source KEEP @41 — Warm PR view must use the cloud repository identity, not probe unrelated local Git. [ownership,privacy; —]
  • B148.listeners CUT @41 — PR loader listener cardinality and repeated helper calls are cache implementation observations. The actual cloud repository/reader source and no-local-Git outcome remain; reader replacement/withdrawal regressions belong to their independent PR-loader suites. [internal-state; P147373,P154750]
  • B149 KEEP @41 — Adoption cannot replace an existing session's repository source. [ownership,authorization; —]
  • B150 KEEP @175 — Replay preserves its repository branch identity; fork gets a separate identity. [ownership,data-loss; —]
  • B151 KEEP @221 — File/protocol-option URL and local-worktree/message conflicts cannot cross repository admission. [security,ownership; —]

src/gateway/server.sessions.create.repository-required.test.ts

  • B152 KEEP @54 — Cloud acknowledgement owns a durable record without prematurely starting an input. [ownership,happy-path; —]
  • B153 KEEP @54 — Only the admitted pinned worker may receive credentials/verified image bytes. [authorization,security,release-integrity; —]
  • B154 KEEP @54 — Source/policy/Stop gates must precede credential access and Git side effects. [authorization,race; —]

src/gateway/server.sessions.create.reset-fork.test.ts

  • B155 KEEP @14 — Idle/active reset must erase prior model context at a stable reset boundary. Body folded unchanged into C12 connected fork-search fixture. [data-loss,race; P166660]
  • B156 KEEP @14 — Completed-prefix fork must not copy unfinished/cleared reset context. Body folded unchanged into C12 connected fork-search fixture. [data-loss; P166660]
  • B157 KEEP @14 — Full fork preserves valid reset context/tool ordering without changing parent bytes. Body folded unchanged into C12 connected fork-search fixture. [data-loss,release-integrity; P166660]

src/gateway/server.sessions.create.resolved-model.test.ts

  • B158 KEEP @58 — Permitted default personal account binds without turning a default model into an explicit pin. [authorization; P169030]
  • B159 KEEP @114 — Public versus trusted in-process/signed resolved selections have distinct authority sources. [authorization; —]
  • B160 KEEP @114 — Every denied/revoked/mismatch/spoof/role variant must fail before row creation. [authorization,security; —]
  • B161 KEEP @114 — Resolved selection must retain the correct parent's identity/lifecycle/provenance. [ownership,data-loss; —]
  • B162 KEEP @297 — Wildcard model access cannot grant a restricted-program capability. [authorization; —]
  • B163 KEEP @297 — A restricted-program denial must still allow authorized standard/clear selection. [authorization; —]

src/gateway/server.sessions.create.sandbox-project.test.ts

  • B164 KEEP @77 — Sandbox/config changes must not reuse another request's project grant. [authorization; —]
  • B165 KEEP @77 — External/cross-agent sources require their own grants and an isolated checkout. [authorization,ownership; P194830]
  • B166 KEEP @77 — Changed project visibility must take effect at every disclosure/admission entrypoint. [authorization,privacy; P194830]
  • B167 KEEP @264 — Explicit/wildcard/private/public grants are distinct authority sources and cannot be flattened. [authorization,privacy; P194830]
  • B168 KEEP @264 — A later request cannot retain a revoked project grant. [authorization; —]
  • B169 KEEP @365 — Next direct/spawn handoff must reenter current project admission rather than borrow old authority. [authorization; —]
  • B170 KEEP @365 — Person merge cannot donate another person's project grant. [authorization,privacy; —]

src/gateway/server.sessions.create.spawn.test.ts

  • B171 KEEP @50 — Enabled/disabled and fork/nonfork paths must keep the parent's private Draft audience. [privacy; P186856]
  • B172 KEEP @50 — A shared child must retain its own owner/policy/sandbox rather than publish or mutate parent. [authorization,ownership,privacy; P186856]
  • B173 KEEP @50 — Persisted fork history stays Draft even after the parent is published. [privacy; P186828]
  • B174 KEEP @203 — The actual Draft fix also fences disabled audience during preparation; retain its original witness. [privacy; P186856]
  • B175 KEEP @250 — Only trusted runtime permission/provenance may stamp a spawned child. [authorization; —]
  • B176 KEEP @323 — Parent replacement during lifecycle wait must not publish a stale child. [race,ownership; —]
  • B177 KEEP @389 — Closed worker turn cannot commit a child after waiting in the store queue. [race,authorization; —]
  • B178 KEEP @476 — Authenticated spawn cannot substitute another parent identity. [authorization; —]

src/gateway/server.sessions.create.titles.test.ts

  • B179 KEEP @53 — Cross old seven-message refinement threshold; explicit rename stays accepted. [user-visible; P185337]
  • B180.drain KEEP @105 — Optional remote metadata naming cannot hold placement drain; retain real no-dispatch, eventual durable title and changed-event positive. [race,user-visible; —]
  • B180.delete KEEP @105 — Late title cannot resurrect deleted session; fold this outcome into stronger B058 same-owner WebSocket delete while naming is pending, retaining that witness. [race,data-loss; —]
  • B181 KEEP @105 — Live title publication succeeds without an unrequested initial dispatch. [authorization,user-visible; —]
  • B182 KEEP @173 — Adoption cannot rename existing state; incognito must not leak content to naming. [privacy,ownership; —]
  • B183 KEEP @193 — Setup failure remains visible while successful/pending naming is retained across discussion open. [user-visible,race; P170794]
  • B184 KEEP @193 — Write-scoped retry must skip setup scripts, retain title and dispatch once. [authorization,user-visible; P170794]
  • B185 KEEP @288 — Generator failure and late-title branches retain recovery and stable worktree identity. [race,user-visible,ownership; P170794]
  • B186 KEEP @371 — No-initial-turn allocation must not derive a branch from task text; message-path tests do not cover this privacy regression. [privacy,user-visible; P153455]
  • B187 KEEP @406 — Foreign plugin cannot trigger naming, provisioning or mutate another owner's session. [authorization,ownership; —]

src/gateway/server.sessions.create.workspace-policy.test.ts

  • B188 KEEP @178 — Windows node cwd targets the remote host, never a Gateway worktree/baseline. [ownership,release-integrity; —]
  • B189 KEEP @201 — Node execution and Gateway allocation cannot compete as workspace owners. [ownership,authorization; —]
  • B190.file KEEP @211 — An authenticated request with a regular-file cwd must fail INVALID_REQUEST before persisting any session; retain the actual file fixture and no-row assertion from the reported unusable-root regression. [user-visible,data-loss; P131955]
  • B190.outside KEEP @211 — Writer cannot select an outside Gateway working directory. [authorization,ownership; —]
  • B190.escape KEEP @211 — Even admin cannot escape the sandbox through a selected symlink. [authorization,privacy; —]
  • B191 KEEP @254 — Admin/writer sandbox aliases retain their own grants and canonical paths. [authorization,ownership; —]
  • B192 KEEP @281 — Adoption cannot replace an admitted workspace through a new cwd. [ownership; P196168]
  • B193 KEEP @281 — Retain both actual before/during alias-retarget ownership races and publication/message-file-source guards; cut only lstatSync call-count observer. [race,ownership; P196168]
  • B194 KEEP @281 — Publication/continuation must retain parent workspace and message-bound file sources. [ownership,data-loss; P196168]
  • B195 KEEP @418 — Connected writer cannot acquire admin-only Full mode. [authorization; —]
  • B196 KEEP @437 — A rejected caller-selected non-Git cwd must name that directory rather than blame the default workspace; retain the witnessed diagnostic, trim the extra direct-cwd success journey. [user-visible; P178664]
  • B197 CUT @447 — Standalone tilde/absolute string-shape rejection is low-value input wiring; real target/escape guards stay. [edge-combination; —]
  • B198 KEEP @453 — Failed/dirty cleanup must retain receipts and user bytes rather than claim removal. [data-loss,ownership; —]
  • B199 KEEP @514 — Reset waits for old physical owner removal before granting a distinct successor. [race,ownership,data-loss; —]
  • B200 KEEP @514 — Old checkout/history must retire without leaking into successor execution. [ownership,data-loss; —]
  • B201 KEEP @611 — Stale file saves cannot overwrite detached/replaced workspace bytes. [race,data-loss; —]
  • B202 KEEP @639 — An initialized repository without commits must report its actual cause and the initial-commit recovery hint, not a false non-Git error; original real-Git guard retained. [user-visible; P140251]
  • B203 KEEP @654 — Changed cwd must invalidate old file-source writes even if worktree ID remains. [race,data-loss; —]

src/gateway/server.sessions.create.worktree-selection.test.ts

  • B204 KEEP @117 — Catalog and inherited model/runtime/account sources remain distinct; title must persist before checkout dispatch. [authorization,race; —]
  • B205 KEEP @117 — Branch must not expose title text and title selection must retain its authorized runtime/account. [privacy,authorization; P153455]
  • B206 KEEP @250 — Denied model must never allocate, name or persist a session. [authorization; —]
  • B207.cwd KEEP @270 — Carry nested dot-prefixed physical cwd and permission/root guard into actual existing checkout case, replacing mocked record proof. [ownership,authorization; —]
  • B207.options CUT @270 — Synthetic createWithOutcome name/base/owner argument and mock-record echo shapes are wiring. [mock-shape; —]
  • B207.flag CUT @270 — Name-without-worktree-flag is an extra malformed-option combination without an incident found. [edge-combination; —]
  • B208 KEEP @335 — Carry admin-selected source into the existing inherited-selection case and assert actual registry source/cwd instead of mocked echoes. [authorization,ownership; —]
  • B209 KEEP @376 — Writer can provision but cannot execute repository setup script. [authorization; —]

src/gateway/server.sessions.create.worktrees.test.ts

  • B210 KEEP @64 — Capture precedes writes; baseline internals remain private and diff shows only new content. [data-loss,privacy; —]
  • B211 KEEP @142 — Failed old allocation cannot roll back its same-key successor. [race,data-loss,ownership; —]
  • B212 KEEP @239 — Restore/remove across repository/empty sources must preserve recoverable user bytes. [data-loss,ownership; —]
  • B213 KEEP @358 — Initial/follow-up/direct-agent execution must consume its admitted physical cwd. [ownership; —]
  • B214 KEEP @358 — A disk config reread cannot replace the admitted roster/source owner. [authorization,ownership; —]
  • B215 KEEP @543 — Invalid hostile input must return visible failure while retaining intent without allocation. [security,data-loss,user-visible; —]

Bug/fix provenance

Retained public-method / happy-path map

Primary subject: sessions.create, real wire+durable worker identity at firstbirth:149–160. Other methods remain where their own guard is tested; incidental reads/settlement do not create a new coverage mandate:

Public surface Retained proof and role (all file stems below are server.sessions.create.*.test.ts)
sessions.patch / patchMany authority:41–96 successful role/sandbox variants, alongside denials
sessions.reset / describe communication:244–273 policy/identity and durable reopen
sessions.fork repositories:175–218 fresh repository identity; fork-search greater-window history
sessions.delete incognito:130–139 private-state lifetime; dispatch:192 late-title race
sessions.get / subscribe incognito:249–273 identityless/reader-authorized private access
sessions.list / search fork-search:130–168 observes retained fork/history; not a separate extra journey
sessions.files.get / set workspace-policy:129–143 /:611–636 real source/bytes and stale-write refusal
sessions.diff worktrees:64–141 observes baseline-before-write output
sessions.send / agent worktrees:358–542 exercises admitted physical cwd; agent.wait settles these runs
chat.send / history fork-search:169–188 continuation preserves parent bytes; fork-search receiver (original reset-fork:14) retains reset-context outcome
chat.abort / startup projects:184–508 visible cancellation/initial-input ownership; not a generic API inventory
session.discussion.open titles:193–286 pending name shared with recovery/retry
projects.checkoutOptions / list sandbox-project:77–364 actual public/granted project visibility

searchRemote/worktrees.list and user-account-management methods are authority-negative subjects where retained, not invitations to add happy allow journeys outside Creation. Event/store labels chat.title, sessions.changed, session.transcript.batch and session.actor.* are not counted as public methods.

Remaining gates and native checkout disposition

Vincent explicitly approved the prior ≥2,000-net floor exception for this single 381-net-line pilot on November 27, 2026. Focused validation, required exact-head CI and native preparation passed. Fresh exact-head ClawSweeper has zero source findings; its sole needs-human decision was resolved by that approval. Native squash merge landed as f75bd912f3fd947a9ded4176fd19238e97a06529 at November 28, 2026, 03:51:41 UTC. Native reconciliation verified the exact reviewed head, squash tree and main ancestry. The landed diff is +434/−815 =381 net test lines across19paths, production0. The native PR checkout was removed through scoped native GC. Campaign landed total: 134,599 (134,218 +381). This ONE-pilot round is complete; no next PR.

The live task checkout is retained until its owning session departs; native completion/release is separate from physical deletion. The native PR checkout is removed. No production repair, dependency repair, foreign checkout mutation or unrelated history cleanup was part of this pilot.

@vincentkoc vincentkoc self-assigned this Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review November 28, 2026 02:03
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts size: XL labels Nov 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR trims session-creation tests, consolidates two suites, and updates their CI selection references.

Example: Session creation with a regular-file working directory

  • Before: The regression test rejects the request and verifies that no session is persisted.
  • After: The repaired PR retains the same file fixture, typed rejection, and no-session assertion.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused test-maintenance change with the previous findings repaired and no new blocking finding.
Proof confidence 🐚 platinum hermit (4/6) This test-only change requires no shipped-product demonstration; the discussion reports focused Node validation, including reruns of the repaired suites, while required exact-head CI remains pending.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated creation fixtures and low-value observations increase test maintenance cost.
Reason: The maintainer-approved pilot reduces test machinery while retaining the repaired protected regression paths; it does not claim to complete the umbrella campaign.

Merge readiness

⛔ Blocked before merge - 1 item remains

No new blocking defect found; the previous regression finding is resolved, while the explicit landing-floor exception remains pending.

Reviewed head: 69aed47648eba5d90b40da66ddfc2e7db66e3bcb
Owner decision: Required. See Decision needed.

Decision needed

  • Question: May this 381-net-test-line pilot land below the previously required 2,000-net-line floor?
  • Recommendation: Approve the bounded exception: Accept this single Creation pilot without padding or expanding its scope.
  • Why: The maintainer explicitly preserves this landing hold; source review cannot grant the exception.

Before merge

  • Await maintainer action - Resolve the recorded exception allowing this 381-net-line pilot to land below the prior 2,000-net-line floor.

Findings

None.

Agent review details

How this fits together

Gateway creation tests exercise request admission, session ownership, workspace preparation, transcript persistence, and publication; CI planners select the relevant suites when their owners change.

flowchart LR
  A[Changed source paths] --> B[CI test planner]
  B --> C[Creation test suites]
  C --> D[Gateway session handlers]
  D --> E[Session and workspace owners]
  E --> F[Durable state and RPC results]
Loading

Technical review

Best possible solution:

Land the bounded consolidation after resolving its explicit numerical exception and satisfying the required checks for the reviewed head.

Do we have a high-confidence way to reproduce the issue?

This is an approved test-maintenance pilot rather than a product-bug report; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The existing harnesses and receiver suites provide a focused consolidation without a new production owner, support framework, or compatibility path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a1ae1c43912c.

Provenance checked

  • Creation suite consolidation changes intended behavior with a stated reason (a4ef4ef: Split creation coverage by owner while retaining assertions and reusing admitted fixtures; the current pilot deliberately revisits coverage value under recorded maintainer direction.)
  • Title-before-startup coverage keeps the original intent (82acd0a: Sessions previously stayed unnamed through worktree setup and reply startup; the retained held-reply test still observes the title before startup is released.)
  • Pre-input durability fault permutations keeps the original intent (9658ea8: The accepted contract permits creation-only state before initial-input commitment; actual transaction refusal, commit refusal, cancellation, and retry coverage remain.)
  • Concurrent creation SQL observation changes intended behavior with a stated reason (4c884c1: The original performance PR explicitly disclaims this base-passing negative control as proof of its cold-SQL fix.)
  • Terminal-persistence fixture cleanup test changes intended behavior with a stated reason (428d204: Protect ordering in a test-support cleanup helper; the pilot explicitly removes this support-only check rather than treating it as a product creation regression.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 49a092d adds src/gateway/server.sessions.create.forks.test.ts:765 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 49a092d67f33; files: src/gateway/server.sessions.create.forks.test.ts)
  • Vincent Koc: Raw commit 1f75f9c adds src/gateway/server.sessions.create.forks.test.ts:827 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1f75f9cec0ee; files: src/gateway/server.sessions.create.forks.test.ts)
  • Josh Avant: Raw commit 54e0bc0 adds src/gateway/server.sessions.create.workspace-policy.test.ts:287 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 54e0bc0c2132; files: src/gateway/server.sessions.create.workspace-policy.test.ts)

PR surface

Tests -381, Other 0. Total -381 across 19 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 18 433 814 -381
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 19 434 815 -381

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test scope Product runtime +0/−0; tests +432/−813; selector tooling +1/−1 The reduction stays within test maintenance and the necessary receiver-reference update; it makes no runtime speedup claim.

Root-cause cluster

Relationship: partial_overlap
Canonical: #139428
Summary: This PR is a bounded Creation-test pilot within the broader test-audit campaign.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: ⏳ waiting on maintainer.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-28T02:21:00.149Z sha 41ebb88 :: blocked before merge. :: [P2] Restore the requested-directory diagnostic regression guard
  • reviewed 2026-11-28T02:36:12.227Z sha a4f4f6b :: blocked before merge. :: [P2] Restore the regular-file cwd regression guard

Reviewed November 27, 2026, 10:05 PM ET / November 28, 2026, 03:05 UTC (Revision 3).

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Current repaired head: a4f4f6bae048a9bb0b828f64fce0562dfdc97ef0; PR-body inventory and proof are current.

Addressed the P2 from #207118 (comment):

This is an explicitly approved VALUE-based coverage reduction:504net test lines,220KEEP/28CUT,one pilot only. Keep auth/security/ownership/authorization, all authority-distinct variants, data loss, real races/TOCTOU, privacy, release integrity, witnessed user-visible regressions and the public-method happy paths. Challenge each of the28enumerated CUTs for hidden protected or incident-backed behavior, incomplete history, an invalid duplicate premise, or collection/isolation loss; uniqueness alone is not a retention reason.

Actual Node proof combines19files/312tests. Final affected workspace-policy suite passed16cases (50.62s); type-aware lint/format and gateway type graph (3.0s) passed. Unchanged proof is reused explicitly in the body. Prior-head CI was green; required CI must cover this repaired head. No production changes. The prior2000-net floor exception remains pending BEFORE LANDING ONLY; do not pad or widen the pilot.

@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Nov 28, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact repaired head: 69aed47648eba5d90b40da66ddfc2e7db66e3bcb. Current PR-body ledger is verified nonempty and matches the published head.

This is an explicitly approved VALUE-based coverage reduction, ONE Creation pilot only:381 net test lines,227KEEP/21CUT,production/shared-support0. Preserve auth/security/ownership/authorization (ALL authority-distinct variants), data loss, real race/TOCTOU, privacy, release integrity, witnessed user-visible regressions and one happy path per public method actually tested. Uniqueness alone is not KEEP.

Addressed the latest P2 regular-file cwd regression (P131955): restored the real file fixture, INVALID_REQUEST and no-row outcome. Audited remaining CUTs through actual source/earlier history rather than stopping at test splits. Restored the shared monotonic catalog deadline/no-selection hang trap (P165989), explicit blank-owner/configured-parent authority (P127661/P165929), reported391869-token large-fork success (P132112), fresh-child stale context/usage reset (P97332), and rejected-commit category nonpublication (P123276). Main-reset rejecting fence and cross-owner input custody plus both prior directory diagnostics remain retained. B109 is KEEP; removing exact callback counts is not behavior-CUT credit.

Please challenge the remaining21CUTs for hidden protected/witnessed behavior, false duplicate premises or collection/isolation breaks: B029,B035,B039,B059.empty,B059.error,B060,B074.before-input,B074.after-preparation,B082.storage,B085.syntax,B086.small,B090.unavailable,B091.fast,B107,B108.sql,B136.missing-turn,B136.blank,B148.listeners,B197,B207.options,B207.flag. Reasons/provenance and exact retained receivers are in the body. P169164 explicitly records B108.sql's attempted negative control passing on the buggy base.

Qualified existing frozen dependencies; no new install. All five changed suites passed108/108 tests in220.90s on actual Node/one worker; combined19files317tests with unchanged proof reused. Scoped lint/format and gateway type graph5.4s passed; unchanged scripts/tooling type graphs and additive-only unused-file proof remain valid. New-head required CI is running; prior-head green is not current proof.

The earlier2000-net floor exception remains pending BEFORE LANDING ONLY. Validation/publication are authorized. No merge or auto-merge has been submitted; do not infer that numerical landing approval has been granted. Please distinguish any source finding from this explicitly disclosed human scope decision.

@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 28, 2026
@vincentkoc
vincentkoc merged commit f75bd91 into main Nov 28, 2026
157 of 158 checks passed
@vincentkoc
vincentkoc deleted the test/creation-value-pilot-20261128 branch November 28, 2026 03:51
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
* test(gateway): checkpoint creation value pilot

* chore(test): format creation pilot suites

* test(gateway): retain creation reset and input custody guards

* test(gateway): preserve witnessed workspace diagnostics

* test(gateway): retain protected creation regression guards

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

1 participant