Commit graph

524 commits

Author SHA1 Message Date
acamilo
17c4c88423 session types: the legacy composition names pokered-unique8-v8
The example composition's adapter and FLYSIM01 string move to v8 with the live
adapter, and the fixtures are regenerated by update_fixtures (composition digest
44916db0... -> d37ccb40...); invalid.json's hand-written cases follow, with the
one deliberately mismatched string moving from v6 to v7 so it is still the
previous adapter. Branches that carry these fixtures (the port stack) regenerate
them the same way on rebase.
2026-09-30 02:11:45 +00:00
acamilo
dfc9a2d227 rewards: damage, adapter v8 with a v7 migration
The operator's decision of 2026-09-29, chosen over a pad rule that would have
withheld a stat move once used: pay the fly for the HP its own attack removes
from the Pokemon it is fighting, so the move that deals damage is worth more
than the one that does not. Row 67: the live fly lost the Pewter Gym's Jr.
Trainer 29 times running with TAIL WHIP 155, BUBBLE 23, TACKLE 0, and nothing in
the catalog paid for anything inside a battle it did not win.

`damage`, the twelfth kind, 80 ms. 0.20 per whole enemy Pokemon's max HP, paid
in proportion on the sample the HP drops; +0.05 when the fly's hit knocks out a
trainer's Pokemon; at most 0.50 a battle (the trainer rule's own value, which
two Pokemon reach exactly). A wild battle pays at the wild-KO rule's scale, 1,
1/2, 1/3, for its first three battles per (map, species, level) that paid any
damage, then nothing, and a rollback blocks every key that has paid
(damageCounts, replay-blocked damage:<key>). Trainer battles keep no lifetime
ledger: a trainer is fought again only after losing to it.

The fly's attack is a drop in wEnemyMonHP on a sample where hWhoseTurn ($FFF3,
counted from the hJoyLast anchor to the end of HRAM) reads 0 and wPlayerMoveNum
is not STRUGGLE. ApplyDamageToEnemyPokemon runs in ExecutePlayerMove with it 0;
the enemy's poison, burn and Leech Seed ticks (HandlePoisonBurnLeechSeed picks
the enemy's HP because it is 1), its recoil, confusion self-hit, Explosion and
Substitute all land with it 1. Every drop moves the target's mark, so a tick is
never paid later as part of a hit. A target is (wEnemyMonPartyPos, species,
level) and keeps its lowest HP for the battle, so a heal is never paid twice and
a switch back keeps its mark; it is marked when it first reads full HP, because
InitBattleVariables leaves the last battle's wEnemyMon in place -- in the row 67
ring that is the same trainer's Diglett at the HP it won with.

v7 -> v8. STATE_VERSION stays 4: damageCounts and battle.damage are optional and
absent in a v7 state, which restores with no wild key paid and a battle in flight
marked where it stands, so nothing lost before the restore is paid.
MIGRATES_FROM is [v7, v6]: the chain composes, since v7's own migration (the
item seed) still runs in this build on the first sample without items:seeded.

Feed: `damage` has no counter (RewardKind::from_adapter -> None). On `wildwin`
the stage would fold every hit into "N wild wins", false of a trainer battle and
of one the fly goes on to lose. A hit reaches the page as a reward event with
its own label, HIT #<species> FOR <n> HP[ KO]; the feed's closed kind set does
not move.

The compatibility string differs from main's in exactly one segment:
pokered-unique8-v7 -> pokered-unique8-v8.

Tests: the rule (fly's turn vs the enemy's, Struggle, heal, switch, twin slots,
stale enemy, restored battle, cap, knockout, wild scale, round trip); the adapter
(proportional pay, TAIL WHIP nothing, poison then hit, the ring's second battle,
wild scale and rollback, one read per address, checkpoint round trip, a v7 state
mid-battle); compat_migration (v7 and v6 FLYSIM01 envelopes refused without
their own opt-in and restored with it; the v7 one mid-battle pays only what
follows); rom_damage (FLY_ROW67_CHECKPOINT: the live v7 string and ledger
migrate; from the live state BUBBLE and TACKLE are paid on every drop they cause
and TAIL WHIP never, the fly's hits land with hWhoseTurn 0 and the enemy's with 1).
2026-09-30 02:11:45 +00:00
acamilo
c433316179 symbols: wPlayerMoveNum and wEnemyMonPartyPos for the damage reward
resolve_wram.py --emit resolved both from ram/wram.asm at the pinned commit,
each bracketed by pinned anchors (wWalkCounter/wEnemyMonSpecies and
wEnemyMonHP/wEnemyMonStatus): $cfd2 and $cfe8. 77 of 81 pinned addresses
re-derived, no disagreement. wEnemyMonPartyPos is battle_struct's third field
(macros/ram.asm: Species db, HP dw, PartyPos). gen_symbols.py's EXTRA_RAM
carries both so a regeneration keeps them.
2026-09-30 02:11:45 +00:00
acamilo
d4b448f14c Merge port/task-01 (eaf588d, TASK-01 round-2 notes) into port/perf-01 2026-09-30 01:46:10 +00:00
acamilo
9aa7b92d04 fly-legacy-session: in-process sessions over the local lane; speed_ab arms
LegacySession starts in-process participants with Via::Local
(FLY_SESSION_LOCAL_LANE=0 keeps the bus path, a measurement knob). speed_ab
takes FLY_PERF_ARMS (local, bus, process), FLY_PERF_SERVICE (the service
host's per-frame reads), FLY_PERF_WORKERS (1 or 2 Tokio workers) and prints
the legacy brain's own tick time beside the session's.
2026-09-30 01:46:07 +00:00
acamilo
aaf660d48e fly-session: the in-process local lane, and the per-frame costs it leaves
- worker: one Shell per worker serves its bus loop and a LocalLane. A local
  request goes through the same admission (classification, body digest,
  result cache, arrival-order ticket, endpoint lock) and answers the same
  SessionRpcOutcome, without a bus message. Worker.* stays on the bus.
  HandlerCtx::seal keeps a local request's reply media in memory.
- rpc: a WorkerRef carrying a lane sends endpoint methods over it; sealed reply
  handles reach the caller in memory under the same reference; a bus call
  carries sealed copies of in-memory attachments (promote).
- launcher: Via::Local offers in-process participants over their lane.
- coordinator: publication attaches sealed copies of in-memory media, begun
  when Environment.Advance answers; defer_snapshots (publish without waiting
  for admission, settled at the next snapshot); digest_views and media_bytes
  as SERVE-01 has them.
- legacy env/agent: frame, memory image, audio and spike bitset sealed via
  HandlerCtx::seal; the spike bitset is built eight neurons a byte.
- profile: span maxima, enabled(); the agent runs the brain's phase clock
  when profiling.
- tests: every synthetic transport test also runs over the local lane; the
  two publication-identity checks state the sealed copy there.
2026-09-30 01:46:07 +00:00
acamilo
35d5a1f38d flybus: in-memory artifacts that never cross a router
Artifact::in_memory holds an immutable buffer in the caller's address space
(store id 'in-memory', no digest): it reads, clones and retains like any other
handle without a router round trip, and a bus call, reply or publish refuses it
as an attachment before anything is sent. Artifact::to_memory reads a sealed
handle into one under the same reference. PERF-01's local lane hands these
between participants of one process.
2026-09-30 01:46:07 +00:00
acamilo
504e4bb116 docs: implementation guide, a blank line before SHADOW-01 2026-09-30 01:41:19 +00:00
acamilo
19d84de387 infra: the guard judges the live fly against its own baseline (SHADOW-01 review round 2, G1)
fly-shadow-run start measures a 10-minute baseline before the shadow
exists (sixty 10-s realtime-factor means: mean, spread; the lag growth
rate). The guard trips only on a sustained degradation against it: 3
checks in a row where the last 5 samples of the same process fall below
the baseline realtime factor or grow lag faster than the baseline rate,
by more than max(0.05, 4 x spread / sqrt 5). It stops itself when
flyshadow.service is not running; check refuses after a guard trip or
with the shadow down. lint drives the rule over RTF traces shaped on the
release CT (a flat 0.66, 0.77-0.99 noisy, real time with hiccups) which
must not trip, and degradations which must. Section 18 and the runbook
follow.
2026-09-30 01:39:52 +00:00
acamilo
a472adcaf4 fly-shadow: review round 2, R3, G1 (in-shadow back-off), N3 (SHADOW-01)
R3: allows_cutover floors the window at REQUIRED_BRAIN_SECONDS (10,800):
a verdict run with a shorter --required-brain-seconds never passes
check. G1: the in-shadow back-off (LagJudge) judges the live lag growth
rate against fly-shadow-run's pre-start baseline (baseline.json lagRate
and margin, re-read every poll) instead of any growth, and lifts itself
for 10 minutes when a pause did not help (the shadow is not the cause);
--lag-guard-margin replaces --max-live-lag-seconds. N3: lagTransitions
is refreshed at every verdict write, backed off or not, over the rest of
the current file and every newer one.
2026-09-30 01:39:52 +00:00
acamilo
37c7befc11 docs: SHADOW-01 review fix round (legacy-gameboy-v1 section 18, implementation guide)
Section 18: skips are the live side's own kinds only, every session-side
failure is a divergence, the live fly never pays for the shadow
(heartbeat, directory cap, guard), and the cutover rule requires the
release /opt/fly/current resolves to, compared saves and a caught-up
shadow. host-fields' reason updated. The guide records the fix round and
the cost re-measured on the rebased tip.
2026-09-30 01:39:52 +00:00
acamilo
2d8b529f42 infra: the shadow's live-impact guard (SHADOW-01 review N2, N1)
fly-shadow-run start records the live fly's baseline (fly_realtime_factor
over 10 s, fly_lag_seconds, uptime), waits for the shadow's heartbeat and
starts flyshadow-guard.timer. fly-shadow-run guard (every 60 s, root)
stops the shadow and the guard, removes the trace drop-in and restarts
flysim without the trace when fly_lag_seconds grew 1 s in the same
process or the mean realtime factor fell below min(0.97, baseline-0.03);
a paused fly is not judged, a restarted one rebaselines. check passes
--current /opt/fly/current --binary flysim-session. lint drives the
guard's rule on six cases. Runbook rewritten: the trace cannot outlive
the shadow (heartbeat, 8 GiB directory cap), not the old claim.
2026-09-30 01:39:52 +00:00
acamilo
e085876d79 fly-shadow: review fixes R1, R2, N3 (SHADOW-01)
R1: the verdict hashes flysim-session (SERVE-01's service) with the
other release binaries; check takes --current (default /opt/fly/current)
and --binary (default flysim-session) and requires the verdict's release
to be the directory the link resolves to, every shadowed binary
unchanged there. R2: a session that does not start, a restore-gate
refusal, a capture with no agent, an unrecorded transition and an
unbuildable trace line are divergences; skips carry a kind and only the
live side's own kinds (startup-save-gone, operator-reward-pulse,
trace-cap, no-transition) allow a cutover. N3: pass and the cutover rule
require one live save compared per 600 brain seconds and at most 10 %
unavailable, and the cutover rule a shadow at most 3,600 transitions
behind. N1: the shadow writes the consumer heartbeat, removes it when it
stops, and prunes history files. The coordinator's history is bounded
per segment. The test adds a gate refusal (a boot divergence) and waits
for the heartbeat; so does the rehearsal script.
2026-09-30 01:39:52 +00:00
acamilo
4bf664ee22 flysim: the trace needs a live consumer and a bounded directory (SHADOW-01 review N1)
In FLY_TRACE_DIR mode a process starts no trace unless the shadow's
heartbeat (<dir>/consumer) is fresh (FLY_TRACE_CONSUMER_STALE_SECONDS,
600), and a running trace stops within a minute of frames once it is
stale ({"truncated":true,"reason":"no-consumer"}). Before a
process creates its file the oldest trace files are deleted to keep the
directory under FLY_TRACE_DIR_MAX_BYTES (8 GiB). A dead or diverged
shadow can no longer leave the live service tracing.
2026-09-30 01:39:52 +00:00
acamilo
9a3a4f5a9c docs: SHADOW-01 final rehearsal (final binary, lag guard on) 2026-09-30 01:39:52 +00:00
acamilo
c09ac100ce docs: SHADOW-01 (legacy-gameboy-v1 section 18, implementation guide) and the rehearsal script
Section 18 fixes what the 3-hour zero-divergence gate means: the inputs,
the architecture (the live legacy fly stays primary; the shadow follows
its trace), what is compared, the declared differences, the window and
the verdict contract. tools/shadow-rehearsal.sh runs the real service and
the real shadow side by side from one checkpoint.
2026-09-30 01:39:52 +00:00
acamilo
095cf7b1da infra: flyshadow.service and fly-shadow-run (SHADOW-01)
Report-only unit, off by default, not bound to flysim, SCHED_IDLE on the
page and encoder CPUs, stays stopped after a divergence (exit 3).
fly-shadow-run start|stop|status|check installs the flysim trace drop-in,
restarts flysim once and reads the verdict. Deploy, build and packaging
ship fly-shadow and fly-session; lint holds the unit to its rules; the
runbook has a Shadow run section.
2026-09-30 01:39:42 +00:00
acamilo
12f361436f fly-legacy-session: the shadow run, its comparator and verdict (SHADOW-01)
shadow::run follows the live service's per-process trace files: each
segment boots a session from that process's startup save (a fresh start
powers on instead), replays the transition's admissions, runs it, takes
the live captures in the live order around a deferred rollback, and
compares its own trace line field by field, the ledger digest, and the
FLYSIM01 bytes of every live save (host-fields and archive-order
substituted). The first difference stops it with a diverged verdict and
divergence.json. A spool copies live generations as they appear; a lag
guard backs off while the live fly loses real time.

