Skip to content

fix(buzz-acp): break WIP-resume loop on placeholder checkpoints (WO #1093) - #13

Merged
Theremoteaidoc merged 2 commits into
mainfrom
codex/wo-1093-wip-placeholder-resume
Sep 7, 2026
Merged

Theremoteaidoc merged 2 commits into
mainfrom
codex/wo-1093-wip-placeholder-resume

Conversation

@Theremoteaidoc

@Theremoteaidoc Theremoteaidoc commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Breaks the Ox-style WIP-resume wedge: placeholder checkpoints are archived (never resumed), and after 2 consecutive killed_idle outcomes the seat skips WIP resume once and posts a one-line channel notice.

Tracks remote-aid-medical#1093.

AC3 (red before / green after)

Ox-shaped fixture (exactly 40 bytes: # buzz-acp wip checkpoint\nts=<N>\n):

  • BEFORE (main@76effaa): resume_wip_hint has no placeholder predicate — any newest OUTBOX/wip/*.bundle becomes a [WIP Resume] prompt. Fixture is treated as resumable → RED (reproduces the loop).
  • AFTER (this PR): placeholder_fixture_archived_not_resumed archives the fixture and returns no resume hint → GREEN.

New / renamed API (crates/buzz-acp/src/wip_checkpoint.rs)

  • is_placeholder_checkpoint / is_header_only_checkpoint_body / PLACEHOLDER_MAX_BYTES / WIP_CHECKPOINT_HEADER
  • archive_wip_bundle → OUTBOX/wip-archive-<UTC>/
  • IdleKillTracker / IDLE_KILL_SKIP_THRESHOLD / decide_wip_resume / WipResumeDecision / wip_idle_skip_notice
  • Wired through PromptContext.idle_kill_tracker and run_prompt_task / handle_prompt_result

Tests

  • crates/buzz-acp/tests/wip_placeholder_resume.rs: placeholder_fixture_archived_not_resumed, two_consecutive_killed_idle_skips_once_with_one_notice
  • Unit: test_placeholder_fixture_is_archived_not_resumed, test_two_consecutive_killed_idle_force_skips_wip_resume_once

files-touched:

  • crates/buzz-acp/src/wip_checkpoint.rs
  • crates/buzz-acp/src/lib.rs
  • crates/buzz-acp/src/pool.rs
  • crates/buzz-acp/tests/wip_placeholder_resume.rs

Evidence

$ # AC3 BEFORE (main): fixture would be resumed — resume_wip_hint has no placeholder filter
BEFORE (main resume_wip_hint, no placeholder filter):
[WIP Resume]
A prior turn left a checkpoint at `.../OUTBOX/wip/1788281363-666978601.bundle`...
would_resume=True placeholder_bytes=40
status=RED (fixture treated as resumable)

$ cargo test -p buzz-acp --test wip_placeholder_resume -- --nocapture
    Finished `test` profile [unoptimized + debuginfo] target(s) in 2.58s
     Running tests/wip_placeholder_resume.rs (target/debug/deps/wip_placeholder_resume-a5623485e21592e5)

running 2 tests
test placeholder_fixture_archived_not_resumed ... ok
test two_consecutive_killed_idle_skips_once_with_one_notice ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


$ cargo test -p buzz-acp wip_checkpoint -- --nocapture
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.35s
     Running unittests src/lib.rs (target/debug/deps/buzz_acp-cffac62f1d39cfb8)

running 17 tests
test wip_checkpoint::tests::test_latest_wip_bundle_none_when_directory_empty ... ok
test wip_checkpoint::tests::test_maybe_drop_wip_does_not_fire_before_five_minutes ... ok
test wip_checkpoint::tests::test_maybe_drop_wip_fires_at_five_minutes ... ok
test wip_checkpoint::tests::test_header_only_body_is_placeholder_even_when_padded_past_1kb ... ok
test wip_checkpoint::tests::test_non_idle_outcome_clears_streak ... ok
test wip_checkpoint::tests::test_maybe_drop_wip_fires_on_termination_signal_regardless_of_elapsed ... ok
test wip_checkpoint::tests::test_real_sized_bundle_still_resumes ... ok
test wip_checkpoint::tests::test_placeholder_fixture_is_archived_not_resumed ... ok
test wip_checkpoint::tests::test_split_empty_outcome_agent_exited_is_crashed ... ok
test wip_checkpoint::tests::test_split_empty_outcome_hard_timeout_is_killed_turn_cap ... ok
test wip_checkpoint::tests::test_split_empty_outcome_idle_timeout_is_killed_idle ... ok
test wip_checkpoint::tests::test_split_empty_outcome_ok_no_output_is_empty ... ok
test wip_checkpoint::tests::test_split_empty_outcome_ok_with_message_is_none ... ok
test wip_checkpoint::tests::test_wip_outbox_path_outside_branch_watcher_glob ... ok
test wip_checkpoint::tests::test_two_consecutive_killed_idle_force_skips_wip_resume_once ... ok
test wip_checkpoint::tests::test_latest_wip_bundle_picks_newest_not_alphabetical_first ... ok
test wip_checkpoint::tests::test_kill_at_25_minutes_resumes_from_bundle_within_5_minutes ... ok

test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 714 filtered out; finished in 0.02s

$ cargo fmt -p buzz-acp -- --check
(exit 0)

… 2 idle-kills (WO block#1093)

Placeholder bundles (<1KB or header-only) are archived instead of resumed, and two consecutive killed_idle outcomes force-skip WIP resume with a one-line channel notice so seats cannot wedge on empty resume loops.
CI Rust Lint failed fmt-check on the new IdleKillTracker wiring and related helpers.
@Theremoteaidoc
Theremoteaidoc merged commit 50d9666 into main Sep 7, 2026
23 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant