Repository navigation
spec(port): port specs/port/trios-railway/crates/trios-igla-race/src/sampler.t27 (Closes #9664) - #9832
Conversation
…sampler.t27 (Closes gHashTag#9664) Port gHashTag/trios-railway:crates/trios-igla-race/src/sampler.rs (at 385c2143ef46, 14 lines) as specs/port/trios-railway/crates/ trios-igla-race/src/sampler.t27 - Roadmap Stage 6, goal gHashTag#4548, target t27c gen-rust. The config sampler'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 port uses for its own unit: 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 sampler carries no state, 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))
|
@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 #9664 port — What is verified:
CI (head ecd6f7f): required trio green — The 3 reds are the base-red trio, not this change: After the merge I will: verify the spec file live on the merge SHA, confirm #9664 auto-closed, and file the 14-step report. Dmitrii Fedorov (@dmitrii-f-t27) |
Summary
Port
gHashTag/trios-railway:crates/trios-igla-race/src/sampler.rs(at385c2143ef46, 14 lines) asspecs/port/trios-railway/crates/trios-igla-race/src/sampler.t27— Roadmap Stage 6 (goal #4548), target t27c gen-rust. Closes #9664.The original is the config sampler's zero-sized unit: a struct with no fields,
newbuilding it, andDefaultdelegating tonew.Per the issue's rule ("Port the decision, not the plumbing"), both listed functions are ported under their names as tested pure functions:
ConfigSampler_new— the constructor builds the unit (original lines 3-8);ConfigSampler_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);sampler_field_count— the countable design decision: the sampler carries no state — no held configuration, no pending sample, no RNG handle — 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 (ConfigSampler_new|ConfigSampler_default)\(': 2.grep -cE '^\s*test\s+(["|[A-Za-z_])': 2 (≥ 2).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)