Skip to content

refactor(compile): name finalizeWiki's behavioural flags - #192

Merged
ethanj merged 1 commit into
mainfrom
refactor/finalize-wiki-flags
Aug 23, 2026
Merged

refactor(compile): name finalizeWiki's behavioural flags#192
ethanj merged 1 commit into
mainfrom
refactor/finalize-wiki-flags

Conversation

@ethanj

@ethanj ethanj commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

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.

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.

`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
@ethanj
ethanj merged commit 1da1a4d into main Aug 23, 2026
2 checks passed
@ethanj
ethanj deleted the refactor/finalize-wiki-flags branch August 23, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant