Library writes: a live verification path; fuel watch for the General #20

Manually merged
vinny merged 0 commits from vinny/library-verify into master 2026-10-13 20:32:43 -04:00 AGit
Owner

Stacked on #18. Part of #6 (library verification path) and #5 (fuel watch); the live run and its evidence follow in a separate PR. #6: a verification path for the library writes - tools/qualify_library.py verifies the tester's library writes the way CMOnet runs them. - A scratch controller (tools/live_controller.py) runs against the running game and refuses data/. - A scripted General answers one verification order per phase: points, zones and missions; ship movement; groups; doctrine; engagement (with --fire, against a hostile GRAY fixture); aircraft; support. - Each write is a coordinator call, and the tester's read-back decides its outcome. - tools/evidence.py import-library records the results: - a completed write as verified; - a write its read-back refused as failed; - each at the library revision its preflight recorded, with the build checked against the tuple. A library composite takes its writes' revision, and action_adapter_revision now agrees. - STATUS names evidence from the current tuple at an older adapter revision as "verified at an earlier adapter revision only". It used to say "another runtime". This covers 40 writes, every library write a sync moved on. - The stage-9 lifecycle harness and verify_runtime.py now refuse the operator's data/ folder. verify_runtime.py used to default to it. #5: fuel watch - agents/fuel_watch.py sends the General an urgent note when an airborne aircraft must refuel or turn home soon. Either the game rep

Stacked on #18. Part of #6 (library verification path) and #5 (fuel watch); the live run and its evidence follow in a separate PR. **#6: a verification path for the library writes** - `tools/qualify_library.py` verifies the tester's library writes the way CMOnet runs them. - A scratch controller (`tools/live_controller.py`) runs against the running game and refuses `data/`. - A scripted General answers one verification order per phase: points, zones and missions; ship movement; groups; doctrine; engagement (with `--fire`, against a hostile GRAY fixture); aircraft; support. - Each write is a coordinator call, and the tester's read-back decides its outcome. - `tools/evidence.py import-library` records the results: - a completed write as verified; - a write its read-back refused as failed; - each at the library revision its preflight recorded, with the build checked against the tuple. A library composite takes its writes' revision, and `action_adapter_revision` now agrees. - STATUS names evidence from the current tuple at an older adapter revision as "verified at an earlier adapter revision only". It used to say "another runtime". This covers 40 writes, every library write a sync moved on. - The stage-9 lifecycle harness and `verify_runtime.py` now refuse the operator's `data/` folder. `verify_runtime.py` used to default to it. **#5: fuel watch** - `agents/fuel_watch.py` sends the General an urgent note when an airborne aircraft must refuel or turn home soon. Either the game rep
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>
vinny manually merged commit 503bed4549 into master 2026-10-13 20:32:43 -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!20
No description provided.