fix(check): detect stale generated outputs - #102
Merged
Conversation
fix(cli): stop interactive prompts hanging behind the status spinner
…ster chore: version packages
…aster chore: version packages
VVeb1250
marked this pull request as ready for review
July 21, 2026 12:13
The stale-output scan spread config.pluginTargets directly; every other call site in the codebase guards it with '?? []'. ValidatedConfig always populates the field, so this is a robustness/consistency fix for configs constructed outside the Zod parse path.
Per the repo 'plugins are first-class targets' contract, any code that iterates targets must hold for registered plugin descriptors, not just builtins. The stale-output scan iterates config.pluginTargets, so add a lock-sync test that registers a plugin descriptor with a managedOutputs layout and asserts a hand-added file under its managed dir is reported in outputsStale (resolved via getDescriptor, not builtin-only).
Stale-output detection adds new user-facing behavior plus additive CLI JSON and MCP result fields (canonicalDrift, outputDrift, outputsStale). Under semver that is a backward-compatible feature, so minor is the correct bump for a 0.x release rather than patch.
sampleXbro
approved these changes
Jul 21, 2026
pnpm audit --prod --audit-level=high failed on tar versions up to 7.5.18: - critical GHSA-23hp-3jrh-7fpw (decompression/parse DoS), patched 7.5.19+ - high GHSA-8x88-c5mf-7j5w (negative entry size infinite loop), patched 7.5.18+ tar is a direct prod dependency, so bumping the pin from 7.5.13 to 7.5.20 clears both. Lockfile regenerated with pnpm 10 to match CI; frozen install and the audit gate both verified green. Pre-existing issue, unrelated to the check changes on this branch.
Owner
|
Hey @VVeb1250 ! Thanks for the PR. I added a few corrections and merge it |
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.
Summary
Follow-up to #99 after the checksum-based fix for #98 landed on
master.findStaleGeneratedOutputshelper from the existing generate-time cleanupoutputsmapcanonicalDrift,outputDrift, andoutputsStalefields across the core/programmatic API, CLI JSON, and MCP check resultDesign
This keeps
checkon the fast lock/checksum path: it does not invoke the generation pipeline. The lockoutputsmap remains the expected-output set, so canonical edits do not create output-noise. Output scanning is skipped for old-format locks and forcheck --no-outputs, preserving the existing migration and gitignored-output escape hatches.The stale finder is read-only. Normal generation still owns deletion by calling the existing cleanup wrapper.
Validation
EPERM)Implements the follow-up requested in #99 and builds on the resolution of #98.