Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5b5070f
t27os: bench.t27 -- the boards, provenance of every number and the pr…
claude Oct 20, 2026
617cbf2
t27os: home tabs in the chat style -- sidebar of homes, big bold head…
claude Oct 20, 2026
cb42d99
t27os: domain_pulse.t27 -- what is happening, per agent domain: commi…
claude Oct 20, 2026
7aa0724
t27os: agent_widgets.t27 -- each of the 27 agents gets its instrument…
claude Oct 20, 2026
3b5ac26
skills: t27os -- the T27 OS instrument panel: the image, where each r…
claude Oct 20, 2026
6340219
skills: t27os -- the 27 petals are the 27 agents; chat and commander …
claude Oct 20, 2026
ad5722d
skills: t27os -- every widget carries its pinned agents, a mandatory …
claude Oct 20, 2026
e0084be
agents: KEY_FILES point at the directories each domain really changes…
claude Oct 20, 2026
ee1e792
t27os: every widget and surface carries its pinned agents -- owner pl…
claude Oct 20, 2026
cab181f
skills: t27os -- one registry per letter: tool, agent, specs, widgets…
claude Oct 20, 2026
a233cf2
skills: t27os -- inventory of the t27<letter> tools that exist, t27t …
claude Oct 20, 2026
ea53d4e
AGENTS.md: T27 OS rules -- 27 petals = 27 letters, everything a widge…
claude Oct 20, 2026
4a62518
t27os: evolve.t27 -- the rule GOD MODE runs: gaps from the panel, pri…
claude Oct 20, 2026
0c74586
t27os: the 27 petals are the 27 agent letters; each letter opens a co…
claude Oct 20, 2026
7a9c181
Merge branch 'claude/t27os-bench' into claude/t27os-homes-chat-style
claude Oct 20, 2026
89c9a75
Merge branch 'claude/t27os-domain-pulse' into claude/t27os-homes-chat…
claude Oct 20, 2026
b35ebc4
merge origin/master into homes branch (glass_window: keys per-number …
claude Oct 20, 2026
3e0e602
AGENTS.md, skill t27os: T27 OS is a project-management system made 10…
claude Oct 20, 2026
aaaedec
t27os homes: gallery parse for 306 rows mapped by id, per-letter side…
claude Oct 20, 2026
3b0aa63
skill t27os: glass everywhere in a window, embedded widget pages incl…
claude Oct 20, 2026
45b1a4f
t27os: t27<letter> tools -- 27 page titles (agent_parts), petal label…
claude Oct 20, 2026
f3cb854
t27os: dashboard-first petals, agent identity card, agents block + '+…
claude Oct 20, 2026
149324e
Merge claude/t27os-tools: letter tools registry, page titles as petal…
claude Oct 20, 2026
46fa6e3
t27os: share.t27 -- share a session, document or "finish this task" t…
claude Oct 20, 2026
df7baf6
golden chain: the landing rule agents follow -- local verify, local g…
claude Oct 20, 2026
000664f
t27os: instrument tiles are matte glass (screen-blended card image, 0…
claude Oct 20, 2026
ebebbf7
bench: Zynq XC7Z020 on the Adept cable (busdev 0:2), AX7203 cable wit…
claude Oct 20, 2026
d0103b6
t27os: virtual instrument grid, ImageIO thumbnails in an LRU decoded …
claude Oct 20, 2026
4a062f6
t27os: queen_board.t27 -- data model of the Q page live board: feed, …
claude Oct 20, 2026
45aed1e
Merge branch 'claude/t27os-tools' into claude/t27os-homes-chat-style
claude Oct 20, 2026
305986e
t27os: queen_board uses evolve's renamed helpers (letter_bit, mask_ha…
claude Oct 20, 2026
b3f3c11
t27os: key-light dot on agent pane headers and in the KEYS foot, adap…
claude Oct 20, 2026
584b06a
t27os: B BENCH, K KANBAN and Q QUEEN pages in glass_window -- host fe…
claude Oct 20, 2026
6968e57
t27os: BENCH reads real openFPGALoader --detect text -- aligned "idco…
claude Oct 20, 2026
3e3c6c6
t27os: window opens over the visible screen by default (window_keep d…
claude Oct 20, 2026
f2fcd96
t27os: home petals match trios -- idle black 0.22, white hover, realm…
claude Oct 20, 2026
bb4a849
t27os: the OS ground is black #000000 -- window tint 0.92 (was 0.30, …
claude Oct 20, 2026
5f24263
t27os: CHAT/CONSOLE switch sits left of the new-chat plus (they overl…
claude Oct 20, 2026
c4cfec5
Merge origin/master into claude/t27os-homes-chat-style: dash_* rename…
claude Oct 20, 2026
4736e51
t27os: the chat terminal scrolls its history -- ring of 5000 rows, su…
claude Oct 20, 2026
cc49652
t27os: LANES AND ACTORS in the chat sidebar -- one row model (lanes_v…
claude Oct 20, 2026
5528794
t27os chat UX: lane log is its own view, kernel actors grouped and la…
claude Oct 20, 2026
59bede4
Merge remote-tracking branch 'origin/master' into claude/t27os-ux-2
claude Oct 20, 2026
ff38012
T27 OS: HIVE devices page (TRI NET) and the formula orbit around the …
claude Oct 20, 2026
a3fa048
Merge origin/master into claude/t27os-hive-devices (Closes #11431)
claude Oct 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .claude/skills/t27os/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ dashboard and back). The window only calls the decisions of `bench.t27`, `kanban
- **Q QUEEN**: lamps (27, "not measured": `domain_pulse` cannot be linked into the window, #5980), feed, top gaps with
why-not, the six-counter meter (links and tests from `git log` / `grep` in the space's folder once a minute),
safety strip with STOP = GOD MODE off.
- **H HIVE (TRI NET devices)**: `devices.t27`. One glass card per machine (host, T27 OS version + build and "behind N" against
the `t27os-latest` tag, `t27c` version, CPU/RAM/free disk, lanes running with model, key light and elapsed), a flow strip
CLAIMED -> LANE PUSHED -> TRIGIT LANDED -> BATCH PUSHED -> MERGED. Sources are git only: `git ls-remote` of
`refs/swarm/claims/*`, `claude/claim-*`, `claude/evolve-lane-*`, `t27os-*` tags, `refs/swarm/alive/*` fetched with their
committer dates, `tri golden status`. Each machine publishes `refs/swarm/alive/<host>` (subject = payload `hb1 host=.. build=..
lanes=issue:model:light:elapsed,..`) every 5 min from the app (`dv_publish_due`), a heartbeat older than 30 min reads OFFLINE,
a host with only a lane branch reads NO HEARTBEAT and n/m. Lanes of this machine come from the lanes table (the lanes feed
runs while the page is open and before each beat). The page widgets carry their agents in `DW_AGENTS`.
- **Formula orbit around the home logo**: `orbit_view.t27` over `formula_orbit.t27` + `formula_table.t27`. How many of the 32
labels fit depends on the stage (PAD 52 is the law of formula_orbit): about 10 in a 960 x 540 window, all 32 from about
1440 x 800. Reduced motion (NSWorkspace) freezes the clock. formula_orbit's PAD, NONE and card_* were renamed ORB_PAD,
ORB_NONE, orb_card_*: t27b splices every import into one namespace and kanban/topic_reel/petal_menu own those names.
- **Trap, measured**: `t27b` splices every imported module into one flat namespace, so a same-named private helper in
two modules is silently the first one. The page specs prefix their internals (`kb_`, `qb_`, `bn_`); check with the
duplicate-name script before importing a new spec into `glass_window`. The fast `t27b test` does not type-check the
Expand Down
16 changes: 8 additions & 8 deletions .trinity/seals/t27os_T27osAgentParts.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"built_by": "t27c-bootstrap@0.5.2+24a3abcad",
"built_by": "t27c-bootstrap@0.5.2+72ddaf7ac",
"closure": [
{
"spec": "specs/t27f/petal_menu.t27",
"spec_hash": "sha256:154e8ee093b282e51d1e8040fc7ad0fabc892f609120a50c5b0a25d7b2dae28a"
"spec_hash": "sha256:2d866d49ab066136006fdabfb1d6e1c4710867535c25029dee184a404af6b51e"
},
{
"spec": "specs/t27os/homes.t27",
Expand All @@ -15,16 +15,16 @@
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:7ede0ad24863934e0de8867c4d4d25a52ef44bb0d764ef4e5250693b183e90c2",
"gen_hash_rust": "sha256:ad6998dd2706c75ed8e9aec7f796feb2cc001524d0c4cf5a1cedd6a1237cc861",
"gen_hash_verilog": "sha256:36ce55c255364e75ecf0c18c12d20bcd321ed94304c63415b29028c9731ea7a8",
"gen_hash_zig": "sha256:c68bf3d1382429f7d8ec6bd5d6be2473ce583bf5c145df1c5ac5b76f6b2c3381",
"gen_hash_c": "sha256:0c7e09b4e0e98371d2f8b79209a28eac552920edd9e4a2167ecf35aa2435b86e",
"gen_hash_rust": "sha256:d5800122192f75b8e1a7edb0b3bf3f317dccd6946662ef6a99416dbd4ee56a50",
"gen_hash_verilog": "sha256:f1aa990ca05be93355b8298782fe1845947f55cc70272762ca40e1abc232cc6c",
"gen_hash_zig": "sha256:549f51d7d6c3471e482069e55a9ea61a8a25c533867104fe0921324e60982a83",
"module": "T27osAgentParts",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-20T14:44:55Z",
"sealed_at": "2026-10-20T16:55:12Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:f4d9ed2c3bd2c391f067c98eb61a2d9ae0b975b4cbe76befdd23277dd272a6d6",
"spec_hash": "sha256:e6b1e9e183c1a1b0192e26caf269a592b0606625904cbe29d6d25be6081ca82e",
"spec_path": "specs/t27os/agent_parts.t27",
"tests": {
"failed": 0,
Expand Down
33 changes: 33 additions & 0 deletions .trinity/seals/t27os_T27osDevices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"built_by": "t27c-bootstrap@0.5.2+72ddaf7ac",
"closure": [
{
"spec": "specs/t27os/lanes_view.t27",
"spec_hash": "sha256:cf06613e5f2002ac9ca07dc8a6586b0754cc99bf1cbb75d780125c480d7b4875"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:f373497e1daf7db6665ddb21f68f24183a5ed3f5d28dc87d334a3cae07f99f0b",
"gen_hash_rust": "sha256:838237a1023b48e7323f595362e5eefe63db9f2d68bb892abebac7b524ee5745",
"gen_hash_verilog": "sha256:2e7e3d22924c35799f13ec704061c9392b5a5d5d12c1033ed9ef1cd694cccac7",
"gen_hash_zig": "sha256:3bce7cb61816ff322e5ab45ee29d52372a68f02a9151f61c10da439ee4cedefc",
"module": "T27osDevices",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-20T16:55:08Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:53643c6db56c0cf3340f7f52ee550d01256877798f6be9a9af84ccf66c6afb44",
"spec_path": "specs/t27os/devices.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 18,
"total": 18,
"vacuous": 0
},
"toolchain": {
"test_runner": "sha256:8512b80da533b79289110fca4a65f3336abd7a059ca4b72ea595d5e33ff8ad10",
"zig": "0.16.0"
}
}
32 changes: 32 additions & 0 deletions .trinity/seals/t27os_T27osOrbitView.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"built_by": "t27c-bootstrap@0.5.2+72ddaf7ac",
"closure": [
{
"spec": "specs/t27f/formula_orbit.t27",
"spec_hash": "sha256:8539caa8b9a6cf19a76dac9e48978c3d3491ca8b5537ac0f22adb94d6af4fee5"
},
{
"spec": "specs/t27f/formula_table.t27",
"spec_hash": "sha256:59d968f6cfd27ba742a07208fd7f0cb25c1cabf4052c9526f8fd9058e1721053"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:ad3f630947e77ad55a59fa59e8e21232dd48ade02f707b48be7915b98dab1599",
"gen_hash_rust": "sha256:b26400e997960a22a2b76c7a3fce79f877efa4eac99062f74ae28400239a048c",
"gen_hash_verilog": "sha256:388dc21a7ef33165d4888e81007903102f3f2e3794ca3cba562780679f50ad87",
"gen_hash_zig": "sha256:32ddfd175ab6c681a272b746e07f86a16ad0e6657d975cb74904abfb93650375",
"module": "T27osOrbitView",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-20T16:55:09Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:0c3c4a1aad9914d4f052fd6c423b62421db02fef1357edd60bc0b7144c324558",
"spec_path": "specs/t27os/orbit_view.t27",
"tests": {
"blocked": "does not compile: spec.zig:247:82: error: division with 'i64' and 'comptime_int': signed integers must use @divTrunc, @divFloor, or @divExact"
},
"toolchain": {
"test_runner": "sha256:8512b80da533b79289110fca4a65f3336abd7a059ca4b72ea595d5e33ff8ad10",
"zig": "0.16.0"
}
}
52 changes: 26 additions & 26 deletions specs/t27f/formula_orbit.t27
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
; --
; How it stays calm. Each formula gets a HOME slot, fixed for a given stage: candidates walk the
; golden spiral (a sunflower over the stage ellipse) and a candidate is kept when
; (1) its label rectangle, grown by PAD on every side, stays on the stage;
; (1) its label rectangle, grown by ORB_PAD on every side, stays on the stage;
; (2) it clears the keep-out circle (logo radius * 1.08), so it never covers the logo or a
; petal's hit area;
; (3) it is at least PAD away, on x or on y, from every slot already kept.
; PAD = 2 * (DRIFT_AMP + PUSH_CAP). Every moving part is capped: drift offset <= DRIFT_AMP per
; (3) it is at least ORB_PAD away, on x or on y, from every slot already kept.
; ORB_PAD = 2 * (DRIFT_AMP + PUSH_CAP). Every moving part is capped: drift offset <= DRIFT_AMP per
; axis, pointer push <= PUSH_CAP per axis. Two labels therefore move toward each other by at most
; PAD in total, so THEY CAN NEVER OVERLAP AND NEVER REACH THE LOGO, whatever the clock and the
; ORB_PAD in total, so THEY CAN NEVER OVERLAP AND NEVER REACH THE LOGO, whatever the clock and the
; pointer do. That is a proof by bounds, and the tests below also sweep it numerically.
; The slowdown near the pointer is a global clock factor (time_scale_permille), not a per-label
; speed, so the field stays rigid and the guarantee above is untouched.
Expand All @@ -33,8 +33,8 @@
; a matte glass chip; with reduced motion draw at slot_x(hx[i]) / slot_y(hy[i]) instead.
; 3. On pointer move: hover = label_hit(px, py, x_i, y_i, LABEL_W, LABEL_H) per drawn label;
; raise the chip, never the flight speed (the clock factor already slows it).
; 4. On click: i = hit_index(...) -> open the card for formula i: card_x / card_y / card_w /
; card_h give its frame; the text comes from formula_table.t27 (name, expression, value,
; 4. On click: i = hit_index(...) -> open the card for formula i: orb_card_x / orb_card_y / orb_card_w /
; orb_card_h give its frame; the text comes from formula_table.t27 (name, expression, value,
; error, sector). A click on the logo or a petal is petal_menu's, checked first.
; phi^2 + 1/phi^2 = 3 | TRINITY

Expand All @@ -45,11 +45,11 @@ pub const DRIFT_AMP : i64 = 8;
pub const PUSH_CAP : i64 = 18;
pub const PUSH_RANGE : i64 = 150;
pub const PUSH_CORE : i64 = 24;
pub const PAD : i64 = 52;
pub const ORB_PAD : i64 = 52;
pub const KEEP_PERMILLE : i64 = 1080;
pub const CANDIDATES : i64 = 1200;
pub const MAX_SLOTS : usize = 64;
pub const NONE : i64 = 0 - 1;
pub const ORB_NONE : i64 = 0 - 1;
pub const FAR : i64 = 0 - 100000;
pub const DRIFT_MDEG_PER_S : i64 = 20;
pub const LABEL_W : i64 = 150;
Expand Down Expand Up @@ -99,22 +99,22 @@ pub fn cos_pm(a : i64) -> i64 {
return sin_pm(a + 90000);
}

/// A slot's rectangle (centre x, y; label w, h; grown by half PAD) clears the circle (cx, cy, r).
/// A slot's rectangle (centre x, y; label w, h; grown by half ORB_PAD) clears the circle (cx, cy, r).
pub fn clears_circle(x : i64, y : i64, w : i64, h : i64, cx : i64, cy : i64, r : i64) -> bool {
const dx : i64 = max_i(abs_i(x - cx) - (w / 2 + PAD / 2), 0);
const dy : i64 = max_i(abs_i(y - cy) - (h / 2 + PAD / 2), 0);
const dx : i64 = max_i(abs_i(x - cx) - (w / 2 + ORB_PAD / 2), 0);
const dy : i64 = max_i(abs_i(y - cy) - (h / 2 + ORB_PAD / 2), 0);
return dx * dx + dy * dy >= r * r;
}

pub fn on_stage(x : i64, y : i64, w : i64, h : i64, sw : i64, sh : i64) -> bool {
const mx : i64 = w / 2 + PAD / 2;
const my : i64 = h / 2 + PAD / 2;
const mx : i64 = w / 2 + ORB_PAD / 2;
const my : i64 = h / 2 + ORB_PAD / 2;
return x >= mx and x <= sw - mx and y >= my and y <= sh - my;
}

/// Two labels are apart by the full PAD margin when they clear each other on x or on y.
/// Two labels are apart by the full ORB_PAD margin when they clear each other on x or on y.
pub fn apart(x1 : i64, y1 : i64, x2 : i64, y2 : i64, w : i64, h : i64) -> bool {
return abs_i(x1 - x2) >= w + PAD or abs_i(y1 - y2) >= h + PAD;
return abs_i(x1 - x2) >= w + ORB_PAD or abs_i(y1 - y2) >= h + ORB_PAD;
}

/// Fill hx, hy with up to n home slots walking the golden spiral outward from the logo; returns how many fit.
Expand Down Expand Up @@ -207,21 +207,21 @@ pub fn label_hit(px : i64, py : i64, x : i64, y : i64, w : i64, h : i64) -> bool
return abs_i(px - x) <= w / 2 and abs_i(py - y) <= h / 2;
}

/// Index of the label under the pointer, or NONE. The first match wins; labels never overlap, so it is the only one.
/// Index of the label under the pointer, or ORB_NONE. The first match wins; labels never overlap, so it is the only one.
pub fn hit_index(hx : []i64, hy : []i64, n : usize, clock : i64, px : i64, py : i64, w : i64, h : i64) -> i64 {
var i : usize = 0;
while (i < n) {
if (label_hit(px, py, item_x(hx[i], hy[i], i as i64, clock, px, py), item_y(hx[i], hy[i], i as i64, clock, px, py), w, h)) { return i as i64; }
i += 1;
}
return NONE;
return ORB_NONE;
}

/// The card a click opens: centred on the stage, at most 520 x 300.
pub fn card_w(sw : i64) -> i64 { return min_i(520, sw - 32); }
pub fn card_h(sh : i64) -> i64 { return min_i(300, sh - 32); }
pub fn card_x(sw : i64) -> i64 { return (sw - card_w(sw)) / 2; }
pub fn card_y(sh : i64) -> i64 { return (sh - card_h(sh)) / 2; }
pub fn orb_card_w(sw : i64) -> i64 { return min_i(520, sw - 32); }
pub fn orb_card_h(sh : i64) -> i64 { return min_i(300, sh - 32); }
pub fn orb_card_x(sw : i64) -> i64 { return (sw - orb_card_w(sw)) / 2; }
pub fn orb_card_y(sh : i64) -> i64 { return (sh - orb_card_h(sh)) / 2; }

test sin_cos_hit_the_quadrant_points {
assert abs_i(sin_pm(0)) <= 2;
Expand Down Expand Up @@ -342,7 +342,7 @@ test hit_finds_the_label_under_the_pointer_and_none_elsewhere {
var hx : [4]i64 = [100, 400, 700, 1000];
var hy : [4]i64 = [100, 100, 100, 100];
assert hit_index(hx, hy, 4, 0, 400, 100, LABEL_W, LABEL_H) == 1;
assert hit_index(hx, hy, 4, 0, 400, 300, LABEL_W, LABEL_H) == NONE;
assert hit_index(hx, hy, 4, 0, 400, 300, LABEL_W, LABEL_H) == ORB_NONE;
assert label_hit(100, 100, 100, 100, LABEL_W, LABEL_H);
assert !label_hit(100 + LABEL_W, 100, 100, 100, LABEL_W, LABEL_H);
}
Expand All @@ -355,8 +355,8 @@ test a_tiny_stage_keeps_what_fits_and_drops_the_rest {
}

test the_card_is_centred_and_fits_small_stages {
assert card_w(1440) == 520;
assert card_x(1440) == 460;
assert card_h(300) == 268;
assert card_y(900) == 300;
assert orb_card_w(1440) == 520;
assert orb_card_x(1440) == 460;
assert orb_card_h(300) == 268;
assert orb_card_y(900) == 300;
}
12 changes: 6 additions & 6 deletions specs/t27f/formula_table.t27
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pub const COMPLEXITY : [32]u32 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
/// Sector names in order of first appearance: gauge-coupling, electroweak, lepton, quark, ckm, pmns, cosmology, higgs, qcd.
pub const SECTOR_OF : [32]u32 = [0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 7, 4, 4, 4, 5, 5, 2, 8, 6, 6];

pub fn field_start(i : u32, f : u32) -> u32 { return FIELD_START[i * 4 + f]; }
pub fn field_len(i : u32, f : u32) -> u32 { return FIELD_LEN[i * 4 + f]; }
pub fn formula_field_start(i : u32, f : u32) -> u32 { return FIELD_START[i * 4 + f]; }
pub fn formula_field_len(i : u32, f : u32) -> u32 { return FIELD_LEN[i * 4 + f]; }
pub fn err_milli_pct(i : u32) -> i64 { return ERR_MILLI_PCT[i]; }
pub fn abs_err(i : u32) -> i64 { if ERR_MILLI_PCT[i] < 0 { return 0 - ERR_MILLI_PCT[i]; } return ERR_MILLI_PCT[i]; }

Expand All @@ -31,10 +31,10 @@ test every_row_is_verified_and_counted {
}

test fields_tile_the_text_without_gaps {
assert field_start(0, 0) == 0;
assert field_start(31, 3) + field_len(31, 3) == 1949;
assert field_start(0, 1) == field_start(0, 0) + field_len(0, 0);
assert field_len(0, 0) > 0;
assert formula_field_start(0, 0) == 0;
assert formula_field_start(31, 3) + formula_field_len(31, 3) == 1949;
assert formula_field_start(0, 1) == formula_field_start(0, 0) + formula_field_len(0, 0);
assert formula_field_len(0, 0) > 0;
}

test errors_are_small_and_signed {
Expand Down
16 changes: 13 additions & 3 deletions specs/t27os/agent_parts.t27
Original file line number Diff line number Diff line change
Expand Up @@ -1020,13 +1020,17 @@ pub const PAGE_NONE : u32 = 0;
pub const PAGE_BENCH : u32 = 1;
pub const PAGE_KANBAN : u32 = 2;
pub const PAGE_QUEEN : u32 = 3;
pub const PAGE_KINDS : u32 = 4;
pub const PAGE_HIVE : u32 = 4;
pub const PAGE_KINDS : u32 = 5;
pub const PERIOD_BENCH : u32 = 10;
pub const PERIOD_KANBAN : u32 = 60;
pub const PERIOD_QUEEN : u32 = 60;
/// HIVE (H, the devices page, specs/t27os/devices.t27): its feed is DV_PERIOD_S there; the same 60 s here.
pub const PERIOD_HIVE : u32 = 60;

pub fn page_kind(l: u32) -> u32 {
if (l == 2) { return PAGE_BENCH; }
if (l == 8) { return PAGE_HIVE; }
if (l == 11) { return PAGE_KANBAN; }
if (l == 17) { return PAGE_QUEEN; }
return PAGE_NONE;
Expand All @@ -1037,6 +1041,7 @@ pub fn page_period(kind: u32) -> u32 {
if (kind == PAGE_BENCH) { return PERIOD_BENCH; }
if (kind == PAGE_KANBAN) { return PERIOD_KANBAN; }
if (kind == PAGE_QUEEN) { return PERIOD_QUEEN; }
if (kind == PAGE_HIVE) { return PERIOD_HIVE; }
return 0;
}

Expand All @@ -1047,7 +1052,9 @@ pub fn page_feed_due(kind: u32, open: bool, now: u64, last: u64) -> bool {
return now - last >= (page_period(kind) as u64);
}

test the_three_built_pages_are_the_tools_b_k_and_q {
test the_four_built_pages_are_the_tools_b_h_k_and_q {
assert page_kind(8) == PAGE_HIVE;
assert page_of_letter(8) == "HIVE";
assert page_kind(2) == PAGE_BENCH;
assert page_kind(11) == PAGE_KANBAN;
assert page_kind(17) == PAGE_QUEEN;
Expand All @@ -1066,7 +1073,7 @@ test every_other_letter_keeps_the_dashboard {
if (page_kind(l) != PAGE_NONE) { pages = pages + 1; }
l = l + 1;
}
assert pages == 3;
assert pages == 4;
assert page_kind(0) == PAGE_NONE;
assert page_kind(28) == PAGE_NONE;
assert page_kind(3) == PAGE_NONE;
Expand All @@ -1077,6 +1084,9 @@ test the_feeds_run_at_their_cadence_and_only_while_the_page_is_open {
assert page_period(PAGE_KANBAN) == 60;
assert page_period(PAGE_QUEEN) == 60;
assert page_period(PAGE_NONE) == 0;
assert page_period(PAGE_HIVE) == 60;
assert page_feed_due(PAGE_HIVE, true, 1060, 1000);
assert page_feed_due(PAGE_HIVE, false, 1060, 1000) == false;
assert page_feed_due(PAGE_BENCH, true, 1000, 0);
assert page_feed_due(PAGE_BENCH, true, 1009, 1000) == false;
assert page_feed_due(PAGE_BENCH, true, 1010, 1000);
Expand Down
Loading
Loading