Skip to content

feat(swarm): add directive completion semantics - #62

Merged
christopherjnelson merged 2 commits into
mainfrom
feat/swarm-directive-completion
Sep 21, 2026
Merged

christopherjnelson merged 2 commits into
mainfrom
feat/swarm-directive-completion

Conversation

@christopherjnelson

@christopherjnelson christopherjnelson commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Purpose

The 25-tick zero-swarm run showed that workers often finished short assignments and then waited for Zero's stall/periodic review. This PR adds deterministic mission completion before the paired live Jev-versus-deterministic-worker benchmark. It does not tune Jev, change the worker candidate policy, or change Zero's periodic cadence.

Changes

  • Complete expand only when the target is infected and controlled by its assigned worker; relocate and reinforce on arrival at their assigned targets; and evade on arrival or after leaving previously high observed cleaning pressure. A reinforce target must be infected or adjacent to infection when issued. hold persists until another review trigger.
  • Add directive-complete as a Zero replan reason. The next strategic observation identifies the completed worker/directive pair, and the compact OpenRouter request supplies a per-worker completion flag.
  • Validate newly issued mission targets against the authoritative pre-action world. Non-hold missions need targets; expand targets must be open cells, including when the alternative is another worker's infected cell or an abandoned infected cell; relocate/reinforce/evade cannot target the current cell; and reinforce needs an infected or adjacent frontier target.
  • If a replacement plan fails, completed directives are not reused. Those workers take legal deterministic fallback actions without an unnecessary Jev call. Provider attempts remain independently accounted for.
  • Show completion in World Lab strategy and activity telemetry. Add offline unit, service, planner request, and UI regression tests.

Validation

The repository owner confirmed the initial local checks passed. After the
open-only expand amendment, a coding subagent reran both local gates and they
passed:

pnpm validate
pnpm test:e2e

No paid-provider test is part of this PR or CI. The next step after merging is the paired live trail-hunter-v1 A/B benchmark, with the same Zero model and scenario inputs for Jev and deterministic workers.

@christopherjnelson
christopherjnelson marked this pull request as ready for review September 21, 2026 00:41
@christopherjnelson
christopherjnelson merged commit 26a75be into main Sep 21, 2026
2 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