Repository navigation
specs/base/types.t27: compile again at 4 trits per byte, seal v2 (Closes #8303) - #8177
Merged
Merged
Conversation
Owner decision 2026-10-09: TRITS_PER_BYTE is 4 (2 bits per trit in a u8). - pack_position_bounds asserted TRITS_PER_BYTE == 8, so the module never compiled and every importer had no verdict (about 405 specs under t27c frontier, #8095). - test_pack_trit_all_positions walked positions 0..8; now 0..4. - ternary_word_unpack returned a slice of a local array and indexed the trit inside its byte with i instead of i % 4; it now writes into the caller's buffer and returns the count. No other spec calls it. - array literals the codegen lowers to anonymous tuples are written as typed arrays filled in a loop. test-report: BLOCKED -> 40 pass, 27 fail, 0 vacuous. The 27 failures are the truth tables of trit_and/or/xor and the packed_trit_* helpers, whose tests and bodies disagree; that is the next decision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
Merged
Merged
Contributor
This was referenced Oct 9, 2026
Owner decision 2026-10-09: balanced ternary logic. - trit_and/or are Kleene min/max; trit_xor is -(a * b); XNOR negates it. - pack_trit: the codegen drops the parens of ~(x << n) (#6549), so the shifted field is named first. This was the root of most failures. - packed_trit_shift_right moves i to i - shift, as rotate_right does. - ternary_word_negate starts from a zeroed word, not undefined bytes. - tests written for 8 trits per byte now use positions 0..3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
Contributor
PR DashboardGenerated at: 2026-10-09 13:30:56 UTC
Summary
Seal Status
|
This was referenced Oct 9, 2026
Merged
Merged
Merged
…8303) Takes over #8177, which had been an idle draft since 13:15Z: merges current master and reseals specs/base/types.t27 as v2 (66 of 66 tests pass, 0 vacuous). Its three seal files (BaseTypes, base_tritype-base, tritype-base) carry the same v2 record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
marked this pull request as ready for review
October 9, 2026 19:39
gHashTag
enabled auto-merge (squash)
October 9, 2026 19:39
Contributor
PR DashboardGenerated at: 2026-10-09 19:40:49 UTC
Summary
Seal Status
|
This was referenced Oct 9, 2026
This was referenced Oct 9, 2026
Closed
gHashTag
added a commit
that referenced
this pull request
Oct 9, 2026
…loses #8371) (#8372) After the hubs (#8177, #8209) every spec that imported them compiles again. t27c seal --save ran on the 1203 specs missing a v2 seal: - 31 were refused (failing tests); - of the 1172 written, only v2 seals with 0 failed tests and at least one test were kept; - blocked and zero-test seals were reverted (#8354). 727 specs remain, and each one's twin seal files carry the same record. t27c frontier on this branch: 1109 of 1743 reused (636 permille), up from 424 (243 permille) on master; closure 73, missing 520. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8303.
Taken over on 2026-10-09 (an idle draft since 13:15Z): merged current master, resealed
specs/base/types.t27as seal v2 (66 of 66, 0 vacuous), and all three seal files naming it carry the same v2 record. That clears the stale-seal failures in coverage and spec-guards.Refs #4817
Refs #8095
Owner decision 2026-10-09: the packed format is 4 trits per byte (2 bits per trit in a u8).
specs/base/types.t27did not compile:pack_position_boundsstill assertedTRITS_PER_BYTE == 8while the constant is 4. Nearly every spec imports it, so undert27c frontier(#8110) about 405 specs could never be REUSE.This PR makes the module compile and fixes the bugs that compiling exposed:
test_pack_trit_all_positionsnow use positions 0..3;ternary_word_unpackreturned a slice of a local array and indexed the trit within its byte withiinstead ofi % 4. It now writes into the caller's buffer and returns the count. No other spec calls it;[_]Trit{...}becomes.{...}) are written as typed arrays filled in a loop. That codegen bug deserves its own issue.t27c test-report: BLOCKED -> 40 pass, 27 fail, 0 vacuous.Draft, because 27 tests still fail. Their tables and their bodies disagree:
trit_andandtrit_or: the tests expect Kleene min and max, but the bodies are not.trit_xor: neither side is a standard function.packed_trit_*: the helpers have the same mismatch.Choosing which side is right is a semantics decision; it is not made here.
🤖 Generated with Claude Code