Skip to content

Fix CLI output wording/ordering: stale-vs-missing, premature success line, version-consistency hint - #110

Merged
mike-north merged 1 commit into
mainfrom
fix/cli-output-wording-ordering
Jul 19, 2026
Merged

mike-north merged 1 commit into
mainfrom
fix/cli-output-wording-ordering

Conversation

@mike-north

Copy link
Copy Markdown
Contributor

Summary

Three mechanical CLI output-wording/ordering defects in the build/validate rendering path. No
behavior change — the same conditions are still detected; only how/when they're reported changes.

  1. stale vs missing. Pre-build freshness on a dist/** bundle file that was never built
    (regenerated-but-absent, not merely byte-differing) now reports it as missing with a
    "run aipm build" hint, instead of stale.
  2. Premature success line. aipm build's Built N plugin(s), M artifact(s). line no longer
    prints when the post-build validate step surfaces a hard finding that fails the run — the
    success summary is now suppressed on a failing run rather than always printing first.
  3. version-consistency source-of-truth hint. The finding now includes a hint naming
    aipm.config.ts as the authoritative version source, so the user knows to bump the manifest
    (not the config) — per aipm validate should gate plugin.json manifest versions against aipm.config.ts #75's contract.

Acceptance criteria mapping

# Criterion Test
1 Not-yet-built dist bundle file reports missing, not stale packages/core/src/pipeline/validate-orchestration.test.tsa not-yet-built dist bundle file reports missing, not stale (issue #97)
2 Built N plugin(s) does not appear before a run-failing hard finding packages/cli/src/run.test.tsdoes not print "Built N plugin(s)" when the post-build validate has a hard finding (negative case: still prints "Built N plugin(s)" before validation output on a clean run guards the non-regression case)
3 version-consistency finding hints aipm.config.ts is the source of truth packages/core/src/pipeline/validate.test.tshints that aipm.config.ts is the source of truth for the version
4 Spec-derived assertions, not snapshots All three tests above assert on specific message/hint substrings and finding-list ordering — no snapshot/gold-master comparisons

Non-goals

No detection-logic changes — checkFreshness, the build command's artifact/validate call
sequence, and validateVersionConsistency's mismatch detection are unchanged; only the emitted
strings and CLI print ordering changed.

Test plan

  • pnpm run check (full workspace check + affected suites) green, run with
    AIPM_TEMPLATE_REPO pointed at the CI-pinned template revision so the
    developer-machine-only validate-orchestration.test.ts suite (self-skips without a
    template checkout) actually executed rather than skipping
  • pnpm run fix:format run before push
  • New/updated tests: packages/cli/src/run.test.ts, packages/core/src/pipeline/validate.test.ts, packages/core/src/pipeline/validate-orchestration.test.ts

Refs #97

… hint in CLI output

Three output-wording/ordering defects that misled users during a normal build/validate
run: pre-build freshness reported a not-yet-built dist bundle file as stale instead of
missing; `Built N plugin(s)` printed before a hard finding that failed the run; and
version-consistency findings didn't name aipm.config.ts as the source of truth. No
detection behavior changed, only how/when it's reported.

Refs #97

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes three user-facing CLI output issues in the build/validate reporting flow (wording + ordering only), aligning aipm output with the intended UX contracts from issues #75 and #97.

Changes:

  • Updates version-consistency findings to include an explicit hint that aipm.config.ts is the version source of truth.
  • Adjusts freshness reporting so regenerated-but-absent dist/** bundle files are reported as missing (with an aipm build hint) rather than stale.
  • Suppresses the Built N plugin(s), M artifact(s). success summary on failing aipm build runs (i.e., when post-build validate fails).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/src/pipeline/validate.ts Adds the version source-of-truth hint to version-consistency findings and reports missing dist bundle paths as missing (not stale).
packages/core/src/pipeline/validate.test.ts Adds a focused assertion that the version-consistency hint mentions aipm.config.ts.
packages/core/src/pipeline/validate-orchestration.test.ts Adds coverage for the missing-vs-stale behavior for a deleted dist bundle file.
packages/cli/src/run.ts Moves/suppresses the “Built N…” success summary so it only prints when validation passes.
packages/cli/src/run.test.ts Adds coverage to ensure “Built N…” is absent on failing runs and preserved/ordered on clean runs.
.changeset/fix-cli-output-wording-ordering.md Records the patch-level changes for @ai-plugin-marketplace/core and @ai-plugin-marketplace/cli.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mike-north
mike-north merged commit 4e5f352 into main Jul 19, 2026
3 checks passed
@mike-north
mike-north deleted the fix/cli-output-wording-ordering branch July 19, 2026 18:39
@github-actions github-actions Bot mentioned this pull request Aug 27, 2026
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.

2 participants