Skip to content

fix(goals): guard continuation against replacement and pause races - #193

Merged
BunsDev merged 1 commit into
mainfrom
fix/goal-race-closeout
Oct 13, 2026
Merged

BunsDev merged 1 commit into
mainfrom
fix/goal-race-closeout

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

Prevent a completed turn or automatic stop from mutating a replacement goal. Pause operations classify their outcome in one transaction, so a concurrent manual pause retains the correct stop reason.

Context

Changes

  • Pin the observed goal identity before recording progress and recheck it during terminal transitions.
  • Return whether a pause actually changed state and preserve terminal-goal counters.
  • Add deterministic replacement, pause/resume, and manual-pause race regressions.

Validation

All Cargo commands used the stable toolchain and a shared target directory.

  • git diff --check
  • cargo fmt --all
  • cargo check --workspace (no warnings)
  • cargo clippy --workspace --all-targets -- -D warnings
  • CARGO_INCREMENTAL=0 cargo test --workspace: 2,141 passed, 7 ignored
  • cargo test -p claurst-core goal: 41 passed
  • cargo test -p claurst-query goal_loop: 15 passed
  • Five race regressions failed before the production fix; independent spec and quality reviews passed.
  • Initial full-suite compilation exhausted disk; after removing regenerable incremental cache, the complete rerun passed.
  • Manual TUI checks: N/A, no TUI behavior or layout changes.

PR Readiness

  • Diff is limited to three intended files.
  • Generated files were not edited by hand.
  • No user-facing documentation changes are needed for these internal race corrections.
  • No secrets, credentials, local paths, or unrelated logs are included.
  • Separate continuation-lease work remains outside this patch.

Follow-up to fixes #175.

Coven-Harness: Codex / GPT-6
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 13, 2026 1:05pm UTC

Request Review

@BunsDev
BunsDev merged commit 45e8959 into main Oct 13, 2026
4 checks passed
@BunsDev
BunsDev deleted the fix/goal-race-closeout branch October 13, 2026 13:44

This branch was successfully deployed

1 active deployment
Preview — d7ced14a Deployed Oct 13, 2026 by vercel[bot]
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