refactor(compile): name finalizeWiki's behavioural flags - #192
Merged
Conversation
`finalizeWiki` took `scoped` as a fifth positional boolean, added when the prompt-modifier fingerprint landed (#188). #169 wants a sixth in the same shape, to skip the embedding refresh. Two adjacent defaulted booleans is the wrong place to be. They are the same type, so transposing them type-checks silently, and each one INVERTS a behaviour on a path whose whole point is to do less than the default: a scoped run that must not record the modifier selection as true of the project, and a compile that must not embed. Swapping them produces a compile that does the opposite of what the caller asked, with nothing to catch it. They move into a named `FinalizeFlags` object. One flag was tolerable; a second one arriving is the signal to name them rather than to add a parameter. The next flag is then `flags.x` at the call site and impossible to transpose. No behaviour change. #188's scoped control was mutation-tested through the new shape at both the call site and the destructure, and each mutant is still caught. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MUdoRq1DJq23aJuhK9QK7X
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
finalizeWikitookscopedas a fifth positional boolean, added when the prompt-modifier fingerprint landed (#188). #169 wants a sixth in the same shape, to skip the embedding refresh.Two adjacent defaulted booleans is the wrong place to be. They are the same type, so transposing them type-checks silently, and each one inverts a behaviour on a path whose whole point is to do less than the default: a scoped run that must not record the modifier selection as true of the project, and a compile that must not embed. Swapping them produces a compile that does the opposite of what the caller asked, with nothing to catch it.
They move into a named
FinalizeFlagsobject. One flag was tolerable; a second one arriving is the signal to name them rather than to add a parameter.No behaviour change. #188's scoped control was mutation-tested through the new shape at both the call site and the destructure, and each mutant is still caught.
Unblocks the rebase on #169, where the conflict is ours rather than the contributor's.