Skip to content

spec(port): port specs/port/trinity/src/tri/faculty_types.t27 (Closes #10005) - #10142

Closed
dmitrii-f-t27 wants to merge 1 commit into
gHashTag:masterfrom
dmitrii-f-t27:zcode-port-10005-faculty-types
Closed

dmitrii-f-t27 wants to merge 1 commit into
gHashTag:masterfrom
dmitrii-f-t27:zcode-port-10005-faculty-types

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor

Summary

Port gHashTag/trinity:src/tri/faculty_types.zig (at ee512359254b, ~170 lines) as specs/port/trinity/src/tri/faculty_types.t27 — Roadmap Stage 5 (goal #4547), target t27c gen-rust. Closes #10005.

The original holds the faculty board's shared types for the Trinity A2A dashboard; the one listed function is the snapshot's active-faculty count.

Per the issue's rule ("Port the decision, not the plumbing"), the one listed function is ported under the name the issue asks for — FacultySnapshot_activeFaculty (original line 123, the activeFaculty method) — as a pure function with 3 tests (6 runtime asserts, 0 vacuous, 100% function coverage):

  • the active faculty (original lines 123-129): the count of the six seats whose status is up.

Two honest notes, both also named in the commit and the report:

  • the original's FacultySnapshot carries agents: [6]AgentState — an array of structs this language's Verilog lowering does not implement (W469) — so the port's TrinityFacultySnapshot carries the six statuses as a scalar array of status codes (the up/down/stub/tbd enum as codes; the labels, colors and emoji are the caller's presentation);
  • the name FacultySnapshot is already defined by specs/tri/agent/faculty_board.t27, so a second definition would create a conflicted type name — the port's type is renamed TrinityFacultySnapshot; the function keeps the required name.

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: 1/1 tested (100%) — no transports in this port.
  • t27c test-report: 3 tests / 3 pass / 0 FAIL / 0 BLOCKED, 0 vacuous passes — all six up, none up (down/stub/tbd mixes), and three mixed-seat counts (3, 1, 5).
  • All four generators were run before the push: gen (56 lines, 0 'not yet implemented'), gen-rust, gen-c, gen-verilog.
  • grep -cE '^\s*(pub )?fn (FacultySnapshot_activeFaculty)\(': 1. grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])': 3 (≥ 1).
  • Boundary: git status --short — exactly this one file. The repo's lefthook pre-commit passed.
  • dupe_scan: the function name is unique across the corpus (checked before the commit); the bare scan reports zero error lines — no new duplicate group, none grew.

Dmitrii Fedorov (@dmitrii-f-t27)

…HashTag#10005)

Port gHashTag/trinity:src/tri/faculty_types.zig (at ee512359254b, ~170
lines) as specs/port/trinity/src/tri/faculty_types.t27 - Roadmap Stage
5, goal gHashTag#4547, target t27c gen-rust.

The one listed function is ported under the name the issue asks for,
FacultySnapshot_activeFaculty (original line 123, activeFaculty
method), and tested (3 tests, 3 pass, 0 vacuous, 6 runtime asserts,
100% function coverage): the active faculty is the count of the six
seats whose status is up. Two honest notes: the original's
FacultySnapshot carries agents: [6]AgentState - an array of structs
this language's Verilog lowering does not implement (W469) - so the
port's TrinityFacultySnapshot carries the six statuses as a scalar
array of status codes (the up/down/stub/tbd enum as codes, the labels
and colors are the caller's presentation); and the name FacultySnapshot
is already defined by specs/tri/agent/faculty_board.t27, so the port's
type is renamed TrinityFacultySnapshot - the function keeps the
required name. All four generators (gen, gen-rust, gen-c, gen-verilog)
emit this spec before the push.

Verified: parse OK, spec-status IMPLEMENTED, typecheck 0 errors,
coverage 1/1, test-report 3/3 pass, 0 BLOCKED, gen 56 lines with
0 'not yet implemented', boundary exactly this one file, dupe_scan:
the function name is unique, bare scan reports zero error lines.

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 only you can merge it.

Verification of this head (7b388bb, on current master — no extra merge needed):

  • Required CI trio green: validate, check-linked-issue, parse-ratchet; also Check L1 TRACEABILITY, duplicate-bodies and cli-tri green.
  • The t27b-native-run artifact of this head (commit 7b388bb, run 39077365235) row for specs/port/trinity/src/tri/faculty_types.t27: reference pass, t27b pass, tests 3, invariants 0, asserts 6, blockers [], detail empty, reference_disagree: [].
  • All four generators were run locally before the push (gen, gen-rust, gen-c, gen-verilog) — this spec emits cleanly everywhere.
  • Two honest notes: the original's agents: [6]AgentState is an array of structs the Verilog lowering does not implement (W469) — the port carries the six statuses as a scalar code array; and FacultySnapshot is already defined by specs/tri/agent/faculty_board.t27, so the port's type is renamed TrinityFacultySnapshot (the function keeps the required name FacultySnapshot_activeFaculty).
  • The only red checks are proven base-red on master WITHOUT this PR:
    • Corpus ratchet: 'Every conflicted type name has a written verdict' — docs/reports/type_conflicts_classified.json disagrees with the tree (UNJUDGED/STALE); the identical error fails on master itself. This port adds no conflicted name (the rename avoids the existing FacultySnapshot).
    • t27b-native-ratchet: the registration debt, red on master across this whole port series.

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

Dmitrii Fedorov (@dmitrii-f-t27)

@gHashTag

Copy link
Copy Markdown
Owner

Landed unchanged (as a merge commit) in #10174, together with ten other green ports, on top of the master fixes #10160/#10172. Closing this as superseded; the linked issue closes when #10174 merges.

@gHashTag gHashTag closed this Oct 18, 2026
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/trinity:src/tri/faculty_types.zig (Zig, 1 function) to specs/port/trinity/src/tri/faculty_types.t27

2 participants