Repository navigation
test: share worker migration and hook policy fixtures - #198928
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
560db19 to
74dc313
Compare
|
@clawsweeper re-review Please review the rebuilt JS/TS-only head |
|
🦞👀 Re-review progress:
|
|
Codex review: passed. What this changesThis PR shares worker-store migration fixtures and converts repeated hook-policy tests into tables. Example: Testing migration from worker schema v38
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR is a worthwhile, maintainer-authored test consolidation; the rebuilt diff preserves the distinct migration and hook-policy guards, and no actionable defects were found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway tests pass synthetic hook configurations and predecessor SQLite databases through existing policy and storage owners, then verify routing decisions, migrated rows, persistence, rollback, and schema descriptors. flowchart TD
A[Migration suite registrations] --> B[Shared migration fixture]
B --> C[Runtime and Doctor owners]
C --> D[SQLite store and worker]
D --> E[Persistence and rollback assertions]
F[Hook policy tables] --> G[Hook configuration and session policy]
G --> H[Routing and rejection assertions]
Technical reviewBest possible solution: Retain this focused consolidation with its existing version-specific assertions and shared fixture owner. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving test refactor, so a product-bug reproduction is not applicable. Is this the best way to solve the issue? The shared fixture is justified by three callers, preserves version-specific branches, and avoids adding production seams or competing storage owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5c5f62914957. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -228. Total -228 across 5 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
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 November 27, 2026, 7:13 AM ET / 12:13 UTC. |
What problem this solves
Three worker-store migration suites duplicated predecessor construction, rollback and PostgreSQL descriptor checks. Hook policy cases repeated configuration and assertion plumbing. Share that test setup while retaining the version-specific storage and hook-policy guards.
Scope and impact
JS/TS test code only: five files, +393/-621, 228 net lines removed. Production delta: 0. Final head:
74dc313367e6ca1909248078cf8d99d9617e10d7; frozen main:a0d3fc69f472bdb1fa4f0efa664facfcae727a05.The original native-app hunks are ON HOLD, excluded from this rebuild and unvalidated. Their original mixed source, including the other omitted hunks, is preserved on the hold branch at the original head. No existing PR checkout was modified or reused. Current-main tests, selectors, baselines and CI inventories remain.
Per-file evidence
src/gateway/hooks.test.tssrc/gateway/worker-environments/store-migration-contract.test-support.tssrc/gateway/worker-environments/store-resource-receipt-migration.test.tssrc/gateway/worker-environments/store-retained-lifecycle-migration.test.tssrc/gateway/worker-environments/store-provision-source-migration.test.tsAll 12 migration cases remain registered. The shared helper has only the three test callers; it adds no production API. The broader original deletion set is not approved by this rewrite.
Evidence
pnpm install --frozen-lockfilepassed with Node 26.7.0 / pnpm 12.15.0; local free disk was 59.314 GiB before and 58.964 GiB after, above the 10 GiB floor.git diff --checkpassed.blacksmith-testbox, leasetbx_01m8ed9jjcpxsz7xveqrfbabeb: bothtsconfig.core.test.gateway-root.jsonandtsconfig.core.test.gateway-other.jsonpassed. Four scoped suites passed 46 tests, including all 12 migration cases; Vitest wall time 52.32 seconds (runner wall 55.29 seconds).3113a6ddaf78496cdc4ba038a650cb69ceef4d4d, tracked-source cleanliness and all five file hashes. The final commit has that identical tree. Provider carrier commit identity is separate from source identity.Fixture qualification for the rebuilt head
The changed token/key-shaped inputs were personally inspected as fixed synthetic fixtures used only by isolated hook helpers and SQLite migration tests. The stored key reference is data for migration assertions, never resolved for authentication, and its public-key marker is a dummy stub. No detected scanner value or scanner output is reproduced. This qualification concerns the rebuilt five-file head; it makes no claim about the original mixed revision. The normal input scanner remains enabled for the requested fresh review.
Follow-ups and limits
Native Android/iOS/macOS tests remain on hold. Existing config-patch/health-state and script-wrapper fold opportunities are left as separate follow-ups; the final diff claims only the five files above.
Observed proof overhead is separate from test time: the cold source mirror copied 67,253 files in 246.7 seconds; the warm retry reused them in 58.3 seconds. No Actions-cost or model-billing saving is inferred from LOC.
Historical preparation for the original mixed head (not current approval or proof)
Current round: STOPPED at native source admission
Published head:
560db192500aafdf6a3a707cf13ca012b7045158. The nativereview-initrefused withUnowned transition resolve-undo entry "apps/macos/Tests/OpenClawIPCTests/MacNodeRuntimeTests.swift". Its process group and notification-pipe holders drained; the wrapper reported releasing the operation lock.The retained index contains the entries below even though ordinary
git statusis clean. The supported working-file recovery deliberately leaves the index unchanged and does not qualify this state. No index reset, guard bypass, new checkout route, or out-of-scope production-tooling repair was attempted.apps/macos/Tests/OpenClawIPCTests/MacNodeRuntimeTests.swiftNo source changes, commit, PR-workspace install, test/typecheck/lint pass, fresh exact-head review, green CI, or merge is claimed for this round. Free disk after admission was 13.318 GiB, above the revised 10 GiB floor. The open PR and existing native checkout remain in place, blocked on native index-ownership recovery. No unattended retry is scheduled.
A current-task lock left by an interrupted waiter was recovered through the exact native lock-recover command after verifying its children had drained. That recovery installed the frozen tooling dependencies from the pnpm store with zero downloads; disk was 16.930 GiB before and 14.314 GiB after recovery. The subsequent admission ended normally and released its own lock.
The admission refusal also blocks rebuilding the JS/TS-only part. Android, macOS and iOS test changes remain on hold; no local native-app verification or partial landing is claimed.
The previous file-to-keeper inventory below is historical preparation evidence, not a fresh approval of the proposed deletions.
Previous preparation and historical evidence
Current fix-only status
Prepared signed head
560db192500aafdf6a3a707cf13ca012b7045158on frozen current main7cb238ad89ab8054f177cf6c6038f11166bb08b6for #198928. Published for review at 2026-11-16 19:15:18 UTC. No merge requested or performed. Exact-head CI is terminal with unresolved failures; this repair is not validated. Historical results below apply only to their recorded heads; they do not validate this repair.Exact-head CI outcome
At head
560db192500aafdf6a3a707cf13ca012b7045158, the recorded result is 135 successful, 43 skipped, one cancelled, one neutral, three failed test jobs and two failed aggregate gates; no jobs remain active. Skipped and cancelled checks are not passes.chat-model-picker.browser.test.tsx, uses slash to focus open picker search without editing composer. The picker test/import/config closure and WebKit membership/order match the parent; that source comparison does not establish an executed baseline result.chat-send-ack-ownership.e2e.test.ts:77, detached DOM during ACK ownership coverage.agents.createtimeout.Causality is UNKNOWN for all three test failures. No runtime baseline reproduced them, and no deletion-caused dependency or justified coverage restoration has been established. Similar historical failures do not prove inheritance. No rerun, merge or ready-state change is requested by this update.
What Problem This Solves
Preserve current regression coverage while carrying the existing authorized test consolidation onto current main. No production files or behavior change. The file-to-keeper manifest retains the original consolidation provenance and records the current retentions.
Current Retentions and Conflict Resolution
apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatMarkdownBlockSegmenterTests.swift, including new streaming-list assertions.test/scripts/release-ci-summary.test.ts, including historical-operation and authentication-failure CI evidence.ui/src/pages/agents-home/templates-catalog.e2e.test.ts, including geometry, audit metadata, disabled-action, Add-without-plan and rollback assertions.src/agents/system-prompt-stability.test.ts: its formerworkspace.bootstrap-cache.test.tskeeper was deleted upstream. Repeated bootstrap loading still checks byte-stable AGENTS.md and SOUL.md content.src/agents/system-prompt.test.ts. Omit this packet's two incidental documentation/support additions;src/agents/system-prompt-support.test.tsalready asserts both strings. No assertion move or line-cap bypass.session-management.sidebar-reconnect.e2e.test.ts,sidebar-customization.e2e.test.tsandsidebar-pin-placement.e2e.test.tsunderui/src/e2e/.extensions/discord/src/voice/realtime-turns.test.ts,src/agents/workspace.bootstrap-cache.test.tsandui/src/e2e/desktop-panel.e2e.test.ts. Their obsolete self-keeper rows are removed, and these upstream deletions earn no campaign credit.Accounting and Evidence
Historical pre-repair validation and consolidation provenance (not current-head proof)
Current validation status
VALIDATED AS GREEN AS MAIN — the GitHub gate remains RED for a reproduced main failure. Signed head
73353a2ad140582c90c979684f12d81c112218a0stays ready for Vincent's review; it has not been merged.The 19:01 UTC status read found CI run 43622697206 complete with 99 successful checks, 19 skipped and two failures: native-control job 132543261001 and its aggregate CI gate. There are no pending jobs. Skipped checks are not counted as passes.
client-native-control.test.ts:474cancellation failures: transcript-first/rejection, delegation-first/rejection, transcript-first/empty and delegation-first/partial. The shard has four failed and 30 passed tests. The independently reviewed main execution receipt reproduced those four failures ond867f1791447e20904bfc2d39c43b1616311035bwith 10 passes in the 14-case file. All 17 audited test/support/owner/dependency blobs match both this PR and its actual CI baseaa4bc216fffafd7a1d53baa64072bef904f3a736. No new failing case or justified keeper restore was found.OpenClawIDDiscoveryAccountError. The focused main baseline reproduced that exact diagnostic at989f4a6d1e4096461fc6c4fbae993f56f3b02a6e. Both consumer builds and shared scans completed before it failed. The declaration and intersection source match. The iOS Periphery failure caused by this tranche is cleared.The campaign-caused Periphery failure was repaired by restoring only the original “current commands include location when enabled” case and its existing manifest note. It restores coverage for
_test_currentCommands()inGatewayConnectionController+Capabilities.swift:305, whose last callers had been removed. Repair delta: +17/-1, with the original assertion intact and zero production change. Independent review, Swift parsing and whitespace checks passed. Local SwiftFormat 0.62.1 refused the repository minimum 0.63.0, so no local formatter pass is claimed; original formatting was preserved.This main-equivalent classification is specific to the reproduced failures above; it does not claim that a red GitHub gate is green, that skipped checks passed, or that the focused native proof establishes whole-runtime parity. No further retry or broad restore is scheduled. This PR is removed from polling.
Related: #198737
Re-cuts part of #198756 alongside #198923. These replacements are standalone main-based branches; neither depends on the other.
What Problem This Solves
Repeated assertions, fixtures and overlapping test suites add maintenance cost. This replacement carries the remaining scoped assertion transfers and 48 approved whole-file removals from the original consolidation originally onto frozen main
1b947c9a9f61c260219ddf0a6f281854600b7bdd, then synchronizes with main2f4ae4d3284bf17ad4930cf6770dac14c025bfc1.Why This Change Was Made
The exact scope and keeper manifest records selected paths, surviving keepers, assertion-transfer provenance and the store-migration helper's three consumers.
Whole-file decisions use the approved bounded area-level review; they do not claim case-by-case equivalence. Six overlaps with newer main were reconciled while retaining current assertions. Final review retained
passes authenticated creator isolation through $methodwith its three imports,rejects CUA-bearing elevation artifacts before verify or installwith its file/symlink producer, and the separate stale-Homebrew-Node and missing-runtime cases. This part retains the 31 files removed separately by part A. Test inventory cleanup stays coupled to this part's actual removals. Three formerly proposed removals stay present because live fixtures target them:test/scripts/build-all.test.ts,test/scripts/dist-artifact-ownership.test.ts, andtest/scripts/personal-credential-writer-guard.test.ts. Current-main selection of the restored cold-history benchmark is preserved.User Impact
No production behavior change. Production LOC: +0/-0. This part retains the reviewed partial-file consolidation alongside 48 whole-file removals (11,905 lines); the manifest adds 350 lines. Aggregate accounting below includes all fixture and inventory changes.
Evidence
The composition repair restores the original 100-line metadata-rebuild suite and 117-line dirty-parent benchmark, with their frozen-main bytes and required inventory row. Only the transferred assertions in integration/invalidation targets are reverted; unrelated assertions are preserved. The benchmark stays opt-in, not an always-running six-row test. These two retentions and removal of obsolete transfer claims debit 160 net lines.
The follow-up owner-builder audit removed the stale
plugins-assertionsshorthand target while preserving the Docker build and E2E owners.73353a2ad140582c90c979684f12d81c112218a0; comparison base:2f4ae4d3284bf17ad4930cf6770dac14c025bfc1.The original was closed without merging after both replacement parts and their complete retention accounting were verified.
Inventory/baseline paths touched:
config/ci-test-timings.json,config/max-lines-baseline.txt,config/test-mock-exports-baseline.txt,scripts/lib/ci-proof-test-inventory.mts,scripts/lib/ci-test-native-bun-qualification.jsonandscripts/test-projects.test-support.mts.