Repository navigation
D-FOUNDRY-PARITY-1: evidence matrix + 64-store read-only operational lab (DT64 + mask-RISC) - #1991
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
A read-only (Level R) lab: 64 stores x 64 inventory categories in source-owned planes, a 211-field DT64 class, one LaneBinding per question (demanded fields only), borrow_all once, and mask-RISC programs for CanCook, CanFulfill, NetworkCapacity and network cost. An independent scalar oracle and a materialized-object null model agree with it on every item, quantity and store. Stale frame, foreign scope, other row order, unmapped and unbound fields are refused; unknown stock is not read as zero; a denied store is NotAuthorized. Five disable runs turn the suite red. Per-store limiting resource and cost are not expressible in the admitted algebra (no element-wise cross-lane arithmetic); the per-store maximum costs a layer-cake sweep. Recorded as G1-G6 in .claude/plans/foundry-parity-v1.md with the evidence matrix. No production contract changed; no Foundry comparator; no parity claimed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPJjVvasjwqhjJ6c9p
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPJjVvasjwqhjJ6c9p
e93dd3c to
f9cdcd1
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9cdcd1aac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
answers() swept its own valid quantities and only compared the caller's q against the result, so answers(0) reported zero-stock stores as feasible (max 0 >= 0) and answers(129) succeeded. It now refuses q outside 1..=Q_MAX like cook_mask does. New test covers answers, fulfill_mask and network_cost at 0, -1 and Q_MAX + 1, plus the admitted bounds. (Codex review on #1991.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPJjVvasjwqhjJ6c9p
|
Add Carrot credits or activate Agent usage billing to use Autofix |
… transfer PR_ARC_INVENTORY gets arc entries for #1991 and #1995; LATEST_STATE a row for main after both; STATUS_BOARD marks D-FOUNDRY-PARITY-1 shipped and G1 partial (per-store cost done, limiting resource open as P1b); INTEGRATION_PLANS points at the new entry and EXO-223. New entry D-FOUNDRY-PARITY-1-P1A records arm C and the read-only LGJ crosswalk (the R11 layout-witness gap is D-DRISA-M1). Entries index regenerated; supersession index unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPJjVvasjwqhjJ6c9p
What
This is a lab-only PR. It adds a Foundry parity evidence matrix and a small executable lab that is independent of the rest of the workspace.
.claude/plans/foundry-parity-v1.md: 18 Foundry capability rows. Each row has its source evidence, a status, the missing contract, the smallest falsifier and a verdict. It also has the missing-contract register G1–G6, the three hypotheses H1–H3 and a roadmap P0–P5. No row claims parity: there was no Foundry comparator. The Foundry cells cite only the official documentation, fetched 2026-11-10.crates/foundry-parity-lab: has its own workspace root. Nothing depends on it, and it changes no production contract. The fixture covers 64 stores × 64 inventory categories in source-owned planes, under a 211-field DT64 class. Each question binds only the fields it needs, then callsborrow_allonce. The answers are mask-RISC programs:CanCook(q) = visible ∧ offered ∧ equip ∧ ⋀_k(known_k ∧ stock_k ≥ d_k·q) ∧ staff ≥ ⌈q/u⌉CanFulfill: CanCook plus a free delivery slot and the deadlineNetworkCapacity = Σ_q Count(CanCook(q)). This is valid because feasibility is monotone in q, and the sweep checks that rather than assuming it.Σ_k d_k·q · MaskedSumI32(CanCook(q), cost_k)Evidence
16 integration tests. Arm B (DT64 + mask-RISC) matches an independent scalar oracle and a materialized-object null model (arm A) for 8 items × 3 quantities × 64 stores. All nine named stores answer as designed:
NotAuthorized, not "cannot cook"Unknown, never zeroThese are also refused: a lane serving a foreign scope, a field the source does not map, a question that needs a field that was not bound, and a quantity outside
1..=128at every entry point that takes one (cook_mask,answers,fulfill_mask,network_cost).Negative controls: bypassing the known-stock guard reads the stale 1000 as stock. Bypassing the authorization predicate reveals exactly the denied store.
Disable runs: five guards were broken one at a time. Each one turned the suite red, and the tree was restored afterwards.
Gates:
cargo test --release,cargo clippy --all-targets -- -D warningsandcargo fmt --checkall pass on the lab crate.Measured
cargo run --release --manifest-path crates/foundry-parity-lab/Cargo.toml --bin bench. One VM (Xeon @ 2.30 GHz, 4 vCPU), single thread, median of 41 runs, three runs.borrow_all+ pointer tableCanCookquestion over 64 storesNetworkCapacityThe per-store maximum and
NetworkCapacityare about 8× slower than arm A's walk. The admitted algebra has no element-wise cross-lane min, so it has to sweep q.Not done
Scopeis only a consistency witness; no IAM is involved (G2).MethodRef(G6).Locality contract questions
LaneBinding::check.🤖 Generated with Claude Code
https://claude.ai/code/session_01XAqKMPJjVvasjwqhjJ6c9p