Skip to content

test: steering compaction test fails when the checkout path is short - #160948

Closed
steipete wants to merge 1 commit into
release/2026.9.7from
fix/r97-steering-compaction-prompt
Closed

steipete wants to merge 1 commit into
release/2026.9.7from
fix/r97-steering-compaction-prompt

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: the steering test "keeps source validation until foreground delivery after pre-prompt compaction" fails deterministically when the checkout lives at a short absolute path (found by the local full-suite run of release/2026.9.7 on a Linux Crabbox box, checkout ~/oc).

User Impact

No user-visible change. The release candidate's unit suite no longer depends on where the checkout lives.

Why This Change Was Made

The test used the session's default system prompt, which embeds absolute checkout paths. With the test's 4k context window, a short path left a small positive headroom, so compaction preparation was rejected and the only provider request was foreground inference (compacting: false). Longer paths (macOS, GitHub runners) made headroom negative, which falls back to the retained-history budget, so the test passed there. Pinning a short base system prompt through the supported session API makes the test exercise compaction on every host.

Evidence

  • Linux Crabbox (AWS c7a.8xlarge, Ubuntu 26.04, Node 24.19 and 24.21), release SHA 56fb887: failed 5/5 before, passed 2/2 after (pnpm test src/agents/embedded-agent-runner/run/attempt-prompt-submit.steering.test.ts, 4/4 tests).
  • macOS: passes before and after.
  • Test cost: unchanged (same four tests, one extra setter call).
  • Autoreview (Codex): scoped-clean, no actionable findings.

Lands on release/2026.9.7 first, then comes back to main.

…gth cannot skip compaction

The pre-prompt compaction steering test used the session's default system prompt, which embeds absolute checkout paths. In a 4k context window, short checkout paths (e.g. ~/oc on a Linux box) leave a small positive headroom that rejects compaction preparation, so the only provider request was foreground inference and requests[0].compacting was false. Longer paths (macOS, GitHub runners) made headroom negative and fell back to the retained-history budget, so the test passed there. Pin a short base system prompt so the test exercises compaction regardless of where the checkout lives.
@clawsweeper

clawsweeper Bot commented Sep 29, 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.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Sep 29, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 29, 2026, 12:18 AM ET / 04:18 UTC.

ClawSweeper review

What this changes

The branch gives an agent steering compaction test a fixed session prompt so its result does not depend on checkout path length.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: the checkout-path-dependent test remains on the fetched main revision and release base. The focused repair is still useful for release validation.

Priority: P2
Reviewed head: 05ecebf5bde0309f2200d36b8cb5ca76a821e47c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The repair is narrow and source-supported, with specific reported before-and-after runs; measured test cost remains to be recorded.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The changed owner is a test fixture, and the PR body reports focused short-path Linux runs failing before and passing after the prompt change. This member-authored, test-only PR has no contributor runtime-proof gate or stored-data contract change.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The changed owner is a test fixture, and the PR body reports focused short-path Linux runs failing before and passing after the prompt change. This member-authored, test-only PR has no contributor runtime-proof gate or stored-data contract change.
Evidence reviewed 8 items Introduced change: The pinned PR delta adds a fixed base prompt only to the compaction test.
Current main still needs the fixture: The fetched main revision retains the compaction assertion without the fixed-prompt call.
Path enters the default prompt: The default system prompt appends the current working directory, making its size sensitive to checkout location.
Findings None None.
Security None None.

How this fits together

The embedded agent session turns prompts and conversation history into model requests. This test checks that compaction preserves validation of a queued child result before the foreground request is sent.

flowchart LR
A[Checkout path] --> B[Test session prompt]
C[Session history] --> D[Token budget]
B --> D
D --> E{Compact history?}
E --> F[Validate queued child result]
F --> G[Test assertion]
Loading

Before merge

  • Resolve merge risk (P1) - The PR body reports unchanged test count but omits the measured one-worker wall time and CI seconds required by the repository's changed-test policy.
  • Complete next step (P2) - Record the focused test's measured one-worker wall time and available CI seconds in the PR body.
Agent review details

Security

None.

PR surface

Tests +3. Total +3 across 1 file.

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

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Use the session's exact-prompt API for this fixture, then carry the validated release-branch repair to main.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Use the session's exact-prompt API for this fixture, then carry the validated release-branch repair to main.

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

Yes. The existing test can be run from a short absolute checkout path; the PR reports repeated baseline failures, and current source shows why prompt length changes the compaction budget. This read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Setting the session's exact base prompt removes the checkout-dependent input while retaining the test's compaction and source-validation assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ddd8fc96ee71.

Labels

Label changes:

  • add P2: A path-sensitive agent test impedes release validation on short checkouts, with no reported user-facing runtime change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The changed owner is a test fixture, and the PR body reports focused short-path Linux runs failing before and passing after the prompt change. This member-authored, test-only PR has no contributor runtime-proof gate or stored-data contract change.

Label justifications:

  • P2: A path-sensitive agent test impedes release validation on short checkouts, with no reported user-facing runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The changed owner is a test fixture, and the PR body reports focused short-path Linux runs failing before and passing after the prompt change. This member-authored, test-only PR has no contributor runtime-proof gate or stored-data contract change.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

steipete added a commit that referenced this pull request Sep 29, 2026
…t fixtures) (#160975)

Keep the state read worker out of the update write graph (7c4cae3; worker 52.2 MB -> 3.5 MB, Kova RSS regression from #160592). Cherry-picked 66b9c5b and 129a640 (-x) and #160948 (05ecebf) test fixes.
@steipete

Copy link
Copy Markdown
Contributor Author

Landed in the batched release PR #160975 (release/2026.9.7 8634a33) as 5370121 cherry-pick of 05ecebf; forward-port to main follows with the state read worker fix.

@steipete steipete closed this Sep 29, 2026
@RomneyDa
RomneyDa deleted the fix/r97-steering-compaction-prompt branch October 22, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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