Repository navigation
Fix the open review findings of the fast toggles and the OpenCode pruning notes - #299
Merged
DocksDocks merged 7 commits intoDec 1, 2026
Conversation
…oggles - Each identity check resolves the config.yml link again after its lstat, so a link that moves to another file between the two calls refuses with ConfigChanged instead of writing the old target. - An ENOTDIR failure (a folder of the path that is no longer a folder) is ConfigMissing at each identity step, so it exits 2 as a refusal. - Tests wrap the Bun file system to act at exact steps: the retarget, the ENOTDIR case, and the existing handler for a file that becomes a folder at the second read. Verified: bun x --no-install vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts cli/test/unit/rootFlags.test.ts; ./docks-kit docs omp-context; bun run check:generated; ./docks-kit sync --dry-run; bun run smoke:package; bun run check
- cli/docs/omp-context.md: the pruner finds a retired key only where config.yml sets it directly; a retired value that only a merge key (<<) supplies is not pruned, while omp still reads it. Verified: bun x --no-install vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts cli/test/unit/rootFlags.test.ts; ./docks-kit docs omp-context; bun run check:generated; ./docks-kit sync --dry-run; bun run smoke:package; bun run check
- Bump the version, add the changelog entry, and regenerate the payload, the talk bundle, and the mutation golden digests that embed the version. Verified: bun x --no-install vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts cli/test/unit/rootFlags.test.ts; ./docks-kit docs omp-context; bun run check:generated; ./docks-kit sync --dry-run; bun run smoke:package; bun run check
…y notes Repairs of code-review round 1 of #293: - Each identity check runs realPath, lstat of the target, then stat through config.yml, and refuses with ConfigChanged when the two reads differ, also in the first check before parsing. A replace or a retarget after the lstat of the last check now refuses. - A file that goes away after realPath succeeded is ConfigChanged; requireDeployedConfig maps ENOTDIR to ConfigMissing, so the check before the locks exits 2 too. - The doc comment names the residual window after the last stat; the tests name their exact steps. - omp-context.md and the changelog make no claim about merged values that omp reads after sync. Verified: bun x --no-install vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts cli/test/unit/rootFlags.test.ts; bun run check:generated
Repairs of plan review round 5 of #293: - Each identity check ends with a second realPath, so a move of config.yml to a hard link of the same file, which keeps the device, inode, time, and bytes, refuses with ConfigChanged. - identityFields takes a structural stat type, so the code names no unstable FileSystem type. - omp-context.md: removing the key removes the contribution of config.yml; omp applies its other settings layers in their usual order. Verified: bun x --no-install vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts cli/test/unit/rootFlags.test.ts; bun run check:types
Repairs of plan review rounds 6 and 7 of #293: - A merge left in config.yml can still supply the value after a prune of the direct entry. - A prune that removes an anchor that a merge still uses can fail to write. - After a prune, omp reads the key from its other layers in their usual order. Verified: ./docks-kit docs omp-context
Repairs of code-review round 2 of #293: - The doc comment and the changelog say that the toggle refuses each change that its checks detect, and limit the exit-2 note to a non-folder found by the config checks. - The ENOTDIR cases cover each call of the second check: both realPath calls, lstat, and stat. Verified: bun x --no-install vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts cli/test/unit/rootFlags.test.ts
DocksDocks
marked this pull request as ready for review
December 1, 2026 22:20
DocksDocks
deleted the
293-fix-the-open-review-findings-of-the-fast-toggles-and-the-opencode-pruning-notes
branch
December 1, 2026 22:35
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.
Plan run: #293 Fix the open review findings of the fast toggles and the OpenCode pruning notes
Pull request: #299. Checks: Full CI passed (run 46758718180, attempt 1, head
999a5aa1). Reviewed head:999a5aa1.What changed
docks-kit --fast,--ultrafast) checkconfig.ymlin a stronger way (cli/src/engine-native/ompFastMode.ts toggleDeployedOpenAiTier). Each identity check runsrealPath, thenlstatof the target, thenstatthroughconfig.yml, thenrealPathagain. The toggle refuses withConfigChangedwhen the checks see a retarget of the link (also to a hard link of the same file) or a save as a new file. This also holds in the first check, before it parses anything.ENOTDIR) is a refusal (exit 2), also in the check before the locks (requireDeployedConfig).cli/docs/omp-context.md: sync does not follow a YAML merge key (<<) to find a retired setting. A merge can still supply the value after a prune, and a prune of an anchor in use can fail to write.Decisions and corrections
realPathresults only. The current form also compares thelstatandstatidentity and time, and ends withrealPath.ompRemovals.ts. Only the docs changed.Delegated decisions
ompRemovals.ts, which would edit an anchored mapping that other keys share. Reversibility: one commit. Record: Research decision "Merge keys in the retired values".stat, a retarget after its lastrealPath). Rejected: a lock shared with omp, which omp does not offer. Reversibility: one commit. Record: Research decision "Retarget", and code-review round 2 rejection.Reviews
Plan review passed in round 8. Code review passed in round 3.
Open findings: none.
Verification
red: before the fix, the retarget case and theENOTDIRcase failed on their_tagassertions, and the second-read case passed. Each later repair case failed on the candidate before it.fast(bun x --no-install vitest run --reporter=verbose cli/test/unit/ompFastMode.test.ts cli/test/unit/rootFlags.test.ts): exit 0, 91 passed.docs(./docks-kit docs omp-context): exit 0, all three statements present.gen(bun run check:generated): exit 0.dry(./docks-kit sync --dry-run): exit 0.smoke(bun run smoke:package): exit 0.talk(omp-smoke.ts):talk tool: offered,warnings: 0.gate(bun run check): exit 0, 6465 passed, 12 skipped, both golden suites OK.Limits and failures
Full CIcovers Ubuntu, macOS, and Windows.Kept resources
Merge now: none.Leave pull request open: the worktreeissue-293and the local and remote branch293-fix-the-open-review-findings-of-the-fast-toggles-and-the-opencode-pruning-notes.After merge
Checklist
bun run checkpassesCloses #293