Skip to content

test(compaction): assert structured stale-writer failure - #174064

Merged
steipete merged 1 commit into
mainfrom
ci/fix5-compaction-failure-result-20261016
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
ci/fix5-compaction-failure-result-20261016

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The compaction maintenance-drain test still expects an early writer check to throw. After #173972, the retained check immediately before custom compaction dispatch runs inside the existing structured failure handler, so the test fails despite compaction being refused and the successor staying intact.

Why This Change Was Made

#173972 explicitly states: “Queued compaction trusts live in-process caller authority during preparation and carries its captured writer claim to the existing transaction check,” and retains one writer-currentness check immediately before non-legacy dispatch. This test now requires the exact failure result: ok: false, compacted: false, the full writer-claim reason, context-engine kind, and no result payload. It still requires maintenance cleanup before settlement, no compaction/native calls, and byte-for-byte-equivalent successor entry and transcript data. No production code, authority guard, timeout, retry or skip changed.

Evidence

  • Current main 11c24cfd6dbd: 82 passed / 1 failed in the full file (129.01 s Vitest, 184.70 s wrapper).
  • Parent of 1fad8b45f17a: the original focused case passed (35.12 s Vitest, 79.38 s wrapper), confirming attribution to improve: reduce redundant reads during session compaction #173972.
  • Updated file: 83/83 passed (55.32 s Vitest, 89.18 s wrapper), including hook-error handling, native writer refusal and successor/data preservation.
  • Targeted agent test types, typed lint, focused boundary lint, formatting, diff checks and independent P2 review passed. No new test cases or boots.
  • One conflict-free rebase retained the exact reviewed test blob. Two direct-main pushes raced advancing main; this is the same proven test-only change, published as a PR without requesting any rerun.

Full original shard and full check-changed were not run. This has no production behavior or release-note change.

The maintenance-drain fixture still expected the early writer check to
throw. #173972 intentionally removed repeated preparation reads and keeps
one current-writer check immediately before custom compaction dispatch.
That check now reaches the existing structured failure handler.

Assert the exact unsuccessful result and reason while retaining cleanup
ordering, no backend calls, and unchanged successor entry/transcript proof.
This changes no production behavior or authority check.

Main reproduced 82 passed / 1 failed; the parent of 1fad8b4 passed the
original focused case. The updated full file passes 83/83, with targeted
test types, typed/boundary lint, formatting and independent P2 review clean.
@clawsweeper

clawsweeper Bot commented Oct 16, 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 Oct 16, 2026
@chatgpt-codex-connector

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-16T09:31:11.164685Z 0393f8b PR opened
ℹ️ 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
steipete enabled auto-merge (squash) October 16, 2026 09:33
@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. labels Oct 16, 2026
@steipete
steipete merged commit 79ff321 into main Oct 16, 2026
105 checks passed
@steipete
steipete deleted the ci/fix5-compaction-failure-result-20261016 branch October 16, 2026 09:41
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit 'ac03ca0b6d26a7dc55d0d262e40d2549631b1ea7': (25 commits)
  fix: apply shared plugin model policy to decisions (#156621)
  perf: shortlist transcript relevance scores before metadata reads (#174058)
  fix: strip standalone trailing NO_REPLY from replies (#171990)
  fix(ci): avoid repeated discovery during changed-test planning (#174069)
  fix(sqlite): preserve transaction outcomes when warnings throw (#157151)
  fix(ai): native video handoff to chat-completions providers + preflight video cost (#170920)
  fix(litellm): image generation fails when the backend returns image URLs (#173508)
  test(memory,gateway,infra,subagents): remove low-value tests (batch d152) (#174034)
  perf(memory): bound derived worker snapshot and pricing retention (#174067)
  fix(test): reduce eager imports during test startup (#174056)
  refactor(codex): share lifecycle preflight fixtures (#174062)
  test(gateway,matrix,agents,ui): remove low-value tests (batch d150) (#174025)
  perf(infra): batch usage refresh maintenance (#174050)
  fix(gateway): revert cold session list worker regression (#174052)
  refactor(config): consolidate browser meeting configuration (#173947)
  fix(cron): keep global-session deliveries on the selected agent (#173855)
  test(compaction): assert structured stale-writer failure (#174064)
  fix(cli): local terminal chat sends model requests without the configured proxy (#173530)
  test(ui): restore bootstrap preference locale after each case (#174065)
  fix: download session files through the development proxy (#173973)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…4064)

The maintenance-drain fixture still expected the early writer check to
throw. openclaw#173972 intentionally removed repeated preparation reads and keeps
one current-writer check immediately before custom compaction dispatch.
That check now reaches the existing structured failure handler.

Assert the exact unsuccessful result and reason while retaining cleanup
ordering, no backend calls, and unchanged successor entry/transcript proof.
This changes no production behavior or authority check.

Main reproduced 82 passed / 1 failed; the parent of dbdd26a passed the
original focused case. The updated full file passes 83/83, with targeted
test types, typed/boundary lint, formatting and independent P2 review clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling 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. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant