Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ a spec sentence inaccurate, don't make the change. Record the sentence, the
proposed text and the reason in [OWNER_QUESTIONS.md](OWNER_QUESTIONS.md), and keep
building to the current text.

The Psi wire encoding (numeric tags, field layouts and format markers) is the
compiler's file format, not specification. It lives beside the codec in
[encoding.md](source-rust/subsystems/compiler/psi/artifact/wire/encoding.md).
Update it in the same PR as the codec change it describes; its tag tables are
tested against the decoder by `mbx test -p terminal-wire --lib spec_tag_tables`.

## Bootstrap mandate

For bootstrap construction work, [bootstrap/MINIMIZATION.md](bootstrap/MINIMIZATION.md)
Expand Down
78 changes: 33 additions & 45 deletions OWNER_QUESTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,51 +159,39 @@ hold. Alternatively, remove these sections from the package-review spec and
the evidence schema now, and delete the decoders and the vocabulary together.
Should package review report these sections?

<a id="theorem-contract-proof-parameters-encoding"></a>
### 4. May the encoding spec describe a theorem contract's own proof parameters?

A logical contract may take a proof parameter in its own header
([logical hypotheses](wiki/spec/proofs/mathematical_bindings.md#logical-hypotheses-and-machine-use):
"If the contract itself takes a proof parameter, that parameter belongs to the
contract's own header. The outer caller supplies one proof of the whole
contract."). The compiler now carries this as Psi format marker 300, so these
sentences of [logical theorem parameters](wiki/spec/terminal-psi/encoding.md#logical-theorem-parameters)
no longer describe the bytes:

- "| theorem contract | counted scalar formal declarations + counted requires
propositions + counted ensures propositions |"
- "| theorem application | owner machine id + edge id + successor block id +
proof source + counted fixed scalar subjects + counted premise obligation ids |"
- The marker paragraph names 299 as the latest marker.

Proposed text. Add before the marker 299 paragraph: "Marker 300 ends each
theorem contract with its counted proof parameters, as in
`machine<Inner: NonzeroIsPositive>(n: u8)`, and each theorem application with
the counted proofs it gives them, as in `Step::<inner>(n)`. Readers reject
earlier markers before reading the payload, so a saved program from marker 299
or earlier must be rebuilt." Replace the contract row with "| theorem contract
| theorem hypothesis + counted theorem hypotheses |" and "| theorem hypothesis |
counted scalar formal declarations + counted requires propositions + counted
ensures propositions |". End the application row with "+ counted theorem
instantiations". Add after the instantiation paragraph: "A theorem contract's
hypotheses are its own proof parameters, in its header order; each is a
contract with none of its own. Its complete type binds them after its subjects
and before its premises: `Π subjects. Π hypotheses. Π premises. conclusion`.
Each hypothesis's type arrives with the declarations it names, appended after
the subjects', so the same contract always has the same type. A supply for such
a parameter names a machine whose own proof formals have exactly those
contracts, in order, and carries no instantiation; its derivations are
unchanged. An application of such a parameter carries one instantiation for
each hypothesis, checked as a supply's instantiation is against that
hypothesis. Every other application carries none."

The marker 299 paragraph and the theorem supply and instantiation rows were
added by an agent in #6291, which merged half an hour after the ruling that
only owners edit `wiki/spec/`. Keep or rewrite them as you see fit.

**Recommend adopting the proposed text.** Psi encoding design is delegated,
and the spec page is the only description a separate reader has of these rows.
Should the encoding spec describe them this way?
<a id="psi-receiving-rules-outside-spec"></a>
### 4. Should the specification restate the Psi receiving rules that moved with the wire encoding?

The Psi wire encoding moved out of `wiki/spec/` on Jarod's word that the
compiler's file format is not language specification. It now sits beside the
codec as [encoding.md](source-rust/subsystems/compiler/psi/artifact/wire/encoding.md),
and agents keep it current with the code. The page is mostly tags and field
layouts, but some paragraphs state what a reader must check or what a row
grants, and no page in `wiki/spec/` restates them:

- [Scalar completion prerequisites](source-rust/subsystems/compiler/psi/artifact/wire/encoding.md#scalar-completion-prerequisites)
and the return-origin paragraphs after the origin table. [Scalar qualifications](wiki/spec/terminal-psi/calls_and_outcomes.md#scalar-qualifications)
summarizes them and links to this page for the rest.
- The prerequisite and completed-result roles under
[retained scalar conditions](source-rust/subsystems/compiler/psi/artifact/wire/encoding.md#retained-scalar-conditions-and-application-scope).
- [Retained access custody](source-rust/subsystems/compiler/psi/artifact/wire/encoding.md#retained-access-custody),
[installation and semantic-code attribution](source-rust/subsystems/compiler/psi/artifact/wire/encoding.md#installation-and-semantic-code-attribution)
and [register event service authority](source-rust/subsystems/compiler/psi/artifact/wire/encoding.md#register-event-service-authority).

The layout and the rules share sentences, so an agent could not leave the rules
behind without writing new specification text. The same change repointed the
links to this page in five specification pages
(`build/optimizations.md` and `terminal-psi/` `product.md`,
`calls_and_outcomes.md`, `fact_validity.md`, `dynamic_dispatch.md`) and changed
no other specification text.

**Recommend leaving them where they are.** They say how a reader validates
rows of the compiler's own format, and [changes to Psi](source-rust/subsystems/compiler/psi/README.md#changes-to-psi)
already requires a codec change to keep trust guarantees intact and to bring
an unresolved trust decision here. Alternatively, an owner restates the ones
that should bind every implementation in `wiki/spec/terminal-psi/`, and agents
then cut the copies from the encoding page.
Should the specification own any of these rules?

<a id="bundle-evidence-field-type"></a>
### 5. Which field type makes a record field mathematical evidence rather than a callable selection?
Expand Down
2 changes: 1 addition & 1 deletion _recycling/omega-rust-v2/PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ The first checkpoint used a pair of same-typed owned fields. Moving one field mu

**Suspension evidence.** For two incoming byte views, the prepared call’s operand identifies the selected formal and its suspension acknowledgement. Changing that operand from `left` to `right` changes which loan the incomplete callee holds. The continuation reads the other view. The Psi-only reader rejects an exchange of the two descriptor identities even when their types, access modes and row count agree. Before a branch selects between two views, a suspending call retains both possible inputs and the selector needed on completion. After the join, the selected descriptor leads back through the actual arrival. The Psi reader detects swapped branch operands. When an arm supplies a shared view returned by a completed local call, the defining call, its selected machine’s normal return and the ordered actuals trace the view back to its input. Nested calls, terminal forwarding and locally supplied members use those same records. For an elided shared-view boundary result with a single shared-view input and otherwise primitive scalar inputs, the applied requirement identifies its input lifetime anchor. The descriptor retains the boundary completion, not a guessed alias of the actual. Other boundary result frontiers still stop at the crossing. [Returned views](layers/05_prepared-trees-to-terminal-psi/tests/returned_view.rs) · [Prepared calls and nested forwarding](layers/05_prepared-trees-to-terminal-psi/tests/returned_view_inputs.rs) [Branch-join consumer](layers/05_prepared-trees-to-terminal-psi/tests/joined_loans.rs) · [Nested joins and terminal calls](layers/05_prepared-trees-to-terminal-psi/tests/joined_loan_inputs.rs) · [Prepared operand and Psi tests](layers/05_prepared-trees-to-terminal-psi/tests/parked_byte_views.rs) · [Ordinary and terminal calls](layers/05_prepared-trees-to-terminal-psi/tests/suspension.rs)

**Coverage before lock.** These seven groups organize implementation. Before sign-off, reconcile individual source forms and typed obligations against the governing spec and the L5 operation, predicate and terminator variants. Include element views and bounds, access policies and storage custody, finite callable families, proof-only recursion, float meaning and integer goals, external observations, and operation identities used for work accounting. For each rule record its spec section, producing fact, emitted record and accept/reject test. If an earlier stage owns a refusal, record the diagnostic there and test the positive handoff at L5. If a valid construct still reaches an unsupported lowering path, keep its rule open. The encoding inventory helps find omitted semantic records. Artifact serialization, proof verdicts, optimization, installation and native realization have their own owners. [Psi product](../wiki/spec/terminal-psi/product.md) · [Semantic rows](../wiki/spec/terminal-psi/encoding.md) · [Integer goals](../wiki/spec/terminal-psi/integer_certificates.md) · [Observations](../wiki/spec/terminal-psi/observations.md) · [Logical work](../wiki/spec/resources/logical_work.md)
**Coverage before lock.** These seven groups organize implementation. Before sign-off, reconcile individual source forms and typed obligations against the governing spec and the L5 operation, predicate and terminator variants. Include element views and bounds, access policies and storage custody, finite callable families, proof-only recursion, float meaning and integer goals, external observations, and operation identities used for work accounting. For each rule record its spec section, producing fact, emitted record and accept/reject test. If an earlier stage owns a refusal, record the diagnostic there and test the positive handoff at L5. If a valid construct still reaches an unsupported lowering path, keep its rule open. The encoding inventory helps find omitted semantic records. Artifact serialization, proof verdicts, optimization, installation and native realization have their own owners. [Psi product](../wiki/spec/terminal-psi/product.md) · [Semantic rows](../source-rust/subsystems/compiler/psi/artifact/wire/encoding.md) · [Integer goals](../wiki/spec/terminal-psi/integer_certificates.md) · [Observations](../wiki/spec/terminal-psi/observations.md) · [Logical work](../wiki/spec/resources/logical_work.md)

**Sign-off run.** For each contested handoff, inspect the product after dropping the prepared trees. Use a source twin to catch a legal but wrong choice, such as selecting a same-typed sibling. Use an independently malformed product or an exact diagnostic to test a refusal at its owning layer. Extend the existing reachable-block and unique-operation invariant over new successor forms. Run the affected producer tests, the complete lowering crate, the published corpus, the dependency check and all-target Clippy through `mbx`. Record the measured L5 suite time and unresolved behavior in the layer table. Jarod signs off after the rule-level review. [Current invariant](layers/05_prepared-trees-to-terminal-psi/tests/support/control_flow.rs) · [Sign-off criteria](#what-solid-means)

Expand Down
Loading
Loading