verdict.json is fly-shadow-verdict-v1, the contract CUT-01 reads;
fly-shadow check applies the cutover rule. trace::compare_line is shared
with trace::compare. tests/shadow.rs runs the real service through a
restart under a shadow and plants four differences, each caught with the
right kind, field and step.
2026-09-30 01:39:42 +00:00
acamilo
105f526200 flysim: trace switches for the shadow run (SHADOW-01)
FLY_TRACE_DIR writes one FLY_TRACE file per process (a restart truncated
the single path), FLY_TRACE_MAX_BYTES caps a file (4 GiB in directory
mode: a trace nobody consumes cannot fill the disk), FLY_TRACE_LEDGERS=<n>
adds ledgersDigest every n transitions. frame::ledgers_string is now the
one definition of the ledger string both runtimes digest. Recording only:
no behaviour field and nothing the fly does changes; compatibility string
unchanged.
2026-09-30 01:39:42 +00:00
acamilo
68bde25493 Merge port/task-01 (TASK-01 round-2 fixes) into port/serve-01; hand begun captures to the writer on pause 2026-09-30 01:37:12 +00:00
acamilo
6c7c58b35a infra: RestartMode=direct so OnFailure= fires only at the start limit; one lock for fly-runtime rollback and fallback
Verified on systemd 257: with the default RestartMode=normal the unit passes through failed
before every auto-restart, so OnFailure= ran on the first crash. The session drop-in now sets
RestartMode=direct. session, legacy, fallback and the trap rollback share one flock; a switch
holds it only until its restart is queued (restart --no-block, health checked against the new
invocation), and the rollback skips restoring an older drop-in once a fallback has completed.
lint.sh covers the drop-in key, the interleaving and the shared lock; runbook corrected.
2026-09-30 01:36:23 +00:00
acamilo
eaf588d2e2 TASK-01 round-2 notes: saves reach the writer on a failed step and on pause, every save outcome reported, sugar admission atomic with the commit
R2-1: a failed step hands the begun captures to the writer before it reports the error, and LegacySession::flush_captures hands them over while the loop idles.
R2-2: completed_saves reports every queued save's outcome instead of stopping at the first error.
R2-3: the commit ends the in-flight admissions and records the pulses under one lock, and a sugar's reads and queueing take that same lock.
2026-09-30 01:30:56 +00:00
acamilo
405cf11498 flysim: read adapter.progress() once per publish
feed_game and feed_milestone each called adapter.progress() (a pure read), so every publish
computed it twice. Both now take the snapshot as an argument; publish and the session service
read it once. The header bytes are unchanged (service_parity and journal_replay pass).
2026-09-30 00:11:25 +00:00
acamilo
1d29ab1ff8 infra: persistent session-to-legacy fallback, signal-safe fly-runtime, MALLOC_ARENA_MAX=2
The fallback used to live only inside one 'fly-runtime session' invocation. The session
drop-in now carries OnFailure=fly-runtime-fallback.service and a 3-starts-in-10-minutes
start limit, so a session binary that will not stay up puts flysim.service back on legacy
after a reboot, a watchdog or loop-recover restart or a deploy. 'fly-runtime fallback'
removes the drop-in, daemon-reloads, restarts on legacy, writes /run/fly/runtime-fellback.json
and a journal line; it is locked, idempotent and keeps the drop-in if legacy cannot start.
fly-runtime traps INT/TERM/HUP and any failure during a switch and rolls back to the
previous state. Session drop-in and flysim-session.service set MALLOC_ARENA_MAX=2.
05-deploy keeps the chosen runtime (operator decision: session stays, trust gates),
refreshes the drop-in in place, and says so; the runbook documents all of it.
lint.sh drives the fallback, the interrupts and the deploy policy against a fake systemctl.
2026-09-30 00:11:25 +00:00
acamilo
7ec9a3c9ef docs: TASK-01 review fix round in the implementation guide 2026-09-29 23:43:17 +00:00
acamilo
12940a5215 tests: speed_ab, the session against the legacy loop interleaved in chunks on one box 2026-09-29 23:08:12 +00:00
acamilo
d35eda399b N5: captures off the loop; wanted and cached artifacts held concurrently
- worker: a handler may finish its reply outside the endpoint's lock
  (HandlerReply::deferred); admitted mutations take the lock in arrival
  order (LockOrder), so a request sent before another is handled first;
  a reply's cache holds are taken concurrently.
