Commit graph

507 commits

Author SHA1 Message Date
acamilo
d7f5ef5ff7 infra: the recovery ladder starts over after real progress, keeps a recent catch, and never replays one archive twice (row 70)
Check 10 now reports window.progress (a milestone, and pokedex/area/trainer/badge rewards; the
species alone), read by no rule. fly-loop-recover returns to level 0 when lasting progress
follows the last step by more than SETTLE, demotes a milestone reset to a restart within six
hours of a species owned, and never restores the archive the last reset restored (a restore is
deterministic: the live rung-11 replay matched the first one event for event and walked into the
same trap). Ladder tests, lint check 10 case 9, loop-recovery.md, macros-traps row 70b-e.
2026-09-30 20:57:52 +00:00
acamilo
539d73bc36 tests: the shadow test waits for the verdict status to settle before asserting it
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
The compared count and the status are recomputed on different verdict
writes; on a loaded box the v0.7.1 release gate read the new count with
the status still 'running'. Bounded wait (120 s); assertions unchanged.
2026-09-30 20:57:27 +00:00
acamilo
7420541df6 docs: v0.7.1 status 2026-09-30 20:21:19 +00:00
acamilo
59ac004b76 Merge fix/loop-row70 hotfix (6eeff4a, reviewed: APPROVE): the SHIFT-style change-Pokémon offer is not a forced switch 2026-09-30 20:21:19 +00:00
acamilo
6eeff4a735 macros: the SHIFT offer's party list is the fly's turn, not a forced switch (row 70)
EnemySendOut opens the party list with BATTLE_PARTY_MENU when the fly answers YES to
"Will <mon> change POKeMON?", the value ChooseNextMon uses after a faint. Read as a forced
switch its pad was SWITCH, NEXT with no B: live in Mt. Moon after the first catch, NEXT on the
Pokemon already out for 58 brain minutes. A forced switch now also needs the active battler at
0 HP; the offer's pad is the party list's SWITCH and BACK.

Unit tests for both lists; ROM tests from the live trap (FLY_ROW70_CHECKPOINT) and from a real
forced switch after a faint (FLY_ROW70_FORCED_CHECKPOINT); macros.md 12.33, macros-traps row 70.
2026-09-30 19:27:08 +00:00
acamilo
4200a99e7e docs: v0.7.0 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-09-30 14:15:14 +00:00
acamilo
c0be101c5f Merge release/v0.7.0-rc: the flybus session runtime ships beside legacy (installed, not selected), with the shadow run and the guarded cutover 2026-09-30 14:15:14 +00:00
acamilo
6c0cc2b717 infra: session stops the shadow and guard; shadow start verifies its cpuset
fly-runtime session now stops a running shadow and its guard (fly-shadow-run stop,
no flysim restart) once flysim is healthy on the session runtime, so the guard
cannot judge the session against the legacy baseline during the probation. The
runbook cutover drops the restart in step 5.

fly-shadow-run start refuses, starting nothing, unless flyshadow's cpuset drop-in
exists and its AllowedCPUs is non-empty and disjoint from flysim.service's.

