You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6839a6b
Browse filesBrowse the repository at this point in the historyBrowse files
feat(ownir): add WellFormedness, the seventh error category
Veto on filing two protocol rules under `shape`, and the reasoning
behind the veto is the part worth keeping.
`protocol can never fire` (no barriers with `exit_barriers: false`) and
`barrier == opens` were reported as `Shape` while the code comment
directly above them said "both are well-formedness, not shape". Every
value in such a record has the right type and a legal vocabulary; what
is broken is that the record cannot MEAN anything.
The justification given was that the taxonomy was already frozen at six.
That is backwards. The taxonomy was frozen by the FIRST census; this
mechanism was found by the SECOND — the same census that just proved a
category set settled early is a claim about the settling, not about the
contract. Filing a newly discovered mechanism under the nearest existing
name is the exact substitution this enum was built to stop, and it was
the substitution being made.
So: `OwnIrErrorKind::WellFormedness`, wire name `well_formedness`. Both
rules move to it. The enum's doc now states the set is closed by
measurement in BOTH directions — it cannot outgrow its evidence (no
`Reference` variant, nothing reaches it) and it is not frozen against
new evidence.
Ledger: 191 -> 193 controls. The two new ones are the acceptance twins
the category needs — `exit_barriers: false` WITH a barrier, and a
barrier that differs from `opens` — so the rejections are about meaning
rather than about the fields being present at all.
Four mutations, all caught, including the two that matter most here:
each rule reported as `Shape` while still rejecting. Category-only
mutations are the only thing that can tell a real taxonomy from a
decorative one.
Also, per review: 128 is now the ONLY normative depth number.
The measured abort points (~831/~846 for serialization, ~804/~851 for
`Drop`) are properties of one stack size, build profile and platform.
They are good forensics and they were creeping into doc comments as if
they were specification; they are out of the normative wording and the
PR keeps them as evidence.
And the guard's promise is stated precisely instead of absolutely. It
was "nothing this crate does can prevent that". Correctly: `to_value()`
and `validate()` refuse a too-deep value and RETURN rather than aborting
inside the serializer. They do not promise that any `Value` a caller
built is safe to hold — `serde_json::Value` has a recursive `Drop`.
Guaranteeing that would mean not representing facts as
`serde_json::Value`, a representation change and outside cp1.
Status, per the same review: cp1 is NOT complete and P-022 + the index
now say so. 0/0/0 currently means "over a set from which two known
Python-accept/Rust-reject families were removed" — coordinates beyond
Rust's integer range, and deep nesting. That is not the parity #259
asks for. Both close Python-first, before this checkpoint may be called
complete. #250 is corrected in the same logical change, via the API.
Refs #250, #259.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJF7MBi1ijU5m9cJVWgQsM
Copy file name to clipboardExpand all lines: docs/proposals/P-022-rust-core-migration.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ was #258 alone, which is satisfied. Per the checkpoints #259 itself defines:
53
53
54
54
|#259 checkpoint | Status | Evidence / what remains |
55
55
|---|---|---|
56
-
| 1 — typed OwnIR validation | **complete** | Two censuses, and the second is the point. The first froze 77 controls, closed twelve permissive documents and read 0/0/0 — then independent review found seven divergences the ledger could not express, because the same author wrote the ledger and the port and one gap in reading BR-D1 produced a matching gap in each (`_svc()` always supplied `lifetime`, so no control could omit it). The re-census is derived from `load()` and `obligations.py` line by line: **191 controls**, which opened a further **58** permissive documents and **9** category mismatches. Closing them was architectural, not incremental — the strict door is now a sequential validator over the raw document (`own-ir/src/strict.rs`) that reproduces BR-D1's interleaving of shape and semantics *per section, in declaration order*. `serde` is the typed constructor, no longer the arbiter, and a document it rejects after validation is reported as a hole in the validator and asserted against. The obligation **acceptance grammar** (`parse_protocol`/`parse_matcher`/`parse_events`/`parse_method`) is ported in `own-ir/src/protocol.rs`; protocol *analysis* is not, and is not part of what the door accepts. Final matrix 29/162 agreed, 0/0/0 across the three failure rows; 27 mutations each caught, five of them only by the validator-hole guard. **One measured divergence stays open and is deliberately not closed here:** Python integers are unbounded and every `line`/`column` field accepts values past 64 bits, so Rust is over-strict above `i64::MAX` across seven field families. The ledger pins the boundary where both agree; the range above it is a Python-first defensive limit on source coordinates (#259's own limits/defensive-parsing requirement), not a case for arbitrary-precision integers through the Rust core. #294 OD-2 remains a separate tolerant-door concern |
56
+
| 1 — typed OwnIR validation | **acceptance surface closed except two named families — not yet complete** | Two censuses. The first froze 77 controls, closed twelve permissive documents and read 0/0/0 — then review found seven divergences the ledger could not express, because the same author wrote the ledger and the port and one gap in reading BR-D1 produced a matching gap in each (`_svc()` always supplied `lifetime`, so no control could omit it). The re-census is derived from `load()` and `obligations.py` line by line: **193 controls**, which opened a further **58** permissive documents and **9** category mismatches. Closing them was architectural — the strict door is now a sequential validator over the raw document (`own-ir/src/strict.rs`) reproducing BR-D1's interleaving of shape and semantics *per section, in declaration order*; `serde` is the typed constructor, and a document it rejects after validation is reported as a hole in the validator and asserted against. The obligation **acceptance grammar** is ported (`own-ir/src/protocol.rs`); protocol *analysis* is not, and is not part of what the door accepts. Taxonomy is now **seven** categories: `WellFormedness` was added for the two protocol rules whose values are all correctly typed and whose records still cannot mean anything — a category set frozen by the first census is a claim about that census, not about the contract. Matrix 31/162, 0/0/0; 31 mutations each caught, five only by the validator-hole guard and two changing nothing but a category. **Why this is not yet complete:** two Python-accept/Rust-reject families are measured and deliberately excluded from the ledger — source coordinates beyond Rust's integer range, and sufficiently deep protocol/flow nesting. 0/0/0 therefore means "over a set from which two known divergence families were removed", which is not the parity #259 asks for. Both close in one **Python-first** defensive-limit change (signed-64 coordinates; one measured domain nesting limit, at-limit accept and limit+1 reject, written into the OwnIR contract). That lands first; this checkpoint is then rebased, gains boundary controls for both families, and is re-measured before it may be called complete. #294 OD-2 remains a separate tolerant-door concern |
| 3 — interprocedural MOS |**complete for the stage-1 domain**|`dump_summaries()` byte-identical to `python -m ownlang summaries` across **35**`*.summaries.json` goldens. Container-valued metadata is **outside** the declared scalar-metadata parity domain — a separate #294-class door decision, not a silent gap |
59
59
| 4 — analysis wiring |**not started**| the crate states its own boundary: "no diagnostics, no analysis" |
@@ -72,11 +72,13 @@ was #258 alone, which is satisfied. Per the checkpoints #259 itself defines:
72
72
| 7b | Rust `own-cli`: command/output/exit-code parity |#261| blocked — needs the production bridge and the output surfaces |
73
73
| 8 | Rust-default **cutover**, rollback gate, Python distribution removal |#262| blocked by #260/#261 and final parity |
74
74
75
-
**Preferred queue:**#259 remaining (cp4 → cp5) → #260/#269. One Python-first
76
-
side change is queued ahead of nothing and blocks nothing: a documented
77
-
defensive limit on source-coordinate integers, which closes the last measured
78
-
cp1 divergence (Python accepts coordinates past 64 bits; Rust does not) without
79
-
pushing arbitrary-precision integers through the Rust core.
|[P-022](P-022-rust-core-migration.md)| Rust core migration: crate DAG, patterns, prior art, differential oracle (Python = golden) | in execution — steps 0–4 built (#214/#249); step 5a done (full diagnostic contract, #255 via #319/#320/#321); step 5b SARIF done (#256; `.ownreport.json` struck — a buffer report needing the AST, not a diagnostics surface); step 6a done (`spec/Bridge.md`, #258); step 6b underway (`own-lowered`/`own-bridge`, #259: strict-door validation, lowering and MOS parity landed — validation re-censused at 191 controls after a first 0/0/0 proved to be the ledger agreeing with its own author; analysis wiring open); Python authoritative until cutover |
44
+
|[P-022](P-022-rust-core-migration.md)| Rust core migration: crate DAG, patterns, prior art, differential oracle (Python = golden) | in execution — steps 0–4 built (#214/#249); step 5a done (full diagnostic contract, #255 via #319/#320/#321); step 5b SARIF done (#256; `.ownreport.json` struck — a buffer report needing the AST, not a diagnostics surface); step 6a done (`spec/Bridge.md`, #258); step 6b underway (`own-lowered`/`own-bridge`, #259: lowering and MOS parity landed; strict-door validation re-censused at 193 controls after a first 0/0/0 proved to be the ledger agreeing with its own author, and awaiting a Python-first defensive-limit change before it can be called complete; analysis wiring open); Python authoritative until cutover |
0 commit comments