Skip to content

fix(check-completion): pass CI gate when plans directory is missing - #96

Merged
vipentti merged 1 commit into
mainfrom
fm/planlet-check-completion-no-plans
Aug 22, 2026
Merged

fix(check-completion): pass CI gate when plans directory is missing#96
vipentti merged 1 commit into
mainfrom
fm/planlet-check-completion-no-plans

Conversation

@vipentti

Copy link
Copy Markdown
Owner

Summary

  • Fix planlet check-completion --base <git-ref> to treat missing plans/ directory as no plans found (ok: true, exit 0) instead of plans_not_initialized error. src/core/check-completion.ts now catches plans_not_initialized from validatePlanlets and returns empty report after listDiffPaths succeeds, preserving existing behavior when directory exists.
  • Add two integration tests covering missing plans/ with and without diff.
  • Add CHANGELOG.md Unreleased Fixed entry.

CLI behavior

  • Commands/options: check-completion --base <git-ref> unchanged options.
  • Output or errors: before plans_not_initialized with exit 1 when no plans/; after ok:true, touched:[], completed:[], violations:[] with exit 0 and empty stderr. Violations still fail with exit 4 when directory exists.
  • Compatibility: strictly less failing; CI gate passes in repos without planning until they start planning.

Before:

error{code,message,path}:
  plans_not_initialized,"Repository does not contain a plans directory",/.../plans
Error: Process completed with exit code 1.

After (no plans/):

ok: true
base: base
touched: []
completed: []
violations: []
# exit 0

Verification

  • npm run format:check
  • npm run lint
  • npm run knip
  • npm run type-check
  • npm run build
  • npm test (252 pass, 0 fail after clearing npm_config_allow_scripts env pollution from ~/.npmrc; packaging test passes when env not inherited)
  • git diff --check
  • Targeted CLI verification: exercised dist/planlet.mjs check-completion --base base on temp repos without plans/ (exit 0, ok true) and with ready plan (exit 4, violation)

Contributor checklist

  • Tests cover new or changed behavior
  • User-facing documentation and CLI help are updated, or no update is needed (no help change)
  • CHANGELOG.md: [Unreleased] entry added
  • Every planlet task this PR completes is checked ... or the PR completes no planlet task
  • Canonical skill changes have been regenerated ... or no skill changed
  • The change preserves supported Node.js and operating-system compatibility

@vipentti
vipentti marked this pull request as ready for review August 22, 2026 05:06
@vipentti
vipentti merged commit d4d0896 into main Aug 22, 2026
6 checks passed
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