Skip to content

repo: move the Psi wire encoding out of the spec and beside its codec - #6308

Merged
Smotto merged 1 commit into
mainfrom
claude/project-thread-k253j2
Nov 27, 2026
Merged

Smotto merged 1 commit into
mainfrom
claude/project-thread-k253j2

Conversation

@Smotto

@Smotto Smotto commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Requested by Jarod · project thread

The Psi wire encoding page described the compiler's file format but lived in
wiki/spec/, where only the owners may edit. Each codec change left it stale
and turned into an owner question. Jarod ruled that the specification is the
truth for the language and that compiler detail is separate, so the page now
sits beside the codec that implements it and agents keep it current.

The page moves unchanged from wiki/spec/terminal-psi/encoding.md to
source-rust/subsystems/compiler/psi/artifact/wire/encoding.md. The tag-table
test reads it from the crate directory. Every link and path citation in active
code, READMEs, drafts and the archive now points at the new place.

Three stale parts of the page are fixed against the codec:

  • The proposition table gains tag 24, IsMere, which the decoder accepts.
    Without the row every_marked_tag_table_matches_its_decoder failed on main.
  • Marker 300 is described: a theorem contract ends with its own proof
    parameters and a theorem application with the proofs it gives them. The
    contract, hypothesis and application rows match theorem_wire in
    module_wire.rs.
  • The envelope table names semantic marker 300, not 293.

Specification text changes only where it linked to the page. Five pages have
their links repointed: build/optimizations.md and, under terminal-psi/,
product.md, calls_and_outcomes.md, fact_validity.md and
dynamic_dispatch.md.

Owner question 4, which asked permission to make the marker 300 edits, is
resolved by the move. Its slot now records the one thing the move leaves open:
the page also states some reader checks and trust rules that no specification
page restates, and they share sentences with the layout, so an agent could not
leave them behind without writing new specification text. The entry lists them
and recommends leaving them with the codec.

AGENTS.md and the Psi README now say where the page lives and that a codec
change updates it in the same PR.

Validation: mbx test -p terminal-wire --lib spec_tag_tables passes both tests.
mbx xtask check-rules, mbx xtask fmt --check and mbx xtask check-boundary
are clean against origin/main at badf8d1.

Agent: Claude Code | Model: unavailable | Effort: medium | Tokens: 3.19M in (3.06M cached), 21.5k out | Steps: 22 | Time: 14m22s | Steers: 0


Generated by Claude Code

The Psi wire encoding page described the compiler's file format but lived in
`wiki/spec/`, where only the owners may edit. Each codec change left it stale
and turned into an owner question. Jarod ruled that the specification is the
truth for the language and that compiler detail is separate, so the page now
sits beside the codec that implements it and agents keep it current.

The page moves unchanged from `wiki/spec/terminal-psi/encoding.md` to
`source-rust/subsystems/compiler/psi/artifact/wire/encoding.md`. The tag-table
test reads it from the crate directory. Every link and path citation in active
code, READMEs, drafts and the archive now points at the new place.

Three stale parts of the page are fixed against the codec:

- The proposition table gains tag 24, `IsMere`, which the decoder accepts.
  Without the row `every_marked_tag_table_matches_its_decoder` failed on `main`.
- Marker 300 is described: a theorem contract ends with its own proof
  parameters and a theorem application with the proofs it gives them. The
  contract, hypothesis and application rows match `theorem_wire` in
  `module_wire.rs`.
- The envelope table names semantic marker 300, not 293.

Specification text changes only where it linked to the page. Five pages have
their links repointed: `build/optimizations.md` and, under `terminal-psi/`,
`product.md`, `calls_and_outcomes.md`, `fact_validity.md` and
`dynamic_dispatch.md`.

Owner question 4, which asked permission to make the marker 300 edits, is
resolved by the move. Its slot now records the one thing the move leaves open:
the page also states some reader checks and trust rules that no specification
page restates, and they share sentences with the layout, so an agent could not
leave them behind without writing new specification text. The entry lists them
and recommends leaving them with the codec.

`AGENTS.md` and the Psi README now say where the page lives and that a codec
change updates it in the same PR.

Validation: `mbx test -p terminal-wire --lib spec_tag_tables` passes both tests.
`mbx xtask check-rules`, `mbx xtask fmt --check` and `mbx xtask check-boundary`
are clean against `origin/main` at badf8d1.

Agent: Claude Code | Model: unavailable | Effort: medium | Tokens: 3.19M in (3.06M cached), 21.5k out | Steps: 22 | Time: 14m22s | Steers: 0
@Smotto Smotto self-assigned this Nov 27, 2026
@Smotto
Smotto merged commit 56a22a5 into main Nov 27, 2026
1 check passed
@Smotto
Smotto deleted the claude/project-thread-k253j2 branch November 27, 2026 02:25
Smotto added a commit that referenced this pull request Nov 27, 2026
…ion 6 (#6315)

<!-- claude-projects-attribution: {"github_login":"Smotto"} -->
_Requested by **Jarod** · [project
thread](https://claude.ai/code/project/chan_016sYCuiAKSBqBrH3DwXxBdZ?thread=cmsg_016sYCuiAKSBqBrH3DwXxBdZFQ9gFQwYPimfsMykLuBmgB)_

Two small cleanups on `main`:

- **Interpreter Clippy.** `mbx clippy -p terminal-interpreter
--all-targets -- -D warnings` refused the operation loop in
`instructions/execution.rs` under `clippy::while_let_loop`. The loop's
body began with a `let ... else { break; }`. It is now a `while let`
over the same expression with the same body, so its behavior is
unchanged.
- **Owner question 6 withdrawn.** It asked for the `IsMere` proposition
tag 24 row. #6308 moved the encoding page to
`source-rust/subsystems/compiler/psi/artifact/wire/encoding.md` and
added that row, so the question no longer needs an answer. It was the
last entry, so no other question's number changes.

Gate: RC-REPOSITORY | Clippy clean on the interpreter; answered owner
question removed.
Spec: none | a lint-only rewrite and an owner-queue cleanup change no
specified behavior
Proof: `mbx clippy -p terminal-interpreter --all-targets --no-deps -- -D
warnings`, `mbx test -p terminal-interpreter` and `mbx xtask fmt --check
--base origin/main` | Clippy now passes; before the change it failed
with `clippy::while_let_loop` at `execution.rs:3633`. All 296
interpreter tests pass. fmt is clean.

Agent: Claude Code | Model: unavailable | Effort: medium | Tokens:
16.70M in (16.65M cached), 27.5k out | Steps: 66 | Time: 24m52s |
Steers: 0


---
_Generated by [Claude Code](https://claude.ai/code)_

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants