Retire the legacy GeneralWorker; its tests run on the agent runtime #21

Manually merged
vinny merged 0 commits from vinny/general-cleanup into master 2026-10-13 20:35:13 -04:00 AGit
Owner

Stacked on #20. Closes #11. - Deleted src/cmonet/general/worker.py and general/context.py. They had no production caller since the agent runtime replaced them. - The test helpers that built tickets through them (tests/stage3 ticket_for, tests/library ticket) now take the agent runtime's path: an order job, a decision row and an acknowledgment. answered() frees the turn's model slot. - The worker's tests that still guarded something now run on the runtime, in tests/stage4/test_general_turns.py: - invalid or partial replies never act; - the tool-round budget; - cancelled intent kept out of the prompt; - the API key kept out of prompt and audit; - a stale clock spends no inference; - settings changes apply to the next continuation; - a stop during discovery submits nothing; - an ambiguous Auto model holds no slot. - The other worker tests were already covered. The strict-JSON check moved to the provider tests. - The coordinator's order-only fence branch served only the worker's tickets. A ticket without an agent job or a supervisor run is now refused. - Docs updated (stage 3/4 architecture notes, LLM system diagram). Check: CHECK PASSED 0ddb19d. 🤖 Generated with Claude Code

Stacked on #20. Closes #11. - Deleted `src/cmonet/general/worker.py` and `general/context.py`. They had no production caller since the agent runtime replaced them. - The test helpers that built tickets through them (`tests/stage3` `ticket_for`, `tests/library` `ticket`) now take the agent runtime's path: an order job, a decision row and an acknowledgment. `answered()` frees the turn's model slot. - The worker's tests that still guarded something now run on the runtime, in `tests/stage4/test_general_turns.py`: - invalid or partial replies never act; - the tool-round budget; - cancelled intent kept out of the prompt; - the API key kept out of prompt and audit; - a stale clock spends no inference; - settings changes apply to the next continuation; - a stop during discovery submits nothing; - an ambiguous Auto model holds no slot. - The other worker tests were already covered. The strict-JSON check moved to the provider tests. - The coordinator's order-only fence branch served only the worker's tickets. A ticket without an agent job or a supervisor run is now refused. - Docs updated (stage 3/4 architecture notes, LLM system diagram). Check: `CHECK PASSED 0ddb19d`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tools/check.py lints with ruff's pyflakes rules (pyproject.toml) and runs
the suite across processes with pytest-xdist (-n auto --dist loadfile),
both pinned in requirements-dev.txt and the test extra; without them it
says the lint was not run. The suite takes 2.4 minutes in parallel.

The first lint pass removed 64 unused imports and the dead variables in
src, tools and tests, and found one real fault: qualify_reads.py's history
check named a generator variable outside its generator, so finding a
record from another timeline raised NameError instead of reporting it.
Tests may import fixtures that pyflakes reads as unused (F401/F811), and
the tester's byte copies, golden bundles and cited verification scripts
are never linted or rewritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Version 0.7.7 (dev-tools)
Some checks failed
check / check (ubuntu-latest) (pull_request) Has been cancelled
check / check (windows-latest) (pull_request) Has been cancelled
fbad0e8f54
Metrics test: wait past the catch-up window of the stream's own connection
Some checks failed
check / check (ubuntu-latest) (pull_request) Has been cancelled
check / check (windows-latest) (pull_request) Has been cancelled
ed6bdf7118
Under parallel test workers the journal stream could open after the fixed
1.3 s sleep began, so the entry fell inside that connection's catch-up
window and no delivery sample was recorded (seen once in three runs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/qualify_library.py verifies the tester's library writes the way
CMOnet runs them: a scratch controller (tools/live_controller.py, never on
data/) against the running game, a scripted General answering one
verification order per phase, every write a coordinator call with its
fences and reservations, and the tester's read-back deciding. Fixtures a
player can't make come over the development socket only and are swept.

tools/evidence.py import-library records completed writes as verified and
read-back refusals as failed, at the library revision their preflight
recorded, checking the build against the tuple; a library composite takes
its writes' revision (action_adapter_revision now says so too, so the old
4.2.2 loadouts.request_change record no longer counts as current).

