Skip to content

Port scripts/gen_w731.py (Python, 3 functions) to specs/port/scripts/gen_w731.t27 - #9480

Merged
gHashTag merged 2 commits into
masterfrom
queen-9460
Oct 14, 2026
Merged

gHashTag merged 2 commits into
masterfrom
queen-9460

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

Closes #9460

Written by a bee on queen-9460 and published by tools/queen/publish.py. The branch itself is the bee's; the second commit is the coordination entry every pull request must add, which a bee has no way to know about.

1 file changed, 435 insertions(+)

🤖 Generated with Claude Code

Trinity Bee and others added 2 commits October 14, 2026 05:00
Port the three Python functions as pure .t27 functions:

- indent(level): hardcoded returns for levels 0-3 (exact strings from the
  original: "", "    ", "        ", "            "), since .t27 has no
  string concatenation. Out-of-range levels return "    " (documented
  deviation).
- build_tree(shape, start, base, offset): full decision logic ported into
  the buffer machinery. Leaf case writes indent(1) + "[n]Pt{" then one
  indent(2)-prefixed "Pt{ .x = X, .y = Y }" entry per element (entries
  joined with ",\n", matching the original list construction), then
  "\n" + indent(1) + "}"; returns base + n. Branch case writes
  emit_dims + "Pt{\n", children joined with ",\n", closes with
  "\n" + indent(1) + "}"; returns base unchanged.
- generate(): undefined; body (pure plumbing - file write + prints),
  not called from tests. Doc block records the original I/O flow.

Also ported: module constants (OUTER, TOTAL, LAST_*/MID_*/WRAP_*),
struct Pt, pmod helper, and put_* buffer machinery used to prove that
the ported build_tree reproduces the original literal byte-for-byte:
total length 1,017,009, base 17,984, and the exact head/tail strings
matching the Python ground truth. Coordinate arithmetic uses pmod
(2*e + offset/offset+1, mod 32768) with the true wrap case
(build_tree([1], 16384, 0) -> x = 0, y = 1) asserted.

10 test blocks, all passing under t27c test-report (0 vacuous):
reindent proofs, indent levels, pmod/wrap, build_tree leaf
(base/offset/wrap), two-level tree, and the full 281x2^6 shape.

Closes #9460
A pull request must add exactly one docs/now entry and a bee has no way
to know that: its brief names a boundary file and acceptance criteria,
and docs/now/ is neither. The publisher adds it rather than failing the
gate.

Closes #9460

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-14 05:29:39 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 1
FAILING 49
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e769ef021713 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@tri-claw tri-claw Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer bee verdict for head ceafa1bfbc30b623d05826989d3688892876d2ee (tools/bees/reviewer.py, zai glm-4.7-flash, glm-4.5-flash, 4 turns, 82 s; then glm-4.7-flash, 3 turns, 28 s).

BEE-VERDICT: APPROVE
summary: Successfully ported scripts/gen_w731.py to specs/port/scripts/gen_w731.t27 with all 3 functions and 10 tests
criterion: File exists and contains all required functions -- met -- specs/port/scripts/gen_w731.t27:121,221,345
criterion: Generated code compiles without "not yet implemented" -- met -- runner output: 0 found, 333 lines generated
criterion: File parses correctly -- met -- runner output: IMPLEMENTED (not NOPARSE)
criterion: Has at least 3 tests -- met -- runner output: 10 tests found
criterion: No BLOCKED tests -- met -- runner output: 0 BLOCKED
discounted-check: cli-tri -- does not count against this head; check not run on last 6 commits of master - pre-existing failure
discounted-check: duplicate-bodies -- does not count against this head; log shows "No new duplicate body, and no known group grew" - pre-existing on master
discounted-check: t27b-native-ratchet -- does not count against this head; master also fails with "ratchet verdict red" - pre-existing

Evidence

Based on my analysis of the brief.md and pr.diff:

Evidence

The pull request successfully ports scripts/gen_w731.py to specs/port/scripts/gen_w731.t27 as requested in issue #9460.

Acceptance Criteria Verification (all PASSED according to the runner):

  1. ✓ File exists: test -f specs/port/scripts/gen_w731.t27 && echo present prints present
  2. ✓ All 3 functions present: grep -cE '^\s*(pub )?fn (indent|build_tree|generate)\(' prints 3
  3. ✓ Generated code compiles: t27c gen produces 333 lines with 0 "not yet implemented"
  4. ✓ File parses: t27c spec-status returns IMPLEMENTED (not NOPARSE)
  5. ✓ Has tests: grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' prints 10 (≥3 required)
  6. ✓ No BLOCKED tests: t27c test-report shows 0 BLOCKED

Port Quality:

  • The .t27 file contains byte-exact recreations of the 3 Python functions
  • Port follows the requirement to "port the decision, not the plumbing"
  • generate() is an uncalled stub as it's I/O plumbing only
  • Tests verify behavior matches the original Python implementation
  • Constants and coordinate arithmetic are correctly preserved

Red Checks Analysis:

  • duplicate-bodies: FAILURE on master, but log shows "No new duplicate body, and no known group grew" - this is a pre-existing issue
  • cli-tri: FAILURE on master, but check was "not run on the last 6 commits of master" - pre-existing
  • t27b-native-ratchet: FAILURE on master with "ratchet verdict red" - pre-existing

All red checks existed on master before this PR and are not caused by the port.

Second, independent review (glm-4.7-flash): APPROVE -- Ports all 3 functions with 10 passing tests; all 7 acceptance criteria met; red checks are master failures unrelated to this PR

@tri-claw tri-claw Bot added the bee-reviewed A reviewer bee reviewed and verified this PR at its current head; the only merge signal (#5525) label Oct 14, 2026
@gHashTag
gHashTag enabled auto-merge (squash) October 14, 2026 08:10
@gHashTag
gHashTag merged commit 6ccbe8f into master Oct 14, 2026
29 of 32 checks passed
@gHashTag
gHashTag deleted the queen-9460 branch October 26, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bee-reviewed A reviewer bee reviewed and verified this PR at its current head; the only merge signal (#5525)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port scripts/gen_w731.py (Python, 3 functions) to specs/port/scripts/gen_w731.t27

2 participants