@starci/hfs 4.7.12 → 4.7.14

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 (57) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/release/gate.mjs +388 -378
  5. package/release/lint-report.mjs +52 -0
  6. package/runtime/knowledge/hfs/canon-pins.yaml +4 -4
  7. package/runtime/knowledge/hfs/ci-standard.yaml +1 -1
  8. package/runtime/knowledge/hfs/rules.yaml +7 -6
  9. package/runtime/knowledge/patterns/be/cli.yaml +1 -0
  10. package/runtime/knowledge/patterns/be/realtime.yaml +1 -0
  11. package/runtime/knowledge/patterns/be/webhooks.yaml +1 -0
  12. package/runtime/modules/kernel/failure-codes.yaml +24 -2
  13. package/runtime/packages/cli/src/catalog.generated.mjs +12 -6
  14. package/runtime/scripts/hfs/architecture/canon-clones.mjs +1 -1
  15. package/runtime/scripts/hfs/architecture/hfs.mjs +19 -4
  16. package/runtime/scripts/hfs/architecture/i18n-keys.mjs +6 -4
  17. package/runtime/scripts/hfs/architecture/transport-owner.mjs +1 -1
  18. package/runtime/scripts/hfs/ci-declaration.mjs +5 -2
  19. package/runtime/scripts/hfs/db-baseline-verb.mjs +5 -2
  20. package/runtime/scripts/hfs/doc-commands.mjs +2 -1
  21. package/runtime/scripts/hfs/rule-catalog.mjs +5 -2
  22. package/runtime/scripts/hfs/rules/coverage-below.mjs +5 -3
  23. package/runtime/scripts/hfs/rules/database-access.mjs +1 -1
  24. package/runtime/scripts/hfs/rules/database-migrations.mjs +13 -3
  25. package/runtime/scripts/hfs/rules/database-plpgsql.mjs +1 -1
  26. package/runtime/scripts/hfs/rules/database-queues.mjs +2 -2
  27. package/runtime/scripts/hfs/rules/deploy-scan.mjs +50 -6
  28. package/runtime/scripts/hfs/rules/deploy-workflow.mjs +11 -1
  29. package/runtime/scripts/hfs/rules/doc-fresh.mjs +18 -3
  30. package/runtime/scripts/hfs/rules/docker-health.mjs +4 -1
  31. package/runtime/scripts/hfs/rules/env-parity.mjs +8 -7
  32. package/runtime/scripts/hfs/rules/env-value-shape.mjs +2 -4
  33. package/runtime/scripts/hfs/rules/fe-build-args.mjs +1 -1
  34. package/runtime/scripts/hfs/rules/release-provenance.mjs +8 -5
  35. package/runtime/scripts/hfs/rules/script-hygiene.mjs +23 -7
  36. package/runtime/scripts/hfs/rules/services.mjs +19 -5
  37. package/runtime/scripts/hfs/rules/stack-tooling.mjs +5 -2
  38. package/runtime/scripts/hfs/rules/stacks-swarm.mjs +5 -5
  39. package/runtime/scripts/hfs/rules/staged-specs.mjs +26 -0
  40. package/runtime/scripts/hfs/rules/supply-chain.mjs +3 -3
  41. package/runtime/scripts/hfs/rules/unused-symbol-properties.mjs +1 -1
  42. package/runtime/scripts/hfs/rules/unused-symbol.mjs +8 -4
  43. package/runtime/scripts/hfs/sealed-members.mjs +1 -1
  44. package/runtime/scripts/hfs/secret-bootstrap-crypto.mjs +1 -1
  45. package/runtime/scripts/hfs/secret-files.mjs +1 -1
  46. package/runtime/scripts/hfs/secret-sops.mjs +1 -1
  47. package/runtime/scripts/hfs/stack-deploy-config.mjs +19 -2
  48. package/runtime/scripts/lib/env.mjs +2 -1
  49. package/runtime/scripts/lib/git-hooks-dir.mjs +30 -0
  50. package/runtime/scripts/lib/path-key.mjs +1 -1
  51. package/runtime/scripts/lib/roots.mjs +3 -3
  52. package/runtime/scripts/lib/secret-patterns.mjs +1 -1
  53. package/runtime/scripts/lib/swarm-stack.mjs +4 -2
  54. package/src/main.mjs +2 -2
  55. package/sync/ci-commands.mjs +275 -275
  56. package/sync/hygiene.mjs +19 -4
  57. package/templates/app/ci-workflows-lite/github/workflows/ci.yml +2 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.7.14 - 2026-10-20