STATUS names evidence verified on the current tuple by an older adapter
source "verified at an earlier adapter revision only" instead of "on
another runtime": 40 writes, all library writes a sync moved on. The
stage-9 lifecycle harness and verify_runtime.py refuse the operator's data
folder (verify_runtime defaulted to it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agents/fuel_watch.py tells the General, with an urgent inbox note, when an
airborne aircraft must refuel or turn home soon: the game reports Joker or
Bingo fuel, or the planning fuel calculator says it must turn for its home
base within 15 minutes to keep the reserve (operator 2026-10-13: both). The
note names the side's tanker missions and airborne tankers; nothing is
ordered automatically, and an aircraft already returning or refuelling is
left alone. A fuel quantity alone writes no history row, so the burn rate
also uses the readings the watch kept. The General's policy gains a FUEL
rule naming logistics.refuel (G2 goldens regenerated).

tools/sync_tester_tools.py and sync_builder_tools.py copy a committed tester
revision (--rev, HEAD by default) and name uncommitted tester edits instead
of shipping them: the manifest said b7d4dd3 while two zone files came from
the tester's uncommitted working tree with CRLF endings. Resynced from
fad8e5f (only those two files' line endings change; library revision
library-cfe7fcf0f4a2). Both find the tester beside the main checkout from
a worktree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Version 0.7.8 (library-verify)
Some checks failed
check / check (ubuntu-latest) (pull_request) Has been cancelled
check / check (windows-latest) (pull_request) Has been cancelled
7b66e42936
Library writes verified live through the product path (issue #6)
Some checks failed
check / check (ubuntu-latest) (pull_request) Has been cancelled
check / check (windows-latest) (pull_request) Has been cancelled
check / check (ubuntu-latest) (push) Has been cancelled
check / check (windows-latest) (push) Has been cancelled
503bed4549
All 60 library writes completed with the tester's read-back on AI TEST
SCENARIO (build 1900.20, side AI) at library-cfe7fcf0f4a2: one clean run
of tools/qualify_library.py, imported with evidence.py import-library
(99 records). 62 of 66 game writes are now verified normal operation;
the rest are CMOnet's own missions.set_refueling,
logistics.refuel_from_missions and the two composites.

The earlier runs found no fault in a library write, only the game
refusing orders the read-backs reported correctly. The harness now
avoids those cases:
- units out of communications;
- a mission re-plotting a cleared course;
- a helicopter capped below jet speed;
- held speeds at altitude, in climbs and in orbits (--pattern-speed);
- altitudes clamped after repeated RTB orders (--flyer);
- a hostile GRAY fixture shooting down a tanker (GRAY now holds AI
  unfriendly).

It also uploads the scenario's CMO database for
loadouts.request_change and offers --only for focused reruns. One store
per run: a new session's retention deletes earlier sessions' records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/cmonet/general/worker.py and general/context.py had no production
caller since the agent runtime replaced them. The test helpers that built
tickets through them now take the runtime's path:
- tests/stage3 ticket_for;
- tests/library ticket.
Each produces an order job, a decision row and an acknowledgment, and
answered() frees the turn's model slot. An order names its units, so the
two-attacker test observes its second unit.

The worker's tests that still guarded something now run on the runtime
(tests/stage4/test_general_turns.py):
- an invalid or partial reply never acts or acknowledges;
- the tool-round budget;
- cancelled intent never reaches the prompt;
- the API key stays out of prompt and audit;
- a stale clock spends no inference;
- settings changes apply to the next continuation;
- a stop during model discovery submits nothing;
- an ambiguous Auto model holds no slot.

The rest were covered already. The provider's strict-JSON check moved to
the provider tests.

The coordinator's order-only fence branch served only the worker's
tickets; a ticket without an agent job or a supervisor run is now
refused outright, so nothing can skip the order checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Version 0.7.9 (general-cleanup)
Some checks failed
check / check (ubuntu-latest) (push) Has been cancelled
check / check (windows-latest) (push) Has been cancelled
check / check (ubuntu-latest) (pull_request) Has been cancelled
check / check (windows-latest) (pull_request) Has been cancelled
ea638f5950
vinny manually merged commit ea638f5950 into master 2026-10-13 20:35:13 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
vinny/CMOnet!21
No description provided.