Skip to content

docs: M1.5 handoff for the port codegen defects - #74

Merged
pyrex41 merged 1 commit into
mainfrom
docs/m1-5-port-codegen-handoff
Jul 31, 2026
Merged

docs: M1.5 handoff for the port codegen defects#74
pyrex41 merged 1 commit into
mainfrom
docs/m1-5-port-codegen-handoff

Conversation

@pyrex41

@pyrex41 pyrex41 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Adds docs/status/m1-5-port-codegen-handoff.md, following the
m1-port-perf-handoff.md convention.

Documents the three pre-existing Shen port code-generation defects
surfaced while reviewing #71 (all fixed and merged: pyrex41/shen-lua#53,
pyrex41/shen-cl#12), and — the reason this is a document rather than a
commit message — the fact that their root cause is shared and still
unfixed
.

All four ports carry a byte-identical core.kl, and the same source
expands to the same 3457-node / depth-435 KL form on every one of them.
The kernel's pattern compiler re-derives the full hd/tl accessor
spine per pattern element; every port receives the same pathological KL
and they differ only in host tolerance. Both port fixes are coping
mechanisms in the backends.

Also records:

  • the shen-cl factoriser blowup (code grew 2^groups; a 33-clause
    dispatch function was fatal at 446s / 938MB) — not an urdr problem,
    any large dispatch table would have hit it
  • that shen/run/run.shen's 8092-byte header comment is what tripped
    shen-lua's reader, which makes this a live constraint on the
    repository's own house style
  • the urdr model-binding fail-open and its new stable code
  • the ADR 0007 corrections, including that verification item 2 became
    Met mid-review while item 5 remains a standalone debt
  • open items, notably that GitHub Actions is failing for billing on
    every repo, so make conformance must be run by hand before merges
  • two method notes: never pipe a gate run through head/tail (SIGPIPE
    truncation reads as a suite that stopped early), and never hand-write
    a .urdr-build-stamp

Docs-only. make fmt-check passes.

🤖 Generated with Claude Code

Reviewing PR #71 found one urdr fail-open and, separately, that
`make conformance` was already red. That led to three pre-existing
code-generation defects in the Shen ports -- two in shen-lua, two in
shen-cl -- none caused by #71, which was merely the first change deep
enough to trip them. All are fixed and merged (shen-lua#53,
shen-cl#12).

The part worth a document is what the fixes do NOT address: all four
ports carry a byte-identical core.kl, and the same source expands to
the same 3457-node, depth-435 KL form on every one of them. The
kernel's pattern compiler re-derives the full hd/tl spine per pattern
element, so every port receives the same pathological KL and they
differ only in host tolerance. Both port fixes are coping mechanisms;
the shared cause is still there and a deeper pattern will find it
again.

Records the shen-cl factoriser blowup separately because it is not an
urdr problem at all -- code grew 2^groups and a 33-clause dispatch
function was fatal, which any moderately large dispatch table would
have hit.

Also records the ADR 0007 corrections, the open debts (verification
item 5, the core.kl expansion, shen-lua's other reader productions),
and two method notes: never pipe a gate run through head/tail, and
never hand-write a build stamp.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pyrex41
pyrex41 merged commit 9889f28 into main Jul 31, 2026
0 of 2 checks passed
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.

1 participant