Skip to content

test(agents,gateway,chat): remove low-value tests (batch d481) - #182737

Merged
steipete merged 26 commits into
mainfrom
tcr/land-d481-1792861060
Oct 24, 2026
Merged

steipete merged 26 commits into
mainfrom
tcr/land-d481-1792861060

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

This test-only campaign batch removes redundant owner-layer replays and consolidates retained fixtures across agents, chat, Codex, infrastructure, and Gateway/session tests. Distinct authority, recovery, persistence, and lifecycle checks remain at their owning boundaries. There are no runtime, public API, schema, dependency, or visual changes.

The batch was replayed onto pinned main 6290fb2. Main's newer tests and fixture ownership win over conflicting campaign refactors; omissions are listed below.

Evidence

  • CI-only mode: no local Vitest, check-changed, typecheck, coverage, or Testbox runs. Hosted openclaw/ci-gate is the test gate.
  • pnpm install --frozen-lockfile --prefer-offline: passed.
  • Changed-file oxfmt --write: passed.
  • Changed-file plain oxlint -c .oxlintrc.json: exited 0.
  • git diff --check against pinned main: passed.
  • Independent review completed: 4 initial findings accepted and 7 initially declined after checking named owner-boundary coverage. All completed corrective reviews are scoped-clean; the last single-file restoration is being reviewed alongside fresh-head CI.
  • The source reports explicitly say coverage was not run under CI-only instructions. No statement/branch coverage totals or <=1% coverage-loss claim are available for these shards. Original reduction targets were not treated as permission to remove distinct contracts.

Production/support LOC: +0/-0. Test LOC: +1946/-4188, net -2242, across 22 files. No files deleted. CODEOWNERS: no changed path matches a listed ownership rule.

Per-shard replay deltas

Counts below are computed against the pinned main, not copied from the pre-replay campaign totals. Declaration counts are static it/test call-site counts, not expanded parameterized cases. Every shard's source coverage status is: not run (CI-only).

r0092

File Test LOC + / - Declarations before / after
src/agents/bootstrap-files.test.ts +230 / -431 29 / 20

Coverage: not run (CI-only); no measured coverage totals available.

r0093

No remaining diff: conflicting/predecessor-dependent changes omitted. Coverage: not run (CI-only).

r0094

No remaining diff: conflicting/predecessor-dependent changes omitted. Coverage: not run (CI-only).

r0095

File Test LOC + / - Declarations before / after
ui/src/pages/chat/chat-history-warm-startup.test.ts +247 / -379 19 / 14
ui/src/pages/chat/chat-page-retained-sessions.test.ts +8 / -17 18 / 18
ui/src/pages/chat/chat-pane-connection-lifecycle.test.ts +65 / -257 13 / 11
ui/src/pages/chat/composer-dictation.test.ts +80 / -131 22 / 19
ui/src/pages/chat/session-snapshot-store.test.ts +175 / -369 28 / 23

Coverage: not run (CI-only); no measured coverage totals available.

r0096

File Test LOC + / - Declarations before / after
extensions/codex/src/commands.detach.test.ts +23 / -44 17 / 17
extensions/codex/src/conversation-binding.test.ts +184 / -337 37 / 35
extensions/codex/src/session-catalog-adoption.test.ts +80 / -199 20 / 19

Coverage: not run (CI-only); no measured coverage totals available.

r0097

No remaining diff: conflicting/predecessor-dependent changes omitted. Coverage: not run (CI-only).

r0098

File Test LOC + / - Declarations before / after
src/infra/device-pairing.test.ts +127 / -253 27 / 25
src/infra/state-migrations.workspace-setup.test.ts +64 / -132 23 / 20
src/infra/update-retained-runtime.test.ts +42 / -88 15 / 15

Coverage: not run (CI-only); no measured coverage totals available.

r0099

File Test LOC + / - Declarations before / after
src/gateway/server-plugins.session-facts.test.ts +84 / -134 16 / 15
src/gateway/session-row-projection.test.ts +67 / -98 13 / 13

Coverage: not run (CI-only); no measured coverage totals available.

r0100

No remaining diff: conflicting/predecessor-dependent changes omitted. Coverage: not run (CI-only).

r0101

File Test LOC + / - Declarations before / after
src/config/sessions/combined-store-gateway.test.ts +121 / -228 12 / 12
src/config/sessions/session-accessor.sqlite-cleanup-race.test.ts +7 / -17 14 / 14
src/config/sessions/session-actor-replica.test.ts +8 / -142 14 / 12
src/config/sessions/session-actor-worker.test.ts +56 / -121 18 / 15

Coverage: not run (CI-only); no measured coverage totals available.

r0102

File Test LOC + / - Declarations before / after
src/gateway/server-methods/sessions-mutations.sticky-model.test.ts +43 / -161 17 / 14
src/gateway/server-methods/sessions-read.test.ts +4 / -230 18 / 11
src/gateway/server-methods/sessions-rewind.test.ts +109 / -215 22 / 18
src/gateway/server-methods/sessions-sharing.identities.test.ts +122 / -205 11 / 12

Coverage: not run (CI-only); no measured coverage totals available.