4
+ - Added: `starci app hygiene` (the managed pre-commit hook) refuses a back-end logic file the index adds without its `<name>.<role>.spec.ts` beside it, naming the file (`BE_UNIT_SPEC_NOT_STAGED`, R47); the measured roles and roots come from the coverage scope.
5
+ - Added: `starci app check` reports `HFS_HOOKS_NOT_INSTALLED` (R13, error) when a set `core.hooksPath` names a hooks folder that is missing or holds no husky dispatcher in the checkout, with the install remedy.
6
+ - Fixed: R165 `HFS_SERVICE_STACK_DECLARATION` accepts, for an api or worker app, a `role: service` component named after it or mapped to it by `environments.<env>.deploy.images.<component>.app` in any environment, so a deployed service named after its stack (`shop-api: {app: api}`) needs no rename onto a shared network alias.
7
+ - Changed: the scaffold's next step names `starci npm ci`, which installs the lockfile and then the app's git hooks; canon pins follow the matching package cohort.
8
+
9
+ ## 4.7.13 - 2026-10-20
10
+ - Fixed: the lite CI template sets NODE_OPTIONS on the database migration check step; ci-standard heap.steps lists `npm run db:lint`.
11
+ - Fixed: bundled runtime source clears the SonarCloud code smells of alpha.23 (regex complexity, concise classes, string prefix and suffix checks, block braces, optional chaining, export-from, default parameters, synchronous awaits, dead stores) without behavior change; canon pins follow the matching package cohort.
12
+ - Fixed: `starci app release gate --sonar` produces `reports/lint.sonar.json` before the scanner (per-side `starci app lint --sonar` runs merged like the managed CI), so the scanner no longer fails on the missing external issues report; a failing lint fails the sonar row.
13
+
3
14
  ## 4.7.12 - 2026-10-19
4
15
  - Fixed: bundled source analysis uses explicit nullable contracts, unary callback arguments and grouped regular-expression alternatives while preserving refusal paths; canon pins follow the matching package cohort.
5
16
 
package/README.md CHANGED
@@ -109,7 +109,7 @@ Its own checks (`scripts/hfs/check.mjs`, `scripts/hfs/rules/`; the rendered-file
109
109
  | `FE_GRAPHQL_CONTRACT` | error | a front-end `.graphql` document that the back end's contract snapshot (`be/contracts/<service>/schema.graphql`) does not serve: an unknown field, argument or input field, a missing required argument, a variable of another type, or a selection that does not fit (R113) |
110
110
  | `HFS_SERVICE_PLACEMENT` | error | a folder outside `be/apps/<service>/` with a `Dockerfile` or a `package.json` of its own (R163): a back-end service is a Nest app of the one repository |
111
111
  | `HFS_IMAGE_UNPINNED` | error | in a product with more than one service, a stack component whose `image` has no tag, `latest`, a branch word or a major or minor-only tag instead of a digest or an exact version (R164) |
112
- | `HFS_SERVICE_STACK_DECLARATION` | error | an api or worker app of a multi-service product that is not a `role: service` component of `application-stacks.yaml` (R165) |
112
+ | `HFS_SERVICE_STACK_DECLARATION` | error | an api or worker app of a multi-service product with no `role: service` component of `application-stacks.yaml`, named after it or mapped to it by `deploy.images.<component>.app` (R165) |
113
113
  | `HFS_EVENT_CONTRACT` | error | the vendored async contract: a missing or stale `be/contracts/<service>/events.json`, a `consumes.ts` entry the provider's snapshot does not declare at that version, a `compensates` naming no declared event, or a consumer queue no consumes table lists (R166) |
114
114
  | `BE_ASYNC_SPEC_MISSING` | error | a consumed event no e2e spec through `useTestWorld` names, or a saga step whose spec does not also name the compensated event (R167) |
115
115
  | `BE_INTEGRATION_SPEC_MISSING` | error | an integration (`src/modules/integrations/<provider>/` with `<provider>.config.ts`) without a `src/tests/integration/<provider>/*.integration-spec.ts` that registers its module through `useTestWorld({ modules })`, references its ErrorCode enum and drives an outage through the world (R112) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/hfs",
3
- "version": "4.7.12",
3
+ "version": "4.7.14",
4
4
  "description": "The StarCi app command implementation for scaffolding, linting, checking and synchronizing one product repository.",
5
5
  "type": "module",
6
6
  "license": "MIT",