Kraite — tag

kraite-tag is the Kraite release workflow — docs, packages, push, CI gate, tag main project. Never touches production servers. Deploy is a separate explicit step via kraite-deploy.


Per-profile gating

The flow shape (analyse → push → tag main project) is the same across profiles. Only the docs phase, path-package iteration, and CI gate are conditional.

FolderProfilePath packages?Docs phase?CI gate?
ingestion.kraite.testingestionyes (kraitebot/core + brunocfalcao/step-dispatcher)yes (full)yes (mandatory)
admin.kraite.test / kraite.testweb-app(-with-queue)nonenono
syntax.kraite.teststatic-sitenonenono

Steps

#Action
1aGather changelog since last tag (git log --oneline $(git describe --tags --abbrev=0)..HEAD); first-tag bootstrap defaults to v0.1.0
1bCategorise: Infrastructure / Features / Architecture / Bug fixes / Config
1cIngestion only — recurse into kraite-update-docs with scope matching the change type. This is where the syntax site refreshes happen
1dCommit doc changes on the Kraite docs repo if any
2Ingestion only — iterate path packages, push and tag each
3agh auth setup-git to prime the credential helper (catches stale HTTPS auth from prior sessions)
3bPush main project + CHANGELOG entry. Tag pre-flight: gh api repos/.../permissions --jq .push — if read-only on a kraitebot/* repo, retry with GITHUB_PAT_KRAITEBOT one-shot (never persisted in git config)
4Read the version from CHANGELOG.md
5Ingestion only — CI gate: gh run list --branch master --limit 1 --json status,conclusion. Schedule recurring check (every 2 min) if still running. No gh run watch (blocks/times out) and no sleep-polling
6aWeb-app + web-app-with-queue only — verify composer.production.json is committed in HEAD (deploy would fail otherwise)
6bTag-order sanity: highest existing tag must be ≤ NEW_VERSION by semver. Orphan higher tag pointing to older commit → "tag history drift" warning
6cgit tag v<version> && git push origin v<version>

Version-bump auto-decide

Applied independently to each package AND to the main project:

BumpWhen
Patchbug fixes, small tweaks, dependency bumps, config changes, typos
Minornew features, meaningful improvements, new commands / endpoints, UI additions
Majorbreaking changes, major rewrites, removed functionality, schema-breaking migrations

Hard rules

  • Never SSH into production servers. This command is LOCAL ONLY.
  • Never run composer update / install on remote servers. Never run artisan on remote.
  • Tag BEFORE deploycomposer update kraitebot/core resolves by tag on prod; deploying without a fresh tag silently ships old code.
  • Never force-push without Bruno's explicit approval.
  • CI gate is async, non-blocking. Recurring 2-min scheduled poll → resume when green; never sleep / block / gh run watch.

What kraite-tag does NOT do

kraite-push handles the changelog only. The syntax docs site refresh is exclusive to kraite-tag (and the kraite-release chain that calls tag). Pushes are not enough to refresh the reader-facing site.