- legacy agent: State.Capture copies the state under the lock and
  encodes, digests and seals it off the lock, so the next Prepare ticks
  while the payload is written.
- rpc: send/finish split (SentCall); the caller's holds on wanted
  attachments are taken concurrently.
- coordinator: begin_capture sends every State.Capture and returns;
  finish_capture collects them. LegacySession begins a boundary's saves
  and collects them after the next transition, then queues them to the
  writer thread.
2026-09-29 23:03:37 +00:00
acamilo
1bfaf923b2 N5: publication at the feed's rate, in-memory transport in-process, capture spans; docs for the fix round
- Coordinator::snapshot_every(n): a snapshot every n-th boundary plus
  every boundary with events or boundary actions; a service session
  publishes every other boundary, the legacy feed's 30 Hz from 60 Hz.
- In-process participants reach the router in memory (a separate process
  still uses its socket).
- Spans on the agent's and the coordinator's capture path; tests/speed.rs
  times the legacy frame's phases, its agent export, and a session save.
- legacy-gameboy-v1: the artifact-backed ledger, the palette seed and the
  pending pulse (amendments of 2026-09-29).
2026-09-29 22:20:39 +00:00
acamilo
d3c61286bf docs: SERVE-01 results and what is open for CUT-01 2026-09-29 22:13:51 +00:00
acamilo
2fc9fd7247 tests: the reward segments include row 64 and the row 65 yard 2026-09-29 21:58:23 +00:00
acamilo
42f3c91c29 journal_replay: compare the adapter ledger as numbers
The session's ledger crosses the task's canonical JSON, which writes an
integral f64 as 7580031 where the legacy export writes 7580031.0; the
values are equal and the legacy import reads both alike.
2026-09-29 21:54:41 +00:00
acamilo
5cf40c3148 Merge port/task-01 (TASK-01 review fixes) into port/serve-01
Takes the artifact-backed task ledger (B1), the pending pulse (N1), the
palette seed (N3), queue_save/completed_saves (N4) and the bounded history
and concurrent seals (N5). The service host now queues its saves through
TASK-01's queue_save; SERVE-01's save_queued is gone.
2026-09-29 21:29:31 +00:00
acamilo
46d07260e9 TASK-01 review N5: the per-boundary costs measured, the world's seals concurrent, bounded history
- fly-session::profile: switchable per-phase spans (FLY_SESSION_PROFILE),
  in the coordinator's phases, the world's advance and the agent's
  prepare and commit.
