Resolve Screenplay options once, at the entry point that sees them first - #2452
Resolve Screenplay options once, at the entry point that sees them first#2452woksin wants to merge 1 commit into
Conversation
WithDefaults ran twice on the way through a generation - once in the generator against the assembly being analyzed, once again in the emitter against the domain of the model - and the two fallbacks are different questions that only happen to agree today. A host calling Emit directly therefore behaved subtly differently from the same model reached through a generation. Resolved options now answer with themselves, so whichever entry point sees them first decides the fallback and the other half reads that decision rather than working one out again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfEAq3cyHk3mrWpo8QA9db
|
Reviewer notes. What changed. Why the flag rather than deleting one call site. The two fallbacks answer different questions and are not interchangeable: Note on record equality. Verification. Scope correction — item 6 of #2401 needed no work. My triage comment on the issue claimed no spec covered optional/nullable emission end to end. That was wrong: |
|
CI note — the red It failed once, then passed on a re-run of the identical commit with no changes (failed run). The failing spec was Why it cannot be this change:
The flake is real and will recur. Worth its own issue; I have not filed one. |
|
Folded into #2451 rather than shipped separately. Both changes are in the Screenplay generator, and this repository ships related work as one pull request — #2418 landed twelve issues at once, and #2425 is titled for exactly that. Splitting them also split one release across two PRs carrying different semver labels, which is the opposite of what the label is for. The commit is unchanged ( The CI note above still applies and is repeated on #2451: the red |
Fixed