Repository navigation
M2: generator fail-closed walls batch (F08 F09 F10 F11 F13 F14 F15 + P2 fold) #21
Copy link
Copy link
Closed
Labels
ready-for-agentSpecified enough that the work is mechanicalSpecified enough that the work is mechanical
Description
Source: multi-agent review of PR #16, all CONFIRMED, all latent on the current pin (none active on the selected M1 surface). 2026-08-13. M-anchor: M2 boundary — exactly when pin refresh + breadth batches start stressing these walls. One batch, red-test-first per wall.
- F08 · low —
LiteralClassifieradmits numeric singleton enums (LiteralClassifier.cs:76-78),TypePlanBindermaps non-boolean literals tostringwithout a binding error (SchemaPlanBinder.cs:480), emitters throw rawInvalidOperationException. Verifier-corrected fix: do not refuse at ingestion (whole-spec projection must keep unreachable schemas); refuse at binding when a numeric literal enters the selected reachable closure; emitter throws stay as invariant backstops. ~40 pinned durableversionliterals make M3 the likely trigger. - F09 · medium —
UnionNormalizer.ProjectacceptsoneOf/anyOf(UnionNormalizer.cs:45-47) butIsMarkedUnionReferencerequirestarget.AnyOf(:189-193); a legal nested markedoneOfunion is misclassified structural and refused. Fix onlyIsMarkedUnionReference(exclusive oneOf-or-anyOf purity); do not broadenIsPureAnyOfBranch(also serves the v2 special-number dialect). Projection + binder tests. - F10 · medium —
BindErrorUnion(SchemaPlanBinder.cs:276-337) never checks document-wide tag uniqueness (existing check is per operation+status only); duplicate tags emit a converter whoseTypesByTaginitializer throwsTypeInitializationExceptionon first error deserialize. Fix: ordinalGroupBy(Tag)duplicate check → binding error, no union. Test with two Effect-tagged schemas sharing_tag. - F11 · medium —
OperationMethodEmitterappendsoptions/cancellationTokenafter bind-time collision checks (OperationMethodEmitter.cs:46-51); handle clients ownpipeline/_pipeline/Pipeline. A wire parameter with those names fails at emit (CS0100) instead of bind. Fix: reserveoptions,cancellationToken,pipelinein binder parameter validation (naming category); never silently rename in emitters. Synthetic binder cases for normal + handle parameters. - F13 · medium — STJ accepts numeric enum values even with
UseStringEnumConverter;ValidateGroupShapehas no default arm (CurationValidator.cs:53-61) andAssembleClientspartitions onlyRoot/Client→"placement": 2silently drops a selected group. Verifier-corrected fix: default switch arm recording a curation error naming the invalid value (do not re-addJsonStringEnumConverter— already enabled and insufficient) + numeric-placement regression fixture. - F14 · medium —
RoutesEmitter.EmitConcatenationsubstitutes only the first occurrence of a repeated placeholder (RoutesEmitter.cs:107-130);PathTemplateValidatorstores tokens in aHashSetso multiplicity is lost. Fix under the current dialect: validator rejects token occurrence count != 1; assert no braces remain after emission. - F15 · low —
CheckTypeNameCollisionsseeds only client+response names (OperationPlanBinder.cs:159-184). Verifier caveat: models live inOpenCode.Sdk.Models, so equal names give consumer CS0104 ambiguity, not CS0101; hard CS0101 remains for clashes with hand-writtenOpenCode.Sdkspine types. Fix: seed withtypeNames.Values(cross-namespace shadowing) + reserve hand-written public spine names (real CS0101). Tests for both. - P2 fold · perf, low —
ReadDataPayloaddouble-parse (ResponseAdapter.cs:52-59): M2's{cursor,data}/{data,hasMore}envelope work introduces source-generated envelope DTOs anyway; fold the single-pass{ "data": TPayload }wrapper into that design. Preserve missing/null/malformed → protocol-failure behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ready-for-agentSpecified enough that the work is mechanicalSpecified enough that the work is mechanical
Activity
fix(generator): land the fail-closed walls batch (#21)
fix(sdk): land the small confirmed review fold-ins