Commit graph

528 commits

Author SHA1 Message Date
acamilo
48aedd25ff Merge fix/bus-01-notes (coordinator review): bus shadow check refuses on the session runtime; worker children die with their parent (PDEATHSIG, spawned from async worker threads, never spawn_blocking); digest-mismatch test 2026-10-02 07:03:35 +00:00
acamilo
9d5dd398ca Cargo.lock: the fly-edge dependency the EDGE-02/CTRL-01 merge resolution left out
Some checks are pending
ci / node 22 (test + typecheck) (push) Waiting to run
ci / rust stable (cargo test --workspace --release) (push) Waiting to run
ci / infra/tests/lint.sh (push) Waiting to run
ci / playwright apps/stage (allowed to fail) (push) Waiting to run
2026-10-02 06:06:08 +00:00
acamilo
4935dcc045 BUS-01 review notes: clippy fixes in the new tests 2026-10-02 05:15:45 +00:00
acamilo
210296a0ff docs: v0.7.6 status 2026-10-02 05:00:24 +00:00
acamilo
fc5a579027 Merge port/edge-02 (reviewed: r1 APPROVE-WITH-NOTES, r2 APPROVE): the video feed over flybus (off by default), fly-feed switch, aux cpus for the bus threads 2026-10-02 04:57:52 +00:00
acamilo
ef48a6aed9 Merge feat/scorecard (reviewed: BLOCK; B1/B2 fixed with the review's proofs): multi-seed play regression harness, per-checkpoint trap rule, v0.7.5 baseline 2026-10-02 04:56:04 +00:00
acamilo
a2449488a5 scorecard: the lockfile gains libc for the crate; docs for the trap rule, Holm and the throws metric 2026-10-02 04:40:14 +00:00
acamilo
eaae6fd82a EDGE-02 notes: bus threads on an aux cpu (FLY_SESSION_AUX_CPUS, SESSION_AUX_CPUS in the deploy), fly-feed direct never rolled back, watchdog falls back to direct at the 4th failure and never reboots for the edge; runbook cost corrected 2026-10-02 04:22:39 +00:00
acamilo
49309a83bd scorecard: per-checkpoint trap rule, Holm over the metric family, throws count throws, children die with the suite, LegacyConfig fields
The compare could not fail a trap confined to one checkpoint: add a rule per checkpoint
(B trapped on two or more runs and two more than A, or a blocked-macro storm A lacks).
Holm-adjust the sign-flip p-values over the judged metrics (the unadjusted family false-failed
about 15% of releases). throws_per_hour counts THROW BALL done, not starts; blocked throws are
their own reported metric. run-one children get PR_SET_PDEATHSIG. runner.rs sets transport and
placements (main's LegacyConfig); overlay.sh drops those lines for trees without the fields.
2026-10-02 03:50:50 +00:00
acamilo
397a589fae Merge branch 'main' into feat/scorecard 2026-10-02 03:42:45 +00:00
acamilo
d5b576a2c1 Merge main into port/edge-02 (CTRL-01, BUS-01, row 72, parity flake fix) 2026-10-02 03:19:30 +00:00
acamilo
076a6bcbbf BUS-01 review notes: shadow check refuses on the session runtime (N1), workers die with their parent via PR_SET_PDEATHSIG (N2), test for the Hello digest refusal (N3) 2026-10-02 03:04:49 +00:00
acamilo
c6ab8247d9 Merge port/bus-01 (reviewed: APPROVE-WITH-NOTES): the session can run its agent and world over the flybus router on Unix sockets (off by default); per-frame work metric 2026-10-02 02:53:23 +00:00
acamilo
7dc744fe63 scorecard: the lockfile gains the crate 2026-10-02 02:29:15 +00:00
acamilo
ae05221495 scorecard: the v0.7.5 reference card and what it shows; the hunt's windows are reported, not judged 2026-10-02 02:28:16 +00:00
acamilo
3181c5ef7b scorecard: one thread per run and eight runs at a time, and --resume 2026-10-02 02:28:16 +00:00
acamilo
d7547085e5 scorecard: ten brain minutes, four threads, two jobs: the cost the box can bear 2026-10-02 02:28:16 +00:00
acamilo
ae5db47801 scorecard: the overlay can be run from a copy outside a checkout 2026-10-02 02:28:15 +00:00
acamilo
49bae21a4d scorecard: a multi-seed good-play regression harness (fly-scorecard)
A fixed checkpoint set x seeds x brain minutes on the real connectome, on the session runtime or the legacy loop, reduced to JSON: rungs per hour, empty pad, watchdog check 10 rules, ladder-worthy traps, the shop-to-catch funnel, heals, whiteouts, battles, blocked macros. Compare mode pairs two cards by (checkpoint, seed) and judges each metric with a sign-flip permutation test and a tolerance. PokeredTask gains a read-only with_reader for the harness.
2026-10-02 02:28:15 +00:00
acamilo
24753db620 Merge fix/service-parity-flake (coordinator review: test-only): the parity test waits for the pause's idle header instead of racing it 2026-10-02 02:16:43 +00:00
acamilo
1ebf35d845 Merge main (v0.7.5 + loop-row72 + ctrl-01) into port/bus-01
service_parity: the control-bus runtime runs on SessionArm::LOCAL.
2026-10-02 02:05:33 +00:00
acamilo
7d98fbf8ba Merge port/ctrl-01 (reviewed: APPROVE-WITH-NOTES; N1 edge follows flysim, N2 large bodies as artifacts): control API as flybus RPC with per-agent grants, off by default 2026-10-02 01:44:56 +00:00
acamilo
d50914e4c7 control edge follows flysim's stops and starts; large request bodies match direct
N1: flysim.service Wants= flycontrol-edge.service and the edge gets an ExecCondition on FLY_CONTROL_VIA
(no [Install]), the pattern flyedge uses, so fly-loop-reset's stop and start brings :7401 back in bus
mode and the edge stays skipped in direct mode. lint.sh checks the wiring and runs the condition;
runbook and flybus.md updated (no enable step).

N2: a request body over 48 KiB of JSON travels as a sealed request artifact, so the edge answers
what direct answers instead of 503 INVALID_ENVELOPE. parity test covers 49 KB to 300 KB bodies on
/chat, /stimulate and /reward plus an unparseable large body.
2026-10-02 01:43:34 +00:00
acamilo
3ea56ef3f8 tests: service_parity waits for the idle header instead of racing the pause
The idle-headers check failed 8 of 12 runs on a loaded build box (main
46e25ef: 3 of 4). The script paused and resumed 2 ms apart, so whether the
loop published a header-only idle snapshot in that window (due at 2 Hz) was
wall-clock luck, and legacy and session often disagreed. Not a product race:
the cadence is the protocol's.

The recorder now holds the resume until the first idle header has been seen
(bounded wait, 30 s), and the compare requires BOTH runtimes to have published
one, rather than merely agreeing on whether any did. The first idle header is
compared as before except for its `events` list: which publish carries the
pause's events is wall clock, and the events are compared in the running
snapshots and the event log.

Also fixed, found once the first was gone (1 in 20 under load): the two
sugars sent at one frame must be drained together; when the loop publishes
a snapshot while they are being sent the run is flagged incomplete and
repeated, like a missed frame.

What it proves, unchanged: a pause makes each runtime publish header-only
idle snapshots (status paused, no attachments) whose fields match the legacy
loop, and the script's responses, feed, event log, journal and final
checkpoint are identical between runtimes.

Under load (build box, load ~25 on 6 cores), toy_raw_service_contracts:
before 4/12 pass, after 40/40.
2026-10-02 01:12:56 +00:00
acamilo
74a3c12857 Merge fix/loop-row72 (coordinator review: test-only, both tests stale): the GO SHOP and GO HEAL ROM tests start where the macro is dealt 2026-10-02 00:44:35 +00:00
acamilo
1382f94cf3 runbook: what the rehearsal measured 2026-10-02 00:43:32 +00:00
acamilo
021c92c66f docs: BUS-01 (port slice) in the implementation guide
The live session's participants on the router: how to select it, what it
took, parity in every arm, and the measurement -- about 8 ms a frame over
the lane on the release CPU model, so the lane stays live.
2026-10-02 00:33:25 +00:00
acamilo
b2fd148f52 session: the live composition's participants on the router (BUS-01)
FLY_SESSION_TRANSPORT=bus (flysim-session --transport bus) runs the
agent and the world as socket clients of the session's router, one
process each by default (FLY_SESSION_MODE=thread and in-process too);
local, the PERF-01 lane, stays the default. Results, traces, checkpoints
and the compatibility string are the same in every arm (SessionArm:
local, bus/in-process, bus/thread, bus/process; FLY_PARITY_ARMS picks
them for the parity suites).

- process-mode placement: the service splits its cpuset as PERF-02 does
  and hands each process its CPUs (--host-cpus, --sweep-cpus;
  Launcher::place_process; pool::apply_placement); FLY_SESSION_AUX_CPUS
  moves the service and the world
- the launcher's own clients in memory in thread and process modes
- participants on a one-worker runtime; long handlers under
  block_in_place, which fixes a process-mode boot that failed when
  Agent.Initialize outlived the 2 s probe on a loaded box
- writers allocated ahead (WriterPool); a worker's own seals cached by
  clone, not a second hold
- over the bus the agent's Commit attaches its feed status, which the
  host reads instead of calling Legacy.FeedStatus at every publish
- fly-shadow --mode / FLY_SHADOW_MODE names the topology, forwarded to a
  remote box; the verdict records candidate.transport; fly-shadow check
  --require-arm

legacy-gameboy-v1 section 12 and 18 carry the dated amendments.
2026-10-02 00:09:41 +00:00
acamilo
8b6d69e13c infra: fly-runtime session --bus; shadow of the bus topology
fly-runtime session --bus (session-bus) writes FLY_SESSION_TRANSPORT=bus
into the runtime drop-in and needs the release's fly-session worker;
session --local takes it out; a flag-less session (05-deploy's refresh)
keeps it. status prints the transport. 05-deploy refuses a release
without fly-session while the drop-in says bus.

fly-shadow-run start --bus runs the shadow's session on the bus
(FLY_SHADOW_MODE=bus/process, forwarded to a remote box by the relay);
check --bus requires a verdict that ran it. start refuses while the live
fly runs the session runtime, which writes no trace to follow. Runbook
and lint cover both.
2026-10-01 23:57:34 +00:00
acamilo
673eec54d5 flysim: per-frame compute time on /metrics
fly_frame_work_mean_ms, _p99_ms, _max_ms and _frames: the loop's work per
frame without its pacing sleep, over the last 3,600 frames, so the
headroom a paced realtime factor of 1.0 hides is visible. The legacy loop
records it here; the session runtime's host records it the same way.
2026-10-01 23:57:29 +00:00
acamilo
49f5496d2a flybus: deliveries carry read locations; small store I/O in place; no body copies
A delivery's attachments now name the read location their ownership
grants (bus-v1 section 12, amendment 2026-10-01; contractDigest changes),
so a delivered artifact is read without an artifact.open round trip. A
client attachment that carries one is refused as an unknown field.

SDK and router only, no wire change: staging allocation, seals and
read_all up to 256 KiB run in place instead of on the blocking pool;
Artifact::is_hold tells an explicit hold from a delivery's handle; an
envelope is encoded from borrowed parts and decoded without copying its
body.
2026-10-01 23:57:29 +00:00
acamilo
39efc4af5c docs: control over the bus (CTRL-01)
Services and methods, the grant table as the no-button guarantee, scoping
per session, agent and controller port, and what in control-api.md is
single-fly.
2026-10-01 23:33:59 +00:00
acamilo
8474d93eb0 infra: flycontrol-edge.service and the FLY_CONTROL_VIA switch
Off by default. 05-deploy validates and writes FLY_CONTROL_VIA; the build
and package ship fly-control-edge; the edge gets the page's cpus. With the
control API on the bus, watchdog check 1 reads flysim's own /healthz and
check 1b restarts only the edge. Runbook: the live switch and rollback.
2026-10-01 23:33:59 +00:00
acamilo
29f9b7da3b flysim: the control API as flybus services with per-client grants (FLY_CONTROL_VIA=bus)
The control semantics move to flysim::control, one ControlRequest per
docs/control-api.md endpoint; flysim::api becomes the HTTP layer over a
ControlBackend. flysim::controlbus registers them as services scoped per
session and per agent (fly), with a closed grant table per client role;
flysim::bus composes the feed and control on one embedded router.
fly-control-edge serves :7401 from the services with flysim's own router.

Tests: every endpoint through the edge equals direct (status, headers,
body, and raw HTTP over TCP); grants refuse what they should, including
an input service on a shared router and per-agent/per-port player grants;
backpressure, cancel, deadlines and the edge's unbind/rebind; serve() in
control-bus mode; the session runtime's service contracts over the bus.
2026-10-01 23:33:59 +00:00
acamilo
6851d6f5a3 rom_macros_mode: GO SHOP test from a state where it is dealt (rung-11 Pewter), GO HEAL test forced hot from the first frame
Both tests passed vacuously until the Viridian stall checkpoint was mapped. GO SHOP is dealt for
a service need since rows 62/66 and the parcel errand is GO OBJECTIVE's, so the Viridian
checkpoint (parcel in the bag) rightly has no GO SHOP. In the GO HEAL test the first hold was the
rotation's GO OBJECTIVE, which walked to Oak's lab and left the area.
2026-10-01 23:26:24 +00:00
acamilo
5ca3488c1f runbook, flybus and tour: the feed over the bus in production 2026-10-01 23:17:58 +00:00
acamilo
6612f9ae9c feed bus in production: fly-feed switch, flysim wants the edge, watchdog checks the edge and falls back, deploy refuses a release without fly-edge 2026-10-01 22:10:44 +00:00
acamilo
12321bb513 fly-edge: healthz fails when the bus goes silent; snapshot age gauge 2026-10-01 21:56:34 +00:00
acamilo
23cc217221 flysim-session serves the feed over the bus: a test of the real binary against direct, and a restart under the edge 2026-10-01 21:55:12 +00:00
acamilo
46e25ef3fc docs: cutover to the session runtime
Some checks are pending
ci / node 22 (test + typecheck) (push) Waiting to run
ci / rust stable (cargo test --workspace --release) (push) Waiting to run
ci / infra/tests/lint.sh (push) Waiting to run
ci / playwright apps/stage (allowed to fail) (push) Waiting to run
2026-10-01 20:47:16 +00:00
acamilo
49bb69e5da docs: v0.7.5 status
Some checks are pending
ci / node 22 (test + typecheck) (push) Waiting to run
ci / rust stable (cargo test --workspace --release) (push) Waiting to run
ci / infra/tests/lint.sh (push) Waiting to run
ci / playwright apps/stage (allowed to fail) (push) Waiting to run
2026-10-01 15:58:22 +00:00
acamilo
2c1b51695a Merge port/perf-02 (reviewed: r1 APPROVE-WITH-NOTES, r2 APPROVE-WITH-NOTES; R1-R3 addressed): the session pins its sweep workers, and the sim's cpus are its own 2026-10-01 15:58:22 +00:00
acamilo
ac7be4a204 infra: fly-cpu-confine also confines /.lxc, check ignores its own chain (PERF-02 review R1-R3)
apply/release/status now cover the cgroup pct exec lands in (/.lxc, only when
it already exists, warn-only when unwritable). check no longer counts its own
process or its parents. Runbook: rollback via an older 05-deploy needs
fly-cpu-confine release; the exact post-first-deploy status/check commands.
2026-10-01 15:57:46 +00:00
acamilo
ab537d1045 infra: the sim's cpus are exclusive to the sim (PERF-02 review N1)
A pinned sweep worker cannot leave its cpu, so any sustained cpu-bound process allowed there
collapsed the session runtime to 0.14x real time. flysim and flysim-session now run in
flysim.slice (AllowedCPUs = the sim's set) and bin/fly-cpu-confine, run by their ExecStartPre,
confines system.slice, user.slice and init.scope to the other cpus. It refuses while a sim unit
still sits outside the slice (shrinking system.slice under it would make it float). Without a
partition the deploy writes FLY_SESSION_PIN=0. fly-recap and fly-retention run at SCHED_IDLE.
The drop-in plan is one function (cpuset_dropin_plan) shared by the deploy and lint; lint covers the
plan, the units, the deploy wiring and fly-cpu-confine against a stub systemctl and a fake /proc.
Runbook and README updated.
2026-10-01 15:01:47 +00:00
acamilo
80104f0d98 docs: v0.7.4 status
Some checks are pending
ci / node 22 (test + typecheck) (push) Waiting to run
ci / rust stable (cargo test --workspace --release) (push) Waiting to run
ci / infra/tests/lint.sh (push) Waiting to run
ci / playwright apps/stage (allowed to fail) (push) Waiting to run
2026-10-01 14:47:23 +00:00
acamilo
15ab7ee002 Merge fix/loop-row71 (reviewed: APPROVE both): the bag and mart cursors count the list's scroll offset 2026-10-01 14:47:23 +00:00
acamilo
ecff9bcff4 docs: macros-traps row 71 trap hunt before/after 2026-10-01 13:49:20 +00:00
acamilo
2ca0853c9a docs: macros-traps row 71 2026-10-01 13:18:49 +00:00
acamilo
a6632b4acf macros: the mart's list cursor is the entry too; the catch test pins its first-window ball (row 71)
state::shop reports the buy and sell lists' cursor as row plus
wListScrollOffset, only while the list is on screen. MART_CURSOR_ROWS
stays. The catch ROM test now asserts its ball sits in the bag window's
first rows, so it covers the unscrolled throw beside row 71's scrolled
one.
2026-10-01 13:10:05 +00:00
acamilo
2dcce9452a docs: row 71, the battle bag's scroll offset (macros.md 12.34, macros-wram.md 16) 2026-10-01 12:57:03 +00:00