- The world seals the view, the image and the audio chunk concurrently.
- Coordinator::bound_history: a service session keeps the newest 4096
  transitions of trace, phase and audit logs and latency samples (it
  grew without bound).
- tests/speed.rs: legacy loop against the session on one box, unpaced
  and paced at 1x, in-process and process, with the span breakdown.
2026-09-29 21:06:32 +00:00
acamilo
0776fab225 service_parity: two sugars in one drain; repeat a run whose recorder fell behind
The TASK-01 review's N1: a second sugar before the next commit is refused
with the first one's pulse as the retry, legacy and session alike. A run
whose recorder misses a frame on a loaded box is repeated rather than
failed (it cannot be compared, and it says nothing about either runtime).
2026-09-29 20:48:37 +00:00
acamilo
7a61877e78 TASK-01 review fixes: an artifact-backed task ledger, the pending pulse, the palette seed, queued saves
- B1: the pokered ledger's adapter state travels as an attachment
  ('reward', its JSON) beside a small typed value {reward: {digest,
  byteLength}, ratchet, slotFilled}; Task gains capture_attachments /
  validate_restore_with / install_restore_with, and the coordinator files
  them as task-ledger-<name> payloads in captures and imports. Every
  failure is an IncompatibleState error, so boot falls to the next
  candidate. Tests: ledger_size (past 64 KB, and malformed ones).
