Skip to content

fix(tests): stop waiting on removed workspace preparation - #202068

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-fix-stale-main-tests-20260919
Nov 19, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-fix-stale-main-tests-20260919

Conversation

@steipete

@steipete steipete commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Two embedded-runner admission tests fail before exercising their lifecycle checks because #201333 removed the redundant workspace directory creation they used as a barrier.

The second reported main failure, an inactive-run diagnostic expectation left by #201790, is already repaired by #202049. Its unchanged steering-custody suite passes all 28 cases on this base.

User Impact

No user-visible behavior changes. The tests again verify that closing or replacing admission during preparation prevents both routing audit work and backend dispatch.

Why This Change Was Made

Hold the real transcript-target preparation result before dispatch checks admission. Workspace creation now belongs inside the backend path, after routing, so waiting there would lose the no-routing contract. All existing rejection, routing, backend, cleanup, and deadline assertions remain intact. No production hook, timeout increase, retry, or duplicate coverage is added.

Production delta: 0 lines. Test delta: +11 / -7 lines.

Evidence

On base f9553398b8e5de2d24d46ea53a899eda5dd1db17, both preparation cases fail twice with embedded run settled before attempt preparation; the other 13 cases pass. The repaired full suite passes 15/15 twice through the repository E2E runner. Initial E2E build preparation also passed. Vitest duration was 93.51/37.48 seconds before (cold/warm) and 26.06/47.83 seconds after; these are correctness controls under shared-host load, not a performance claim. Exact-head CI ran all 15 cases under pinned Bun in 47.76 seconds (49.04 seconds for the test shard); both admission cases passed.

Codex autoreview of the local change against that base, including dispatch and transcript-preparation owner context, is scoped-clean through P2 with no actionable findings. git diff --check and focused formatting pass. pnpm check:changed passed, including the affected test typecheck, lint, boundary guards, and all dead-export scans. Exact-head CI run 44617085124 passed: 17 successful jobs, 32 intentional skips, zero failures. ClawSweeper final-head review has zero findings and zero open items at c58cc735586d3f21728e20d0b733f45115963534. No CI rerun or inherited-failure exception was used.

Replace the workspace mkdir barrier left stale by #201333 with the real transcript-target preparation boundary. Preserve both admission closure and replacement checks before routing publication and backend dispatch.
@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Nov 19, 2026
@steipete
steipete marked this pull request as ready for review November 19, 2026 21:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T21:18:31.115990Z c58cc73 Draft marked ready
ℹ️ 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.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

Please review the test-only preparation barrier repair at c58cc73. Both admission close/replacement cases must continue to reject before routing audit work and backend dispatch. The old mkdir barrier was removed by #201333; the current barrier holds the real transcript-target preparation result. Local before/after controls and check:changed pass as recorded in the PR body. The separate #201790 diagnostic regression was already repaired by #202049 and is unchanged here.

@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces the removed workspace-directory barrier with a pause after real transcript-target preparation in two admission tests.

Example: Admission for route-preparation-close closes while transcript-target preparation is paused.

  • Before: The test waits for a removed mkdir call and fails before checking admission invalidation.
  • After: The test releases preparation and verifies rejection without routing audit work or backend dispatch.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported test repair with reported repeatable controls; validation is in-process and exact-head CI is still running.
Proof confidence 🦐 gold shrimp (3/6) Test-only repair requires no shipped-entry-point demonstration; supplied validation reports repeated before/after runs through the repository E2E runner.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Existing admission regressions fail during setup before verifying that invalidated runs cannot publish routing work or dispatch.
Reason: The maintainer-directed repair restores meaningful existing coverage without altering production behavior or weakening assertions.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR narrowly repairs two stale preparation barriers while preserving rejection, zero-routing, and zero-backend assertions; no actionable defects found.

Priority: P3
Reviewed head: c58cc735586d3f21728e20d0b733f45115963534

Before merge

None.

Findings

None.

Agent review details

How this fits together

The embedded runner prepares a transcript target, checks active admission, records routing, and dispatches the backend; these tests invalidate admission before those effects.

flowchart TD
  A[Test starts embedded run] --> B[Real transcript target preparation]
  B --> C[Test barrier closes or replaces admission]
  C --> D[Active admission check]
  D --> E[Reject run]
  D --> F[Routing audit and backend dispatch]
Loading

Technical review

Best possible solution:

Retain the real transcript-preparation barrier and all existing negative-effect assertions without restoring redundant production directory creation.

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

Source confirms the old checkpoint was removed, and the PR records repeated base failures and repaired passes; this read-only review ran no tests.

Is this the best way to solve the issue?

The replacement is the smallest complete repair: it pauses an existing production preparation operation while preserving its result and every admission assertion.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Admission invalidation preparation barrier keeps the original intent (96de6f4: Exercise real awaited preparation and verify that closed or replaced admission produces neither routing receipts nor backend dispatch.)
  • Workspace preparation ownership keeps the original intent (f5d35bc: Remove early duplicate directory creation so workspace preparation validates bindings before creating directories.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests +4. Total +4 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 11 7 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 11 7 +4

Preflight source

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

Labels

Label changes:

  • add P3: Focused test maintenance restores existing coverage without changing production behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Focused test maintenance restores existing coverage without changing production behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 November 19, 2026, 4:21 PM ET / 21:21 UTC.

@steipete
steipete merged commit 200bd90 into main Nov 19, 2026
200 of 203 checks passed
@steipete
steipete deleted the steipete/perf-micro-fix-stale-main-tests-20260919 branch November 19, 2026 21:40
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 20, 2026
…2068)

Replace the workspace mkdir barrier left stale by openclaw#201333 with the real transcript-target preparation boundary. Preserve both admission closure and replacement checks before routing publication and backend dispatch.
tideclaw-bot pushed a commit that referenced this pull request Nov 23, 2026
Replace the workspace mkdir barrier left stale by #201333 with the real transcript-target preparation boundary. Preserve both admission closure and replacement checks before routing publication and backend dispatch.

(cherry picked from commit 200bd90)
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 1b9ddd1bd4ffe007a47407815e69118759b4fad6)
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
* fix(worktrees): retain recently used session checkouts

* test(agents): decouple admission proof from workspace creation

(cherry picked from commit f5d35bc)

Release adaptation: reuse the beta.3 adaptation aef0b19dc08b for the stable workspace owner: add existing reader/error imports and the minimal #200691 removed-checkout preflight so activity marking never recreates a removed checkout. Omit only the changed assertion in the Gateway test file absent on this branch; retain existing Gateway readiness and owner coverage.

Companions: #202074 is selected next. #202068 is present-equivalent (5631d96); #202204 changes later main-only GC owner-census behavior; #203057 is an independent probe optimization. Other later overlap concerns unrelated worktree refresh/reclamation, policy, restore UX, or the later absent removed-checkout fixture; not prerequisites (enumerated in lane audit).

Release adaptation: reuse the sibling path-specific realpath spy and no-recreation regression (abce9babd5cab). The original one-shot spy closed authority at the preflight read instead of the target workspace boundary.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit e3495dac6afc80bd3fe36110008dec96013d2514)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant