@zaaxch/tailframe 4.0.3 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/new.mjs +13 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaaxch/tailframe",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "Tailframe architecture toolkit: validates the Tailframe structure, import-boundary, and file-convention contracts. The package version is the contract version.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/new.mjs CHANGED
@@ -551,7 +551,7 @@ ${options.ui ? "- In production, serve the compiled UI from `dist/public` with a
551
551
  The ECR build targets \`linux/amd64\`. ${options.ui ? "Its default immutable tag is `<product-sha>` and production Compose requires that exact tag." : "Its default immutable tag is `<product-sha>` and production Compose requires that exact tag."} The runtime image contains production dependencies only and runs as the Node user.${options.ui && options.auth === "firebase" ? ` The build requires \`${ui}/.env.production\` and mounts it as a BuildKit secret only while Vite compiles the browser bundle; it is not copied into the final image.` : ""}
552
552
 
553
553
  ## Production deployment
554
- Pull requests into product \`main\` validate release candidates. The resulting \`main\` push validates again before GitHub Actions may publish an immutable image tagged with the full product commit SHA. Image publication and production deployment are separate workflows with distinct AWS roles: the release role publishes, while the pull-only deployment role manually deploys from \`main\` using an already-published full SHA from \`main\` history and that commit's deployment files. Product data migrations must authenticate to the registry, pull and digest-verify that exact release image, and explicitly select the production datastore; never inherit rehearsal image or target defaults. GitHub Actions may replace files under \`/opt/${options.name}/current\` and MUST NOT replace persistent configuration, credentials, keyfiles, or data under \`/opt/${options.name}/shared\`. Keep Node runtime behavior in the shared service \`.env.production\`, Compose interpolation and infrastructure credentials in \`.env.infrastructure\`, and fixed topology wiring in Compose \`environment:\`. The optional UI build-time \`.env.production\` is a separate ephemeral file. Do not run deployment until the host and GitHub environments have been bootstrapped according to \`docs/production-deployment.md\`.
554
+ Pull requests into product \`main\` validate release candidates. The resulting \`main\` push validates again before GitHub Actions may publish an immutable image tagged with the full product commit SHA. Image publication and production deployment are separate workflows with distinct AWS roles: the release role publishes, while the pull-only deployment role manually deploys from \`main\` using an already-published full SHA from \`main\` history and that commit's deployment files. Build both role-trust subjects from GitHub's API-reported \`sub_claim_prefix\`; never infer the effective prefix from \`use_immutable_subject\`. Product data migrations must authenticate to the registry, pull and digest-verify that exact release image, and explicitly select the production datastore; never inherit rehearsal image or target defaults. GitHub Actions may replace files under \`/opt/${options.name}/current\` and MUST NOT replace persistent configuration, credentials, keyfiles, or data under \`/opt/${options.name}/shared\`. Keep Node runtime behavior in the shared service \`.env.production\`, Compose interpolation and infrastructure credentials in \`.env.infrastructure\`, and fixed topology wiring in Compose \`environment:\`. The optional UI build-time \`.env.production\` is a separate ephemeral file. Do not run deployment until the host and GitHub environments have been bootstrapped according to \`docs/production-deployment.md\`.
555
555
 
556
556
  ## Tests and validation
557
557
  Run \`pnpm validate:architecture\` and \`pnpm format:check\` after changing files or imports. The generated service also includes unit tests and ${postgres ? "PostgreSQL-backed" : "Mongo-backed"} integration tests. Run focused service database tests through pnpm for the full service check. Test use cases, policies, ${postgres ? "PostgreSQL" : "Mongo"} repository adapters, and HTTP boundaries where behavior lives. Every public operation needs success and error-envelope coverage; authenticated operations need trusted-identity coverage; persisted capabilities need ${postgres ? "PostgreSQL" : "Mongo"} ownership/query coverage; UI-enabled services must verify that \`/api\` paths never fall through to the SPA. All AWS/ECR and Docker commands, including the release image script, must run outside the sandbox from the first attempt.
@@ -1209,10 +1209,18 @@ Configure \`DEPLOY_HOST\` and \`DEPLOY_USER\` as production-environment variable
1209
1209
  - \`DEPLOY_SSH_PRIVATE_KEY\`: dedicated host deployment key.
1210
1210
  - \`DEPLOY_SSH_KNOWN_HOSTS\`: pinned host key.
1211
1211
 
1212
- Restrict both environments' deployment branches to \`main\`. The release role trust accepts only the repository's
1213
- \`release\` environment OIDC subject; the pull-only deployment role accepts only its \`production\` subject. Use the
1214
- repository's active GitHub subject format: legacy subjects name the owner/repository, while immutable subjects use
1215
- their IDs. Do not use a repository-wide wildcard. Required reviewer approval MAY add a second manual gate.
1212
+ Restrict both environments' deployment branches to \`main\`. Before creating or updating either AWS role trust, query
1213
+ GitHub's repository OIDC endpoint and use its effective prefix:
1214
+
1215
+ \`\`\`bash
1216
+ gh api /repos/OWNER/REPOSITORY/actions/oidc/customization/sub --jq .sub_claim_prefix
1217
+ \`\`\`
1218
+
1219
+ Treat the returned \`sub_claim_prefix\` as authoritative; do not infer it from \`use_immutable_subject\`, repository
1220
+ age, names, or separately queried IDs. The release role trust uses exactly
1221
+ \`<sub_claim_prefix>:environment:release\`; the pull-only deployment role uses exactly
1222
+ \`<sub_claim_prefix>:environment:production\`. Keep the audience equal to \`sts.amazonaws.com\` and do not use a
1223
+ repository-wide wildcard subject. Required reviewer approval MAY add a second manual gate.
1216
1224
 
1217
1225
  ## Deploy and rollback
1218
1226