Repository navigation
test(runtime,ui,plugins): remove low-value tests (batch d593) - #184245
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b884f7c91
ℹ️ 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".
| const metadataOnly = vi.fn((_event: unknown, context: unknown) => { | ||
| expect((context as PluginHookSessionContext).endedTranscript).toEqual({ | ||
| available: false, | ||
| reason: "conversation-access-required", | ||
| }); |
There was a problem hiding this comment.
Keep the transcript-access assertion outside the fail-open hook
If transcript projection accidentally grants access to the metadata-only hook, this assertion now throws inside runSessionEnd, whose runner defaults to catchErrors: true and swallows handler failures in hooks.ts. The remaining invocation and read-count assertions still pass because this callback never reads the transcript, so the test no longer detects that permission regression. Retain the assertion against the captured callback arguments after dispatch, or configure this runner with catchErrors: false.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8409c666ff
ℹ️ 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".
| goal: createSessionGoalFixture("goal-1", objective, { | ||
| createdAt: Date.now() - 15_000, | ||
| updatedAt: 2, | ||
| tokenStart: 100, | ||
| tokensUsed: 12_400, | ||
| tokenBudget: 50_000, |
There was a problem hiding this comment.
Restore the goal fixture's elapsed-time baseline
Removing the createdAt: Date.now() - 15_000 override makes createSessionGoalFixture use its default createdAt: 1. The active-goal renderer calculates elapsed time against the current clock, so both cases of renders goal details and gates actions now display time since the Unix epoch rather than the 15s still asserted at lines 64 and 91. Restore the timestamp override and a deterministic clock so this test continues to pass without becoming timing-dependent.
Useful? React with 👍 / 👎.
|
Codex review: blocked before merge. What this changesThis PR consolidates fixtures, combines overlapping test cases, removes obsolete probes, and shrinks one mock-policy allowance without changing production code. Example: Two approved plugins claim the engine ID existing-engine.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR provides useful test consolidation, and the reviewed diff revealed no actionable defect; the exact-head CI gate remains pending. Priority: P3 Before merge
FindingsNone. Provenance
Agent review detailsHow this fits togetherThe changed test suites exercise runtime, Gateway, plugin, storage, and chat owners using synthetic inputs, then check their outputs, lifecycle effects, and rejection boundaries. flowchart LR
A[Synthetic fixtures] --> B[Runtime and Gateway owners]
A --> C[Plugin owners]
A --> D[Chat components]
B --> E[Contract assertions]
C --> E
D --> E
E --> F[Hosted CI gate]
Technical reviewBest possible solution: Retain the consolidation with distinct contracts in their existing owner suites and let the exact-head CI gate complete. Do we have a high-confidence way to reproduce the issue? No product bug is claimed; source inspection confirms a test-only cleanup, and this read-only review executed no tests. Is this the best way to solve the issue? Reusing existing fixtures and owner suites is appropriate; sampled replacement coverage preserves the contracts cited for the removed layers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4a5a4ee6f162. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -1446, Other -1. Total -1447 across 61 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 26, 2026, 2:23 AM ET / 06:23 UTC. |
Reuse the exact staged PDF fixture and queued-item builder; reuse route fixture subscriptions and publication. Drop obsolete goal clock setup and repeated ignored heartbeat fields. Keep mobile focus/draft/caret coverage in chat-composer-mobile.browser.test.tsx (keeps the mobile draft through %s focus). Retain distinct keyboard-close and touch-retarget proof here. Keep outbox summary projection coverage in outbox-store.test.ts (queries draft and attention snapshots) and sidebar-outbox.e2e.test.ts; retain live attention IDs and custody boundaries here. CI-only: oxfmt, plain oxlint exit 0, and diff check passed. No tests or coverage run. Shard LOC 2028 -> 1723 (15.04%); still below 20% because remaining source branches and lifecycle/authority contracts lack redundant proof.
Remove identity-cache benchmark scaffolding; retain reload, deep-link and WebSocket network reuse assertions. Diagnostic phase coverage remains in control-ui-bootstrap-document.http.test.ts and control-ui-document-diagnostics.test.ts. Reuse paired-device setup, factor row delivery preparation, and replace nested MCP teardown with ordered disposal. Preserve all 30 declarations and 45 expanded cases. CI-only validation: formatting, diff check and plain oxlint; no runtime tests or coverage run. Shard LOC: 2106 -> 1998 (5.1%); distinct lifecycle, authority and retention behavior prevents the requested 20% cut.
Keep Gateway pressure publication and diagnostics toggles; worker retirement and held-result custody remain in worker-task-pool.owned.test.ts (retires only idle slots on critical pressure, after result and resource custody settle). Remove obsolete session-store mock and miss-TTL replay. sessions-resolve-projection.test.ts covers orphan reads, no SQL, and later identity publication in keeps the freshest same-session-id row when prompts are not decoded; its shared-store owner case retains literal-global ownership. Keep eager-tool prevention in the startup fixture; remove mock-produced array identity and internal call-shape assertions. Real surface authorization remains in worker-session-tool-executor.test.ts. Retain exact encoded delta proof instead of duplicate object assertions and factor MCP wait gates. CI-only: plain oxlint, oxfmt and diff-check pass; no tests or coverage run. Additional reduction 1998 -> 1861 lines; cumulative 2106 -> 1861 (11.6%), below 20% because remaining owner/authority/lifecycle contracts are distinct.
Use compact indexed-row fixtures, one node reapproval receipt assertion helper, and fixture-owned observer publication capture. Keep every authority and ordering case. Remove duplicated post-mutation checks from the worker ordering scenario: deletion is covered by server.sessions.delete-lifecycle.test.ts (preserves locked archived sessions and deletes ordinary archived sessions), archive state by server.sessions.archive-worker-placement.test.ts, and recovery successor publication by server.sessions.recover.test.ts (recovery source reads and commit guards execute no host SQLite). The move-preflight error itself proves begin was entered, making its separate flag redundant. CI-only validation: plain oxlint, formatting and diff-check pass; no tests or coverage run. Additional LOC 1861 -> 1835; cumulative 2106 -> 1835 (12.9%). The 20% target remains unmet rather than deleting distinct security, durability or lifecycle behavior.
Table-drive schema and error decision paths without dropping distinct assertions. Keep Connector HTTP auth proof instead of the duplicate direct 403 assertion; remove redundant internal call counts and argument-shape checks while retaining cache reuse, eviction, approval-token mapping, and replay-safety outcomes. Reuse the existing state temp-directory tracker, retain per-test database closure, and remove single-table OAuth and consent wrappers. Shard totals: 1702 to 1360 lines (20.1 percent); this follow-up removes 93 lines. CI-only: oxfmt, diff-check, and plain oxlint passed; no runtime tests or builds run.
9ba0f7c to
bbc6ff9
Compare
…aw#184245) * test(chat): remove o0122 fixture and layer duplication Reuse the exact staged PDF fixture and queued-item builder; reuse route fixture subscriptions and publication. Drop obsolete goal clock setup and repeated ignored heartbeat fields. Keep mobile focus/draft/caret coverage in chat-composer-mobile.browser.test.tsx (keeps the mobile draft through %s focus). Retain distinct keyboard-close and touch-retarget proof here. Keep outbox summary projection coverage in outbox-store.test.ts (queries draft and attention snapshots) and sidebar-outbox.e2e.test.ts; retain live attention IDs and custody boundaries here. CI-only: oxfmt, plain oxlint exit 0, and diff check passed. No tests or coverage run. Shard LOC 2028 -> 1723 (15.04%); still below 20% because remaining source branches and lifecycle/authority contracts lack redundant proof. * test(gateway): deslop o0123 tests Remove identity-cache benchmark scaffolding; retain reload, deep-link and WebSocket network reuse assertions. Diagnostic phase coverage remains in control-ui-bootstrap-document.http.test.ts and control-ui-document-diagnostics.test.ts. Reuse paired-device setup, factor row delivery preparation, and replace nested MCP teardown with ordered disposal. Preserve all 30 declarations and 45 expanded cases. CI-only validation: formatting, diff check and plain oxlint; no runtime tests or coverage run. Shard LOC: 2106 -> 1998 (5.1%); distinct lifecycle, authority and retention behavior prevents the requested 20% cut. * test(gateway): remove duplicate o0123 proof layers Keep Gateway pressure publication and diagnostics toggles; worker retirement and held-result custody remain in worker-task-pool.owned.test.ts (retires only idle slots on critical pressure, after result and resource custody settle). Remove obsolete session-store mock and miss-TTL replay. sessions-resolve-projection.test.ts covers orphan reads, no SQL, and later identity publication in keeps the freshest same-session-id row when prompts are not decoded; its shared-store owner case retains literal-global ownership. Keep eager-tool prevention in the startup fixture; remove mock-produced array identity and internal call-shape assertions. Real surface authorization remains in worker-session-tool-executor.test.ts. Retain exact encoded delta proof instead of duplicate object assertions and factor MCP wait gates. CI-only: plain oxlint, oxfmt and diff-check pass; no tests or coverage run. Additional reduction 1998 -> 1861 lines; cumulative 2106 -> 1861 (11.6%), below 20% because remaining owner/authority/lifecycle contracts are distinct. * test(gateway): consolidate o0123 fixtures and lifecycle proof Use compact indexed-row fixtures, one node reapproval receipt assertion helper, and fixture-owned observer publication capture. Keep every authority and ordering case. Remove duplicated post-mutation checks from the worker ordering scenario: deletion is covered by server.sessions.delete-lifecycle.test.ts (preserves locked archived sessions and deletes ordinary archived sessions), archive state by server.sessions.archive-worker-placement.test.ts, and recovery successor publication by server.sessions.recover.test.ts (recovery source reads and commit guards execute no host SQLite). The move-preflight error itself proves begin was entered, making its separate flag redundant. CI-only validation: plain oxlint, formatting and diff-check pass; no tests or coverage run. Additional LOC 1861 -> 1835; cumulative 2106 -> 1835 (12.9%). The 20% target remains unmet rather than deleting distinct security, durability or lifecycle behavior. * test(memory): deslop o0121 tests Share session timer, manager, transcript and interruption setup. Reuse cache configuration/count assertions and upgrade fixture access; retain first-search bootstrap separately from discovery after an empty bootstrap. Drop the no-embedding metadata-failure cache replay: manager.reindex-recovery.test.ts preserves the cache when a full rebuild fails without writing embeddings and retries both sources without force after a late shadow failure. These cover the same pre-publication failure and retained-index boundary. CI-only: plain oxlint, oxfmt and diff check pass; no tests, coverage or Testbox run. Shard lines 2113 to 2041 (3.4%), below 20%: remaining tests protect distinct read-only diagnostics, temporal sources, stream limits/cancellation, repair draining, scheduler yield, publication authority/restart admission and cache budgets. * test(harness): finish o0125 structural reduction Retain nested invocation mutation proof instead of the shallow replay; embedded-agent-subscribe.handlers.tools.test.ts covers cron accounting. Remove the heartbeat response test retired by a0cb9fa. Keep exact/literal transport integration; config/model-provider-config.test.ts retains exact-before-legacy, legacy fallback, and duplicate-row rules. runtime-plugin.test.ts and plugins/config-state.test.ts retain memory activation and catalog-discovery contracts. ACPX index.test.ts and gateway/config-reload.test.ts retain reload declaration and planner proof. Reuse system admission and promise gates, consolidate retry assertions and load-plan fixtures, and assert memory guidance context through its returned text. Preserve approval, recovery, dispatch, privacy, and lifecycle boundaries. CI-only: formatting, plain oxlint, and diff checks passed; no tests run. * test(agents): deslop o0124 tests * test(agents): consolidate o0124 coverage layers Remove the Anthropic alias inventory replay covered by model-catalog-core's native Anthropic catalog normalization case and model-selection-manifest-workspace's captured normalization flags case. Remove ordinary non-overflow fallback replay covered by executes fallback aliases in the selected agent scope and terminal-boundary's preserves recovery when its fallback observer rejects. Reuse fixture and assertion scaffolding while retaining provenance, accounting, queue lifecycle, publication, and image/signature boundary checks. Static lint and format checks pass; runtime validation deferred to hosted CI per campaign instructions. Shard remains below the 20 percent reduction target. * test(agents): remove obsolete normalizer packaging probe The runtime normalizer stopped probing source/dist require candidates in f778d2d. Remove its synthetic esbuild package layer; preserve active/request/generation authority and one-pass manifest normalization through direct production calls. Fold stream wrapping and retained-reconciler assertions into the guarded request lifecycle cases, retaining prepare/reload/request ordering and fail-closed behavior. Static formatting, oxlint and diff checks pass. No runtime tests executed under CI-only campaign instructions. Shard remains below the requested 20 percent reduction target. * test(outbound): deslop o0126 tests Share worker SQL-observer, pending-entry and missing-artifact assertions; reuse typed message-action fixtures and table plain-text preservation cases. Preserve all case inputs and distinct ownership, redaction and lifecycle assertions. CI-only validation: oxlint, oxfmt and diff checks; no runtime or coverage runs. This bounded cleanup falls short of the shard line target. * test(qa-lab): deslop o0127 tests Share transcript and generated-image fixtures, pair sentinel inputs with expected classifications, and consolidate native session evidence. Preserve all existing cases, privacy assertions, storage and lifecycle boundaries. CI-only: plain oxlint, formatting and diff checks passed; 1565 to 1481 test lines (5.37%), below the 20% target because the remaining suites cover distinct boundaries. * test(qa-lab): consolidate o0127 test layers Combine log classification and cursor proof, carry duplicate-label retry and raw-index assertions into gallery projection, and retain browser interaction and UTF-16 proof in one page flow. Browser cleanup remains covered by web-runtime.lifecycle.test.ts and web-runtime.lifecycle.e2e.test.ts. Share native session and SQLite environment fixtures; replace the lifecycle summary IPC observer with durable summary inspection after process close. Keep privacy, containment, receipt, storage and cleanup assertions. CI-only: formatting, plain oxlint and diff checks pass; no tests or coverage run. Shard files: 1565 to 1252 lines, exactly 20 percent; lifecycle support loses 21 additional lines. * test(infra): deslop o0130 tests Share browser platform setup without dropping Linux, SSH, or macOS paths. Reuse the backup fixture adapter and generated-file builder, preserving permission, snapshot, privacy-probe and archive assertions. Retain distinct custody, recovery, authority and lifecycle cases; the safe line reduction is below the shard target. * test(infra): remove duplicate o0130 proof layers Registry precedence remains in windows-install-roots.test.ts: prefers HKLM registry roots over process environment values. Browser Windows dispatch still checks rundll32 and the file URL. Manual release remains in charges reservations and releases each charge only once; execute budget rejection remains in sqlite-worker-broker.test.ts: charges admission waiters to the byte budget and releases canceled reservations. The handoff row retains input capture. Surface supersession remains in device-pairing-node.test.ts: supersedes pending requests when the approval surface changes. Aged read/write/reopen and disconnect retention remain in the lifecycle suite. First-connection recording remains in atomically grants one first-connection claim across concurrent handshakes. Audit exact-ID serialization and adjacent replacement refusal remain in recovers released numeric restore journals and refuses replacement files. Remove duplicate round-trip proof and launchd wording/call-count restatements while preserving deadline, ownership and fallback assertions. * test(infra): consolidate o0130 owner-boundary proof Measure backup privacy and file probes around real baseline/populated archives instead of replaying a hand-built snapshot plan. Keep the two header-worker regression and archived dirty-file assertion. Alias and declared-database correctness remain in backup-create.sqlite-hardlinks.test.ts, backup-database-resources.test.ts, and backup-create.test.ts (sanitizes all SQLite aliases). Remove universal Git fixture tracking duplicated by update-runner-git-candidate.test.ts's update wrapper and update-runner-git-admission.test.ts's rechecks admission after transport, pinning target test. Keep actual installed Doctor execution and version/schema verification. The reconnect lifecycle row is covered by device-pairing-node.test.ts: rejects every pending request for one node without removing its approval. Retain aged read/write/reopen and disconnect proof. Simplify alias fixtures and cleanup scaffolding; use one launcher-marker representative for the same stop-budget branch. No test execution in CI-only mode. * test(plugins): deslop o0129 tests Share context-engine approval and loader fixtures; consolidate manifest rejection tables while retaining all inputs and assertions. Drop the duplicate unwired event result assertion: returns inert results for unwired runtime and scheduler handlers retains the default, and enforces post-registration call eligibility retains late event forwarding. Retain all 112 expanded cases for distinct plugin authority, lifecycle, provenance, and network boundaries. CI-only validation: plain oxlint, oxfmt, and diff check. Reduction is 43 lines (2.5%), below the shard target; no additional safe cross-file duplicates identified. * test(plugins): consolidate o0129 loader and contract proof Move owner-precedence and graceful-init cases into bundled-capability-runtime.test.ts in the same isolated plugins project. Reuse loader fixtures, pair API defaults with post-registration eligibility, and keep startup-summary assertions in the partial-registration scenario. Drop the retired API inventory and same-branch input replays. Schema-validator.manifest.test.ts flags unusable schemas including unresolved refs; the retained deep-schema loader case proves validation failure and retry. ClawHub/npm parsing stays in infra spec tests; source-info cases keep pin states, warnings, defaults and provenance constraints. Network cases retain policy branches, with IP classification covered by net-policy ip tests. CI-only: plain oxlint, oxfmt and git diff --check passed; no tests, builds, coverage or Testbox runs. Shard LOC 1727 -> 1468 (15.0%); still below the 20% target without dropping distinct authority, lifecycle, or public-contract behavior. * test(plugins): remove redundant o0129 wiring layers Share capability capture setup across plain and channel plugins, absorb source-coexistence assertions into the pin matrix, and exercise registration closure through its direct owner. Retain all allow/deny, transcript lifetime, owner precedence and manifest validation decisions. Remove the internal inherited-getter fixture introduced by refactor 164ab27: production builder callers use literal handlers. Loader activation's registers node feature CLI commands under nodes case retains the real routing boundary; the lifecycle table retains defaults and post-registration eligibility. Trim unused package metadata and repeated diagnostic wording. The bundled shadow uses the supported index.cjs entrypoint. CI-only static checks: oxfmt, plain oxlint and git diff --check pass. No test or coverage runs. Original shard 1727 -> 1381 lines, down 346 (20.03%). * test(commands): deslop o0128 tests Consolidate inference invocation and ordering checks, delivery payload setup, native credential inspection, and SQLite subprocess scaffolding. Preserve every case and all lifecycle, privacy, admission, and foreign-write assertions. CI-only validation: plain oxlint, oxfmt, and diff checks; no runtime tests or coverage run. * test(commands): consolidate o0128 boundary coverage Fold turn routing and outbound-session checks into one delivery table. Move Gateway capture non-mutation proof to real native bootstrap and remove its mocked startup layer. Keep normal-root migration in the recovery case and routed migration in the isolation case. Retain unavailable-inference output coverage in src/system-agent/setup-inference-error-reporting.test.ts (preserves cause in JSON) and keep guidance here. Remove downstream rollback replay covered by src/cli/update-cli/update-command-database-retention.test.ts (retains recovery snapshots). Unowned-link rejection remains in doctor-update-rehearsal-inventory.test.ts (refuses default-alias and rechecks new-default-alias). Preserve all environment mutation inputs in a compact fixture. CI-only: oxlint, oxfmt and git diff --check passed; no tests or coverage executed. Target remains unmet rather than removing distinct storage and lifecycle contracts. * test(commands): reduce o0128 remaining fixture layers Remove unrelated plugin installation from storage diagnosis fixtures and replace repeated diagnostic snapshot wrappers with one local helper. Keep every PostgreSQL snapshot and storage permission case. Collapse one-shot error handling into a table without losing exit, output, or admission checks. Remove continuation warm-reader replay covered by doctor-maintenance.admission-warm.test.ts: binds the reader to Doctor's source and drains before cold restoration. Retain the real cold capture, hashing bound, lifecycle, and file integrity proof. CI-only validation: plain oxlint, oxfmt, and git diff --check passed. No test or coverage runs. The 20 percent shard target remains unmet; retained cases protect distinct behavior. * test(chat): deslop o0131 tests Factor repeated menu readiness, publication button assertions, copy actions, disclosure input settlement, and observer event fixtures. Keep all distinct behavior and test cases; no production changes. CI-only validation: plain oxlint, oxfmt, git diff --check. Conservative reduction falls short of the shard target because remaining cases cover independent lifecycle, interaction, and safety branches. * test(chat): consolidate o0131 behavior proof Reduce the original shard from 1992 to 1593 lines without production changes. Keep shared disclosure CSS/browser selection proof once; component toggle behavior remains in chat-activity-disclosure.test.ts (keeps parallel tool activity expandable) and chat-tool-card-identity.browser.test.ts (preserves independent inline/standalone disclosure IDs). Keep composer End-key behavior in menu-navigation-loading.browser.test.tsx (replays queued keys in navigation order), and lazy menu admission in menu-navigation.browser.test.tsx. Move catalog label assertions into its retained full-picker focused-refresh test. Retain CSS/script escaping assertions in the mixed-asset and deferred-script cases; retain repeat-count payload behavior in the notice callback-update case and agent-switch navigation in the pane integration case. Remove internal inventories, duplicate call counts, unused fixture fields, and harness-owned cleanup. CI-only: oxfmt, plain oxlint, and git diff --check passed; no test, coverage, or typecheck runs. * test(msteams): deslop o0134 tests Remove six pending-upload copies covered by pending-uploads-fs.test.ts and three conversation-store copies covered by conversation-store.shared.test.ts (normalization, CRUD/user lookup, freshest DM). Both keepers exercise the same state owner and remain in the database-worker project. Consolidate DM-selection and retry-delay fixtures and account configuration setup while retaining distinct authorization, expiry, corruption, concurrency, and reply-safety assertions. CI-only: oxfmt, diff-check and plain oxlint passed; runtime tests and coverage deferred to hosted CI. * test(msteams): finish o0134 structural consolidation Table-drive schema and error decision paths without dropping distinct assertions. Keep Connector HTTP auth proof instead of the duplicate direct 403 assertion; remove redundant internal call counts and argument-shape checks while retaining cache reuse, eviction, approval-token mapping, and replay-safety outcomes. Reuse the existing state temp-directory tracker, retain per-test database closure, and remove single-table OAuth and consent wrappers. Shard totals: 1702 to 1360 lines (20.1 percent); this follow-up removes 93 lines. CI-only: oxfmt, diff-check, and plain oxlint passed; no runtime tests or builds run. * test(plugins): keep retained failure suite as sole proof owner * test: preserve independent safety contracts during batch replay * test: retain rollback and startup boundary proof * test(plugins): assert transcript denial after hook dispatch * test: repair CI typing after campaign replay * test: preserve fixture timing and tighten replay helper types * test: retain isolated mocks and browser disclosure fixtures * test: prune removed session mock baseline entry * test(ui): remove unnecessary query helper generics * test(memory): retain original session delta fixtures
Verify effective database write access during Doctor state admission after permission hardening. A current database with no plugin migrations can otherwise complete diagnostics without ever attempting a write, hiding immutable storage. The non-truncating open preserves database contents and uses the existing command-boundary diagnosis and recovery guidance. The existing macOS regression started failing in 6ce3260 (#184245), which removed a plugin fixture whose writes had incidentally exposed this condition. Keep its assertions unchanged and document the independent admission check. Release-note context: Doctor reports an immutable state database's path and the macOS chflags nouchg remedy, and exits unsuccessfully even when no migration is pending. Writable shared stores and owned read-only mode repair remain supported.
Verify effective database write access during Doctor state admission after permission hardening. A current database with no plugin migrations can otherwise complete diagnostics without ever attempting a write, hiding immutable storage. The non-truncating open preserves database contents and uses the existing command-boundary diagnosis and recovery guidance. The existing macOS regression started failing in 6ce3260 (#184245), which removed a plugin fixture whose writes had incidentally exposed this condition. Keep its assertions unchanged and document the independent admission check. Release-note context: Doctor reports an immutable state database's path and the macOS chflags nouchg remedy, and exits unsuccessfully even when no migration is pending. Writable shared stores and owned read-only mode repair remain supported. Co-authored-by: Peter Steinberger <[email protected]>
…w#199509) Verify effective database write access during Doctor state admission after permission hardening. A current database with no plugin migrations can otherwise complete diagnostics without ever attempting a write, hiding immutable storage. The non-truncating open preserves database contents and uses the existing command-boundary diagnosis and recovery guidance. The existing macOS regression started failing in 1b7b2d7 (openclaw#184245), which removed a plugin fixture whose writes had incidentally exposed this condition. Keep its assertions unchanged and document the independent admission check. Release-note context: Doctor reports an immutable state database's path and the macOS chflags nouchg remedy, and exits unsuccessfully even when no migration is pending. Writable shared stores and owned read-only mode repair remain supported. Co-authored-by: Peter Steinberger <[email protected]>
Verify effective database write access during Doctor state admission after permission hardening. A current database with no plugin migrations can otherwise complete diagnostics without ever attempting a write, hiding immutable storage. The non-truncating open preserves database contents and uses the existing command-boundary diagnosis and recovery guidance. The existing macOS regression started failing in 6ce3260 (#184245), which removed a plugin fixture whose writes had incidentally exposed this condition. Keep its assertions unchanged and document the independent admission check. Release-note context: Doctor reports an immutable state database's path and the macOS chflags nouchg remedy, and exits unsuccessfully even when no migration is pending. Writable shared stores and owned read-only mode repair remain supported. Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 39c3099) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 0de3eb1eac1666561c6e4051b6f233420eb40766)
What Problem This Solves
Removes repeated test setup, duplicate proof layers, and obsolete probes across runtime, chat, and plugin tests.
User Impact
No user-visible behavior or production-code changes. This is the current-main replay of test-reduction batch d593; newer main coverage wins wherever the older cleanup conflicted.
Why This Change Was Made
Keep distinct lifecycle, authority, persistence, transport, and failure contracts while consolidating fixtures and redundant assertions. The context-engine owner-precedence suite moves into the existing bundled-capability suite. The current graceful-initialization failure suite remains the sole owner of its cases; copied cases from the replay were removed.
25 of 30 supplied commits replayed (some partially), plus replay-only corrections. The o0121 memory cleanup was ultimately restored to main; it contributes no final diff. Initial base:
f1664980f94c8ce553c189bb60bb298e0960ee02; final rebase base:d1e8a1a28990727ec928d0cfe00c7caf52107945.Skipped:
e8d710af57e1: fixture import already repaired on main; current fixture is initialized inside its describe block (6b12657032d9d).82f82bb6c100: intertwined memory suite deletion/move conflicted with rewritten current read and upgrade coverage; kept current suites and CI inventories.65edb8d11969: middleware/media/heartbeat copies already absent in current tool-invocation suite; no resurrection of retired heartbeat proof.f44b1582531eand07a44635f719: outbound consolidation and its dependent cleanup conflict with current split worker/adapter/normalization proof; retained current versions.Conflict resolutions (all other nonconflicting hunks retained):
Evidence
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <changed surviving files>: passed.node_modules/.bin/oxlint -c .oxlintrc.json <changed surviving TS/JS files>: exit 0.git diff --check f1664980f94c8ce553c189bb60bb298e0960ee02: passed.Runtime tests, coverage, typechecking, check-changed, and Testbox deliberately not run under the maintainer's CI-only instruction. Hosted
openclaw/ci-gateis the test/merge proof; no local runtime timing or coverage preservation percentage is claimed.Independent review found one deterministic fixture failure and seven independent-contract risks. All eight affected files were restored to the pinned main contents, dropping those cleanup hunks entirely. A second full-diff review identified five more contract-preservation concerns; the six implicated files were also restored to pinned main. Final review covers that corrective commit.
Restored files:
src/commands/doctor-gateway-service-preview.test.ts,src/infra/update-runner-git-admission.test-support.ts,src/infra/browser-open.test.ts,src/infra/backup-sqlite-snapshot.performance.test.ts,src/gateway/server-worker-environment-startup.lazy.test.ts,extensions/memory-core/src/memory/manager-cache-rebuild.test.ts,src/agents/model-ref-shared.test.ts, andsrc/gateway/server.sessions.worker-placement-order.test.ts. This retains supported-runtime expectations, update admission ordering, trusted Windows root selection, alias/plugin database snapshots, per-connection tool identity, failed-publication atomicity, packaged normalization, and persisted lifecycle effects.Second-pass retained contracts: actual rollback refusal in
doctor-maintenance.database-writes.test.ts; unowned symlink rejection indoctor-update-rehearsal-producer.test.ts; non-overflow order inmodel-fallback.context-overflow.test.ts; exact scoped and bounded requests inscenario-catalog.prompt-evidence.test.ts; and quarantine verification with the pairedstartup-plugin-source-captures.test.ts/startup-config-preflight.native-bootstrap.test.tssuites.Hosted review correction: the metadata-only transcript denial assertion remains outside the fail-open hook callback, so hook error handling cannot swallow a permission regression.
Rejected review finding: the alleged missing
loadOpenClawPluginsexport is false. Unchangedsrc/plugins/loader.test-fixtures.tsimports it at line 7 and explicitly re-exports it at line 11.Hosted CI run 40275223390 exposed replay-only typing, fixture-clock/settlement, optional-property, mock-export, and browser-import failures. Restored main's ingress diagnostics, image sanitization, code-mode backpressure, route warm boot, goals, activity, system-inference, media-runtime, and disclosure browser tests; repaired void cleanup callbacks, tuple/callback types, payload return annotations, DOM query return types, UUID parameter type, and optional MCP lifecycle assertions. Each corrective delta received independent review; local format/plain lint/diff checks pass. Fresh-head hosted CI remains the required runtime proof.
Fresh-head run 40276536508 passed every test-typecheck and all three UI shards. Its mock-export ratchet identified one stale allowance for the removed
server-session-key.test.ts→session-utils.jsfactory; removed exactly that reported baseline entry (shrink-only, no new exceptions). Its remaining actionable lint errors required removing the DOM helpers' unnecessary generic parameters, retaining native typed queries for input/details properties. The unrelated max-lines messages are warnings, not failed gates.Run 40277802850 completed green on
9ba0f7c19455367d1274a3363717b04a58e915aa, including all PostgreSQL shards. Main advanced during CI and produced a merge conflict. Rebased ontod1e8a1a28990727ec928d0cfe00c7caf52107945; retained main's completechat-composer-recovery.test.ts(new import ownership and fixture) and dropped that cleanup hunk.git range-diffconfirms the other 33 commits are equivalent. Fresh-head CI is required after this rebase; prior-head green is not claimed as rebased-head proof.Rebased run 40280715564 passed all checks except PostgreSQL conformance (1/3), whose untouched
extensions/memory-core/src/tools.postgres.test.tsrebuild-search assertion at line 226 returned no hit. The latest three scheduled main PostgreSQL jobs passed, so this is not claimed proven pre-existing and no admin exception is used. Following the operator's drop-unclear-hunks rule, restored the sole remaining memory cleanup (manager-session-delta.test.ts) to main. This is conservative scope reduction, not a claim of established root cause. Fresh-head CI must validate the final candidate.CODEOWNERS: no changed path matches the current explicit CODEOWNERS entries.
Final replay: 59 files, +1,953 / -3,369 lines (net -1,416). Production: +0 / -0. Test files: +1,944 / -3,302. Test-support files: +9 / -66. Test-policy baseline: +0 / -1.
Per-shard replay deltas
Counts are against the final pinned rebase base, not the historical campaign tree. Declarations count source-level
it/testdeclarations, not expanded table cases. Original per-shard reports explicitly say coverage was not run under CI-only instructions; no numerical coverage totals exist to report.Files touched by shard (relative to the indicated directory)
ui/src/pages/chat/: chat-pane-presence.test.ts.src/gateway/: node-reapproval-coordinator.test.ts, server-session-key.test.ts, server.auth.identity-network.test.ts, server.diagnostics-policy.test.ts, server.sessions.mcp-cleanup.test.ts, session-observer-model.test.ts, session-row-delta-retention.test.ts. Also removes the obsolete session-key mock entry fromconfig/test-mock-exports-baseline.txt.src/agents/: opencode-request-headers.test.ts, provider-stream.lifecycle.test.ts, simple-completion-runtime.selection.test.ts, tool-images.test.ts, workspace-bootstrap-publish.test.ts.src/agents/harness/: acp-native-approval-effect.process.test.ts, acp-native-process.test-support.ts, context-engine-recovery.projection.test.ts, lifecycle-hook-helpers.test.ts, native-hook-relay.participants.test.ts, provider-route-selection.test.ts, runtime-plugin-load-plan.executor.test.ts, workspace-context.test.ts.src/infra/outbound/: message-action-normalization.test.ts, message-action-send.validation.test.ts, sanitize-text.test.ts.extensions/qa-lab/src/: evidence-gallery.presentation.test.ts, execution-identity-storage-inspection.test.ts, gateway-log-sentinel.test.ts, runtime-tool-fixture.native-workspace.test.ts, suite-process-lifecycle.test-support.ts, suite-process-lifecycle.test.ts, web-runtime.test.ts.src/commands/: agent.delivery.test.ts, doctor-database-diagnostics.postgres.test.ts, doctor-maintenance.continuation-scope.test.ts, doctor-state-storage.test.ts, onboard-quickstart-host.test.ts.src/plugins/: api-lifecycle.test.ts, before-agent-reply.test.ts, bundled-capability-runtime.test.ts, clawhub.test-support.ts, context-engine-owner-precedence.test.ts (deleted), manifest-backup-resources.test.ts, wired-hooks-session.test.ts.src/infra/: device-pairing-node.lifecycle.test.ts, sqlite-worker-input-preparation.test.ts, state-migrations.audit-recovery-protocol.test.ts, update-freebsd-pkg-ownership.test.ts.ui/src/pages/chat/components/: chat-composer-plus-menu-loading.test.tsx, chat-details-desktop-section.browser.test.tsx, chat-github-publication-readiness.test.tsx, chat-pane-header-agent.test.ts, chat-pane-placement.test.ts, chat-question-card-loading.test.ts, chat-run-failure-notice.test.ts.extensions/msteams/src/: approval-card.test.ts, channel.config-schema.test.ts, errors.test.ts, pending-uploads-fs.test.ts.