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
semantic: a position that requires a compile-time constant is left to Roslyn — a non-constant enum member value is CS0133, a default through H.x is CS1736, both behind SPY0908 #2432
class-trackerThe one issue per class: carries the contract and the cell tablelane:iceInternal compiler error: SPY0908/SPY0909, a CSxxxx leak, a crashreach:programAn ordinary program a Python programmer would write hits it
Class (contract): a position that requires a compile-time constant refuses a non-constant expression at semantic time, under its own diagnostic. It never reaches Roslyn behind SPY0908 (docs/design/spy0908-policy.md). The check exists for some spellings: SPY0401 fires on a plain default that reads a @static field. Other spellings and the enum member position pass the checker.
Found by the name-resolution differential (P77a, #2421) and its /verify-implementation round. Measured with sharpyc run @ 5f8a4c4.
position
program
observed
expected
enum member value
x: int = 5 / enum R0: / RED = x
SPY0908 CS0133
a semantic refusal
enum member value
RED = x() with def x() -> int
SPY0908 CS0133
a semantic refusal
parameter default
class H(B): def r(self, p0: int = H.x) with x a @static field inherited from B
SPY0908 CS1736
SPY0401
parameter default
def r(self, p0: int = H.x) with x a @static property
SPY0908 CS1736
SPY0401
struct field initializer
struct H: r: int = H.x with x a @static property
SPY0908 CS1736
SPY0401
control
def r(self, p0: int = H.x) with x a @static field on H itself
SPY0401
SPY0401
The @static property arms sit next to #2417 (the read is untyped), but a typed read still needs this check to refuse it, so they belong here.
Lane / reach: ice · program. Allowlist rows in src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt: every CS0133 and CS1736 cell cites this issue, and the row names the generated program.
Not probed: const initializers beyond the sweep's cells, attribute arguments, the dataclass field route outside the sweep's cells.
Drain set @ fd925ddca (measured): 27 rows cite this issue: CS0133 / CS1736 in a constant position. They cited #2423 only through a default arm in the harness's route, which is gone.
Batching 2026-11-05 @ ee9a007 — charter .claude/plans/remediation-round-2026-09-20-batching.md §3.20l, P78 — N1/N2/N4/N7: scope decides meaning (order 6c⁶⁵: directly after P77, before P79). Ruling R-KV (owner, 2026-11-05, D8): (a) P78 — the constant-position validator's membership walk under N4 ("constants are not special": foldability decides legality, never what a name means); the plan author may split it off as P78b if the gate is too wide.
Contract: every position that requires a compile-time constant (enum member value, parameter default, struct field default, dataclass field default) reaches the same verdict for the same expression kind — SPY0401 for a non-constant, never CS0133/CS1736 behind SPY0908. Lane / reach: ice · program. Cells (27 allowlist rows citing this issue @ ee9a007): enum member value RED = x / RED = x() → CS0133; a parameter default / struct field / dataclass field through an INHERITED static or a @static property → CS1736; the own-static control is SPY0401. One class: position × expression kind {own static, inherited static, static property, call, alias}. Joins P78 beside #2398's interface/union parameter-default cell (SPY0200 + SPY0401 → one diagnostic). Rejected: (b) P30 — the validator reads the member-shape table P30 builds (static-ness, inherited, property), but the enum position stays an outlier there; P30's table is a dependency P78 reads when it lands. Two-way (placement). Class tracker: this issue.
Drain set after P77b (name-resolution differential, branch remote/p77b-implement-plan @ 0c0bdcf)
29 rows of src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt cite this issue (27 at the plan base 2279c0d), all read Ice. When the cure lands, every one of these rows must drain: a stale row fails the sweep.
To list them: grep -n '# #2432' src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txt
Both now Match. The cause is a P77 fix: TryResolveTypeMemberAccess binds a static or const reached through a subclass to its declaring symbol (866a9a2), so the default through the base resolves as C.x does. The issue's other rows stay.
Two cells of this class found by plan-777361's (P78) revision after pass 2, outside that plan's contract. Both measured with sharpyc run, Debug, product code == e24aaf9f0 (origin/dev).
Cell
Program
Observed
Expected
Lane
Reach
enum member value × a constant of a wider integer type
from system import Int64 / enum Q: / RED = Int64.max_value / def main(): / print(1)
SPY0908 CS0266 ("Cannot implicitly convert type 'long' to 'int'")
a checker refusal at the member value
ice
probe
attribute argument × unused-import warning
from system import Math / import system.component_model / class H: / @[system.component_model.default_value(Math.PI)] / property p: float = 1.0 / def main(): / print(H().p)
runs 1.0, with SPY0452 "Imported name 'Math' is never used" and the same for system.component_model
no warning: both imports are used by the attribute
message
probe
The second goes away once the checker visits bracket-attribute arguments, which P78's plan now carries (its D8, pass-2 finding 3).
Cell, in P78's contract (plan-777361, held by its acceptance A14). Measured with sharpyc project / run on product code == dev @ e24aaf9f0; the multi-file route was not measured by verify pass 3.
Imported module consts declares const Q with a computed (non-literal) initializer; the importer reads it at a parameter default.
Importer spelling
Observed
Expected
import consts / def f(p: int = consts.Q)
SPY0908 behind CS1736
SPY0401
import consts as c0 / def f(p: int = c0.Q)
SPY0908 behind CS1736
SPY0401
the three from-import forms, def f(p: int = Q)
SPY0401
SPY0401
an imported literal const and an imported class's const at a default, all five forms
run, print 5 9
run
These figures are the revising agent's measurement; verify pass 4 has not graded them yet.
Cell (found by the independent review of PR #2767's test code; not generated, by the owner's decision of #2423 comment 7052893050 item 26). The arrow-lambda spelling takes a function-typed parameter annotation with a default, and a non-constant there reaches Roslyn.
Program
Observed
Expected
import math / f = (p: (float) -> float = math.sqrt) -> p ✔
SPY0908 behind CS1736
SPY0401
f = (p: () -> int = five) -> p
SPY0401
SPY0401 (control)
f = (p: system.DayOfWeek = system.DayOfWeek.Monday) -> p
runs
runs (control)
P78's generator has a lambda-keyword host for a lambda's default and none for the arrow spelling, though the same validator call judges both. ✔ = reproduced with sharpyc run on product code == dev @ e24aaf9f0. Lane: ice · reach: program.
class-trackerThe one issue per class: carries the contract and the cell tablelane:iceInternal compiler error: SPY0908/SPY0909, a CSxxxx leak, a crashreach:programAn ordinary program a Python programmer would write hits it
Activity
antonsynd commentedon Nov 5, 2026
Drain set @
fd925ddca(measured): 27 rows cite this issue: CS0133 / CS1736 in a constant position. They cited #2423 only through a default arm in the harness's route, which is gone.Rows
These shas are on local
dev, not pushed yet.test(p77a): verify round: the harness reads what it claimed to read (#…
ci(p77a): the name-resolution sweep fails without python; contract ro…
antonsynd commentedon Nov 5, 2026
Batching 2026-11-05 @ ee9a007 — charter
.claude/plans/remediation-round-2026-09-20-batching.md§3.20l, P78 — N1/N2/N4/N7: scope decides meaning (order 6c⁶⁵: directly after P77, before P79). Ruling R-KV (owner, 2026-11-05, D8): (a) P78 — the constant-position validator's membership walk under N4 ("constants are not special": foldability decides legality, never what a name means); the plan author may split it off as P78b if the gate is too wide.Contract: every position that requires a compile-time constant (enum member value, parameter default, struct field default, dataclass field default) reaches the same verdict for the same expression kind — SPY0401 for a non-constant, never CS0133/CS1736 behind SPY0908. Lane / reach: ice · program. Cells (27 allowlist rows citing this issue @ ee9a007): enum member value
RED = x/RED = x()→ CS0133; a parameter default / struct field / dataclass field through an INHERITED static or a@static property→ CS1736; the own-static control is SPY0401. One class: position × expression kind {own static, inherited static, static property, call, alias}. Joins P78 beside #2398's interface/union parameter-default cell (SPY0200 + SPY0401 → one diagnostic). Rejected: (b) P30 — the validator reads the member-shape table P30 builds (static-ness, inherited, property), but the enum position stays an outlier there; P30's table is a dependency P78 reads when it lands. Two-way (placement). Class tracker: this issue.test(p77b): restore READ's pruned outers and builtins under a ReadOut…
antonsynd commentedon Nov 6, 2026
Drain set after P77b (name-resolution differential, branch
remote/p77b-implement-plan@ 0c0bdcf)29 rows of
src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txtcite this issue (27 at the plan base 2279c0d), allreadIce. When the cure lands, every one of these rows must drain: a stale row fails the sweep.To list them:
grep -n '# #2432' src/Sharpy.Compiler.Tests/Conformance/name-resolution-differential-allowlist.txtGenerated by Claude Code
test(p77b): restore READ's outers and the builtins under ReadOuter (D…
test(p77b): R-KX and R-LI, a read above a same-scope declaration is m…
test(p77b): R-KY, a store over a def or type name is must-refuse N6-t…
test(p77b): R-KZ, a match or as capture reused after its arm is must-…
test(p77b): R-LA, a construct target reusing a builtin's name is must…
test(p77b): R-LH, a bare store over a method's name is must-refuse SP…
5 remaining items
test(conformance): drop two #2432 rows the subclass binding fixed
antonsynd commentedon Nov 18, 2026
PR #2742 (P77) drains two rows of this issue from
name-resolution-differential-allowlist.txt(commit 410a688):read/ClassComputedConst/ParameterDefault/base/H.x Iceread/StaticField/ParameterDefault/base/H.x IceBoth now Match. The cause is a P77 fix:
TryResolveTypeMemberAccessbinds a static or const reached through a subclass to its declaring symbol (866a9a2), so the default through the base resolves asC.xdoes. The issue's other rows stay.Generated by Claude Code
test(conformance): P78 stage 0: ScopeMeaningDifferentialTests
process(plan): plan-777361 (P78) revised before pass 1
test(conformance): P78 stage 0: close ScopeMeaning's seven axes
test(conformance): P78 stage 0: pin constant readers, member kinds
antonsynd commentedon Nov 20, 2026
Two cells of this class found by plan-777361's (P78) revision after pass 2, outside that plan's contract. Both measured with
sharpyc run, Debug, product code ==e24aaf9f0(origin/dev).from system import Int64/enum Q:/RED = Int64.max_value/def main():/print(1)from system import Math/import system.component_model/class H:/@[system.component_model.default_value(Math.PI)]/property p: float = 1.0/def main():/print(H().p)1.0, with SPY0452 "Imported name 'Math' is never used" and the same forsystem.component_modelThe second goes away once the checker visits bracket-attribute arguments, which P78's plan now carries (its D8, pass-2 finding 3).
Generated by Claude Code
test(conformance): P78 stage 0: spellings, module roster, probes
process(plan): plan-777361 (P78) revised after pass 3
antonsynd commentedon Nov 20, 2026
Cell, in P78's contract (plan-777361, held by its acceptance A14). Measured with
sharpyc project/runon product code ==dev@e24aaf9f0; the multi-file route was not measured by verify pass 3.Imported module
constsdeclaresconst Qwith a computed (non-literal) initializer; the importer reads it at a parameter default.import consts/def f(p: int = consts.Q)import consts as c0/def f(p: int = c0.Q)def f(p: int = Q)constand an imported class'sconstat a default, all five forms5 9These figures are the revising agent's measurement; verify pass 4 has not graded them yet.
Generated by Claude Code
test(conformance): P78 stage 0: decimal constants, lambda defaults
process(plan): plan-777361 (P78) revised after pass 4
antonsynd commentedon Nov 20, 2026
Cell (found by the independent review of PR #2767's test code; not generated, by the owner's decision of #2423 comment 7052893050 item 26). The arrow-lambda spelling takes a function-typed parameter annotation with a default, and a non-constant there reaches Roslyn.
import math/f = (p: (float) -> float = math.sqrt) -> p✔f = (p: () -> int = five) -> pf = (p: system.DayOfWeek = system.DayOfWeek.Monday) -> pP78's generator has a
lambda-keyword host for a lambda's default and none for the arrow spelling, though the same validator call judges both. ✔ = reproduced withsharpyc runon product code ==dev@e24aaf9f0. Lane: ice · reach: program.Generated by Claude Code
test(conformance): P78 stage 0: fixes after the independent review
process(plan): plan-777361 (P78) fix round after the independent review