fix(cli): real gen:versions CI gate + truthful press build exit codes#11
Merged
Conversation
…ugin/SEO) Design doc capturing the rescoped BASE/PAGES foundation item: - fix ISR (getPage no-store → revalidate:60) - generic idempotent seedPage(); remove privacy-policy from base bootstrap - reduce buildMetadata to <title>; hand SEO/social to a new Plugin/SEO item Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lugin/SEO) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…+ ISR) The catch-all page route now lists published slugs from the CMS (new getPageSlugs/getStaticPageParams) in generateStaticParams, so published pages build as static ISR (● SSG, revalidate 60s) instead of ƒ (Dynamic). dynamicParams stays true (slugs added later render on-demand); getPageSlugs fails to empty, so an unreachable CMS at build prerenders nothing rather than failing — the CMS is a build-time optimization, not a hard dependency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ata reduction) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Empirical build showed the paramless optional catch-all stays ƒ (Dynamic) without generateStaticParams; the route now prerenders published slugs (● SSG + ISR), CMS as a build-time optimization (fail-to-empty). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closes the BASE/CLI review's two "looks done but isn't" defects. CI gate (DONE #4): `gen:versions --check` was a silent no-op. It filtered on `@ogs-tech/press-cli` — no such package (it's `@ogs-tech/create-press`), and `pnpm --filter` exits 0 when it matches nothing. Even with the right name it ran AFTER `pnpm build`, whose cli build script is `gen:versions && tsc` (write mode), which regenerated the file and masked any drift. Fixed the filter and moved the step above `pnpm build`, so a stale versions.generated.ts now fails CI. press build (DONE #2): a failing subprocess (strapi/next build) collapsed to a generic exit 1. `util/run.ts` now rejects with a SubprocessError carrying the real code/signal and bin/press.ts re-exits with it — matching dev.ts's crash-aware guarantee. dev's pre-boot seed/sync-types become truthful for free. Robustness/cleanup gaps from the review are tracked as follow-ups in docs/superpowers/plans/2026-07-11-base-cli-followups.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What & why
Review to close the CRM task [OGS] [PRESS] BASE / CLI. Auditing the existing CLI against the DONE criteria surfaced two "looks done but isn't" defects; this PR fixes both. The other two DONE criteria — create-press scaffolds a runnable project, and
press upgraderewrites pins + re-materializes — were already met.1.
gen:versions --checkCI gate was hollow (DONE #4)Two compounding bugs made the gate always pass without ever checking:
.github/workflows/ci.ymlfiltered on@ogs-tech/press-cli— no such package exists (it's@ogs-tech/create-press), andpnpm --filterexits 0 when it matches nothing, so the step was a silent no-op.pnpm build, whose cli build script isgen:versions && tsc(write mode) — it regenerated the file in the runner tree before the check could observe a stale commit.Fix: correct the filter and move the step above
pnpm build.2.
press buildswallowed the real exit code (DONE #2)A failing
strapi build/next buildcollapsed to a genericexit 1, weakening the "never a false success" guaranteedev.tsalready upholds.util/run.tsnow rejects with aSubprocessErrorcarrying the child's realcode/signal, andbin/press.tsre-exits with it.Verification
run.test.ts(TDD):run()preserves the real exit code. Fullpress-websuite 227/227,cli21/21, both typecheck clean.versions.generated.ts→--checkexits 1; fresh → 0.run()+ the bin catch expression → exit 7 for a subprocess that exits 7 (previously 1).Follow-ups (tracked, not in this PR)
docs/superpowers/plans/2026-07-11-base-cli-followups.md: e2e + orchestration tests, doc drift + dead code, deriveNEXT_PINfrom a manifest.🤖 Generated with Claude Code