Tests in infra/tests/lint.sh cover both.
2026-09-30 13:36:12 +00:00
acamilo
a3a0d957e2 Merge feat/cut-01-probation: the switch to the session runtime is a 30-minute speed probation 2026-09-30 12:59:57 +00:00
acamilo
c1f0dde9e9 infra: CUT-01 speed probation after fly-runtime session
fly-runtime session now starts fly-runtime-probation (timer every 60 s, 30 minutes):
after a 300 s warm-up, a sustained median realtime factor below 0.97 or lag growth
over 30 s in a 10-minute window runs fly-runtime fallback with reason speed. A pass
writes /run/fly/runtime-probation.json and stops the timer; fly-runtime legacy and
every fallback cancel it; state on disk resumes it after a reboot. Lint drives it over
synthetic traces; runbook gets the end-to-end cutover procedure.
2026-09-30 12:58:05 +00:00
acamilo
416c73941a lint: the build and package checks name flysim-session, fly-shadow and fly-session together 2026-09-30 10:19:32 +00:00
acamilo
b3f6d6fbba Merge port/shadow-01 (SHADOW-01) into v0.7.0 release candidate
Conflicts: deploy/build/package scripts (flysim-session, fly-shadow and fly-session all
built, packaged and given cpuset drop-ins; fly-runtime and fly-shadow-run both converged),
fly-legacy-session Cargo.toml and lib.rs (service and shadow both kept, tokio gains signal),
runbook and implementation guide (both sections kept).
2026-09-30 10:09:01 +00:00
acamilo
b996695f0a Merge port/serve-01 (SERVE-01) into v0.7.0 release candidate
Conflicts in fly-legacy-session task.rs (feed record next to PERF-01 profile spans) and
fly-session coordinator.rs (media_bytes doc, read_agent_extension and trim_records kept
alongside PERF-01 spans, publish span and publish metric both kept).
2026-09-30 10:06:03 +00:00
acamilo
7f5f5d0e5d Merge port/perf-01 (PERF-01) into v0.7.0 release candidate 2026-09-30 10:05:07 +00:00
acamilo
6b77b87991 Merge port/task-01 (TASK-01) into v0.7.0 release candidate 2026-09-30 10:05:06 +00:00
acamilo
0b56e03ae3 shadow: a live process that leaves no trace fails the verdict; the test builds the flysim it runs
tests/shadow.rs failed with 'one trace file per process' (0 vs 2) on a
build box because it ran a flysim binary that was not built from the
tree under test: cargo test -p fly-legacy-session does not build
flysim's binary, and the box's bx target directory was shared by name
with other trees, so the binary beside the test predated FLY_TRACE_DIR
and wrote no trace. Reproduced by running that test binary against its
stale flysim; not a timing or segment-handling bug. The test now builds
the flysim binary itself (cargo build -p flysim --bin flysim, same
target directory and profile), proved on a target another tree had
populated.

Production could miss a whole process the same way (a trace that
cannot be created, a failed consumer check), so the shadow now holds
every flysim boot header in the live sugar journal since it started to
a trace file created during that boot; an untraced process is a
coverage divergence and fails the verdict. In FLY_TRACE_DIR mode a trace
that cannot be created no longer stops flysim from starting (it runs
untraced and the shadow fails), and a heartbeat dated ahead of the
clock counts as fresh. The test adds an untraced third process and
expects the coverage divergence.
2026-09-30 04:57:50 +00:00
acamilo
e04b0c76b0 session_trace: boot parity accepts the adapter migrations v0.6.7 deploys with
The live checkpoints the boot parity starts from are pokered-unique8-v7 files;
since row 68 (v8) a boot takes them only with FLY_ACCEPT_ADAPTERS, as the
v0.6.7 deploy sets it. The test sets the adapter's own MIGRATES_FROM when the
environment names none; both runtimes read the same list.
2026-09-30 04:11:06 +00:00
acamilo
f7ca35ba2c infra: the shadow guard survives the shadow's crash-restart delay; check needs a live guard and a baseline; refuse a verdict dated in the future
Review round 3, G1-a: the guard stops only when flyshadow's ActiveState is inactive or failed
(systemctl show), not while it is activating/auto-restart. check also requires the guard timer
active and baseline.json. allows_cutover refuses an updatedAt more than 60 s ahead of the clock.
Lint drives the guard and check with a fake systemctl; a real systemd 257 user manager run is
kept in the review notes.
2026-09-30 04:06:38 +00:00
acamilo
c56e04cdf8 docs: PERF-01 in legacy-gameboy-v1 (release configuration) and the implementation guide 2026-09-30 03:57:05 +00:00
acamilo
d2d65a4a60 tests: recorded live-fly RTF traces for the shadow guard; docs: review round 2 (SHADOW-01)
Four recordings from a real flysim at real time, with and without a real
fly-shadow (infra/tests/fixtures/shadow-guard): alone and with an idle
shadow on other cpus the guard does not trip; with a shadow on the fly's
own cpu (0.66 -> 0.44-0.60) it trips at check 7. Section 18 and the
implementation guide record R3, G1 (both guards), N3, the rebase onto
port/task-01 eaf588d and the merge of main v0.6.7 (adapter v8).
2026-09-30 03:47:37 +00:00
acamilo
5a7747210f Merge main (v0.6.7: row 68 damage reward, adapter pokered-unique8-v8) into port/shadow-01 2026-09-30 03:16:36 +00:00
acamilo
6634b33e80 infra: the guard's baseline is robust to a step in its window (median, MAD)
A real recording (a flysim whose box load stepped 1.0 -> 0.66 inside the
10-minute window) widened the old mean/sd margin to 0.25 and hid a
genuine shadow-induced drop to 0.44-0.60. The baseline RTF is now the
median of the window, its spread 1.4826 x the median absolute deviation,
and the lag rate is taken over the most recent half. The recording now
trips at check 7; over 800 synthetic 3-hour runs shaped on the release
CT (flat 0.66, 0.77-0.99 and 0.6-1.0 noisy, per second and per sample)
there is no false trip, and all 400 degradations (to 0.55-0.75, and
0.66 -> 0.58) trip.
2026-09-30 03:16:36 +00:00
acamilo
2058fff54a Merge main (606e386, row 68: pokered-unique8-v8) into port/perf-01 2026-09-30 03:09:59 +00:00
acamilo
606e386e86 docs: v0.6.7 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-09-30 03:06:09 +00:00
acamilo
790347af7d Merge feat/damage-reward (reviewed: APPROVE-WITH-NOTES): pay the fly for damage its own attacks deal, adapter pokered-unique8-v8 2026-09-30 03:06:05 +00:00
acamilo
8618e38a5f fly-session: clippy (box the bus request), race test starts from its torn state
The admission race test (TASK-01 R2-3) spawned its hammer before the first
iteration set the queue up; on a loaded build box the hammer could admit into
the empty initial queue, which is a legitimate admission, and fail the test.
2026-09-30 02:55:51 +00:00
acamilo
9a2d7c0286 PERF-01: the local lane carries every endpoint method but Worker.*; contract amendments
- worker: local_lane_carries is every method but Worker.*, so an endpoint's
  read-only extension (SERVE-01's Legacy.FeedStatus) no longer crosses the bus.
- ipc-v1 section 1, bus-v1 section 12, step-v1 and the framework README: the
  in-process local lane and in-memory artifacts, dated 2026-09-30.
2026-09-30 02:42:17 +00:00
acamilo
be73014bf5 docs: the stage folds a battle's damage hits into one ticker row 2026-09-30 02:41:58 +00:00
acamilo
fa8c9305a7 PERF-01: spikes gathered per tick, 1 Hz session snapshots, fewer copies
- flybrain-core: LifNetwork::tick_spikes, the last CPU tick's spike list
  (None under the GPU backend); a test proves it is exactly the neurons the
  tick stamped and that window unions equal the last_spike_ms scan.
- legacy agent: Prepare runs its ticks one at a time and ORs each tick's list
  into the transition's bitset; Commit uses it instead of scanning 139,255
  last-spike times (falls back to the scan when no list is kept).
- legacy composition: a service session publishes its committed snapshot
  every 60th boundary (plus every boundary with events or boundary actions);
  nothing in the release subscribes, and each publication seals copies of
  the frame and the audio.
- coordinator: a single dispatch job is called in place; worker shell moves
  the reply result instead of cloning it; publication promotions begin when
  Advance answers whatever the cadence.
- profile: record() for a sample from another clock; finer spans (shell,
  local lane, handlers, advance parse/build, the brain's phase clock).
2026-09-30 02:15:25 +00:00
acamilo
d10aa09afa stage: the ticker folds a battle's hits into one damage row, with two ticker mockups 2026-09-30 02:14:41 +00:00
acamilo
9462c2e28a docs: row 68, the damage reward survey, and a status line
macros-traps: row 68, the catalog's answer to row 67. Three starts x 120 brain
minutes from the row 67 checkpoint, v7 against v8 (the palette seed does not
diversify a run; the starts are the checkpoint and the game run 7 and 19 frames
ahead of the brain). v8 beat the Jr. Trainer in 2 of 3 (one also took the
Boulder Badge), v7 in 0 of 3; the move choice did not shift more under v8 than
under v7 (BUBBLE about 15% -> 20% in both), so no learned preference is shown
inside two brain hours. stream-mvp-plan: an unreleased status line.
2026-09-30 02:11:56 +00:00
acamilo
e9d8f1a753 docs: the damage reward, and the v7 migration in deploy examples
rewards-learning: the catalog row, "Damage rewards" (what counts as the fly's
attack, the magnitudes against the catalog, what cannot be farmed, why `damage`
has no feed counter, the measured press-to-payout delay against the 5 s trace,
the migration) and an honesty paragraph. flysim.md: v7 -> v8 under "Restoring
across an adapter version", with the exact compatibility-string change.
macros-wram: hWhoseTurn, wPlayerMoveNum, wEnemyMonPartyPos and the stale
wEnemyMon. Deploy examples name pokered-unique8-v7 (example.env: add v6 to keep
the pre-v0.6.0 milestone archives restorable).
2026-09-30 02:11:45 +00:00
acamilo
3914f824ce rewards: rom_damage reports how long after the MOVE press each hit is paid 2026-09-30 02:11:45 +00:00
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