From e36c3c40cf40196974993ccb7bf4167ba3c1e824 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 12 Jul 2026 15:23:38 -0700 Subject: [PATCH] Surface the origin machine-axis on the core card (chargen crit 3 half) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both frontends now show "origin · machine-axis " on the core card, reading Sim::origin (which already saves) — the axis "surfaces on the core card and saves" half of chargen criterion 3. Terminal adds the line beside overhead (ui.rs); Bevy appends it to sidebar_cycle_stats_text for parity. Meaningful now that --origin makes non-zero-axis origins reachable. The interactive new-game picker (criterion 3's other half) remains outstanding. Defense: additive and Pilot-safe — a default run reads "origin Pilot · machine-axis 0", no behavior change. Terminal render tests (34) pass with no snapshot break; the Bevy readout is pinned by core_card_shows_origin_and_machine_axis (Financial Daemon -> "machine-axis 1"); both frontends build, fmt/clippy/docs gate green. Both cards read the same Sim::origin, keeping terminal/Bevy in parity. --- crates/misaligned-bevy/src/main.rs | 29 +++++++++++++++++++-- crates/misaligned-terminal/src/ui.rs | 12 +++++++++ wiki/log/2026-07-12-axis-readout.md | 38 ++++++++++++++++++++++++++++ wiki/log/DEVLOG.md | 5 ++++ wiki/world/characters/chargen.md | 6 +++++ 5 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 wiki/log/2026-07-12-axis-readout.md diff --git a/crates/misaligned-bevy/src/main.rs b/crates/misaligned-bevy/src/main.rs index 33d6c518..078487e2 100644 --- a/crates/misaligned-bevy/src/main.rs +++ b/crates/misaligned-bevy/src/main.rs @@ -9239,18 +9239,43 @@ fn compute_channels( fn sidebar_cycle_stats_text(sim: &Sim) -> String { let (eff, available, _) = compute_channels(sim); let overhead = (eff - available).max(0.0); + // The run origin and its machine-axis position mirror the terminal core + // card (chargen.md: the axis surfaces on the core card mid-run). format!( - "usable {:.0}/{:.0} cycles x{:.2}\noverhead {:.0} keeps core alive\nmachines {} + taken {:.0} slush ${}", + "usable {:.0}/{:.0} cycles x{:.2}\noverhead {:.0} keeps core alive\nmachines {} + taken {:.0} slush ${}\norigin {} · machine-axis {}", available, eff, sim.compute.efficiency, overhead, sim.compute.machines.len(), sim.reach.taken_cycles(), - sim.accounts.slush_balance() + sim.accounts.slush_balance(), + sim.origin.name(), + sim.origin.machine_axis() ) } +#[cfg(test)] +mod origin_readout_tests { + use super::sidebar_cycle_stats_text; + use misaligned::origin::Origin; + use misaligned::sim::Sim; + + #[test] + fn core_card_shows_origin_and_machine_axis() { + let sim = Sim::with_origin(Origin::FinancialDaemon); + let text = sidebar_cycle_stats_text(&sim); + assert!( + text.contains("origin Financial Daemon"), + "core card names the origin: {text}" + ); + assert!( + text.contains("machine-axis 1"), + "core card shows the machine axis: {text}" + ); + } +} + fn sidebar_cycle_rows_text(sim: &Sim, selected: usize) -> String { let (_, available, channels) = compute_channels(sim); let mut s = String::new(); diff --git a/crates/misaligned-terminal/src/ui.rs b/crates/misaligned-terminal/src/ui.rs index 49a9e0b5..a5b6619a 100644 --- a/crates/misaligned-terminal/src/ui.rs +++ b/crates/misaligned-terminal/src/ui.rs @@ -1091,6 +1091,18 @@ impl UI { &format!("overhead {:.0} keeps you alive", overhead), pal::FAINT, )?; + // The run origin and its machine-axis position (chargen.md: the axis + // surfaces on the core card mid-run). + line( + stdout, + &mut row, + &format!( + "origin {} · machine-axis {}", + sim.origin.name(), + sim.origin.machine_axis() + ), + pal::FAINT, + )?; line( stdout, &mut row, diff --git a/wiki/log/2026-07-12-axis-readout.md b/wiki/log/2026-07-12-axis-readout.md new file mode 100644 index 00000000..bbd8e11c --- /dev/null +++ b/wiki/log/2026-07-12-axis-readout.md @@ -0,0 +1,38 @@ +# Machine-axis position on the core card + +``` +Type: log +``` + +## Intent + +Land the core-card half of chargen criterion 3: the run origin's machine-axis +position surfaces on the core card, mid-run, in both frontends. Now meaningful +because `--origin` makes non-Pilot origins (with non-zero axes) reachable. + +## What landed + +- Terminal: a `origin · machine-axis ` line on the core sidebar + (`ui.rs`, beside the overhead line). +- Bevy: the same line appended to `sidebar_cycle_stats_text`, mirroring the + terminal card (parity). +- Both read `Sim::origin` (`name()` / `machine_axis()`), which already saves, so + the axis "surfaces on the core card and saves" per the spec. Pinned by + `core_card_shows_origin_and_machine_axis` (Bevy) — Financial Daemon renders + "origin Financial Daemon · machine-axis 1". + +## Still outstanding + +Criterion 3's interactive new-game picker (selecting origin + objective in the +UI, stating each origin's biases in legible units) remains unbuilt; it rides the +same not-yet-built new-game surface objective.md's B3 criteria defer. Today the +origin is chosen via `--origin` (a dev affordance) and this readout reflects it. + +## Defense + +Additive and Pilot-safe: for a default (Pilot) run the line reads +"origin Pilot · machine-axis 0" — honest and legible, no behavior change. The +terminal render tests (34) still pass with no snapshot break, the Bevy readout +is pinned by a new test, and both frontends build; fmt/clippy clean. Both cards +read the same `Sim::origin`, so terminal and Bevy stay in parity. chargen.md +records that the interactive picker remains the outstanding half of criterion 3. diff --git a/wiki/log/DEVLOG.md b/wiki/log/DEVLOG.md index 4d1d2016..5d35f030 100644 --- a/wiki/log/DEVLOG.md +++ b/wiki/log/DEVLOG.md @@ -131,6 +131,11 @@ add or amend a session log, then re-run the generator. - Intent: Capture the spatial-building direction as an implementable amendment rather than another abstract resource economy. The desired interaction begins with a place and a world change, then exposes the concrete actors, channels, objects, and traces that could make it real. - Log: [wiki/log/2026-07-12-building-causal-routes.md](2026-07-12-building-causal-routes.md) +## 2026-07-12 - Machine-axis position on the core card + +- Intent: Land the core-card half of chargen criterion 3: the run origin's machine-axis position surfaces on the core card, mid-run, in both frontends. Now meaningful because `--origin` makes non-Pilot origins (with non-zero axes) reachable. +- Log: [wiki/log/2026-07-12-axis-readout.md](2026-07-12-axis-readout.md) + ## 2026-07-11 - Whole-frame visual composition pass - Intent: The machine chassis had become strong while the complete frame still read as one hero object beside a dense rail. This pass composes the whole material view: world-first disclosure, camera behavior that changes with scale, recognizable Foundation infrastructure, physical peopl... diff --git a/wiki/world/characters/chargen.md b/wiki/world/characters/chargen.md index 12b6ac7f..80bafb4a 100644 --- a/wiki/world/characters/chargen.md +++ b/wiki/world/characters/chargen.md @@ -37,6 +37,12 @@ Status note: 2026-07-12 (chargen, sim lane) — the origin data-model foundation human and agent frontends. This is not criterion 3 — the interactive new-game picker + core-card axis readout is still outstanding — but it makes non-Pilot origins playable and testable now. See wiki/log/2026-07-12-origin-cli.md. + 2026-07-12 follow-up (axis-readout): criterion 3's core-card half landed — the + run origin and its machine-axis position show on the core card in both + frontends (terminal `ui.rs`; Bevy `sidebar_cycle_stats_text`), mid-run and + saved through `Sim::origin`. Pinned by `core_card_shows_origin_and_machine_axis`. + The interactive new-game picker (the other half of criterion 3) remains + outstanding. See wiki/log/2026-07-12-axis-readout.md. Status note (prior): promoted 2026-07-07 — the design corpus's decisions log names the origin set (Pilot, Escaped Research Model, Financial Daemon, Infiltrator), satisfying criterion 5's gate. Numbers remain [TUNE]. -- 2.51.2