Skip to content

test(conformance): P77 verify — guard gaps, stale artifacts, record - #2751

Merged
antonsynd merged 6 commits into
devfrom
claude/p77-verify
Nov 19, 2026
Merged

antonsynd merged 6 commits into
devfrom
claude/p77-verify

Conversation

@antonsynd

@antonsynd antonsynd commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

P77 — /verify-implementation of plan-775c50

The implementation merged as #2742. This lane carries the verify round's remediation and, as its last commit, the ## Implementation Verification Record in plan-775c50 (stamp CONVERGED, Adequacy CLASS, tier full). No product code changes.

Result. Five refuting auditors read 6d6c5c9b2..f968835c1 (dev just before the merge against the merge; 474 files) and found no regression: nothing red at the tip that was green at the base, in any suite or in about 250 probe programs outside the generator's matrix, each run on both binaries and under CPython 3.15.2.

Gate: 85541/0/10 @ 5a5adce6c (measured, run 44554132404), Python Build Tools green (run 44554139066). The tip after it, c59145b63, changes only the plan file. Baseline: 85539/0/12 @ a2876b2e2 (measured, run 44517339246); the two extra skips there are coverage-only.

Independent review @ c9179c2: merge after fixes; 3 applied, 0 declined (reasons below); fixes c9179c2..5a5adce read by the lead

What this pull request changes

Commit Change Why
7356ab494 AsyncGuardedUseFactTests: a cell for the with, for, comprehension and tuple-leaf arms of the async-use fact the with arm could be replaced by false with all 25 AsyncGuarded* tests green
2f2ea0234 the #2588 cell reads the sweep-before-main order off the exception that escapes it asserted on a stdout the helper discards when the program throws
bea6f9262 the drained initializer-dependency-differential-allowlist.txt deleted; scorecard seed baseline 2379 → 2377; two stale comments contract §11; the last two rows drained without --lower
c9179c2e1 parameter_modifiers.md: the out operand's read-by-name example (7 42; 42 7 at the base); a ref / in example that differs at the base (3 2 3 against 0 1 3) deferred finding F14's spec half; the old example printed 2 3 3 at both
5a5adce6c the review's three findings: a comment, one spec clause, one design-doc row below
c59145b63 the verification record

Mutation outcomes