Replay omissions

  • 75aecbcd8eec: all (four session files) — missing prerequisite helpers; newer main tests.
  • b67bb34e8d5e: src/agents/openclaw-tools.sessions.test.ts — main extracted resume and timeout registrars.
  • e0a1bd0b5030: src/agents/openclaw-tools.sessions.test.ts — main extracted resume/timeout tests; keep current registrars.
  • e0a1bd0b5030: src/agents/isolated-completion.test.ts (one hunk) — retain current two runtime-admission cases instead of resurrecting obsolete five-stage matrix.
  • 7a90729c0de3: src/agents/isolated-completion.test.ts; src/agents/openclaw-tools.sessions.test.ts — retain newer admission scenario and extracted registrars.
  • 6107ee994c2a: all — already fixed on main; registerFreshDoctorOutcomeTests and DiagnosticTests are present.
  • f0a4d75e8897: src/cli/update-cli/update-command-admit.test.ts; src/cli/update-cli/update-command-lease.test.ts — current main has rewritten admission/lease fixtures and expanded recovery coverage; omit conflicting consolidation.
  • 22c8bca41fb8: src/cli/update-cli/update-command-admit.test.ts; src/cli/update-cli/update-command-fresh-doctor.test.ts; src/cli/update-cli/update-command-lease.test.ts — preserve rewritten admission/lease fixtures and new lint-state-inspection warning case.
  • 519398d97407: ui/src/pages/chat/chat-goals.test.ts — main has different observed-roster/recovery fixtures; campaign helper prerequisites absent.
  • 4ccffeba4302: ui/src/pages/chat/chat-goals.test.ts; ui/src/pages/chat/chat-page-retained-sessions.test.ts — main owns different Goal and retained-page fixtures; campaign chat-page-host helper absent.
  • ea91d9998c43: ui/src/pages/chat/chat-goals.test.ts; ui/src/pages/chat/composer-dictation.test.ts — retain main Goal fixtures and shared audio mock/lifecycle coverage.
  • bc34f1044249: src/gateway/server-methods/chat.directive-tags.test.ts (replay case only) — retain main's cached response and dispatch-count assertions.
  • 71fd21853f24: extensions/codex/src/native-thread-tool.test.ts — main uses a different withFixture lifecycle and native authority scenarios; omit incompatible rewrite.
  • 9b942fdcbe01: extensions/codex/src/commands.detach.test.ts; extensions/codex/src/native-thread-tool.test.ts — preserve current separate fixture roots, durable rollback assertions, and native-tool fixture lifecycle.
  • 7f65976b97b0: extensions/codex/src/commands.detach.test.ts — retain per-suite state roots and current diagnostics authority fixtures.
  • 058e21b8a1ad: src/infra/update-retained-runtime.test.ts — main has different read-only fallback/backup fixture boundaries; preserve current cases.
  • daddf008eee2: src/infra/update-retained-runtime.test.ts (one hunk) — kept main removal-timing assertion alongside consolidated unrelated-worker assertion.
  • 30cf5efeb318: src/gateway/github-publication-requester.test.ts; src/gateway/server-methods.session-scoped-reads.test.ts; src/gateway/server.required-worker-profile.test.ts — missing campaign helper prerequisites; retain current publication recovery, read gates, and worker-profile checks.
  • 4671dfe7c763: src/gateway/server-methods.session-scoped-reads.test.ts — depends on absent campaign request-gate helper; retain main read-boundary tests.
  • 3287e4e9afde: src/gateway/github-publication-requester.test.ts; src/gateway/server-methods.session-scoped-reads.test.ts; src/gateway/server.required-worker-profile.test.ts — same absent predecessor fixtures as first r0099 commit; keep current main versions.
  • 568ff71e225a: all — lifecycle admission cases removed/moved on main; avoid restoring retired tests.
  • e0decb4db09c: src/config/sessions/session-accessor.sqlite-prepared-admission.test.ts; src/config/sessions/session-actor-worker.test.ts (one hunk) — do not restore relocated lifecycle tests; retain newer native-commit/reply-failure regression.
  • 3060dcd60232: src/gateway/server-methods/question.session-access.test.ts — retain main full RPC method names and current fanout/security/store-identity assertions.

Three commits skipped during initial replay: 75aecbcd8eec (missing predecessor refactors), 6107ee994c2a (Doctor registrars already present on main; introduced in 47be911), and 568ff71e225a (lifecycle cases already relocated). The other 27 supplied commits were initially applied fully or partially. Later stack cleanup dropped three directive-tag commits (bc34f1044249, b30c56c598f0, 467aa6cc967b) and three command-shard commits (8c8fc89ed9a6, aab7a8cccc6b, 169af8b84d5a). 21 supplied commits remain plus formatting/corrective commits; some have no remaining net change after file-level restorations.

Source-report warnings about missing helpers were reconciled by retaining main where incompatible; current retained-runtime logging imports are present. Hosted CI remains authoritative for the replayed head.

Review and first CI corrections

Independent review: 11 findings considered, 4 accepted and 7 declined with source evidence. Restored the complete isolated-completion, inbound-registry, and directive-tag files to pinned main to retain utility-to-CLI integration, distinct runtime isolation, and persisted sensitive-media proof. Restored the optional-result guard in session-catalog-adoption.

Declined coverage findings: requester revocation is exercised by the registered current-core service-receipt and boundary finalization suites; rollback refusal, restoration, and terminal settlement remain in update-command-rollback and update-command-post-update-recovery. Cron admission negatives remain in agent-run-local-operator-authority and retained resolver expiry remains in agent-tools.create-openclaw-coding-tools. Board HTTP tests explicitly reject a ticket through a different or inactive issuing Gateway. Device pairing retains old-token/new-generation rejection plus upgraded-token issuer equality. Project validation remains in server.sessions.create.projects and real cwd/admin/sandbox rejection in server.sessions.create.workspace-policy. The retained-runtime opening test still starts acceptedWrite before callback exit and asserts completion before maintenance removal, including unrelated-worker survival.

First CI run: https://github.com/openclaw/openclaw/actions/runs/40114722801. SQLite copy failed journal-transition, aggregate-error, and descriptor-cleanup expectations; restored that entire file to main. Worktree spawn failed absent-property expectations introduced by assertion consolidation; restored that entire file to main. Check-plan rejected a new type-level import of the bundled memory plugin; restored the existing host-contract type so the plugin implementation stays outside the core type graph. No retries, assertion weakening, or local test runs. PR context check required this authored problem heading, now corrected.

These five restored files have no remaining batch diff: src/agents/isolated-completion.test.ts, src/agents/prepared-model-runtime.inbound-registry.test.ts, src/gateway/server-methods/chat.directive-tags.test.ts, src/infra/sqlite-readonly-location.copy.test.ts, and src/gateway/server.sessions.create-worktree-spawn.test.ts. The table above reflects the final reduced scope. Completed corrective-delta reviews are scoped-clean; fresh-head CI remains the execution gate.

Later CI corrections and final scope