- N1: a sugar admitted and not yet reported on by a commit is an active
  pulse (AdmissionQueue::pending_stimulus_ms): two sugars between two
  commits are one admission and one PulseActive, as the legacy drain.
- N3: a restore seeds the palette with the restored brain's RNG state,
  as Sim::boot does; palette_seed holds on the cartridge that two seeds
  press the same buttons (a fresh start's constant is therefore exact).
- N4: interval, milestone and after-rollback saves are queued to the
  checkpointer's writer thread; startup and shutdown saves block.
- Boot parity adds row64 and the row65 yard (the largest ledgers); the
  segments add them too. tests/speed.rs measures N5.
2026-09-29 20:47:19 +00:00
acamilo
002fcbe26c docs, tools: SERVE-01 implementation entry and the runtime soak client
tools/runtime-soak.ts drives a running flysim or flysim-session with the
stage's own feed decoder and the bridge's HttpSimClient for a wall-clock
soak and samples the store cadence.
2026-09-29 20:31:20 +00:00
acamilo
0012759ace infra: flysim-session.service, fly-runtime, and shipping the session runtime
fly-runtime session|legacy|status switches which binary flysim.service runs
with one drop-in (flysim.service.d/10-runtime.conf), so fly.target, flyedge's
Requires=, the watchdog, fly-loop-recover and its sudoers line,
fly-loop-reset, fly-reset-to-milestone and the unstick rule keep naming
flysim.service, and the choice survives reboots and deploys. It refuses a
release without flysim-session or with a different compatibility string,
waits for /healthz and an advancing frame, and falls back to legacy by
itself when the session runtime does not come up.

flysim-session.service: the standalone unit (flysim's limits, cpuset and
environment, Conflicts=flysim.service, no [Install]). build-flysim.sh and
package-release.sh ship flysim-session and fly-session; 05-deploy.sh
installs fly-runtime, writes the standalone unit's cpuset drop-in and
refuses a release without flysim-session while the drop-in is present;
tmpfiles creates /run/fly/session. lint.sh checks all of it and drives
fly-runtime against stubs. Runbook: Switch the runtime.
2026-09-29 20:31:20 +00:00
acamilo
98f29e47c6 fly-legacy-session: flysim-session, the session runtime as the live service
The service host (service.rs, bin flysim-session) runs the legacy composition
behind flysim::serve with flysim's own Config and keeps Sim's order and
bookkeeping: TASK-01's boot (legacy candidate order and gate), boot events,
chat sidecar, sugar journal (runtime fly-session), startup/shutdown durable
saves, queued hot/durable/milestone/after-rollback saves on the wall clock,
macro/reward/milestone/recovery/sugar/checkpoint events, the recovering
status, flysim's Pacer, sd_notify ready/watchdog, and the 30 Hz feed built
by flysim's feed_* functions from the committed view, the step's audio
through the legacy DC blocker, the OR of the commits' spike bitsets, the
task's adapter/ratchet/macro layer and the agent's Legacy.FeedStatus.

Task: FeedRecord (executed/rewards/abandoned/rollback events), the applied
mask (0 after a rollback, the checkpoint's after an import), inspect().
Composition: boot_unsaved, save_queued, the event-log watermark setter.

Tests: service_parity (legacy Sim vs session host behind flysim's router,
one scripted request set, every header/attachment/response/event/journal
line and the final checkpoint compared), journal_replay (a killed session
run's journal replayed from the seed in the legacy loop onto its last hot
checkpoint), unit tests for the audio path and the feed status;
examples/seed_store.
2026-09-29 20:31:13 +00:00
acamilo
4fcd9233c7 fly-session: what a service host needs from the session
- Legacy.FeedStatus (capability legacy-feed-status-v1): the legacy agent's
  read-only feed status at a committed boundary -- rates, pulse, the whole
  plasticity statistics and the decoder's baselines/scores -- which no
  session message carries and the legacy header and /status report.
- Coordinator::read_agent_extension (never fences), media_bytes (the
  committed view/audio chunk), digest_views (off for a host that reads the
  details only for commit attachments), trim_records (the trace, phase log,
  audit and injection log grew with every transition: ~120 KB/s on the live
  fly), and timings for the feed status and the per-step publication.
2026-09-29 20:31:13 +00:00
acamilo
95614122a9 flysim: serve() shell and shared feed-header builders for a second runtime
flysim::run is now serve(config, Sim::boot + Sim::run): serve binds the feed
(or the feed bus), the control API and the metrics listener, handles the
signals and runs any runtime on the calling thread with the shared state,
the snapshot slot and the command queue. The fly-derived pieces of a feed
header (feed_rates/learning/game/milestone/sugar) and the chat admission
(admit_chat) are free functions both runtimes call; DcBlocker gains an f32
entry point for audio already converted with v/255. No behaviour change:
the legacy frame, header bytes and compatibility string are unchanged.
2026-09-29 20:31:13 +00:00
acamilo
f34b236f12 tests: the service test waits for the first snapshot before reading /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
/healthz goes green before the first snapshot is published, and until
then /status carries the placeholder header (a one-rung BOOT ladder). A
loaded box read that window and failed 'the ladder length is in
/status'. Bounded wait (30 s); every assertion unchanged.
2026-09-29 20:15:04 +00:00
acamilo
452525dc38 docs: v0.6.6 status 2026-09-29 19:34:29 +00:00
acamilo
1700bd58e9 Merge feat/row69-throw-name (reviewed: APPROVE-WITH-NOTES): throw on low HP only, the fly names its catch
# Conflicts:
#	infra/docs/macros-traps.md
2026-09-29 19:34:10 +00:00
acamilo
3c72967a5b docs: row 69, throw on low HP only and the fly names its catch
macros.md 12.32 and the 13.1 table rows; macros-wram.md 15 (the two
naming bytes); feed-protocol: padEmptyMs is 0 on the keyboard;
macros-traps row 69 with the ROM tests and the connectome survey.
2026-09-29 18:54:57 +00:00
acamilo
70aa740b37 reset: a sugar journal that cannot be cleared is a warning once the reset is complete
review-state-02 N3: the error made fly-reset-to-milestone exit non-zero
after a finished reset, so fly-loop-reset reported it failed and the
stream's splash said so.
2026-09-29 18:45:05 +00:00
acamilo
5a05b1667a Merge fix/loop-row67 (reviewed: APPROVE-WITH-NOTES)
# Conflicts:
#	docs/design/macros.md
#	infra/docs/macros-traps.md
#	services/flysim/crates/flysim/tests/rom_macros_mode.rs
2026-09-29 18:43:50 +00:00
acamilo
494477e1f2 Merge test/row66-shop-catch (reviewed: APPROVE-WITH-NOTES) 2026-09-29 18:43:19 +00:00
acamilo
70e5ad6134 Merge port/integration (reviewed: APPROVE-WITH-NOTES) 2026-09-29 18:43:19 +00:00
acamilo
7ef16be317 docs: TASK-01 on STATE-02 (the store, the boot, the task ledger) 2026-09-29 18:23:11 +00:00
acamilo
e561c81295 TASK-01 on STATE-02: the store, the boot and the task ledger
- The task ledger is STATE-02's TaskHalf ledger {reward, ratchet,
  slotFilled} (pokered-task-ledger-v1); the task exposes its half, rank
  and brain time for the host.
- The FLYSIM01 import uses legacy_checkpoint's halves, agent_payload
  (the file's framebuffer as the next input, its reinforcement count)
  and world_payload, with ids from the file; ImportSpec carries the
  source scope.
- The coordinator can defer a rollback so the host captures first
  (apply_pending_rollback) and takes a participant-coherent capture
  for the legacy store (capture_payloads).
- LegacySession: attach_store (LegacyCheckpointer), save, advance in the
  declared boundary order (slot save, milestone archive on a climb,
  rollback, durable save after it, interval saves), shutdown_save; boot()
  restores from the live stores in the legacy order and gate, one
  session per attempt, fresh when the stores are empty.
- tests: fafb_boot_run_save_restore, the SHADOW-01 entry gate.
2026-09-29 18:16:55 +00:00