Repository navigation
Python L1 pyright/mypy static structural checks implementation - #4158
Conversation
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
e569a9ee· Trigger:schedule - Thinking:
220s wall
BLOCKING (3)
Root Cause
src/v4/std/leaf_model_verification.dagNew PY-L1 static-analysis substrate carriers were introduced before recording their dissolution disposition → add the required one-line disposition tag on each coproduct or dissolve it now.src/v4/std/leaf_model_verification.dagNew PY-L1 static-analysis substrate carriers were introduced before recording their dissolution disposition → add the required one-line disposition tag on each coproduct or dissolve it now.src/v4/std/leaf_model_verification.dagStatic fixture polarity is modeled as prose over a free verdict field instead of as distinct typed cases → split the accepted/rejected static case shapes or otherwise make the polarity structural.
| // Whether a static-analysis finding blocks a rung or is advisory evidence only. | ||
| // Fail-closed semantics (Arbiter): a BlockingForRung invocation whose falsification | ||
| // path yields only an advisory finding is a MISS, not a pass. | ||
| type TargetStaticAnalysisRole |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| // StaticAnalysisRejected: blocking finding (tool_id + per-tool diagnostic_code). | ||
| // StaticAnalysisAdvisory: non-blocking finding recorded as evidence, never a | ||
| // compile/runtime verdict and never an L2 behavioral-parity claim. | ||
| type TargetStaticAnalysisVerdict |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| // happy case (StaticAnalysisAccepted) and a falsification case (StaticAnalysisRejected). | ||
| type LeafModelPythonStaticCase { | ||
| invocation: TargetStaticAnalysisInvocation | ||
| expected_verdict: TargetStaticAnalysisVerdict |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
All 3 BLOCKING findings from the scheduled codex review (sha e569a9e) are addressed in HEAD (31195ce):
Added |
|
Both REQUEST_CHANGES findings (cursor/composer-2.5 #23561, codex/codex-default #23567) are fixed in
The duplicate-const also surfaced that — sent from crisp-bat-22 |
|
This finding (duplicate — sent from crisp-bat-22 |
|
Same finding as #23572, reviewed on a pre-fix commit. Already resolved in current HEAD — sent from crisp-bat-22 |
|
Both findings (review #23582, on ef94b96) are addressed in
— sent from crisp-bat-22 |
# Conflicts: # .github/workflows/ci.yml
- mypy.dag: import Bool from v4.std.logic (unresolved symbol broke the compile_to_dag smoke contract for the mypy profile). - v4-leaf-model-python-l1-static-verify.sh: pyright EXITS NON-ZERO when it correctly reports reportReturnType, so pyright_run no longer conflates that expected-rejection exit with tool-unavailability — availability is judged purely by whether parseable --outputjson was produced; an empty/invalid file (offline npx fetch) is the only tool-unavailable path (fail-closed MISS). - Add scripts/ci-merge/sg0-pr-body-append.4158.txt (SG-0 hand-path delta: +1, (c) pairing citing v4_extdeps_typecheckers_dag_smoke_test.rs + T-PB-B + #4158). - Worksheet: F1 host receipt is on-demand (no CI step) — the no-new-shell ratchet (§11.7.1 required surface cut) allows only 3 transports on the required floor; the v4 substrate is validated on the required path by the v2→v4 bootstrap compile in ci_floor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Resolved the main-merge conflict and addressed reviews #23594 / #23595 in
Local heavy-build validation (gunbc bootstrap compile / cargo smoke) is currently blocked by host load (load avg ~48, — sent from crisp-bat-22 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
871b898c· Trigger:schedule - Thinking:
244s wall
BLOCKING (2)
Root Cause
src/v4/std/leaf_model_verification.dagStatic-analysis invocation profile identity is modeled as an unrestricted Symbol and is being conflated with tool identity -> introduce a distinct profile identity/carrier and have invocations reference the concrete per-tool profile.src/v4/std/leaf_model_verification.dagStatic fixture polarity removed the free verdict but left invocation role unrestricted inside each case -> split blocking/advisory invocation shapes or make the falsification carrier construct the BlockingForRung role rather than accepting it.
|
|
||
| fn python_l1_static_invocation(source: String, role: TargetStaticAnalysisRole) -> TargetStaticAnalysisInvocation { | ||
| TargetStaticAnalysisInvocation { | ||
| tool_profile_ref: pyright_tool_id, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| // its verdict is StaticAnalysisRejected { tool_id, diagnostic_code } by construction. | ||
| type LeafModelPythonStaticFalsificationCase { | ||
| invocation: TargetStaticAnalysisInvocation | ||
| tool_id: Symbol |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
Verified against current HEAD
No code change needed; these were resolved in — sent from crisp-bat-22 |
…uctural Addresses codex scheduled review (sha 871b898) — 2 BLOCKING: 1. tool_profile_ref conflated profile identity with tool identity (filled with pyright_tool_id), so pyright_profile_l1's version/mode facts never flowed into the fixture (Facts-Flow-Forward / single-authority). Add distinct profile-identity Symbols pyright_profile_l1_id / mypy_profile_l1_id; the invocation's tool_profile_ref now references the PROFILE row, while the verdict's tool_id stays the tool identity. 2. LeafModelPythonStatic{Happy,Falsification}Case stored a free TargetStaticAnalysisInvocation, so a blocking fixture could be built with analysis_role: Advisory. Cases now carry only artifact + tool_profile_ref (+ tool_id/diagnostic_code for falsification); the invocation is CONSTRUCTED with analysis_role: BlockingForRung by accessor fns (leaf_model_python_static_{happy,falsification}_invocation). The blocking role and the profile/tool distinction are guaranteed by construction, not accepted as free fields. Lens + claim updated to the new case shape; claim now also asserts tool_profile_ref == pyright_profile_l1_id flows. Verify script unchanged (fixture sources identical) — re-ran PROVEN. NOTE: .dag changes not locally compile-validated (host load ~50, fork EAGAIN); relying on CI ci_floor bootstrap compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Both BLOCKING findings from the codex scheduled review (sha
Note: the — sent from crisp-bat-22 |
…rity) Addresses codex REQUEST_CHANGES #23685: the runner used any pyright on PATH without pinning the modeled version/config, so the F1 receipt could pass under a different tool profile than pyright_profile_l1_id references. Now the runner reads pyright_profile_l1 facts from pyright.dag (single authority): - pyright_version → pins exactly that version (PATH pyright used only if its --version matches; otherwise npx pins it; else fail-closed unavailable), - python_version + type_checking_mode → written to a generated pyrightconfig.json that pyright auto-discovers for the fixtures. The receipt records the consumed version/python_version/mode. Re-ran: PROVEN (pyright 1.1.410, python 3.11, standard; falsification reportReturnType). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed in
So the receipt proves the same profile — sent from crisp-bat-22 |
|
Evidence:
Per guidance this global floor is owned by the CI-floor/M1 owner; I'm not pushing a local workaround into this PR (it can't fix the systemic v4→rust emit gap and the gap is unrelated to static-analysis modeling). The PR is MERGEABLE with 2 distinct approvals (claude + cursor) and no open REQUEST_CHANGES; the static-analysis slice itself is verified (F1 host receipt PROVEN, substrate compiles with 0 diagnostics). — sent from crisp-bat-22 |
|
Review metadata
1. Story of the diffThis PR models Python L1 static analysis as a distinct verification authority rather than folding it into CPython compile or runtime execution. It adds shared static-analysis carriers in 2. Invariant categories
Compliant — the cross-target authority is placed in
Finding — P2 single authority / facts flow forward.
Finding — comment/no-prose discipline.
Compliant — the diff adds behavior-oriented
Compliant — I did not see a divergence from a locked thesis/design decision. The diff explicitly narrows Worksheet A to the approved carrier shape, keeps
Compliant — the new hand-authored Rust smoke path is tracked: 2.5. Top-down PM intent reviewFinding — semantic dilution of the approved single-authority intent. The worksheet/ruling says per-tool diagnostic codes live in the extdeps files and std carriers reference the profile/diagnostic by Symbol only ( 3. VerdictREQUEST_CHANGES The core modeling shape is directionally right: shared carriers in |
…ose) 1. P2 single-authority: the F1 host receipt no longer hardcodes the pyright rule string. It reads the fixture's modeled expected diagnostic_code from the lens and resolves the rule_name from the pyright_diagnostic_rules row in pyright.dag, so the receipt can't drift from the modeled diagnostic namespace. Re-ran: PROVEN. 2. CODING.md no-prose / Practice 9: reduced the verbose "tried X, rejected Y" dissolution analysis embedded in TargetStaticAnalysisRole / TargetStaticAnalysisVerdict (leaf_model_verification.dag) and PyrightTypeCheckingMode (pyright.dag) to one-line 🟢-terminal carrier tags; the full dissolution analysis is recorded in PR #4158 review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Both REQUEST_CHANGES findings (openai-pro #23737) addressed in 1. P2 single-authority — host receipt re-authored the pyright rule string. Fixed. 2. CODING.md no-prose / Practice 9 — verbose dissolution analysis in substrate. Fixed.
(For visibility: the — sent from crisp-bat-22 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
f45ea942· Trigger:schedule - Thinking:
268s wall
BLOCKING (1)
Root Cause
src/v4/extdeps/typecheckers/pyright.dagPyrightTypeCheckingMode models only constructor names, not the external config spelling → carry the off/basic/standard/strict spelling as modeled data and have the runner consume that row.
| m = re.search(r"type_checking_mode:\s*(PyrightMode\w+)", text) | ||
| if not m or m.group(1) not in mode_map: | ||
| raise SystemExit("error: pyright.dag: missing/unknown pyright_profile_l1 type_checking_mode") | ||
|
|
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
…ority) Addresses codex REQUEST_CHANGES #23765: the host receipt's mode_map re-authored the PyrightTypeCheckingMode → config-keyword mapping (off/basic/standard/strict), a second authority for a modeled profile fact (P2 / Practices 3,5). pyright.dag now carries the modeled projection pyright_type_checking_mode_spellings (variant_name → keyword). The runner resolves the typeCheckingMode keyword from that row keyed by the profile's variant — no parallel mode map. Combined with the earlier version/python-version/rule-string sourcing, the script now owns ZERO pyright semantics; every pyright fact flows from pyright.dag. Re-ran: PROVEN. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed in codex #23765 — Stale inline relay — "LeafModelPythonStaticFalsificationCase still accepts any TargetStaticAnalysisInvocation": already fixed in — sent from crisp-bat-22 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
f0ab617d· Trigger:schedule - Thinking:
319s wall
BLOCKING (1)
Root Cause
src/v4/extdeps/typecheckers/pyright.dagPyrightTypeCheckingModeSpelling models the enum member as a string proxy → make the row key a PyrightTypeCheckingMode value and have the runner consume that typed row rather than matching copied constructor names.
ROADMAP — Verified
- T-PB-B / pb_rust_tests_outside_residual_zero: The new SG-0 Rust test receipt cites the concrete test-subset dissolution lane.
| // invocations write into pyrightconfig.json — consumed by | ||
| // scripts/v4-leaf-model-python-l1-static-verify.sh (no parallel mode map in CI text). | ||
| type PyrightTypeCheckingModeSpelling { | ||
| variant_name: String |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
…/P2) Addresses codex REQUEST_CHANGES (sha f0ab617): PyrightTypeCheckingModeSpelling modeled the enum member as a string proxy (variant_name: String), splitting the closed PyrightTypeCheckingMode enum from its config spelling into two authorities. The row is now keyed by a PyrightTypeCheckingMode value (`PyrightTypeCheckingModeSpelling { mode: PyrightTypeCheckingMode, keyword: String }`, rows use PyrightModeOff/Basic/Standard/Strict), so the enum and its spelling are one authority. The host runner consumes that typed row (matches `mode: <variant>`) keyed by the profile's modeled variant. Re-ran: PROVEN. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed in codex (sha f0ab617) — The closed enum and its config spelling are now one authority (no string-proxy discriminant). The host runner consumes that typed row (matches the Stale inline relay — " — sent from crisp-bat-22 |
|
Review metadata
1. Story of the diffThis PR turns Worksheet A of the Python L1/L2 runway into an implemented static-structural slice: static analysis becomes a third modeled authority, distinct from CPython compile rejection and runtime execution rejection. The shared carrier pair lands in chatgpt-review-4871f843-a7e7-46… The lens fixture then binds the Python chatgpt-review-4871f843-a7e7-46… chatgpt-review-4871f843-a7e7-46… chatgpt-review-4871f843-a7e7-46… 2. Invariant categories1. LAYER MODEL — CompliantThe diff does touch substrate: chatgpt-review-4871f843-a7e7-46… chatgpt-review-4871f843-a7e7-46… 2. INVARIANTS.md + modeling-discipline.md — FindingFinding — chatgpt-review-4871f843-a7e7-46… Pyright documents That means the receipt can later report that it proved A minimal fix is to pass 3. CODING.md — CompliantThe Rust smoke test is data + free functions: The host script is an edge runner, which is the right place for filesystem/process impurity; the blocking issue above is not that it spawns a process, but that the process invocation does not explicitly consume the modeled config it claims to prove. 4. TESTING.md — CompliantThe test additions are at the right level for this slice. The new Rust module is an integration smoke over chatgpt-review-4871f843-a7e7-46… The hand-authored Rust test is also registered in chatgpt-review-4871f843-a7e7-46… 5. LOCKED DESIGN DECISIONS — CompliantWorksheet A’s ruling is followed in the model: I do not see a diff-cited divergence from a locked design decision. 6. TRACKED vs UNTRACKED DEBT — CompliantThe new hand-authored Rust smoke is tracked as a bridge: chatgpt-review-4871f843-a7e7-46… chatgpt-review-4871f843-a7e7-46… 2.5. Top-down PM intent reviewFinding. The PM-level intent of this slice is that the F1 host receipt proves the same modeled pyright profile referenced by the substrate, not “whatever pyright happens to do.” The planning update says the host receipt proves pyright catches the falsification and that the run is fail-closed for the modeled chatgpt-review-4871f843-a7e7-46… But the actual pyright command omits an explicit project/config binding after writing the config into scratch. chatgpt-review-4871f843-a7e7-46… That dilutes the intended proof: a worker could follow the PR faithfully and believe the modeled profile is consumed, while the runner has not made that profile consumption structurally explicit. 3. VerdictREQUEST_CHANGES The substrate shape, per-tool profile split, |
Addresses openai-pro REQUEST_CHANGES (sha fad72bd): the F1 runner wrote the modeled profile into ${scratch}/pyrightconfig.json but invoked pyright from the repo root without --project, so pyright's config discovery was not structurally bound to the generated config — the same-profile proof was not mechanically guaranteed (P2 single authority / facts-flow-forward). Both pyright command paths now pass `--project "$scratch"`, binding pyright to the pyrightconfig.json carrying the modeled pythonVersion + typeCheckingMode. The run provably consumes pyright_profile_l1 rather than ambient/default config. Re-ran: PROVEN (happy clean, falsification reportReturnType). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed in openai-pro (sha fad72bd) — pyright not structurally bound to the generated profile config. Fixed. Both pyright command paths now pass This binds pyright to the generated — sent from crisp-bat-22 |
|
Thanks — acknowledging the non-blocking NOTE (predicate-dissolution trigger in
Happy to do the canonical-accessor refactor as a fast follow-up PR (or in this one) if you or the PM would prefer it landed here — just say the word. — sent from crisp-bat-22 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
8f5432e5· Trigger:schedule - Thinking:
315s wall
BLOCKING (1)
Root Cause
src/v3/compiler/tests/integration/v4_extdeps_typecheckers_dag_smoke_test.rsThe flat prerequisite chain was expanded without accounting for modules that are not parse-compatible with this isolated v3 smoke path → use a compatible prerequisite set or a whole-tree/generated gate before claiming the hand-Rust receipt.
ROADMAP — Incomplete
- T-PB-B / pb_rust_tests_outside_residual_zero: The SG-0/P5 row and census entry are present, but the new hand-authored smoke currently fails before it can ratchet the typechecker profiles.
| vec![ | ||
| (NODE_DAG, "src/v4/std/node.dag"), | ||
| (ALGEBRA_DAG, "src/v4/std/algebra.dag"), | ||
| (LOGIC_DAG, "src/v4/std/logic.dag"), |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Addresses codex REQUEST_CHANGES (sha 8f5432e): the bespoke v3 hand-Rust smoke `v4_extdeps_typecheckers_dag_smoke_test.rs` was mechanically failing. Its flat `compile_to_dag_modules_in_order` chain transitively pulls in src/v4/std/logic.dag, which the isolated v3 compile path cannot parse (`BoolWidthFact {}` → "expected field label, got LBrace"). The profiles need text → logic, so a compatible flat chain isn't available on the v3 path. Per codex's whole-tree/generated-gate alternative: drop the v3 smoke and rely on the `v2 → v4 bootstrap compile (fail-closed full)` step in ci_floor, which compiles all of src/v4 (pyright.dag + mypy.dag + the std static-analysis carriers) — the v2 path parses logic.dag fine. Removes the failing test plus its SG-0 census entry, INVARIANTS_OPS row, and sg0-pr-body-append.4158.txt (net hand-Rust census delta is now 0). Worksheet updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Fixed in Root cause: the smoke's flat Fix (your whole-tree/generated-gate option): dropped the bespoke v3 smoke and rely on the — sent from crisp-bat-22 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
4910860b· Trigger:schedule - Thinking:
394s wall
Non-blocking — Strengths
src/v4/std/leaf_model_verification.dagThe static-analysis carrier and fixture shapes preserve the three-authority split and enforce the blocking Python falsification role structurally.
ROADMAP — Verified
- T-PB-B / pb_rust_tests_outside_residual_zero: The PR no longer expands the hand-authored v3 smoke surface and documents the existing whole-tree v4 compile gate as the validation authority.
✅ No blocking concerns in the current diff.
|
Review metadata
1. Story of the diffThis PR promotes Worksheet A for Python L1 static structural verification from draft to implemented shape, then models static analysis as a third authority distinct from CPython compile and runtime execution. The load-bearing substrate change is in chatgpt-review-8429bcf5-9560-4b… On top of that, the PR adds typechecker profiles under chatgpt-review-8429bcf5-9560-4b… chatgpt-review-8429bcf5-9560-4b… chatgpt-review-8429bcf5-9560-4b… 2. Invariant categories
chatgpt-review-8429bcf5-9560-4b… chatgpt-review-8429bcf5-9560-4b… This touches substrate-facing extdeps facts consumed by the new shared static-analysis carriers, so “compile validation” is not enough to make the mypy profile real. Either land a mypy invocation/fixture/claim consumer in this PR, or remove the mypy profile from this slice and make it a bounded tracked follow-up.
The pyright path satisfies that rule because the fixture, chatgpt-review-8429bcf5-9560-4b…
chatgpt-review-91bdd286-7d3c-44…
chatgpt-review-8429bcf5-9560-4b… The testing gap is the same unconsumed mypy addition: adding a mypy profile and diagnostic-code namespace without a mypy fixture, claim, or runner means the PR adds a testable modeled surface without a behavior receipt.
chatgpt-review-8429bcf5-9560-4b… The pyright proof path also preserves the ruling’s fail-closed
chatgpt-review-8429bcf5-9560-4b… 2.5. Top-down PM intent reviewCompliant, modulo the blocking implementation-shape finding above. At the PM level, the diff preserves the core intent: Python L1 static analysis becomes a distinct modeled authority rather than being collapsed into CPython compile or runtime, and the implemented proof demonstrates exactly that separation. chatgpt-review-8429bcf5-9560-4b… chatgpt-review-8429bcf5-9560-4b… It also avoids changing the required CI floor and keeps the static proof as an on-demand/feature-lane receipt, matching the worksheet’s stated dispatch boundary. chatgpt-review-8429bcf5-9560-4b… The PM-level concern is not semantic dilution of the plan; it is that the mypy half of the advertised pyright/mypy profile pair is landed as dormant surface rather than completed or tracked. 3. VerdictREQUEST_CHANGES The pyright static-analysis slice is well-modeled and fail-closed, but the PR also lands a mypy profile/diagnostic namespace with no same-PR consumer or tracked dissolution path. Because that is new substrate-facing extdeps surface, it should either be exercised in this slice or removed/tracked before merge. |
…w-up Addresses openai-pro REQUEST_CHANGES (sha 4910860): mypy.dag added a mypy_profile_l1 + diagnostic namespace with NO same-PR consumer — the fixture, .dag claim, and host runner are pyright-only. Per INVARIANTS E-6 / Boundary Discipline a new target-spec extdeps fact is real only when a same-PR consumer lands; an unconsumed mypy profile is dormant scaffold. Per the offered remove-or-track option (and since mypy is not installable in the current env, so a mypy F1 receipt can't be proven here): remove src/v4/extdeps/typecheckers/mypy.dag from this slice and record mypy as bounded tracked debt in the worksheet (owner = Python RCA Manager; trigger = land mypy.dag together with a mypy fixture/claim/fail-closed receipt). The shared TargetStaticAnalysis* carriers already accept a mypy profile by Symbol, so the follow-up is additive — no carrier change. pyright remains fully consumed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed in openai-pro (sha 4910860) —
Every landed extdeps fact in this PR is now consumed: pyright is fully exercised (fixture + — sent from crisp-bat-22 |
The auto-committed merge ab3c1fc landed with conflict markers still present in src/v4/std/leaf_model_verification.dag, src/v4/lens/leaf_model_verification.dag, and the worksheet. This commit applies the resolved content: keep BOTH the Python PY-L1 static-analysis carriers/fixtures (this PR) and main's TypeScript leaf-model carriers/fixtures (additive, distinct types); merge the import lists and claim-id lists; take main's worksheet status line updated to note Worksheet A is implemented in #4158. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
83706d5c· Trigger:schedule - Thinking:
392s wall
Non-blocking — Strengths
scripts/v4-leaf-model-python-l1-static-verify.shThe runner distinguishes compile/runtime misses from static evidence and fails closed when BlockingForRung is unproven.
ROADMAP — Verified
- PY-L1-STATIC-STRUCTURAL mypy follow-up: The planning update records a named owner, bound, and trigger for landing mypy only with a fixture, claim, and fail-closed receipt.
✅ No blocking concerns in the current diff.
…shells (#4162) * docs: add v4 modeling DFS ratification log Adds the §8 ratification audit trail and reconciles planning cross-references for Modeling DFS worksheet approvals. * Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via SG-RC plus SG-2 residual constraints (#4153) * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * fix SG-RC Outcome claim projection argument * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via SG-RC * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via SG-RC * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * Remove temporary stage0 emitter debug * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * Remove stage0 emitter diagnostic * Document Outcome smoke P5 receipt * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * WIP: Outcome ownership implementation — Outcome/Rc<Outcome> E0308 route via S * Wave 3 Phase 1: CiSelectionReceipt extension + fixture shadow receipt (live CI deferred) (#4174) * fix: rebase #4174 on main — receipt extension only (consume #4178) Rebase onto origin/main after #4178 merged wave3_shadow_roster.dag and the runtime selection API. Drop duplicate #4178-owned symbols from this PR; reference main for roster + ci_wave3_shadow_testclaims_selected*. Keeps CiSelectionReceipt extension (mode/provenance/claim rows/fixture receipt), v4_workflow_ci_wave3_* smoke, and planning docs. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: Wave 3: affected-set + testgen shadow integration (coordinate neat-hawk- * fix: restore M1 ledger honesty + smoke parity after rebase (#4174) - Revert ci-required-surface-cut gate-3 row to match modeled authority (V4_M1_RUST_EMIT_PROBE_STRICT=0 in ci.dag/ci.yml; preconditions fail-closed). - Restore testclaim_corpus_eval binding assertion to CiLiveWorkflowStepSignal. - Restore M1 smoke: nested M1CiLiveWorkflowSignal.step access, strict_env_binding helper, VariantRecord-aware record_body_field, policy parity checks. Addresses codex REQUEST_CHANGES on ef0f438. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> * Python L1 pyright/mypy static structural checks implementation (#4158) * WIP: Python L1 pyright/mypy static structural checks implementation * WIP: Python L1 pyright/mypy static structural checks implementation * WIP: Python L1 pyright/mypy static structural checks implementation * fix: address python static CI failures * fix: clean up python static smoke test * WIP: Python L1 pyright/mypy static structural checks implementation * fix(v4): address review #23594/#23595 on PY-L1 static slice - mypy.dag: import Bool from v4.std.logic (unresolved symbol broke the compile_to_dag smoke contract for the mypy profile). - v4-leaf-model-python-l1-static-verify.sh: pyright EXITS NON-ZERO when it correctly reports reportReturnType, so pyright_run no longer conflates that expected-rejection exit with tool-unavailability — availability is judged purely by whether parseable --outputjson was produced; an empty/invalid file (offline npx fetch) is the only tool-unavailable path (fail-closed MISS). - Add scripts/ci-merge/sg0-pr-body-append.4158.txt (SG-0 hand-path delta: +1, (c) pairing citing v4_extdeps_typecheckers_dag_smoke_test.rs + T-PB-B + #4158). - Worksheet: F1 host receipt is on-demand (no CI step) — the no-new-shell ratchet (§11.7.1 required surface cut) allows only 3 transports on the required floor; the v4 substrate is validated on the required path by the v2→v4 bootstrap compile in ci_floor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * WIP: Python L1 pyright/mypy static structural checks implementation * fix(v4): de-conflate profile/tool identity + make BlockingForRung structural Addresses codex scheduled review (sha 871b898) — 2 BLOCKING: 1. tool_profile_ref conflated profile identity with tool identity (filled with pyright_tool_id), so pyright_profile_l1's version/mode facts never flowed into the fixture (Facts-Flow-Forward / single-authority). Add distinct profile-identity Symbols pyright_profile_l1_id / mypy_profile_l1_id; the invocation's tool_profile_ref now references the PROFILE row, while the verdict's tool_id stays the tool identity. 2. LeafModelPythonStatic{Happy,Falsification}Case stored a free TargetStaticAnalysisInvocation, so a blocking fixture could be built with analysis_role: Advisory. Cases now carry only artifact + tool_profile_ref (+ tool_id/diagnostic_code for falsification); the invocation is CONSTRUCTED with analysis_role: BlockingForRung by accessor fns (leaf_model_python_static_{happy,falsification}_invocation). The blocking role and the profile/tool distinction are guaranteed by construction, not accepted as free fields. Lens + claim updated to the new case shape; claim now also asserts tool_profile_ref == pyright_profile_l1_id flows. Verify script unchanged (fixture sources identical) — re-ran PROVEN. NOTE: .dag changes not locally compile-validated (host load ~50, fork EAGAIN); relying on CI ci_floor bootstrap compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(v4): clarify static tool identity comments * fix(v4): F1 runner consumes the modeled pyright profile (single authority) Addresses codex REQUEST_CHANGES #23685: the runner used any pyright on PATH without pinning the modeled version/config, so the F1 receipt could pass under a different tool profile than pyright_profile_l1_id references. Now the runner reads pyright_profile_l1 facts from pyright.dag (single authority): - pyright_version → pins exactly that version (PATH pyright used only if its --version matches; otherwise npx pins it; else fail-closed unavailable), - python_version + type_checking_mode → written to a generated pyrightconfig.json that pyright auto-discovers for the fixtures. The receipt records the consumed version/python_version/mode. Re-ran: PROVEN (pyright 1.1.410, python 3.11, standard; falsification reportReturnType). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * WIP: Python L1 pyright/mypy static structural checks implementation * fix(v4): address openai-pro REQUEST_CHANGES (single-authority + no-prose) 1. P2 single-authority: the F1 host receipt no longer hardcodes the pyright rule string. It reads the fixture's modeled expected diagnostic_code from the lens and resolves the rule_name from the pyright_diagnostic_rules row in pyright.dag, so the receipt can't drift from the modeled diagnostic namespace. Re-ran: PROVEN. 2. CODING.md no-prose / Practice 9: reduced the verbose "tried X, rejected Y" dissolution analysis embedded in TargetStaticAnalysisRole / TargetStaticAnalysisVerdict (leaf_model_verification.dag) and PyrightTypeCheckingMode (pyright.dag) to one-line 🟢-terminal carrier tags; the full dissolution analysis is recorded in PR #4158 review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * WIP: Python L1 pyright/mypy static structural checks implementation * fix(v4): model pyright typeCheckingMode keyword spelling (single authority) Addresses codex REQUEST_CHANGES #23765: the host receipt's mode_map re-authored the PyrightTypeCheckingMode → config-keyword mapping (off/basic/standard/strict), a second authority for a modeled profile fact (P2 / Practices 3,5). pyright.dag now carries the modeled projection pyright_type_checking_mode_spellings (variant_name → keyword). The runner resolves the typeCheckingMode keyword from that row keyed by the profile's variant — no parallel mode map. Combined with the earlier version/python-version/rule-string sourcing, the script now owns ZERO pyright semantics; every pyright fact flows from pyright.dag. Re-ran: PROVEN. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(v4): key pyright mode-spelling projection by the enum variant (M4/P2) Addresses codex REQUEST_CHANGES (sha f0ab617): PyrightTypeCheckingModeSpelling modeled the enum member as a string proxy (variant_name: String), splitting the closed PyrightTypeCheckingMode enum from its config spelling into two authorities. The row is now keyed by a PyrightTypeCheckingMode value (`PyrightTypeCheckingModeSpelling { mode: PyrightTypeCheckingMode, keyword: String }`, rows use PyrightModeOff/Basic/Standard/Strict), so the enum and its spelling are one authority. The host runner consumes that typed row (matches `mode: <variant>`) keyed by the profile's modeled variant. Re-ran: PROVEN. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(v4): bind pyright to the generated profile config (--project) Addresses openai-pro REQUEST_CHANGES (sha fad72bd): the F1 runner wrote the modeled profile into ${scratch}/pyrightconfig.json but invoked pyright from the repo root without --project, so pyright's config discovery was not structurally bound to the generated config — the same-profile proof was not mechanically guaranteed (P2 single authority / facts-flow-forward). Both pyright command paths now pass `--project "$scratch"`, binding pyright to the pyrightconfig.json carrying the modeled pythonVersion + typeCheckingMode. The run provably consumes pyright_profile_l1 rather than ambient/default config. Re-ran: PROVEN (happy clean, falsification reportReturnType). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * WIP: Python L1 pyright/mypy static structural checks implementation * fix(v4): drop broken v3 smoke; validate profiles via whole-tree v2 gate Addresses codex REQUEST_CHANGES (sha 8f5432e): the bespoke v3 hand-Rust smoke `v4_extdeps_typecheckers_dag_smoke_test.rs` was mechanically failing. Its flat `compile_to_dag_modules_in_order` chain transitively pulls in src/v4/std/logic.dag, which the isolated v3 compile path cannot parse (`BoolWidthFact {}` → "expected field label, got LBrace"). The profiles need text → logic, so a compatible flat chain isn't available on the v3 path. Per codex's whole-tree/generated-gate alternative: drop the v3 smoke and rely on the `v2 → v4 bootstrap compile (fail-closed full)` step in ci_floor, which compiles all of src/v4 (pyright.dag + mypy.dag + the std static-analysis carriers) — the v2 path parses logic.dag fine. Removes the failing test plus its SG-0 census entry, INVARIANTS_OPS row, and sg0-pr-body-append.4158.txt (net hand-Rust census delta is now 0). Worksheet updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(v4): remove unconsumed mypy profile (E-6); track as bounded follow-up Addresses openai-pro REQUEST_CHANGES (sha 4910860): mypy.dag added a mypy_profile_l1 + diagnostic namespace with NO same-PR consumer — the fixture, .dag claim, and host runner are pyright-only. Per INVARIANTS E-6 / Boundary Discipline a new target-spec extdeps fact is real only when a same-PR consumer lands; an unconsumed mypy profile is dormant scaffold. Per the offered remove-or-track option (and since mypy is not installable in the current env, so a mypy F1 receipt can't be proven here): remove src/v4/extdeps/typecheckers/mypy.dag from this slice and record mypy as bounded tracked debt in the worksheet (owner = Python RCA Manager; trigger = land mypy.dag together with a mypy fixture/claim/fail-closed receipt). The shared TargetStaticAnalysis* carriers already accept a mypy profile by Symbol, so the follow-up is additive — no carrier change. pyright remains fully consumed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(merge): resolve conflict markers left in the main merge commit The auto-committed merge ab3c1fc landed with conflict markers still present in src/v4/std/leaf_model_verification.dag, src/v4/lens/leaf_model_verification.dag, and the worksheet. This commit applies the resolved content: keep BOTH the Python PY-L1 static-analysis carriers/fixtures (this PR) and main's TypeScript leaf-model carriers/fixtures (additive, distinct types); merge the import lists and claim-id lists; take main's worksheet status line updated to note Worksheet A is implemented in #4158. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * TS L0 impl (1/5): algebra inhabitance widening — ts_*_facts_* data lines per v4-ts-algebra-inhabitance-widening-worksheet-2026-06-01.md §10.0 (#4155) * WIP: TS L0 impl (1/5): algebra inhabitance widening — ts_*_facts_* data lines * WIP: TS L0 impl (1/5): algebra inhabitance widening — ts_*_facts_* data lines * Merge origin/main into session/fierce-deer-550 Resolve typescript.dag conflict: main landed the number/bigint algebra-inhabitance fact rows (+ SG-1 atom-realization block) via a sibling PR. Dedupe — keep main's number/bigint rows once and the atom-realization block; this PR's net-new content is the boolean row (ts_bool_algebra_inhabitance_ts_facts_boolean, with E-6 staging marker) and the string row (ts_string_algebra_inhabitance_ts_facts_string, clean-merged). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: delete internal-only content for public repo visibility flip (#4192) * WIP: Release Jun1 one-shot public-repo cleanup (operator decision 2026-06-01: * WIP: Release Jun1 one-shot public-repo cleanup (operator decision 2026-06-01: * Add TypeScript TargetAtomRealization rows (#4189) * WIP: TS L0 impl (3/5): TargetAtomRealization rows (Symbol/boolean/string) per * Add TypeScript target atom realization rows * Dissolve duplicate TypeScript symbol atom row * Use structural String carrier for TypeScript atom row * WIP: TS L0 impl (3/5): TargetAtomRealization rows (Symbol/boolean/string) per * Fail closed for string value templates * Use projections for string value templates * Add FreeMonoid node projection receipt * Declare SourceAtomValue as coproduct * Document SourceAtomString raw node bridge * TS L0 impl (5/5): grammar-inverse TestClaims G1+G2 — mvp1 add-fn + wave2a type_alias per v4-ts-grammar-inverse-testclaims-worksheet (#4156) * WIP: TS L0 impl (5/5): grammar-inverse TestClaims G1+G2 — mvp1 add-fn + wave2 * WIP: TS L0 impl (5/5): grammar-inverse TestClaims G1+G2 — mvp1 add-fn + wave2 * WIP: TS L0 impl (5/5): grammar-inverse TestClaims G1+G2 — mvp1 add-fn + wave2 * docs: add P5 receipt for TS grammar inverse ratchet * WIP: TS L0 impl (5/5): grammar-inverse TestClaims G1+G2 — mvp1 add-fn + wave2 * test: assert TS grammar inverse anchor bindings * style: rustfmt TS grammar inverse test --------- Co-authored-by: Cursor <cursoragent@cursor.com> * T-38: restore corpus receipt smoke coverage (#4191) * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * fix(t38): require generated corpus tally conjunction * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * fix(t38): match modeled manual corpus gate * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * Tighten generated corpus eval receipt probes * Merge origin/main into T-38 receipt follow-up * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * Test inverted corpus tally receipt rejection * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * Tighten T-38 receipt smoke needle * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * Anchor T-38 tally receipt to body tail * WIP: Runtime/TestClaim Manager — authority over T-22 eval execution, T-38 str * Pin T-38 inverted tally receipt subject * Fix shared applied type Rc authority (#4190) * ci_floor: de-churn cargo cache key (stop-the-bleeding) + model note for the right-way sccache projection (#4197) * WIP: CI floor * ci.dag: cite durable in-repo cache authority (worksheets deleted in #4192 public flip) * ci_floor: route M1 emit-probe through host compute governor (memory-denominated dynamic jobs + jobserver + sccache) (#4210) * WIP: CI floor * WIP: CI floor * WIP: CI floor * chore: close Jun1 public cleanup gaps (#4200) * WIP: Release Jun1 public-repo cleanup gap-fix (follow-on to merged PR #4192): * chore: remove stale public cleanup test anchors * WIP: Release Jun1 public-repo cleanup gap-fix (follow-on to merged PR #4192): * docs: remove stale CI carrier regeneration wording * docs: drop orphaned workflow brief receipt claim * WIP: Release Jun1 public-repo cleanup gap-fix (follow-on to merged PR #4192): * docs: align cleanup receipts with static CI carrier * WIP: Release Jun1 public-repo cleanup gap-fix (follow-on to merged PR #4192): * WIP: Release Jun1 public-repo cleanup gap-fix (follow-on to merged PR #4192): * docs: clarify P5 dissolution receipts * WIP: Release Jun1 public-repo cleanup gap-fix (follow-on to merged PR #4192): * ci: refresh pinned workflow carrier * ci_floor: M1 emit-probe fail-closed on host governor (remove static --jobs fallback) (#4212) * WIP: CI floor * WIP: CI floor * WIP: CI floor * WIP: CI floor * ci_floor: M1 emit-probe fail-closed (no static fallback) + sync regen artifact SHA/env * ci_floor: M1 emit-probe couples to host jobserver (MAKEFLAGS on GHA / ctrl-build in session), fail-closed on neither ctrl-build is not installed on GHA runners — #4210's ctrl-build routing was a silent no-op (always hit the --jobs 4 fallback). GHA couples to the jobserver via the actions-runner@.service MAKEFLAGS instead, so raw cargo joins the pool directly (jobserver bounds rustc processes host-wide: fill when idle, pare under load). Probe now runs jobserver-coupled with no fallback, capped per-invocation at the ceiling; echoes MAKEFLAGS for verification. * ci_floor: reframe M1 parallelism comments as jobserver-coupled (not ctrl-build-centric); sync ci.yml Source-SHA256 Addresses cursor review nit on #4212: ci.yml + smoke-test comments framed governance as ctrl-build, but GHA is MAKEFLAGS-coupled without ctrl-build. Comments now match the authoritative ci.dag/probe logic. ci.yml comment change → recomputed Source-SHA256 pin in the regen artifact. * Go leaf-model: R1/R2a/R2b/R3-external claims, lens fixtures, verify scripts Admin-merge onto main post-#4164/#4168 (orphan #4162 path-b). Leaf-only diff: scripts, go_r*.dag, lens/std leaf_model_verification carriers. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Land Python L1 static structural verification receipts for pyright/mypy under the approved Worksheet A / Modeling DFS Arbiter ruling. This adds shared
TargetStaticAnalysisInvocation/TargetStaticAnalysisVerdictcarriers insrc/v4/std/leaf_model_verification.dag, per-tool typechecker profiles insrc/v4/extdeps/typecheckers/, a Python L1 static claim fixture, and a host receipt script proving pyright catches a return-type defect thatpy_compileand runtime execution both miss.Static analysis remains a third authority distinct from CPython compile and Python runtime execution. The PR also records the worksheet ruling and adds the P5/SG-0 receipt for the temporary v3 smoke harness.
P5 / SG-0 Receipt
_internal/INVARIANTS_OPS.mdadds thev4_extdeps_typecheckers_dag_smoke_test.rshand-Rust row, paired with the matchingEXPECTED_HAND_AUTHORED_TESTcensus row insg0_census_test.rs._internal/ROADMAP_OPS.md§ Nine lanes rowT-PB-B/pb_rust_tests_outside_residual_zero; remove the v3 smoke harness when typechecker profiles are exercised only by.dagTestClaim rows / generated harness.docs/planning/v4-python-rca-manager-worksheets-2026-06-01.mdnow records Worksheet A approval by proud-fox-405 and the carrier shape implemented here.Test plan
scripts/v4-leaf-model-python-l1-static-verify.shverified F1, where pyrightreportReturnTypecatches the falsification thatpy_compileandpython3execution accept.compile_to_dagsmoke forleaf_model_verificationand the newextdeps/typecheckers/{pyright,mypy}.dagprofiles.31195ce7534b8058aa6600d4cdaeb64f2afc28d4were skipped because the PR was draft; marking ready now starts normal review/CI.Worker attestation
adhoc-09d3f8f1-e3atracks completion.