Skip to content

fix(cli): real gen:versions CI gate + truthful press build exit codes#11

Merged
odenirdev merged 9 commits into
mainfrom
fix/cli-ci-gate-and-build-exit-code
Jul 11, 2026
Merged

fix(cli): real gen:versions CI gate + truthful press build exit codes#11
odenirdev merged 9 commits into
mainfrom
fix/cli-ci-gate-and-build-exit-code

Conversation

@odenirdev

Copy link
Copy Markdown
Contributor

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 upgrade rewrites pins + re-materializes — were already met.

1. gen:versions --check CI gate was hollow (DONE #4)

Two compounding bugs made the gate always pass without ever checking:

  • .github/workflows/ci.yml filtered on @ogs-tech/press-cli — no such package exists (it's @ogs-tech/create-press), and pnpm --filter exits 0 when it matches nothing, so the step was a silent no-op.
  • Even with the right name, the step ran after pnpm build, whose cli build script is gen: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 build swallowed the real exit code (DONE #2)

A failing strapi build / next build collapsed to a generic exit 1, weakening the "never a false success" guarantee dev.ts already upholds. util/run.ts now rejects with a SubprocessError carrying the child's real code/signal, and bin/press.ts re-exits with it.

Verification

  • New run.test.ts (TDD): run() preserves the real exit code. Full press-web suite 227/227, cli 21/21, both typecheck clean.
  • CI gate proven: stale versions.generated.ts--check exits 1; fresh → 0.
  • E2E observed: real 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, derive NEXT_PIN from a manifest.

🤖 Generated with Claude Code

odenirdev and others added 9 commits July 5, 2026 23:12
…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>
@odenirdev
odenirdev merged commit 0b83416 into main Jul 11, 2026
1 check passed
@odenirdev
odenirdev deleted the fix/cli-ci-gate-and-build-exit-code branch July 11, 2026 16:28
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