Guard Mutation Broken Restored
AsyncGuardedUseFactTests each of the four arms → false, one at a time 2 of 3 failed, four times 3 passed
MainRequiresItsModule_AndAFailedSweepStopsBeforeMain Main loads after its body 1 of 5 failed (ValueError) 5 passed
InitializerDependency_Sweep (the plan's one unrecorded M5 mutation) a class swept only at its line; a closed generic type's sweep deferred 32/1/0, 92 and 220 cells red, the probe prints 5 7 33/0/0

Thirteen more guards of the plan's range were mutated by the class-cure auditor: twelve red, one vacuous (the first row above). The full table is in the record.

Class status

  • Contract: a module or @static value's readiness, and the emission of a reference to it, do not depend on the path, spelling or position of the use, nor on what its initializer reads.
  • Standing harness: InitializerDependencyDifferentialTests — pool 3267, red 0, allowlist 0 rows, python agreed 1372 of 1372, and its allowlist file is gone.
  • Seams: the store seam and the binding resolver are each one point. Two arms were found and filed, not widened here:
    • the backing field of a Guarded @static property default, read as H._hp before its initializer, prints a storage default (0 7 7) under the experimental property_observers flag; the base gave SPY0908. It is inside the plan's contract and is the one counterexample found to "no read returns a value never given one".
    • the operand rule (SPY0389) misses a subclass that redeclares a base field as a property: CS0206 behind SPY0908, at both shas.
  • Cost, measured and unruled: in Debug, the default of sharpyc run, a loop over a @static += and a module read is about 2.8× slower than at the base (Release: level). A host whose TryLoad lost the lock stays unswept for the process, and its reads then take the process-wide lock, about 22–28 ns against about 0.7 ns.

Issues

Refs #2422, #2412, #2420. Each meets its close criterion in the plan's "Issues to Close":

Issue Evidence
#2422 pool 3267, red 0, allowlist 0; no allowlist row cites it; the no-initializer cell is on #2427 (comment 6967863739); the gate above. Its residue is on #2427
#2412 no row cites it; the alias const cycle is SPY0278 @ a2876b2, 2 1 @ 6d6c5c9
#2420 DetectInitializerDependencies is gone; seeds D10 and E06 print 6 @ a2876b2, SPY0908 CS0103 @ 6d6c5c9
sharpy-issues:
  closes: [2422, 2412, 2420]
  files: []

No issue filed: every cell had an open tracker (eleven cells, seven comments).

Independent review

One reviewer that wrote none of the code, read-only, given the diff and both built compilers, never the plan.

  • F1, applied. The new cells' comment claimed a cell for every arm of IsElementOf. I tried a cell for its list arm and its parenthesized arm: with each arm replaced by false the test stayed green, because the parser gives those targets a TupleLiteral. The two vacuous cells are not added; the comment names the three arms no accepted program reaches.
  • F2, applied. One clause in the new out paragraph: the value stays initialized, so its declaration does not run the initializer again.
  • F3, applied. gap-discovery-contracts.md no longer describes the deleted file as present.

The fix round adds no guard and no abstraction, so it takes no second review.

Unresolved

  • The two filed arms and the two costs above.
  • SPY0278's explanation is still titled "Circular constant reference", though its message says "value".
  • Not reached by any auditor: LSP hover, rename and semantic tokens on a Guarded value; a second thread reading a module host mid-sweep; a C# consumer's static constructor reading an unswept Sharpy host.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LGMKZW5iXgCkmJYFuSUhUm

plan-775c50 /verify-implementation, class-cure audit: the WithStatement arm
of AsyncGuardedUseAnalyzer.IsStoreTarget could be replaced by false with
FullyQualifiedName~AsyncGuarded still green (25/25), although
DispatchSiteInventoryTests rosters the site as netted by this type. The
generator held a member store only as an assignment's target.

Four uses join the generator, a member of the value as a tuple leaf and as
a for / with / comprehension target, each expected Ensure, over the six
non-const spellings and both views.

Mutations, each on AsyncGuardedUseAnalyzer.cs alone, restored by cp and
cmp, filter FullyQualifiedName~AsyncGuardedUseFactTests (3 tests):
- WithStatement arm -> false: broken -> red (2 failed, 1 passed)
- ForStatement arm -> false: broken -> red (2 failed, 1 passed)
- ForClause arm -> false: broken -> red (2 failed, 1 passed)
- IsElementOf's TupleLiteral arm -> false: broken -> red (2 failed, 1 passed)
- restored -> green (3 passed)
Measured @ a2876b2 plus this change.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LGMKZW5iXgCkmJYFuSUhUm
plan-775c50 /verify-implementation. The #2588 cell asserted that stdout
does not contain "main", but ProjectCompilationHelper returns an empty
stdout whenever the program throws, so the absence had no positive control:
a Main that ran the user's body first and the sweep after it stayed green.

main now raises its own ValueError, and the test asserts that the
exception under the reflection wrapper is exactly ZeroDivisionError: the
sweep ran first, and nothing wraps what it raised (D3; Q3).

Mutation, RoslynEmitter.ModuleClass.cs: Main's __Load() appended to its
body in place of inserted first; filter
FullyQualifiedName~StaticInitSweepProjectTests (5 tests):
broken -> red (1 failed, 4 passed: found "ValueError");
restored by cp and cmp -> green (5 passed).
Measured @ a2876b2 plus this change.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LGMKZW5iXgCkmJYFuSUhUm
plan-775c50 /verify-implementation, stale artifacts (contract section 11):
- initializer-dependency-differential-allowlist.txt held 0 rows since
  086a550 and was never deleted. The test reads a missing file as empty
  (the ratchet stays), it has no seed line and no pin entry.
- scorecard_metrics.py --lower: allowlist_rows_seed 2379 -> 2377, the two
  rows 410a688 drained without lowering. --check: RESULT OK.
- Two comments that still described drained rows or a retired SPY0618 in
  the present tense now say what holds: SPY0618's forward-read rule is
  retired, the code stays for N2's shape (owner ruling, 2026-11-17).

No assertion changes. The generator's run with the file absent is recorded
in the plan's verification record.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LGMKZW5iXgCkmJYFuSUhUm
plan-775c50 /verify-implementation, two docs findings in
parameter_modifiers.md:
- Deferred finding F14 asked the spec to name both moves of an out operand
  on a value not yet initialized. The NameError inside the value's own
  initializer was there; the callee's read by name before the initializer
  was not. New block: 7 42 @ a2876b2, 42 7 @ 6d6c5c9 (the ruling is
  Q-F (a) of the plan's verification summary).
- The ref / in example ran its operands from main, where every value is
  ready at the base too (2 3 3 at both shas), so it did not show
  "initialized first". It now runs them from an earlier initializer:
  3 2 3 @ a2876b2, 0 1 3 @ 6d6c5c9.
Both blocks carry the output marker and were run with sharpyc run (Debug).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LGMKZW5iXgCkmJYFuSUhUm
Independent review of #2751 @ c9179c2 (merge after
fixes), its three findings:

- F1: the comment on the new cells claimed one cell per arm of
  IsElementOf; only its TupleLiteral arm has one. A cell was tried for
  the list arm ([v.x, n0] = ...) and for the parenthesized arm
  ((v.x, n0) = ...): with each arm replaced by false the type stayed green
  (3 passed both times), because the parser gives a list target and a
  parenthesized tuple target a TupleLiteral (sharpyc emit ast, for an
  assignment, a for and a comprehension). A starred member target is
  SPY0106. The two vacuous cells are not added; the comment names the
  three arms no accepted program reaches, and why.
- F2: parameter_modifiers.md says the value stays initialized after the
  callee's read, so its declaration does not run the initializer again.
- F3: gap-discovery-contracts.md no longer describes the deleted
  allowlist file as present.

No assertion and no cell changes against c9179c2: comments and prose only.
FullyQualifiedName~AsyncGuardedUseFactTests|~DispatchSiteInventoryTests:
20 passed, 0 failed, measured on this tree.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LGMKZW5iXgCkmJYFuSUhUm
Appends the Implementation Verification Record: five refuting auditors
over 6d6c5c9..f968835 (the merge of #2742), no
regression found, six completeness gaps and two vacuous assertions fixed
on this lane, eleven cells posted to seven open trackers, no issue filed.

Gate, the last code commit's: 85541/0/10 @ 5a5adce (measured, run
44554132404), Python Build Tools green (run 44554139066).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LGMKZW5iXgCkmJYFuSUhUm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants