Skip to content

Post-cutover: summary-backed lifecycle release reachability (generalize the landed #293/#302 predicates) #304

Open

Description

@PhysShell

Tracker for P-036 Phase 2 (#303) — the first post-cutover feature consumer of the interprocedural summary architecture.

Context

The landed #293/#302/#306 extractor predicates are the current bounded implementation. This issue tracks replacing or generalizing them with CFG-backed, summary-composed lifecycle reasoning per P-036:

  • lifecycle-root reachability + must-release composition through MethodSummary application (helpers prove release via summaries, not name/symbol fixpoints inside the extractor);
  • guarded effects for simple parameter predicates (the Teardown(bool skip) shape) with constant-argument substitution at callsites; unsupported predicates degrade to may/unknown, never must — per P-037;
  • the LifecycleEffect vs LifecycleEnrollment split: a release guaranteed if the root runs is not proof the root runs — enrollment evidence (using/DI scope disposal/wired framework callback/owner dispose chain/registered callback) is required before a clean verdict;
  • exceptional-exit and degraded virtual/external-target handling with explicit precision.

Gate

Blocked on the P-022 parity/cutover discipline (#262): no verdict-changing implementation before cutover. The landed predicates are the regression floor — no fixture they catch (or deliberately keep silent) may regress.

[DISCHARGED 2026-09-18] P-022 Stage 3 landed (merged as #359, main at 63148d0), so the cutover condition is met, not waived. The regression-floor sentence stands unchanged and was never conditional on the cutover.

Acceptance

The eight fixture families of P-036 §Phase 2 plus P-037 §8's seventeen worked cases and the branch-3 pure-ungrounded fixture: families 1–3 become regression anchors over the landed predicates; families 4–8 (summary-proven helper release, may-release policy, degraded virtual/external targets, exceptional exits, runtime-correlated confirmation) are the new summary-backed capability. Findings carry call/branch witnesses; runtime correlation keeps stable static identities; the two P-037 verdict-change classes are the only permitted diffs against the collapsed-view golden dumps.

[AMENDED 2026-09-18] Read "the three P-037 declared difference classes" — APPLICATION_REFINEMENT, SUMMARY_REFINEMENT, LEGACY_HONESTY — per the governance amendment. Class 3 is verdict-preserving by construction and may not be used to change a verdict; a collapsed-view difference outside the three is a defect, not a fourth class.

Activity

  1. PhysShell commented on Sep 18, 2026

    @PhysShell
    OwnerAuthor

    A2 execution governance freeze — before the first vocabulary change

    Landed in aff77cdb162f7f9e72383a08a83ba27138705598 under
    docs/notes/p037-formal-kernel.md §10.

    This freezes A2.0 through A2.2. New implementation findings are classified as:

    1. contradict frozen P-037 -> implementation defect;
    2. expose an unrecorded theorem assumption -> proof-boundary manifest amendment;
    3. expose an unrepresented syntax/fact shape -> shape-census addition;
    4. expose a missing test/control -> evidence-infrastructure addition;
    5. require new semantics or change a frozen rule -> STOP; explicit contract amendment.

    Only case 5 reopens architecture.

    Raw fact boundary

    Roslyn reports source facts, never summary conclusions.

    Reference argument facts are:
    NullLiteral | ObjectCreation | StableParam(param) | CallResult(callee,sig) | Opaque.

    The frontend must never emit a synthetic fresh_owned fact. A call result is
    mapped to the positive nullness cell only at G-A1 application, after finalized
    summaries prove that callee returns fresh. It is opaque otherwise. Reading
    CallResult as a solver-edge transform would make the fixed pre-solver
    system depend on the value solver's own output and is a case-5 STOP.

    For nullness, forwarding the same stable nullable reference is id, never
    const-pos: identity of the predicate is not truth of the predicate.
    null is const-neg; object creation is statically non-null. Roslyn
    nullable-flow inference is not part of this contract.

    A2 staging

    A2.1: guarded sidecar becomes a known fail-loud OwnIR vocabulary on both
    doors, but remains semantically inert.

    A2.2: Roslyn emits honest sidecar facts for every relevant call, including
    sites the legacy ConsumesParam path currently treats as consuming. The
    legacy body remains authoritative.

    Acceptance through A2:

    • FACT shape: deliberate changes allowed;
    • whole MOS document: unchanged;
    • public verdicts: unchanged.

    A deliberately contradictory but valid sidecar is the named inertness control:
    A2 must accept it while leaving MOS and verdict unchanged; phase B flips the
    same fixture to a required-read control for the guarded shadow path.

    Phase B proof boundary

    No semantic wiring in B until a proof-boundary audit is green. The bounded
    Kani model (3 coordinates / 2 edges per coordinate) remains a bounded adapter
    over shared production algebra; production uses a dynamic driver. The bound is
    explicitly outside the proof boundary. Harness inventory is derived, and every
    load-bearing assumption must name either a production guarantor or
    OUTSIDE_KANI_BOUNDARY.

    Before phase C

    P-022 shadow/rollback policy must be re-scoped before intentional Rust/Python
    P-037 divergence:

    • shadow accepts only machine-classified per-document differences in the three
      declared classes;
    • rollback mechanics, exact parity on an unaffected sample, and classified
      intentional P-037 divergence are separate contracts.

    C+ is an explicit post-cut checkpoint to canonicalize the temporary double
    representation; A2 introduces stable call-site identity now.

  2. PhysShell commented on Sep 28, 2026

    @PhysShell
    OwnerAuthor

    OWNER RULING — R / record-level absence (2026-09-28), recorded from the owner's decision on the case-5 escalation in #371. It is committed verbatim in docs/notes/p037-formal-kernel.md §10.6 (0ae8213).

    Decision: accept R as an explicit out-of-A2 precision boundary. Do not add a new carrier and do not create new functions[] records in A2.

    A2.2's completeness claim is henceforth scoped as follows:

    Roslyn emits honest guarded_facts for every relevant call inside every emitted functions[] record.

    This is a scope clarification required by the measured record-level boundary, not authorization to weaken the per-record contract. For every emitted function record, the existing A2.2 rule remains absolute: every relevant call must appear, and absence is a defect.

    R boundary. A source method for which the frontend emits no functions[] record has no guarded_facts carrier in A2. Examples currently include:

    • methods whose disposable locals all escape and that have no owned parameter;
    • methods whose lowered body is empty;
    • expression-bodied members not represented by the flow-function surface.

    A2 does not create a flow record merely to host guarded facts, because that would change the MOS population and violate A2's zero-semantic-cut contract.

    A2 also does not introduce a second top-level method/sidecar carrier. Doing so would change the frozen OwnIR layout and create two representations that Phase B/C+ would later have to reconcile.

    record-absence-boundary remains an executable census boundary.

    Phase B semantics. Record absence is fail-closed. If no emitted functions[] record exists, the guarded engine has no evidence for that method. Absence must never be interpreted as:

    • must;
    • no / definite borrow;
    • an unconditional summary;
    • an eligible guard;
    • an id / neg transform;
    • proof that a call has no ownership effect.

    It is simply outside the guarded fact domain. Any implementation that converts record absence into a positive semantic claim is a defect.

    Phase B consequences:

    • Guardrail. Phase B never reads a missing record or sidecar as "no effects", borrow, unconditional, or "guard irrelevant". It means unknown: no guarded evidence.
    • Negative control. record-absence-boundary becomes a permanent Phase-B negative control. A mutant that draws a positive conclusion from absence must turn it red.

    What this decision does and does not claim. It accepts a precision / recall boundary, not semantic completeness over arbitrary C# methods. Expression-bodied wrappers and other record-less methods may hide useful guarded-summary information. That is a known gap, not evidence that such methods are semantically irrelevant. No claim is made that R is permanently acceptable.

    Reopen condition. Do not expand the carrier pre-emptively. Reopen R only when a bounded experiment demonstrates practical value that cannot be obtained through the existing functions[] surface. For example:

    • a real or corpus-derived P-037 case whose required summary path crosses a record-less method;
    • a material missed finding or unresolved summary attributable specifically to R;
    • Phase B coverage showing that record absence forms a significant fraction of otherwise eligible guarded paths.

    At that point, run a separate kill-first experiment comparing:

    1. extending the existing flow-function population; versus
    2. introducing a distinct fact-only method carrier.

    Neither design is authorized by this ruling.

    A future kill-gate, not now: after the first Phase-B shadow run, measure how many potential guarded paths break specifically because a functions[] record is missing.

    • Near zero: the carrier stays as it is.
    • A material share (for example 15–20% of real wrapper chains breaking at expression-bodied members): that is the basis for an IR extension, through the comparison above.

    Acceptance consequence for #371. #371 may close A2.2 with R recorded as this boundary if all existing A2.2 gates remain green:

    • per-emitted-record call completeness;
    • sidecar inertness;
    • whole MOS unchanged;
    • public verdicts unchanged;
    • record-absence-boundary pinned.

    After this ruling, Phase B may start from the #371 fact surface. R is not to be silently removed from the census when Phase B begins.


    Generated by Claude Code

  3. PhysShell commented on Sep 28, 2026

    @PhysShell
    OwnerAuthor

    OWNER RULING — B0 / A14 (2026-09-28). Recorded from the owner's decision on #372 (the P-037 Phase B0 proof-boundary audit). The ruling is committed verbatim in docs/notes/p037-formal-kernel.md §10.7 (0e2c01a), together with the context the owner gave with it.

    Decisions

    • B0 PASS is accepted.
    • Both §E.4 interpretations stand:
      • PRODUCTION_GUARANTOR means a mechanism that exists now;
      • apply / lower are the current formal-to-production seam, and B1 must move the K7 witness onto the real adapter.
    • B1 shadow is authorized, with all 16 entry obligations.
      • B1 must report guarded results as conditional on static dispatch.
      • B1 must not change public semantics.

    A14 (static dispatch)
    A14 is NOT accepted as a permanent production assumption. It is a mandatory pre-Phase-C gate. Before guarded summaries can become authoritative:

    1. measure dynamic-dispatch exposure on the first B1 shadow population;
    2. test whether any admissible runtime target can invalidate a static-target positive conclusion, especially MUST;
    3. if yes, Phase C must fail closed for non-exact dispatch, either through a minimal dispatch fact or another explicitly approved mechanism;
    4. no non-exact call may fabricate MUST merely from the statically resolved callee.

    Do not amend OwnIR before the measurement establishes that the information is actually needed.

    The A14 gate runs after the first B1 shadow run and before Phase C. It is sized in hours, not weeks.

    • Population:
      • the repo tree;
      • the committed corpus;
      • the P-037 controls and shapes;
      • the first B1 shadow corpus.
    • Counts:
      • relevant calls;
      • exact calls;
      • virtual/interface/abstract candidates;
      • candidates that take part in a guarded summary chain;
      • candidates where two or more possible implementations have different summary classes.
    • Hard KILL: if even one reachable virtual/interface call has a static callee that can give MUST and an admissible runtime target that does not, static dispatch cannot enter an authoritative Phase C.
    • If the KILL fires, the preferred remedy is a minimal producer fact, dispatch: exact | open, with non-exact dispatch degrading to Opaque/Unknown and never to MUST.

    Not changed now

    • A13 (finalize before cross-SCC export) is an ordinary B1 obligation.
    • A16 (normal-return scope) is an inherited, honestly classified boundary.

    Generated by Claude Code

  4. PhysShell commented on Sep 28, 2026

    @PhysShell
    OwnerAuthor

    P-037 governance record — the A18 population decomposition and PCS-0 (2026-09-28)

    1. A18-1F (#378): terminal KILL, owner-accepted.

    • The approach killed is post-processing population decomposition: rewriting OwnIR in Python after the fact and reconstructing forward closures there.
    • It hit its pre-registered final budget at 165/145 measurement lines, before any test was written. Nothing was run.
    • There is no A18-1G and no further line-budget re-plan.
    • The unrun draft is not merged; P-037 A18-1F: TERMINAL KILL — population-decomposition approach (budget 165/145), not run — do not merge #378 stays open only as the research artifact.
    • This is an operational KILL of that method. The two-seam model was neither confirmed nor refuted on the population.

    2. Standing state:

    3. PCS-0 (#379): the producer-side canonical shadow, a new premise. RESULT: KILL on budget, not run.

    • It was pre-registered at 96810e5 before any code.
    • Caps: C# ≤ 100, driver ≤ 40, tests ≤ 60, total ≤ 180.
    • The first complete draft came to C# 83/100 and tests plus probe 57/60, but the driver was 68/40 and the total 208/180.
    • The overrun is the new standalone driver's own plumbing. The producer shadow itself fit its cap, with no schema change and the ordinary lowering unchanged with the switch off.
    • Nothing was measured: neither the F0 transitive falsifier nor the 8 rows. There is no PCS-1R2.
    • Per the pre-registration, the next question is whether to freeze the P-037 implementation as a whole. That is the owner's decision.

    Generated by Claude Code

  5. PhysShell commented on Sep 28, 2026

    @PhysShell
    OwnerAuthor

    OWNER RULING (2026-09-28): P-037 IMPLEMENTATION FREEZE

    P-037 STATUS: IMPLEMENTATION FROZEN
    
    Design:                                KEEP
    formal/p037-kernel:                    KEEP
    A2 honest guarded-fact surface:        KEEP as validated research/producer work
    B0 proof-boundary result:              KEEP / PASS
    B1:                                    historical RESULT = FAIL — B1 BLOCKED (KILL 5)
    A18-0:                                 KEEP as bounded evidence only
    A18 population decomposition:          KILLED operationally
    PCS producer canonical shadow:         KILLED operationally
    Phase C:                               NOT AUTHORIZED
    
    No further P-037 implementation experiment is authorized.
    

    What is frozen. The P-037 design and the formal kernel are not rejected. Only the production migration path is frozen: B1 → reconciliation → Phase C → authoritative guarded summaries. It stopped after B1 because the migration boundary needed to justify authoritative guarded semantics could not be established within the pre-registered operational budgets.

    Evidence:

    Consequences:

    PR stack:

    Reopen conditions. Only an external structural change that lowers the cost of the necessary condition reopens P-037. Time passing does not, and neither does a new way to measure the same thing. One of:

    1. Canonical calls: independent production work makes the call representation canonical. For example, the legacy body stops folding first-party forwards into release/use, so the honest call becomes the MOS's natural source.
    2. Measurable need: a real production defect class with measurable value appears that the current predicates do not cover, with a material count on corpus or real-world code.
    3. Cheap population checks: independent infrastructure makes the population check nearly free. For example, an existing evidence runner already emits both representations and per-row MOS without a specialized driver.

    A reopen gate starts with this question, not with code: what changed since the KILL that makes the previous upper cost bound no longer apply? "We now know how to write the same script shorter" does not lift the freeze.

    #304 stays open with status FROZEN; it is not closed as "the idea is bad", because that was not established.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions