Skip to content

spec(port): port specs/port/trinity/src/vibeec/soul_collector.t27 (Closes #9719) - #10129

Closed
dmitrii-f-t27 wants to merge 1 commit into
gHashTag:masterfrom
dmitrii-f-t27:zcode-port-9719-soul-collector
Closed

dmitrii-f-t27 wants to merge 1 commit into
gHashTag:masterfrom
dmitrii-f-t27:zcode-port-9719-soul-collector

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor

Summary

Port gHashTag/trinity:src/vibeec/soul_collector.zig (at ee512359254b, 69 lines) as specs/port/trinity/src/vibeec/soul_collector.t27 — Roadmap Stage 5 (goal #4547), target t27c gen-rust. Closes #9719.

The original walks the project tree and gathers every sacred text into trinity_corpus.txt.

Per the issue's rule ("Port the decision, not the plumbing"), the one listed function is ported under its name as a pure function (no transports — the directory walk, the reads and the corpus writes are the callers' plumbing) with 5 tests (33 runtime asserts, 0 vacuous, 100% function coverage):

  • the suffix scan (original line 31-32's endsWith): byte-indexed, compares the path's last suffix.len bytes;
  • the marker scan (lines 35-37's indexOf != null): a sliding window across the path;
  • the sacred filter (line 39): a file enters the corpus exactly when it ends with .tri or .zig and mentions none of .git, zig-cache, temp_generated anywhere in its path — including the original's quirk that .gitignore.zig is profane too (its indexOf(".git") matches);
  • the 10 MB read cap (line 47): a file at most the cap in size is absorbed; a larger one fails the capped read and the walk continues without it (the original's catch |continue|);
  • main: the walk's per-file decision — the filter and the cap together decide ABSORBED or SKIPPED.

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: 5/5 tested (100%) — no transports in this port.
  • t27c test-report: 5 tests / 5 pass / 0 FAIL / 0 BLOCKED, 0 vacuous passes — the suffix scan on match/mismatch/shorter-than-suffix/empty cases, the marker scan including the .gitignore quirk and a mid-string needle, the filter on eight paths covering every exclusion and both extensions, the cap boundary at exactly 10485760 and one byte over, and the walk decision end-to-end.
  • All four generators were run before the push: gen (138 lines, 0 'not yet implemented'), gen-rust, gen-c, gen-verilog.
  • grep -cE '^\s*(pub )?fn (main)\(': 1. grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])': 5 (≥ 1).
  • Boundary: git status --short — exactly this one file. The repo's lefthook pre-commit passed.
  • dupe_scan: all 5 function names 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)

…oses gHashTag#9719)

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

The corpus builder's decisions are ported as pure functions and tested
(5 tests, 5 pass, 0 vacuous, 33 runtime asserts, 100% function
coverage): the suffix scan (endsWith, byte-indexed), the marker scan
(contains, sliding window), the sacred filter (a file enters the
corpus exactly when it ends with .tri or .zig and mentions none of
.git, zig-cache, temp_generated anywhere in its path - including the
original's quirk that .gitignore.zig is profane too, since indexOf
'.git' matches it), and the 10 MB read cap (a file at most the cap in
size is absorbed; a larger one fails the capped read and the walk
continues without it - the original's catch-continue). The directory
walk, the reads and the corpus writes are the caller's plumbing. 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 5/5, test-report 5/5 pass, 0 BLOCKED, gen 0 'not yet
implemented', boundary exactly this one file, dupe_scan: all 5
function names 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 (285b6bd, 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 285b6bd, run 39069710520) row for specs/port/trinity/src/vibeec/soul_collector.t27: reference pass, t27b pass, tests 5, invariants 0, asserts 33, 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.
  • The only red checks are proven base-red on master WITHOUT this PR:
    • Corpus ratchet: the failing step is '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 (workflow runs on 18c98cc and b655dce, and every PR of this series). This spec declares no struct or enum, so it cannot add a conflicted type name.
    • 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 #9719 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
dmitrii-f-t27 pushed a commit to dmitrii-f-t27/t27 that referenced this pull request 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/vibeec/soul_collector.zig (Zig, 1 function) to specs/port/trinity/src/vibeec/soul_collector.t27

2 participants