Skip to content

fix(loop): enforce task write scopes and validate dependency edits atomically - #558

Merged
huichen merged 1 commit into
mainfrom
claude/loop-write-scope
Sep 11, 2026
Merged

huichen merged 1 commit into
mainfrom
claude/loop-write-scope

Conversation

@huichen

@huichen huichen commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Use goal-relative required_write_scope per task, falling back to the agent workspace only when omitted. Normalize existing symlink prefixes for future output files and refuse ambiguous legacy relative goal anchors.
  • Check workspace conflicts and append lease/audit records under one ledger lock for run, todo claim and lease claim. Keep ownership/lease protection even with force; include the write contract in worker prompts.
  • Validate CLI dependency edits under the append lock: reject unknown/self/cyclic references without writing, while allowing incremental repair of unrelated legacy damage.
  • Update legacy fixtures, stabilize the test-owned watchdog lock release, and bump skills to future-loop 4.2.0 (fix(loop): document task write scopes and safe dependency wiring future-skills#57).

Validation

  • cargo fmt -p future-loop --check
  • cargo clippy -p future-loop --all-targets -- -D warnings
  • cargo test -p future-loop (full suite)
  • cargo clippy -p future-loop --target x86_64-pc-windows-msvc --all-targets -- -D warnings
  • cargo test -p future-cli (full suite, isolated HOME/USERPROFILE, API-key env removed)
  • Skills: all offline checks and new documented-regex fixtures passed
  • Real concurrent CLI processes: four disjoint claimants all succeed, overlapping claimants have one winner, opposing dependency updates cannot jointly create a cycle; mock-agent run exercises task scopes without force.

Boundaries / validation history

Declarations are a coordination contract, not a filesystem sandbox; undeclared legacy agents retain fail-open behavior. Native Windows execution remains for CI, not claimed locally. Initial full checks exposed old dangling-reference fixtures and a macOS path-alias assertion, now corrected. An existing watchdog test twice raced concurrent subprocess inheritance; explicit test-owned unlock removes that cleanup race. The first CLI pass inherited local auth in an existing web_search stdin test (fixed query x); the isolated full rerun passed without real credentials.

@huichen
huichen enabled auto-merge (squash) September 11, 2026 15:22
@huichen
huichen merged commit 3109ca3 into main Sep 11, 2026
12 checks passed
@huichen
huichen deleted the claude/loop-write-scope branch September 11, 2026 15:26
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