Skip to content

spec(port): port specs/port/trios-railway/crates/trios-igla-race/src/race.t27 (Closes #9668) - #9835

Merged
gHashTag merged 1 commit into
gHashTag:masterfrom
dmitrii-f-t27:zcode-port-9668-race-coordinator
Oct 17, 2026
Merged

gHashTag merged 1 commit into
gHashTag:masterfrom
dmitrii-f-t27:zcode-port-9668-race-coordinator

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor

Summary

Port gHashTag/trios-railway:crates/trios-igla-race/src/race.rs (at 385c2143ef46, 14 lines) as specs/port/trios-railway/crates/trios-igla-race/src/race.t27 — Roadmap Stage 6 (goal #4548), target t27c gen-rust. Closes #9668.

The original is the race coordinator's zero-sized unit: a struct with no fields, new building it, and Default delegating to new.

Per the issue's rule ("Port the decision, not the plumbing"), both listed functions are ported under their names as tested pure functions:

  • RaceCoordinator_new — the constructor builds the unit (original lines 3-8);
  • RaceCoordinator_default — the default value delegates to the constructor, and the delegation is this port's body exactly as it is the original's (lines 10-14);
  • coordinator_field_count — the countable design decision: the coordinator carries no state — no trial table, no lane book, no worker handles; the trials live in Neon — so anything grown onto this struct would be hidden state. The tests assert the zero-field pin against both construction paths.

Verification (all run live from the worktree root, zig 0.16.0)

  • t27c parse: OK. t27c spec-status: IMPLEMENTED. t27c typecheck: 0 errors, 0 warnings.
  • t27c coverage: 3/3 tested (100%) — no transports in this port.
  • t27c test-report: 2 tests / 2 pass / 0 FAIL / 0 BLOCKED, 0 vacuous passes.
  • t27c gen | grep -c 'not yet implemented': 0; gen | wc -l: 38 (> 12).
  • grep -cE '^\s*(pub )?fn (RaceCoordinator_new|RaceCoordinator_default)\(': 2. grep -cE '^\s*test\s+(["|[A-Za-z_])': 2 (≥ 2).
  • Boundary: git status --short — exactly this one file. The repo's lefthook pre-commit passed.
  • dupe_scan: all 3 names unique across 2040 specs; the bare body scan adds no duplicate group (752 bodies / 221 groups on base, identical with this spec present).

Dmitrii Fedorov (@dmitrii-f-t27)

…race.t27 (Closes gHashTag#9668)

Port gHashTag/trios-railway:crates/trios-igla-race/src/race.rs (at
385c2143ef46, 14 lines) as specs/port/trios-railway/crates/
trios-igla-race/src/race.t27 - Roadmap Stage 6, goal gHashTag#4548, target
t27c gen-rust.

The race coordinator's zero-sized unit is ported as pure functions
and tested (2 tests, 2 pass, 0 vacuous, 100% function coverage), the
same shape the ASHA scheduler (gHashTag#9659) and config sampler (gHashTag#9664)
ports use for their own units: the constructor builds the unit, the
default delegates to the constructor (the delegation is this port's
body, as in the original), and the field-count pin asserts the
zero-field design - the coordinator carries no state, the trials
live in Neon, so anything grown onto it would be hidden state. No
transport exists in this port.

Verified: parse OK, spec-status IMPLEMENTED, typecheck 0 errors,
coverage 3/3, test-report 2/2 pass, 0 BLOCKED, gen 38 lines with 0
'not yet implemented', boundary exactly this one file, dupe_scan:
all 3 names unique across 2040 specs, bare body scan adds no
duplicate group (752/221 unchanged).

Dmitrii Fedorov ([@dmitrii-f-t27](https://github.com/dmitrii-f-t27))
@dmitrii-f-t27

Copy link
Copy Markdown
Contributor Author

@gHashTag Please merge this PR into master via the golden chain — rights on gHashTag/t27 are read-only for me (403), so the merge itself needs your action.

What this is: the #9668 port — crates/trios-igla-race/src/race.rs (gHashTag/trios-railway, at 385c2143ef46, 14 lines) re-authored as specs/port/trios-railway/crates/trios-igla-race/src/race.t27. One file, head 47e09efca, Closes #9668.

What is verified:

  • t27c parse OK, spec-status IMPLEMENTED, typecheck 0 errors / 0 warnings, coverage 3/3 (100%) — no transports, t27c test-report 2 tests / 2 pass / 0 FAIL / 0 BLOCKED, 0 vacuous.
  • gen → 38 lines, 0 not yet implemented; the 2 required names count exactly 2; 2 test blocks; boundary exactly the one file.
  • dupe_scan: all 3 names unique across 2040 specs; bare body scan adds no duplicate group (752/221 unchanged).
  • The t27b-native-run artifact of this head (commit 47e09ef, run 39003065111): race.t27 row — reference pass, t27b pass, tests 2, invariants 0, asserts 2, blockers [], detail empty, reference_disagree: [].

CI (head 47e09ef): required trio green — validate, check-linked-issue, parse-ratchet; 26 checks pass overall, incl. emit-bitexact, t27b-native-linux, t27b-native-macos.

The 3 reds are the base-red trio, not this change: cli-tri (the #3324 include_str!), duplicate-bodies (only the known base names), t27b-native-ratchet (the same verdict red the Queen's port PRs carry; this spec's own row is reference pass + t27b pass — the registration debt is the UNLISTED class).

After the merge I will: verify the spec file live on the merge SHA, confirm #9668 auto-closed, and file the 14-step report.

Dmitrii Fedorov (@dmitrii-f-t27)

@gHashTag
gHashTag merged commit 38ad270 into gHashTag:master Oct 17, 2026
26 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port gHashTag/trios-railway:crates/trios-igla-race/src/race.rs (Rust, 2 functions) to specs/port/trios-railway/crates/trios-igla-race/src/race.t27

2 participants