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
codegen: a function used as a value without a target type lowers to a delegate spelled from its Sharpy signature — generic, iterator-returning, defaulted, params and CLR-typed signatures reach Roslyn (SPY0908) #2277
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
A function used as a value without a target type is lowered to a Func/Action spelled from its Sharpy signature, and five signature shapes reach Roslyn (SPY0908). The semantic pass accepts f = statistics.mode; code generation then writes a delegate the C# compiler refuses. Plain signatures work as values (sorted(xs, key=os.path.basename), map(math.sqrt, xs) print python's output), so the defect is on the signature-shape axis, not the callee-kind axis: a user-defined generic function fails the same way as a stdlib one.
Contract: a function value either runs with python's result or is refused semantically with a named code (SPY0336 already refuses an overload set with a steer); SPY0908 is never the verdict (docs/design/spy0908-policy.md).
Cells
Measured @ 729bf1e with the built sharpyc run and by the #2272 function-heading guard (StdlibDocFieldNameBindingTests, census line DOC-FN-EMIT, 29 failures over 53 doc pages; pages that hold an overload set stop at SPY0336 and never reach emission, so the census is a lower bound).
One matrix over signature shape {plain (control), generic, iterator-returning, defaulted, params, CLR-typed, overload set (SPY0336 control)} × callee kind {user function, Sharpy-sourced stdlib, hand-written C# stdlib, CLR static} × position {local without annotation, key=, map argument, annotated local}; every cell runs with python's output or carries a named semantic refusal.
Batching 2026-10-08 @ be1c16f — charter .claude/plans/remediation-round-2026-09-20-batching.md §3.12c, P60 — function-value route parity (order 12c, directly after P57). Ruling R-FW (owner, 2026-10-08): option (a) — a function whose signature has a *args tail is not a value without a lambda; refused in the SPY0335 family with the steer "wrap it: lambda a, b, c: s(a, b, c)".
Contract: a function used as a value either runs with python's result or is refused semantically with a named code — SPY0908 is never the verdict — and the value's TYPE is ONE recorded fact (full signature, defaults erased, no tail, type arguments closed) read by both the checker's through-value call check and the emitter's delegate speller, so the inferred local f = g reaches every verdict the annotated f: (…) -> T = g reaches. Lane / reach: ice · program; this issue is the class tracker.
Measured @ be1c16f (built sharpyc run):f = first[int] → SPY0335 already (the explicit spelling is refused; bare f = first reaches Roslyn — this issue's cell); m: (int, int) -> int = h → SPY0486 already, and function_types.md §Default Parameter Erasure rules k(1) through the value SPY0277 — while the inferred k = h; k(1) → SPY0908 CS7036 and k(1, 5) prints 6; m: (int) -> int = h and g: (list[int]) -> int = first → SPY0220 (no arity adaptation, no inference from the target — unchanged); f = s for def s(*xs: int) → SPY0908 CS0123 (Func<int, int>). So the generic and defaulted shapes are spelling-parity cells of EXISTING rules and need no ruling; only the tail did.
Cells / generator (REQUIRED FIRST, 3 axes): signature shape {plain (control), generic, iterator-returning, defaulted, *args tail, CLR-typed parameter, overload set (SPY0336 control)} × callee kind {user def, spy-sourced stdlib, hand-written C# stdlib, CLR static} × position {local without annotation, key=, map argument, annotated local}; each cell compiled and run against its direct-call twin, allowlist ratchet. The DOC-FN-EMIT census in StdlibDocFieldNameBindingTests is Output.WriteLine only today — the plan's first task makes it an asserted allowlist citing this issue (drain on fix). Emit-family cells (iterator return spelled from the Sharpy type; unqualified TextWriter) join the #1683/#1802 emit-family roster. No snapshot moves by design. Direction record: SPY0908 → the new code / SPY0486 + SPY0277 / runs.
Rejected: (b) type the tail as one sequence parameter (list[int]) -> int (C# normal form; f([1, 2, 3]) runs where python refuses and f(1, 2, 3) is refused — magic, one-way once written); (c) a *T spelling in function types with a per-arity variadic delegate family (a language feature; (a) → (c) later is additive). Scheduled after P57 rather than as P17e after P17's sentinel (R-GC): every refusal cell lands on an existing code or R-FW's, so the sentinel adds nothing. No seam hypothesis — the plan measures the seam.
New axis value for this class — the from … import … as ALIAS used as a value (found by the P53 sibling-cell prober @ f33b528; identical on the base binary 8be4576, so pre-existing). Plain signature (no generics, no defaults), so the failing axis here is the SPELLING of the function value, not its shape:
lib.spy: class Widget: … and def build(label: str) -> Widget: …
main.spy
sharpyc run
from lib import build as b … f = b; print(f("x").label)
SPY0908 ×2: CS0246 The type or namespace name 'Widget' could not be found, CS0407 'Widget LibModule.Build(string)' has the wrong return type
from lib import build … f = build; print(f("x").label)
runs ✅
from lib import build as b … print(b("x").label) (alias called, not stored)
runs ✅
The delegate the value lowering spells from the Sharpy signature names the return type Widget unqualified; through the alias the type's module qualification is lost (the unaliased value spells it so that it compiles). Recurrence shape of closed #1588 (alias value position). Add aliased from-import to the position axis of the acceptance matrix.
Batching 2026-10-14 @ 27e2616 — charter .claude/plans/remediation-round-2026-09-20-batching.md §3.12c, P60 — function-value route parity (order 12c; placement unchanged). The call-22 cell (the from … import … as ALIAS used as a value — f = b → CS0246/CS0407, the delegate's return type unqualified through the alias; f = build and b("x") run; recurrence shape of closed #1588) is recorded: aliased from-import joins the position axis of the generator.
Cell (found by P78's stage-0 generator, plan-777361; outside that plan's contract). Measured with sharpyc run on product code == dev @ e24aaf9f0.
Program
Observed
Expected
from system import Array / x: object = Array.resize
SPY0908 behind CS8917 (The delegate type could not be inferred)
a refusal with a Sharpy code
the same read at a parameter default
SPY0908 behind CS1736
a refusal with a Sharpy code
from system import Math / x: object = Math.abs
SPY0336 ('abs' is a CLR method group; call it, or wrap it in a lambda)
(control: the non-generic overloaded group is refused with a code)
A generic CLR method read uncalled, with no target type, is not caught by the SPY0336 rule that catches an overloaded CLR method group, and reaches Roslyn. Lane: ice · reach: program. The generator excludes the generic-method shape with a probe tied to this member.
Two cells (found by P78's stage-0 generator, plan-777361; outside that plan's contract). Reproduced with sharpyc run on product code == dev @ e24aaf9f0. Both fail with a literal default, so neither is a scoping verdict.
Program
Observed
Expected
class H: / @static / g: auto = lambda p1: int = 5: p1 / def main() -> None: / print(H.g())
SPY0908 behind CS7036 (no argument given that corresponds to the required parameter 'arg' of 'Func<int, int>')
5, or a Sharpy diagnostic at the call
class H: / property r: int = (lambda p1: int = 5: p1)() / def main() -> None: / print(H().r) (also the @static form)
SPY0908 behind CS0103 (The name '__lambda_0' does not exist in the current context)
5
The first is this tracker's "defaulted" signature: a lambda stored in an auto field becomes a delegate whose type carries no default. The second may be a different mechanism (a lambda with a default hoisted out of a property default); it is posted here as the nearest open class and may want its own tracker. Lane: ice · reach: program. The generator excludes both shapes with a probe each.
Cell with an owner ruling (2026-11-20; #2423 comment 7052893050, item 29): a function target type selects the overload of a CLR method group. Found by the independent review of PR #2767; reproduced with sharpyc run on product code == dev @ e24aaf9f0.
Program
Observed
Expected
from system import Math / x: (float) -> float = Math.abs / print(x(-1.5))
SPY0336 ('abs' is a CLR method group; call it, or wrap it in a lambda)
runs, 1.5
from system import Char / g: (char) -> bool = Char.is_digit / print(g('5'))
dotnet_interop.md says a function target type at the reference site selects the method for a Sharpy builtin's method (counter: (int) -> int = xs.count). The owner's words on the CLR case: "Must-run, known-red" — "a function target type selects a CLR overload". P78's generated cells for this shape become must-run and cite this tracker; the fix is not P78's. Lane: false-refusal · 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
fix(docs): the stdlib docs generator places every member where the co…
antonsynd commentedon Oct 9, 2026
Batching 2026-10-08 @ be1c16f — charter
.claude/plans/remediation-round-2026-09-20-batching.md§3.12c, P60 — function-value route parity (order 12c, directly after P57). Ruling R-FW (owner, 2026-10-08): option (a) — a function whose signature has a*argstail is not a value without a lambda; refused in the SPY0335 family with the steer "wrap it:lambda a, b, c: s(a, b, c)".Contract: a function used as a value either runs with python's result or is refused semantically with a named code — SPY0908 is never the verdict — and the value's TYPE is ONE recorded fact (full signature, defaults erased, no tail, type arguments closed) read by both the checker's through-value call check and the emitter's delegate speller, so the inferred local
f = greaches every verdict the annotatedf: (…) -> T = greaches. Lane / reach: ice · program; this issue is the class tracker.Measured @ be1c16f (built
sharpyc run):f = first[int]→ SPY0335 already (the explicit spelling is refused; baref = firstreaches Roslyn — this issue's cell);m: (int, int) -> int = h→ SPY0486 already, andfunction_types.md§Default Parameter Erasure rulesk(1)through the value SPY0277 — while the inferredk = h; k(1)→ SPY0908 CS7036 andk(1, 5)prints6;m: (int) -> int = handg: (list[int]) -> int = first→ SPY0220 (no arity adaptation, no inference from the target — unchanged);f = sfordef s(*xs: int)→ SPY0908 CS0123 (Func<int, int>). So the generic and defaulted shapes are spelling-parity cells of EXISTING rules and need no ruling; only the tail did.Cells / generator (REQUIRED FIRST, 3 axes): signature shape {plain (control), generic, iterator-returning, defaulted,
*argstail, CLR-typed parameter, overload set (SPY0336 control)} × callee kind {user def, spy-sourced stdlib, hand-written C# stdlib, CLR static} × position {local without annotation,key=,mapargument, annotated local}; each cell compiled and run against its direct-call twin, allowlist ratchet. TheDOC-FN-EMITcensus inStdlibDocFieldNameBindingTestsisOutput.WriteLineonly today — the plan's first task makes it an asserted allowlist citing this issue (drain on fix). Emit-family cells (iterator return spelled from the Sharpy type; unqualifiedTextWriter) join the #1683/#1802 emit-family roster. No snapshot moves by design. Direction record: SPY0908 → the new code / SPY0486 + SPY0277 / runs.Rejected: (b) type the tail as one sequence parameter
(list[int]) -> int(C# normal form;f([1, 2, 3])runs where python refuses andf(1, 2, 3)is refused — magic, one-way once written); (c) a*Tspelling in function types with a per-arity variadic delegate family (a language feature; (a) → (c) later is additive). Scheduled after P57 rather than as P17e after P17's sentinel (R-GC): every refusal cell lands on an existing code or R-FW's, so the sentinel adds nothing. No seam hypothesis — the plan measures the seam.antonsynd commentedon Oct 14, 2026
New axis value for this class — the
from … import … asALIAS used as a value (found by the P53 sibling-cell prober @ f33b528; identical on the base binary 8be4576, so pre-existing). Plain signature (no generics, no defaults), so the failing axis here is the SPELLING of the function value, not its shape:lib.spy:class Widget: …anddef build(label: str) -> Widget: …main.spysharpyc runfrom lib import build as b…f = b; print(f("x").label)The type or namespace name 'Widget' could not be found, CS0407'Widget LibModule.Build(string)' has the wrong return typefrom lib import build…f = build; print(f("x").label)from lib import build as b…print(b("x").label)(alias called, not stored)The delegate the value lowering spells from the Sharpy signature names the return type
Widgetunqualified; through the alias the type's module qualification is lost (the unaliased value spells it so that it compiles). Recurrence shape of closed #1588 (alias value position). Addaliased from-importto the position axis of the acceptance matrix.antonsynd commentedon Oct 14, 2026
Batching 2026-10-14 @ 27e2616 — charter
.claude/plans/remediation-round-2026-09-20-batching.md§3.12c, P60 — function-value route parity (order 12c; placement unchanged). The call-22 cell (thefrom … import … asALIAS used as a value —f = b→ CS0246/CS0407, the delegate's return type unqualified through the alias;f = buildandb("x")run; recurrence shape of closed #1588) is recorded: aliased from-import joins the position axis of the generator.antonsynd commentedon Nov 20, 2026
Cell (found by P78's stage-0 generator, plan-777361; outside that plan's contract). Measured with
sharpyc runon product code ==dev@e24aaf9f0.from system import Array/x: object = Array.resizeThe delegate type could not be inferred)from system import Math/x: object = Math.abs'abs' is a CLR method group; call it, or wrap it in a lambda)A generic CLR method read uncalled, with no target type, is not caught by the SPY0336 rule that catches an overloaded CLR method group, and reaches Roslyn. Lane: ice · reach: program. The generator excludes the generic-method shape with a probe tied to this member.
Generated by Claude Code
antonsynd commentedon Nov 20, 2026
Two cells (found by P78's stage-0 generator, plan-777361; outside that plan's contract). Reproduced with
sharpyc runon product code ==dev@e24aaf9f0. Both fail with a literal default, so neither is a scoping verdict.class H:/@static/g: auto = lambda p1: int = 5: p1/def main() -> None:/print(H.g())no argument given that corresponds to the required parameter 'arg' of 'Func<int, int>')5, or a Sharpy diagnostic at the callclass H:/property r: int = (lambda p1: int = 5: p1)()/def main() -> None:/print(H().r)(also the@staticform)The name '__lambda_0' does not exist in the current context)5The first is this tracker's "defaulted" signature: a lambda stored in an
autofield becomes a delegate whose type carries no default. The second may be a different mechanism (a lambda with a default hoisted out of a property default); it is posted here as the nearest open class and may want its own tracker. Lane: ice · reach: program. The generator excludes both shapes with a probe each.Generated by Claude Code
antonsynd commentedon Nov 20, 2026
Cell with an owner ruling (2026-11-20; #2423 comment 7052893050, item 29): a function target type selects the overload of a CLR method group. Found by the independent review of PR #2767; reproduced with
sharpyc runon product code ==dev@e24aaf9f0.from system import Math/x: (float) -> float = Math.abs/print(x(-1.5))'abs' is a CLR method group; call it, or wrap it in a lambda)1.5from system import Char/g: (char) -> bool = Char.is_digit/print(g('5'))Trueconst K: (int) -> int = Math.absg: (float) -> float = Math.sqrt/print(g(4.0))(one overload; control)2.0x: (float) -> float = math.log(the Sharpy module's overloaded function; control)x: object = Math.abs(no function target type)dotnet_interop.mdsays a function target type at the reference site selects the method for a Sharpy builtin's method (counter: (int) -> int = xs.count). The owner's words on the CLR case: "Must-run, known-red" — "a function target type selects a CLR overload". P78's generated cells for this shape become must-run and cite this tracker; the fix is not P78's. Lane: false-refusal · 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