Run https://github.com/openclaw/openclaw/actions/runs/40115455211 exposed a platform callback returning a Chai chain and missing actor statement-counter/fixed-clock fixtures. The actor counter and clock were restored without changing assertions. The incompatible transcript-anchor consolidation was dropped by restoring its complete test file to pinned main.

Run https://github.com/openclaw/openclaw/actions/runs/40116148345 exposed older campaign type/fixture assumptions in fresh Doctor, post-update finalization, scoped runtime refresh, memory search, and flat-profile migration, plus missing mock-isolation notes in the restart fixture. Those complete reductions were dropped: fresh-doctor, post-update, scoped-refresh, memory-search, restart-stale-pids, doctor-auth-flat-profiles, agent.test, and agent-via-gateway now exactly match pinned main. The command-shard commits were removed by rebase so the line-cap ratchet remains intact.

Run https://github.com/openclaw/openclaw/actions/runs/40117072800 had one remaining failed test shard: post-update-repair extracted Chai assertion methods without their receiver. That file is now restored exactly to pinned main too. There are no remaining update-test changes. The table above reflects the final 22-file reduction. No guard bypasses, retries, widened types, assertion weakening, local tests/typechecks/check-changed, or Testbox runs were used.

Reuse local bootstrap and session fixtures and compact prepared runtime setup while preserving authority, credential, lifecycle and path boundaries. Keep the hook insertion proof in the root-memory alias case and both compaction marker transitions in one lifecycle scenario.
Keep scoped refresh behavior in the real worker keeps-unaffected-workers-live test, account retention in catalog-owner and configured-catalog, and inspection lifetime in registry-borrow tests. Keep notification denial in sessions-send-tool.admission and mailbox behavior in the registered sessions-send mailbox table. Utility owner inheritance remains in utility-completion; quota deadlines remain in isolated-completion.deadline. Preserve distinct security, credential and lifecycle assertions.
Reuse baseline-existing sessions resume and timeout registrars instead of their copied test bodies. Preserve their original assertions and suite setup. Consolidate local and remote bootstrap alias cases and diagnostics rows without dropping policy branches. Keep runtime admission gates event-driven and retain security assertions. No tests run under the campaign CI-only policy.
Consolidate stopped-service fixtures and repeated no-inference assertions. Compact finalization tables without deleting cases or weakening assertions. Keep admission, lease, Doctor, migration, rollback, and activation boundary cases intact; no cross-file duplicate safely removes their distinct failure paths. Static-only campaign proof: oxfmt, oxlint, and diff-check; hosted CI owns execution.
Remove rollback replays covered by update-command-rollback.test.ts (blocked recovery and active identity after restart-unhealthy), real pnpm generation rollback in update-command-service.integration.test.ts, and terminal recovery in update-command-post-update-recovery.test.ts. Retain the unique no-package skipped-ledger case.

Keep deferred-inspection routing and restart ordering here; parsing, findings and retry guidance remain in update-command-post-activation-inspections.test.ts. Current-core service receipt and boundary finalization tests retain requester revocation. Protected-definition metadata remains covered in update-command-service-maintenance-identity.test.ts.

Consolidate invalid-config lease assertions into the downgrade table, reduce branch-equivalent authority/deadline and retired-file rows, and remove the retired inference-repair mock. Preserve process, Windows recovery, migration and WAL branches. Static-only verification: oxfmt, plain oxlint, git diff --check. The 35 percent target remains unmet because further safe overlap was not established.
Preserve real admission, lease, migration, and recovery branches while removing redundant config permutations, output/call-shape assertions, copied metadata, and unreachable fixture setup.

Older-schema read preservation stays in update-command-managed-context.test.ts; keep the fresh Doctor observe:false boundary assertion and database cleanup. Source writer feature detection stays in test/scripts/source-update-artifact-preflight.test.ts; retain the legacy convergence caller and missing-dependency/ownership cases. Native activation/verification stays in update-command-service.integration.test.ts and update-command-service.test.ts; rollback-skip ledger proof remains in this shard.

Consolidate shared/configured database inspection in one post-Doctor WAL-growth case. Retain same-branch admission reference selection and the older-plugin retired-config regression. Plain oxlint, oxfmt, and diff-check pass; no tests run under CI-only mode. Total reduction remains below 35 percent because additional safe duplication was not established.
Consolidate repeated fixtures and assertions while retaining distinct lifecycle, authority, and durability cases.

Drop envelope validation variants already covered by session-snapshot-write.test.ts and the append-miss replay covered by session-prefetch.test.ts. The reconnect request shape remains covered by chat-pane-history-issuance.test.ts.

CI-only campaign: formatting, plain oxlint, and diff checks passed; no tests or coverage executed. Safe reduction is below the requested 35% target.
Remove retained-page route scenarios duplicated in chat-page-close-route, Goal recovery replays covered by chat-goal-recovery E2E and gateway-store.auth, and owner-level realtime and connection inventories.

Consolidate startup cache ordering, dictation lifecycle variants, and snapshot metadata fixtures while retaining distinct authority, QR rendering, and v1 migration paths.

CI-only validation: formatting, plain oxlint and diff checks passed; no tests or coverage executed. Cumulative shard LOC: 5016 to 4305, below the requested 35 percent target.
Share cold-start, metadata, recovery, corruption, eviction and migration fixtures without dropping distinct scenario branches. Keep automatic reconnect Stop and real microphone-button quick-tap integration.

Remove redundant rendering and final-transcript proof covered by chat-message image/media, speech-playback and browser-dictation-status suites. Preserve QR authority transitions and v1/v7 database upgrade paths.

CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage run. Cumulative test LOC 5016 to 3899; the requested 35 percent reduction remains unmet.
@clawsweeper

clawsweeper Bot commented Oct 24, 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.

@steipete
steipete enabled auto-merge (squash) October 24, 2026 17:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T17:53:47.317712Z 9401218 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: codex size: XL labels Oct 24, 2026
@steipete
steipete disabled auto-merge October 24, 2026 17:13
Consolidate timeout, detach-failure and confirmation cases; remove repeated internal request dumps and fixture data while retaining no-write, target and recovery assertions.

Duplicate proof remains in native-thread-tool-selection.test.ts (keeps the client available when fork authority changes before dispatch), session-catalog-archive.test.ts (rejects archive when a paginated archived descendant has an OpenClaw owner), and session-catalog-continue-result.test.ts (returns the upstream seed to every joined catalog Continue request). The retained mapped-read rejection also checks canonical thread selection.

Remove the obsolete 100-entry collector saturation replay: the keyed turn router now rejects overflow at 256 entries. turn-router.test.ts retains pre-bind ordering and terminal-fact tests; conversation-turn-collector.test.ts retains final-answer selection. CI-only: formatting, diff-check and plain oxlint; no tests run.
Consolidate repeated revocation gates, strict RPC responses, and inbound claim setup. Remove unused adoption-fixture options while preserving all remaining cases and safety assertions. CI-only: plain oxlint, oxfmt, and diff checks; no tests run. Further reductions would remove distinct ownership, rollback, recovery, or supervision proof.
Share pairing approval and APNs fixtures without changing authority inputs. Keep omitted-scope approval calls direct.

Remove the Linux CLI renderer replay covered by device-pairing-prune.test.ts: invalidates the card renderer cache after pruning the last renderer. Remove the historical backup fixture replay covered by update-retained-runtime.backups.test.ts: updates the npm package without traversing a historical package backup, including retained assets and recovery evidence.

CI-only campaign: oxfmt, plain oxlint and diff checks passed; no runtime tests or coverage run. Retain distinct snapshot, process authority and migration recovery cases; line reduction is below the requested target.
Reuse SQLite descriptor and cleanup fixtures while preserving the acquisition census, short-read injections, WAL races and staging capacity guard. Keep Windows null-ancestry protection as an explicit table row.

Remove repeated worker-settlement checks from package-layout rows; the deferred runtime deletion test owns accepted writes and unrelated borrower survival. Explicit target selection remains covered by the retained inspection test and runtime-worker-url.test.ts. Recovery name variants share the prefix branch; retain file, directory and explicit-link boundaries.

Consolidate migration claim/link recovery and recreated-marker assertions while preserving absent-source claims, independent attestation mtime, verified and superseded receipts. Native cwd classification plus gateway-process-argv.test.ts and gateway-processes.test.ts own the retired cross-layer process checks.

CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage executed. Cumulative reduction remains below the requested 35 percent; unique authority and durability cases retained.
Consolidate restart owner and authority checkpoints, protected-pid outcomes, Windows inconclusive probes and process-group races into branch tables. Preserve every distinct checkpoint and negative signal assertion.

Merge metadata repair into its refresh lifecycle; retain scope and issuer behavior at token verification instead of repeating returned object fields. Combine configured and orphan workspace migration batches while retaining empty/full setup, receipts, timestamps and content identity.

Reuse the admitted SQLite baseline for the one-copy write budget and readable payload; keep large-copy paths in WAL and pathname replacement cases. Exercise wal-index creation with the same native reader in process instead of a child wrapper.

CI-only: formatting, plain oxlint and diff checks passed. No tests, coverage or builds run. Cumulative line reduction remains below the requested target; distinct security and durability scenarios retained.
Remove five requester groups duplicated in github-publication-requester-aliases.test.ts: resumed grants, queued alias bindings, immediate retries, pending profile recovery, and concurrent bindings. Keep the alias suite as their owner.

Reuse scoped-read and ACP fixtures and remove redundant project/dispatch call-shape assertions. Project creation remains covered by server.sessions.create.projects.test.ts. Preserve distinct authority, storage, and ordering cases.

CI-only campaign: no tests or coverage run. Plain oxlint, oxfmt, and diff-check passed. 4976 -> 4573 test lines; 35% target not reached without removing distinct behavior.
Keep project validation in server.sessions.create.projects.test.ts, external cwd rejection in server.sessions.create.workspace-policy.test.ts, and structured denial translation in sessions-spawn-tool.test.ts. Keep provisioning assertions in server.sessions.create.worktrees.test.ts.

Keep session/owner PR lifetime fences in control-ui-session-pr-subscriptions.lifetimes.test.ts and real visibility fences in control-ui-session-pr-access.test.ts. Consolidate selected and service committed-preview assertions and reuse existing rejection/disposal helpers.

CI-only: no test or coverage runs. Plain oxlint, oxfmt and diff-check pass. Additional 100 lines removed; cumulative 4976 to 4473 (10.1%). Remaining distinct authority, storage, and lifecycle cases prevent a safe 35% cut.
Share typed session/model fixtures and scoped RPC setup while retaining per-method authority and lifecycle assertions. Remove duplicated internal dispatch, registry and steady-state checks. Keep sandbox rejection coverage in server.sessions.create.projects.test.ts and positive inherited-sandbox tool cases here.

Restore the queueGuest import used by the retained policy-readiness case. Keep negative-policy setup controls, durable failure errors, and checkout path ownership assertions.

CI-only: plain oxlint, oxfmt and diff-check pass; no tests or coverage run. Additional 180 lines removed, cumulative 4976 to 4293 (13.7%). The 35% target remains unmet because no further behavior-equivalent layer was identified.
@steipete
steipete force-pushed the tcr/land-d481-1792861060 branch from bd1e5f6 to 6aabf01 Compare October 24, 2026 17:17
@steipete
steipete enabled auto-merge (squash) October 24, 2026 17:17
@steipete
steipete disabled auto-merge October 24, 2026 17:23
@steipete
steipete enabled auto-merge (squash) October 24, 2026 17:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c17e25f2f4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +657 to 659
it("validates and persists context windows from the selected runtime", async () => {
const model = "openai/gpt-5.6-sol";
const selected = { model, agentRuntime: "codex", contextWindow: "64k" };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain the selected-runtime fork-budget regression

The removed fork case protects a different production path from the retained patch assertions: a 70,000-token parent must be rejected when the selected Codex route advertises a 64,000-token context window, without leaving a child session behind. The replacement only calls patchSession, so it cannot detect incorrect runtime-window selection in resolveSessionForkMaxTokens or failure to apply that limit during session creation. The remaining fork-budget tests do not exercise this runtime-specific catalog wiring. Retain that boundary regression alongside the consolidated fixture.

Useful? React with 👍 / 👎.

@steipete
steipete disabled auto-merge October 24, 2026 17:37
Remove duplicate lifecycle-admission cases retained in session-accessor.sqlite-lifecycle-admission.test.ts, including cold FIFO, read-only cleanup, repair refusal, authority retirement, selected state ownership, and historical preparation.

Retain cold-command coverage in session-actor.test.ts (installs a cold command and stale preimage without a separate read request), bookkeeping in session-actor-completion.test.ts (commits final custody, recap, usage, and claim cleanup together across rollback and restart), and usage-cache isolation in session-actor-entry-residency.test.ts (retains resident session facts across usage cache writes and reloads actual session changes).

Keep replica eviction as the behavioral byte-budget contract. Consolidate standalone and reply-tail watermarks; memory anchor coverage remains in session-transcript-memory-read.test.ts. Lagging and unclassified projection cases remain in session-accessor.sqlite-handle-lifecycle.test.ts. Shared and qualified lineage selection remains in session-utils-store-lookup.test.ts and combined-store-gateway.worker.test.ts; global parent transitions remain in session-row-projection.archived.test.ts.

Remove internal SQL/receipt inventories and repetitive fixtures, preserving durable outcomes, scoped authority, and actual race controls. CI-only validation: formatting, plain oxlint and diff checks passed; no tests or coverage run. Original shard 5247 to 4480 lines (14.6 percent), below the 35 percent target.
Share memory search owner requests, exact response assertions, and invalid-agent cases. The unavailable-manager case retains the legacy-backend acquisition assertions previously repeated by a separate test.

Reuse rewind scopes and media expectations and sharing permission fixtures without removing distinct authority, lifecycle, or persistence cases. CI-only campaign: static lint, formatting, and diff checks only.
Remove duplicate catalog, discovery, model-policy, projection, validation, and ticket scenarios. Keep distinct worker publication, runtime preparation, physical ownership, and authority interleavings.

Retained proof: memory-host-sdk host/types keeps pending-index and sync-failure diagnostics; question.own-run keeps privileged-record concealment and accepted-answer lifetime. sessions-read-catalog-scope, optional-model-catalog, session-utils single-row-cache/subagent, targets-read-availability and targets-discovery keep catalog isolation, selected-row parsing, fixed-store and template discovery.

sessions-create-category keeps first-use group invalidation; session-model-selection-policy keeps non-admin session-only selection; server.sessions.create.forks keeps native fork capacity; session-utils and model-catalog-view keep context-window projection. session-accessor.sqlite-message-cut-native keeps native cut validation; retained rewind lifecycle tests keep archived rejection and queue settlement. Retained creator-lifecycle tests keep archived, duplicate and sentinel identities; board-http keeps live issuing-Gateway ticket enforcement.

CI-only: plain oxlint, formatting, and diff checks pass. No tests or coverage run. Original shard LOC 4797 to 4020; 35 percent target remains unmet rather than dropping unique security or lifecycle proof.
@steipete
steipete force-pushed the tcr/land-d481-1792861060 branch from c17e25f to bf2e762 Compare October 24, 2026 17:38
@steipete
steipete enabled auto-merge (squash) October 24, 2026 17:39
@openclaw-barnacle openclaw-barnacle Bot removed the commands Command implementations label Oct 24, 2026
@steipete
steipete disabled auto-merge October 24, 2026 17:49
@steipete steipete changed the title test(agents,gateway,update): remove low-value tests (batch d481) test(agents,gateway,chat): remove low-value tests (batch d481) Oct 24, 2026
@steipete
steipete enabled auto-merge (squash) October 24, 2026 17:51
@openclaw-barnacle openclaw-barnacle Bot removed the cli CLI command changes label Oct 24, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates test fixtures and removes overlapping tests across agents, Gateway sessions, Codex, infrastructure, and chat.

Example: No user-visible behavior changes.

  • Before: Repeated fixtures and assertions exercise existing behavior.
  • After: Consolidated fixtures and fewer tests exercise that behavior.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with substantial retained coverage, but two distinct regression contracts need restoration and exact-head CI is unfinished.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only cleanup changes no shipped behavior; hosted test validation supports the retained scenarios, with the aggregate gate still pending.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces repeated test maintenance without changing runtime behavior, provided distinct regression contracts survive.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep open: this maintainer-authored cleanup is useful, but it removes two distinct regression contracts without equivalent remaining coverage.

Priority: P2
Reviewed head: 94012183acb743abf20eabb71685b0eca1dabe57

Before merge

  • Restore the selected-runtime fork-budget regression (P2) - The removed case creates a fork from a 70,000-token parent with a selected Codex route advertising a 64,000-token window, then checks rejection and absence of a child session. This replacement calls only patchSession, so it cannot detect losing runtime-specific capacity selection in resolveSessionForkMaxTokens or its application during creation. The remaining server.sessions.create.forks table covers different capacity scenarios. Restore this creation-boundary case alongside the consolidated fixture; this also resolves the existing review comment.
  • Retain accounting coverage for every transcript context form (P2) - Deleting the preceding accounting test removes the independent checks for nested tool payloads and shared rows in complete, windowed, and exact transcript contexts. The retained eviction scenario builds a tail payload, so omitted context charges or changed nested accounting can pass it while undercounting residency against the shared 8 MiB budget. The original optimization explicitly promised unchanged estimates and added these golden cases to enforce that promise. Retain or consolidate those cases rather than dropping their distinct accounting contract.
  • Explain or restore the original intent of Native-runtime fork windows - feat: offer model choices across agent harnesses #147994: Runtime-specific catalog capabilities must govern selection, display, and fork admission; later cleanup moved the regression into this suite.
  • Explain or restore the original intent of Transcript residency accounting - 4f5de1a: Bound memoization to reused row payloads while preserving residency estimates across every context form.

Findings

  • [P2] Restore the selected-runtime fork-budget regression — src/gateway/server-methods/sessions-mutations.sticky-model.test.ts:657-659
  • [P2] Retain accounting coverage for every transcript context form — src/config/sessions/session-actor-replica.test.ts:175

Provenance

  • Native-runtime fork windows changes intended behavior without addressing why it exists (feat: offer model choices across agent harnesses #147994: Runtime-specific catalog capabilities must govern selection, display, and fork admission; later cleanup moved the regression into this suite.)
  • Transcript residency accounting changes intended behavior without addressing why it exists (4f5de1a: Bound memoization to reused row payloads while preserving residency estimates across every context form.)
Agent review details

How this fits together

These Vitest suites feed synthetic inputs into existing runtime owners and check session, bootstrap, persistence, transport, and chat behavior.

flowchart LR
  A[Test fixtures] --> B[Agent bootstrap]
  A --> C[Gateway sessions]
  A --> D[Codex binding]
  A --> E[Chat state]
  C --> F[Storage and workers]
  B --> G[Behavior assertions]
  D --> G
  E --> G
  F --> G
Loading

Technical review

Best possible solution:

Keep the fixture consolidation while restoring the native-runtime fork regression and the distinct residency accounting cases.

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

The pinned diff directly demonstrates both coverage deletions and inspection of the remaining suites confirms their different scenarios; no target tests were executed under the read-only instructions.

Is this the best way to solve the issue?

Fixture consolidation is appropriate, but the smallest complete cleanup retains tests for distinct creation and residency-accounting contracts.

Full review comments:

  • [P2] Restore the selected-runtime fork-budget regression — src/gateway/server-methods/sessions-mutations.sticky-model.test.ts:657-659
    The removed case creates a fork from a 70,000-token parent with a selected Codex route advertising a 64,000-token window, then checks rejection and absence of a child session. This replacement calls only patchSession, so it cannot detect losing runtime-specific capacity selection in resolveSessionForkMaxTokens or its application during creation. The remaining server.sessions.create.forks table covers different capacity scenarios. Restore this creation-boundary case alongside the consolidated fixture; this also resolves the existing review comment.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.
  • [P2] Retain accounting coverage for every transcript context form — src/config/sessions/session-actor-replica.test.ts:175
    Deleting the preceding accounting test removes the independent checks for nested tool payloads and shared rows in complete, windowed, and exact transcript contexts. The retained eviction scenario builds a tail payload, so omitted context charges or changed nested accounting can pass it while undercounting residency against the shared 8 MiB budget. The original optimization explicitly promised unchanged estimates and added these golden cases to enforce that promise. Retain or consolidate those cases rather than dropping their distinct accounting contract.
    Confidence: 0.93
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Bootstrap memory filtering keeps the original intent (fix(memory): respect provenance in automatic context #127469: Automatic bootstrap context enforces provenance eligibility; the consolidation retains trusted, untrusted, missing-classification, and unsupported-runtime cases.)
  • Warm chat metadata keeps the original intent (b89bc0e: Receipt-matched startup metadata avoids retransmission while retaining scope and missing-cache behavior.)
  • Shared session-store ownership keeps the original intent (fix(sessions): preserve logical shared-store ownership #138380: Logical session ownership remains separate from physical shared-store ownership; retained scenarios exercise those identities.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/gateway/server-methods/sessions-mutations.sticky-model.test.ts src/gateway/server.sessions.create.forks.test.ts --maxWorkers=1
  • pnpm test src/config/sessions/session-actor-replica.test.ts src/config/sessions/session-actor-transcript-replica.test.ts src/config/sessions/session-actor-transcript-residency.test.ts --maxWorkers=1
  • pnpm exec oxlint -c .oxlintrc.json src/gateway/server-methods/sessions-mutations.sticky-model.test.ts src/config/sessions/session-actor-replica.test.ts
  • git diff --check

What I checked:

PR surface

Tests -2242. Total -2242 across 22 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 22 1942 4184 -2242
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 22 1942 4184 -2242

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests +1942/-4184, net -2242 The reduction adds no runtime machinery, but line savings do not justify removing distinct regression contracts.

Labels

Label changes:

  • add P2: Two focused coverage restorations are needed before this test cleanup merges; current runtime behavior is unchanged.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Two focused coverage restorations are needed before this test cleanup merges; current runtime behavior is unchanged.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed October 24, 2026, 2:10 PM ET / 18:10 UTC.

@steipete
steipete merged commit 2e7668b into main Oct 24, 2026
121 checks passed
@steipete
steipete deleted the tcr/land-d481-1792861060 branch October 24, 2026 18:18
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
…law#182737)

* test(agents): deslop r0092 tests

Reuse local bootstrap and session fixtures and compact prepared runtime setup while preserving authority, credential, lifecycle and path boundaries. Keep the hook insertion proof in the root-memory alias case and both compaction marker transitions in one lifecycle scenario.

* test(agents): remove redundant r0092 test layers

Keep scoped refresh behavior in the real worker keeps-unaffected-workers-live test, account retention in catalog-owner and configured-catalog, and inspection lifetime in registry-borrow tests. Keep notification denial in sessions-send-tool.admission and mailbox behavior in the registered sessions-send mailbox table. Utility owner inheritance remains in utility-completion; quota deadlines remain in isolated-completion.deadline. Preserve distinct security, credential and lifecycle assertions.

* test(agents): consolidate r0092 retained fixtures

Reuse baseline-existing sessions resume and timeout registrars instead of their copied test bodies. Preserve their original assertions and suite setup. Consolidate local and remote bootstrap alias cases and diagnostics rows without dropping policy branches. Keep runtime admission gates event-driven and retain security assertions. No tests run under the campaign CI-only policy.

* test(update): deslop r0094 tests

Consolidate stopped-service fixtures and repeated no-inference assertions. Compact finalization tables without deleting cases or weakening assertions. Keep admission, lease, Doctor, migration, rollback, and activation boundary cases intact; no cross-file duplicate safely removes their distinct failure paths. Static-only campaign proof: oxfmt, oxlint, and diff-check; hosted CI owns execution.

* test(update): consolidate r0094 branch coverage

Remove rollback replays covered by update-command-rollback.test.ts (blocked recovery and active identity after restart-unhealthy), real pnpm generation rollback in update-command-service.integration.test.ts, and terminal recovery in update-command-post-update-recovery.test.ts. Retain the unique no-package skipped-ledger case.

Keep deferred-inspection routing and restart ordering here; parsing, findings and retry guidance remain in update-command-post-activation-inspections.test.ts. Current-core service receipt and boundary finalization tests retain requester revocation. Protected-definition metadata remains covered in update-command-service-maintenance-identity.test.ts.

Consolidate invalid-config lease assertions into the downgrade table, reduce branch-equivalent authority/deadline and retired-file rows, and remove the retired inference-repair mock. Preserve process, Windows recovery, migration and WAL branches. Static-only verification: oxfmt, plain oxlint, git diff --check. The 35 percent target remains unmet because further safe overlap was not established.

* test(update): prune duplicate r0094 fixture and assertion layers

Preserve real admission, lease, migration, and recovery branches while removing redundant config permutations, output/call-shape assertions, copied metadata, and unreachable fixture setup.

Older-schema read preservation stays in update-command-managed-context.test.ts; keep the fresh Doctor observe:false boundary assertion and database cleanup. Source writer feature detection stays in test/scripts/source-update-artifact-preflight.test.ts; retain the legacy convergence caller and missing-dependency/ownership cases. Native activation/verification stays in update-command-service.integration.test.ts and update-command-service.test.ts; rollback-skip ledger proof remains in this shard.

Consolidate shared/configured database inspection in one post-Doctor WAL-growth case. Retain same-branch admission reference selection and the older-plugin retired-config regression. Plain oxlint, oxfmt, and diff-check pass; no tests run under CI-only mode. Total reduction remains below 35 percent because additional safe duplication was not established.

* test(chat): deslop r0095 tests

Consolidate repeated fixtures and assertions while retaining distinct lifecycle, authority, and durability cases.

Drop envelope validation variants already covered by session-snapshot-write.test.ts and the append-miss replay covered by session-prefetch.test.ts. The reconnect request shape remains covered by chat-pane-history-issuance.test.ts.

CI-only campaign: formatting, plain oxlint, and diff checks passed; no tests or coverage executed. Safe reduction is below the requested 35% target.

* test(chat): remove redundant r0095 test layers

Remove retained-page route scenarios duplicated in chat-page-close-route, Goal recovery replays covered by chat-goal-recovery E2E and gateway-store.auth, and owner-level realtime and connection inventories.

Consolidate startup cache ordering, dictation lifecycle variants, and snapshot metadata fixtures while retaining distinct authority, QR rendering, and v1 migration paths.

CI-only validation: formatting, plain oxlint and diff checks passed; no tests or coverage executed. Cumulative shard LOC: 5016 to 4305, below the requested 35 percent target.

* test(chat): consolidate r0095 lifecycle fixtures

Share cold-start, metadata, recovery, corruption, eviction and migration fixtures without dropping distinct scenario branches. Keep automatic reconnect Stop and real microphone-button quick-tap integration.

Remove redundant rendering and final-transcript proof covered by chat-message image/media, speech-playback and browser-dictation-status suites. Preserve QR authority transitions and v1/v7 database upgrade paths.

CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage run. Cumulative test LOC 5016 to 3899; the requested 35 percent reduction remains unmet.

* test(codex): deslop r0096 tests

* test(codex): consolidate r0096 owner-boundary proof

Consolidate timeout, detach-failure and confirmation cases; remove repeated internal request dumps and fixture data while retaining no-write, target and recovery assertions.

Duplicate proof remains in native-thread-tool-selection.test.ts (keeps the client available when fork authority changes before dispatch), session-catalog-archive.test.ts (rejects archive when a paginated archived descendant has an OpenClaw owner), and session-catalog-continue-result.test.ts (returns the upstream seed to every joined catalog Continue request). The retained mapped-read rejection also checks canonical thread selection.

Remove the obsolete 100-entry collector saturation replay: the keyed turn router now rejects overflow at 256 entries. turn-router.test.ts retains pre-bind ordering and terminal-fact tests; conversation-turn-collector.test.ts retains final-answer selection. CI-only: formatting, diff-check and plain oxlint; no tests run.

* test(codex): share r0096 authority and RPC fixtures

Consolidate repeated revocation gates, strict RPC responses, and inbound claim setup. Remove unused adoption-fixture options while preserving all remaining cases and safety assertions. CI-only: plain oxlint, oxfmt, and diff checks; no tests run. Further reductions would remove distinct ownership, rollback, recovery, or supervision proof.

* test(infra): deslop r0098 tests

Share pairing approval and APNs fixtures without changing authority inputs. Keep omitted-scope approval calls direct.

Remove the Linux CLI renderer replay covered by device-pairing-prune.test.ts: invalidates the card renderer cache after pruning the last renderer. Remove the historical backup fixture replay covered by update-retained-runtime.backups.test.ts: updates the npm package without traversing a historical package backup, including retained assets and recovery evidence.

CI-only campaign: oxfmt, plain oxlint and diff checks passed; no runtime tests or coverage run. Retain distinct snapshot, process authority and migration recovery cases; line reduction is below the requested target.

* test(infra): consolidate r0098 boundary fixtures

Reuse SQLite descriptor and cleanup fixtures while preserving the acquisition census, short-read injections, WAL races and staging capacity guard. Keep Windows null-ancestry protection as an explicit table row.

Remove repeated worker-settlement checks from package-layout rows; the deferred runtime deletion test owns accepted writes and unrelated borrower survival. Explicit target selection remains covered by the retained inspection test and runtime-worker-url.test.ts. Recovery name variants share the prefix branch; retain file, directory and explicit-link boundaries.

Consolidate migration claim/link recovery and recreated-marker assertions while preserving absent-source claims, independent attestation mtime, verified and superseded receipts. Native cwd classification plus gateway-process-argv.test.ts and gateway-processes.test.ts own the retired cross-layer process checks.

CI-only: oxfmt, plain oxlint and diff checks passed; no tests or coverage executed. Cumulative reduction remains below the requested 35 percent; unique authority and durability cases retained.

* test(infra): share r0098 lifecycle scenario harnesses

Consolidate restart owner and authority checkpoints, protected-pid outcomes, Windows inconclusive probes and process-group races into branch tables. Preserve every distinct checkpoint and negative signal assertion.

Merge metadata repair into its refresh lifecycle; retain scope and issuer behavior at token verification instead of repeating returned object fields. Combine configured and orphan workspace migration batches while retaining empty/full setup, receipts, timestamps and content identity.

Reuse the admitted SQLite baseline for the one-copy write budget and readable payload; keep large-copy paths in WAL and pathname replacement cases. Exercise wal-index creation with the same native reader in process instead of a child wrapper.

CI-only: formatting, plain oxlint and diff checks passed. No tests, coverage or builds run. Cumulative line reduction remains below the requested target; distinct security and durability scenarios retained.

* test(gateway): deslop r0099 tests

Remove five requester groups duplicated in github-publication-requester-aliases.test.ts: resumed grants, queued alias bindings, immediate retries, pending profile recovery, and concurrent bindings. Keep the alias suite as their owner.

Reuse scoped-read and ACP fixtures and remove redundant project/dispatch call-shape assertions. Project creation remains covered by server.sessions.create.projects.test.ts. Preserve distinct authority, storage, and ordering cases.

CI-only campaign: no tests or coverage run. Plain oxlint, oxfmt, and diff-check passed. 4976 -> 4573 test lines; 35% target not reached without removing distinct behavior.

* test(gateway): remove duplicate r0099 boundary replays

Keep project validation in server.sessions.create.projects.test.ts, external cwd rejection in server.sessions.create.workspace-policy.test.ts, and structured denial translation in sessions-spawn-tool.test.ts. Keep provisioning assertions in server.sessions.create.worktrees.test.ts.

Keep session/owner PR lifetime fences in control-ui-session-pr-subscriptions.lifetimes.test.ts and real visibility fences in control-ui-session-pr-access.test.ts. Consolidate selected and service committed-preview assertions and reuse existing rejection/disposal helpers.

CI-only: no test or coverage runs. Plain oxlint, oxfmt and diff-check pass. Additional 100 lines removed; cumulative 4976 to 4473 (10.1%). Remaining distinct authority, storage, and lifecycle cases prevent a safe 35% cut.

* test(gateway): consolidate r0099 fixtures and assertions

Share typed session/model fixtures and scoped RPC setup while retaining per-method authority and lifecycle assertions. Remove duplicated internal dispatch, registry and steady-state checks. Keep sandbox rejection coverage in server.sessions.create.projects.test.ts and positive inherited-sandbox tool cases here.

Restore the queueGuest import used by the retained policy-readiness case. Keep negative-policy setup controls, durable failure errors, and checkout path ownership assertions.

CI-only: plain oxlint, oxfmt and diff-check pass; no tests or coverage run. Additional 180 lines removed, cumulative 4976 to 4293 (13.7%). The 35% target remains unmet because no further behavior-equivalent layer was identified.

* test(sessions): consolidate r0101 owner-boundary coverage

Remove duplicate lifecycle-admission cases retained in session-accessor.sqlite-lifecycle-admission.test.ts, including cold FIFO, read-only cleanup, repair refusal, authority retirement, selected state ownership, and historical preparation.

Retain cold-command coverage in session-actor.test.ts (installs a cold command and stale preimage without a separate read request), bookkeeping in session-actor-completion.test.ts (commits final custody, recap, usage, and claim cleanup together across rollback and restart), and usage-cache isolation in session-actor-entry-residency.test.ts (retains resident session facts across usage cache writes and reloads actual session changes).

Keep replica eviction as the behavioral byte-budget contract. Consolidate standalone and reply-tail watermarks; memory anchor coverage remains in session-transcript-memory-read.test.ts. Lagging and unclassified projection cases remain in session-accessor.sqlite-handle-lifecycle.test.ts. Shared and qualified lineage selection remains in session-utils-store-lookup.test.ts and combined-store-gateway.worker.test.ts; global parent transitions remain in session-row-projection.archived.test.ts.

Remove internal SQL/receipt inventories and repetitive fixtures, preserving durable outcomes, scoped authority, and actual race controls. CI-only validation: formatting, plain oxlint and diff checks passed; no tests or coverage run. Original shard 5247 to 4480 lines (14.6 percent), below the 35 percent target.

* test(gateway): deslop r0102 tests

Share memory search owner requests, exact response assertions, and invalid-agent cases. The unavailable-manager case retains the legacy-backend acquisition assertions previously repeated by a separate test.

Reuse rewind scopes and media expectations and sharing permission fixtures without removing distinct authority, lifecycle, or persistence cases. CI-only campaign: static lint, formatting, and diff checks only.

* test(gateway): remove r0102 owner-layer replays

Remove duplicate catalog, discovery, model-policy, projection, validation, and ticket scenarios. Keep distinct worker publication, runtime preparation, physical ownership, and authority interleavings.

Retained proof: memory-host-sdk host/types keeps pending-index and sync-failure diagnostics; question.own-run keeps privileged-record concealment and accepted-answer lifetime. sessions-read-catalog-scope, optional-model-catalog, session-utils single-row-cache/subagent, targets-read-availability and targets-discovery keep catalog isolation, selected-row parsing, fixed-store and template discovery.

sessions-create-category keeps first-use group invalidation; session-model-selection-policy keeps non-admin session-only selection; server.sessions.create.forks keeps native fork capacity; session-utils and model-catalog-view keep context-window projection. session-accessor.sqlite-message-cut-native keeps native cut validation; retained rewind lifecycle tests keep archived rejection and queue settlement. Retained creator-lifecycle tests keep archived, duplicate and sentinel identities; board-http keeps live issuing-Gateway ticket enforcement.

CI-only: plain oxlint, formatting, and diff checks pass. No tests or coverage run. Original shard LOC 4797 to 4020; 35 percent target remains unmet rather than dropping unique security or lifecycle proof.

* style(test): normalize replayed fixture formatting

* test: preserve boundary proof and repair replayed fixtures

* test: repair retained lifecycle fixture setup

* test: drop incompatible campaign fixture reductions

* test: retain inline update repair assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui extensions: codex gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant