Skip to content

fix(template): default to Starter 1.2.5 and fix update/create failures - #16

Merged
brianvarskonst merged 3 commits into
mainfrom
fix/default-starter-pin
Nov 23, 2026
Merged

brianvarskonst merged 3 commits into
mainfrom
fix/default-starter-pin

Conversation

@brianvarskonst

Copy link
Copy Markdown
Member

Problem

Findings #1, #2 and #8 of the Fable re-audit (2026-11-22):

  • Welcome #1 (Medium): sympress new without --template-version still created projects from Starter 1.1.8, so new projects missed the security fixes of Starter 1.2.2–1.2.5.
  • Roadmap feedback #2 (Low): project:update failed with Unknown template for every project created from a manifest template, because the template id was looked up in the built-in catalog before the snapshot manifest was loaded (always with --no-remote-manifest).
  • chore(deps): commit Composer lock #8 (Low): when project:create failed after the clone, the half-created project (sometimes with .git and .env with the admin password) stayed behind and blocked the next attempt.

Fix

  • Default template is Starter 1.2.5, pinned to the commit of tag v1.2.5 (b403cc00866a5fcb189dadd2b211f4cb198a5e78, verified via gh api repos/SymPress/starter/git/ref/tags/v1.2.5, lightweight tag pointing at a commit). The default must resolve to that commit, otherwise the run stops; with --no-remote-manifest the pinned commit is used directly. Explicit --template-version/--repository behave as before. README and manifest fallback updated.
  • project:update builds a template definition from .sympress/project.json when the recorded template is not built in; manifests still replace it and the redirect check still applies.
  • The generator removes the directory it created (or empties the previously empty one) when anything fails before the starter setup. A failing setup still keeps the project. Review the generator commit with git show -w (mostly re-indentation).

Tests

  • New: testDefaultStarterIsPinnedToReleaseCommit, testDefaultVersionMustResolveToPinnedRevision, testDryRunKeepsTemplateFromManifestThatIsNotBuiltIn, testFailedCreationRemovesTheHalfCreatedProject; each fails without its fix.
  • composer tests (72 tests), static-analysis, cs, validate --strict green locally.
  • Manual: bin/sympress new x --dry-run -n --no-setup against GitHub shows sympress/starter:1.2.5 at b403cc0….

Release

No release commit here; the follow-up security PR carries chore(release): prepare 0.4.0.

`sympress new` without --template-version still created projects from
Starter 1.1.8, so every new project missed the security fixes released
in Starter 1.2.2 to 1.2.5 (.htaccess hardening, debug log location,
doctor sudoers rule, Symfony security updates in the deployment lock).

The built-in default is now Starter 1.2.5, and the catalog also pins
the commit that tag points to (b403cc0). The default must resolve to
that commit or the run stops; with --no-remote-manifest the pinned
commit is used directly instead of an unchecked tag lookup later.
`project:update` looked up the project's templateId in the built-in
catalog before loading the snapshot manifest that defines it, so every
project created with --manifest failed with "Unknown template", and
always failed with --no-remote-manifest.

When the recorded template is not built in, the update now starts from
a definition built from .sympress/project.json (id, package, repository,
version). A snapshot or explicit manifest still replaces it, and the
existing identity check still rejects redirects.
When project:create failed after the clone (checkout error, manifest
redirect, broken composer.json, .sympress being a file), the partial
project stayed behind, sometimes with .git and a .env holding the admin
password, and the next attempt stopped with "Target directory is not
empty".

The generator now removes the directory it created, or empties the
directory that was empty before, when anything fails before the starter
setup runs. A failing setup still keeps the project so it can be rerun.
Most of the diff is re-indentation; review with `git show -w`.
@brianvarskonst
brianvarskonst merged commit f5e0d62 into main Nov 23, 2026
2 checks passed
@brianvarskonst
brianvarskonst deleted the fix/default-starter-pin branch November 23, 2026 14:09
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