@starci/eslint-canon-be 3.19.1 → 3.19.3

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.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.19.3 - 2026-11-07
4
+
5
+ - Added (R235 `SCAN_SMELL`, `no-line-separator-literal`): a raw U+2028, U+2029 or U+0085 anywhere in a file, specs included, is an error that names the escape to write (`
`, `
`, `…`) in a string, template or regular expression, or says to delete the character elsewhere. The Sonar scanner splits lines at these characters and TypeScript does not, so its analysis aborts with "Line n is out of range ... File has m lines".
6
+
7
+ ## 3.19.2 - 2026-11-07
8
+
9
+ - A patch: peers `@starci/hfs` ~6.0.0. Comments, rule docs and messages cite rules by their ids and carry no ruling history.
10
+
3
11
  ## 3.19.1 - 2026-11-05
4
12
 
5
13
  - Added (HR-CORE-BE-3, R34 `BE_SCHEMA_AUTHORITY`, `no-runtime-schema`): a root-package file hfs.json `sides.be.ddlRenderers` lists (`{ path, reason }`, app-root relative, a `*` only in the file name; the hfs runtime merges it into `ruleParams.ddlRenderers`) may hold DDL text, so the renderer `cli entities plan --write` uses to write NEW migration files is no longer flagged. It may only build and return the text: in that file a database client import (typeorm, pg, ...) is refused (`rendererClient`) and so is a `.query/.execute/.exec/.raw/.unsafe` call (`rendererExecutes`); DDL text in any other file, including the rest of the same package and every file of the be side, is still refused; and a file that is neither the cli nor a root package and imports (or re-exports) a symbol the renderer declares, directly or through a package barrel, is refused (`rendererImported`; type-only imports are not). Needs @starci/hfs 5.13.2.
6
14
 
7
15
  ## 3.19.0 - 2026-11-05
8
16
 
9
- - Changed (decision release-only-what-changed): the canon reads the @starci/hfs runtime (slots, rule catalog, canon pins, failure codes, the architecture machine) from the installed hfs at run time, which it peers by `~5.13.0`, and bundles no copy; `runtime/` keeps only the project graph rule, the jsdoc and sonar helpers and the package-scripts template. The stale forks it kept (slots 3.13.0) are gone, so it lints with the manifest hfs ships.
17
+ - Changed: the canon reads the @starci/hfs runtime (slots, rule catalog, canon pins, failure codes, the architecture machine) from the installed hfs at run time, which it peers by `~5.13.0`, and bundles no copy; `runtime/` keeps only the project graph rule, the jsdoc and sonar helpers and the package-scripts template. The stale forks it kept (slots 3.13.0) are gone, so it lints with the manifest hfs ships.
10
18
 
11
19
  ## 3.18.4 - 2026-11-05
12
20
 
13
- - Changed: the runtime copy of the canon pins gives the Grammar family its same-minor range (decision grammar-patch-range) and names `@starci/hfs` 5.12.0 and the Grammar family 0.22.0; the runtime copy of R15 reads the range.
21
+ - Changed: the runtime copy of the canon pins gives the Grammar family its same-minor range and names `@starci/hfs` 5.12.0 and the Grammar family 0.22.0; the runtime copy of R15 reads the range.
14
22
 
15
23
  ## 3.18.3 - 2026-11-05
16
24
 
@@ -70,7 +78,7 @@
70
78
 
71
79
  ## 3.16.0 - 2026-11-04
72
80
 
73
- - Changed: `schema-place` (R304) lets any file of a root workspace package (tier `package`: `packages/<name>/`, slots `app.packages` and `app.module-registry`) import `zod`, since its node, block and vocabulary contracts are zod schemas; a door or `dto/` folder there still answers to `class-validator`, a `<name>.schema.ts` there still never shares a file with `class-validator` or a GraphQL type, and `schema-bounded` holds unchanged (ruling package-zod-contracts). Spec: `src/packages-config.spec.ts`.
81
+ - Changed: `schema-place` (R304) lets any file of a root workspace package (tier `package`: `packages/<name>/`, slots `app.packages` and `app.module-registry`) import `zod`, since its node, block and vocabulary contracts are zod schemas; a door or `dto/` folder there still answers to `class-validator`, a `<name>.schema.ts` there still never shares a file with `class-validator` or a GraphQL type, and `schema-bounded` holds unchanged. Spec: `src/packages-config.spec.ts`.
74
82
  - Changed: the runtime copies carry the landed-migration db rules, the module shape of `be.integrations.passport` in the package slot manifest and the canon pins of `@starci/hfs` 5.8.0.
75
83
 
76
84
  ## 3.15.5 - 2026-11-04
@@ -184,7 +192,7 @@
184
192
 
185
193
  ## 3.11.6 - 2026-11-01
186
194
 
187
- - Changed: the bundled rule catalog states the R61 status law as the owner's pair rule.
195
+ - Changed: the bundled rule catalog states the R61 status law as the status pair rule.
188
196
  - Changed: the bundled canon pins name @starci/grammar 0.20.2, eslint-grammar-core and eslint-grammar-offset-pop 0.20.2, eslint-canon-be 3.11.6, eslint-canon-fe 9.8.5, stylelint-canon 2.4.0 and hfs 4.16.5 (RELEASE_VERSION_NOT_BUMPED: the previous versions are on npm). No rule changes.
189
197
 
190
198
  ## 3.11.5 - 2026-11-01
@@ -220,7 +228,7 @@
220
228
 
221
229
  ## 3.10.0 - 2026-10-31
222
230
 
223
- - Added: `ai-virtual-key-name` (R344 `BE_AI_VIRTUAL_KEY`): inside `integrations/ai` every `<env>.secret(...)` names exactly `STARCI_AI_KEY`, as a literal: the one virtual key the ai-router gateway mounts and every client uses; the custody owner `integrations/ai-gateway` passes the gateway no `adminToken`, since it exposes no admin API (ruling be-ai-one-virtual-key). Exported: `VIRTUAL_KEY_VARIABLE`.
231
+ - Added: `ai-virtual-key-name` (R344 `BE_AI_VIRTUAL_KEY`): inside `integrations/ai` every `<env>.secret(...)` names exactly `STARCI_AI_KEY`, as a literal: the one virtual key the ai-router gateway mounts and every client uses; the custody owner `integrations/ai-gateway` passes the gateway no `adminToken`, since it exposes no admin API. Exported: `VIRTUAL_KEY_VARIABLE`.
224
232
  - Changed: the bundled runtime copies follow @starci/hfs 4.13.2 (R344 in the catalog and on the `be.integrations` slot) and the canon pins name the lint cohort eslint-canon-be 3.10.0, eslint-canon-fe 9.6.5, eslint-grammar-core and eslint-grammar-offset-pop 0.16.5.
225
233
 
226
234
  ## 3.9.4 - 2026-10-31
@@ -230,9 +238,9 @@
230
238
  ## 3.9.3 - 2026-10-31
231
239
 
232
240
  - Changed: the bundled canon pins name the 0.16.3 cohort (@starci/grammar, eslint-grammar-core and eslint-grammar-offset-pop 0.16.3, eslint-canon-fe 9.6.3, eslint-canon-be 3.9.3, stylelint-canon 2.3.0, jest-preset 2.6.0, hfs 4.13.0); ChatWorkspace and PaneLayout are removed with no alias; PaneGrid and Pane are the one generic pane grid: grammar names are generic.
233
- - Added: `entity-extends-base` (R342 `BE_ENTITY_EXTENDS_BASE`, `src/entity-base.ts`, BE-PERSISTENCE-3, ruling entity-base), both editions: an `@Entity` class that declares a database-set `created_at` or `updated_at` itself (`@CreateDateColumn`, `@UpdateDateColumn`, or a `@Column` on those names, or on `createdAt` / `updatedAt`, with `insert: false`, `update: false` or a `default`) and, beside both, the generated uuid `id` is refused; the finding names `UuidAbstractEntity` or `AbstractEntity` of `@modules/platform/database` as the base to extend. A timestamp the application sets (a plain `@Column`) and the base file `platform/database/abstract.entity.ts` are not judged. Spec: `src/entity-base.spec.ts`.
241
+ - Added: `entity-extends-base` (R342 `BE_ENTITY_EXTENDS_BASE`, `src/entity-base.ts`, BE-PERSISTENCE-3), both editions: an `@Entity` class that declares a database-set `created_at` or `updated_at` itself (`@CreateDateColumn`, `@UpdateDateColumn`, or a `@Column` on those names, or on `createdAt` / `updatedAt`, with `insert: false`, `update: false` or a `default`) and, beside both, the generated uuid `id` is refused; the finding names `UuidAbstractEntity` or `AbstractEntity` of `@modules/platform/database` as the base to extend. A timestamp the application sets (a plain `@Column`) and the base file `platform/database/abstract.entity.ts` are not judged. Spec: `src/entity-base.spec.ts`.
234
242
  - Changed: the bundled rule catalog adds R342 and the failure codes add `BE_ENTITY_EXTENDS_BASE`.
235
- - Added: the lint result cache of `starci app check` (ruling app-check-cache): `crossFileInputs`, the files and folders each rule reads beyond the linted file (git-history inputs; third-party-owner walks the integrations only for integration files; an fs-audit spec proves every rule declares what it reads), and the `projectGraph` export the cache keys a file's lint record on.
243
+ - Added: the lint result cache of `starci app check`: `crossFileInputs`, the files and folders each rule reads beyond the linted file (git-history inputs; third-party-owner walks the integrations only for integration files; an fs-audit spec proves every rule declares what it reads), and the `projectGraph` export the cache keys a file's lint record on.
236
244
 
237
245
  ## 3.9.2 - 2026-10-31
238
246
 
@@ -297,7 +305,7 @@
297
305
  ## 3.8.11 - 2026-10-29
298
306
 
299
307
  - Fixed: `source-suffix` (BE_SOURCE_FORM, R89) admits the one file a file slot names by its path, read from the slot manifest: the lite entity registry `src/modules/platform/database/entities.ts` (slot `be.platform.database.entities`) was refused for having no role suffix.
300
- - Changed: `no-raw-sql` (R334) exempts its two raw SQL owners by side-relative folder (`RAW_SQL_OWNERS`: `src/modules/platform/database/` and `src/tests/world/`) and keeps refusing raw SQL in integration and e2e specs, builders and fixtures; its messages send a spec author to entities on `world.db.<connection>` or a named world helper. `callDbFunction` with a listed function is allowed in specs as in domain code (ruling lite-test-sql-owner).
308
+ - Changed: `no-raw-sql` (R334) exempts its two raw SQL owners by side-relative folder (`RAW_SQL_OWNERS`: `src/modules/platform/database/` and `src/tests/world/`) and keeps refusing raw SQL in integration and e2e specs, builders and fixtures; its messages send a spec author to entities on `world.db.<connection>` or a named world helper. `callDbFunction` with a listed function is allowed in specs as in domain code.
301
309
  - Fixed: the edition gate (`pluginForEdition`) reads the rule catalog in full too, so a rule whose catalog entries name only lite is inactive in full: `no-raw-sql` (R334, `editions: [lite]`) no longer fires on a full app, whose SQL law is R36. Full used to return every rule without reading the catalog.
302
310
  - Changed: the bundled canon pins name hfs 4.11.12, eslint-canon-be 3.8.11, eslint-canon-fe 9.5.13 and the Grammar family 0.15.24.
303
311
 
@@ -336,7 +344,7 @@
336
344
  ## 3.8.2 - 2026-10-29
337
345
 
338
346
  - Added: R336 `BE_EVENT_BUS_LITE_SHAPE` (`src/event-bus-lite.ts`, contexts/code/be/event-bus.md BE-EVENT-BUS-6), lite only: `event-dedupe-key` refuses an event class of `src/modules/events/**` whose payload type has no `dedupeKey` (a literal, `EventPayload`, or an interface or alias of the file that declares it or extends `EventPayload`), and `event-subscription-static` refuses a `subscribe(queue, consumer, options?)` whose queue is not a `*_TOPIC_QUEUE` constant imported from `@modules/platform/event-bus` or whose options are not a literal object. Spec: `src/event-bus-lite.spec.ts`.
339
- - Changed: the bundled slot manifest 3.13.0 admits `pgmq` in `ruleParams.db.extensions` (the lite event bus, ruling lite-pgmq-bus-bullmq-jobs), retires `ruleParams.db.queueOutbox` and `sides.be.queueOutbox` with the pg_cron half of R258, lists `public.event_bus_send`, `public.event_bus_read`, `public.event_bus_archive`, `public.event_bus_bury`, `public.event_bus_dead_letters` and `public.event_bus_requeue` in place of `public.event_bus_write` in `ruleParams.be.dbFunctions`, and moves slot `app.db.image` to `.starcistacks/images/db/Dockerfile` (ruling lite-db-image-in-stacks, admitted by the lite `app.starcistacks` allows); the bundled rule catalog keeps R258 `DB_PGMQ_DECLARED` as the event-bus law, retires `DB_CRON_OWNED` and adds R336 `BE_EVENT_BUS_LITE_SHAPE`; the bundled canon pins name hfs 4.11.3, eslint-canon-be 3.8.2, eslint-canon-fe 9.5.4 and the Grammar family 0.15.15. Spec `src/lite-event-bus-template.spec.ts` lints the lite pgmq event-bus templates of @starci/hfs with `no-raw-sql` (R334).
347
+ - Changed: the bundled slot manifest 3.13.0 admits `pgmq` in `ruleParams.db.extensions` (the lite event bus), retires `ruleParams.db.queueOutbox` and `sides.be.queueOutbox` with the pg_cron half of R258, lists `public.event_bus_send`, `public.event_bus_read`, `public.event_bus_archive`, `public.event_bus_bury`, `public.event_bus_dead_letters` and `public.event_bus_requeue` in place of `public.event_bus_write` in `ruleParams.be.dbFunctions`, and moves slot `app.db.image` to `.starcistacks/images/db/Dockerfile` (admitted by the lite `app.starcistacks` allows); the bundled rule catalog keeps R258 `DB_PGMQ_DECLARED` as the event-bus law, retires `DB_CRON_OWNED` and adds R336 `BE_EVENT_BUS_LITE_SHAPE`; the bundled canon pins name hfs 4.11.3, eslint-canon-be 3.8.2, eslint-canon-fe 9.5.4 and the Grammar family 0.15.15. Spec `src/lite-event-bus-template.spec.ts` lints the lite pgmq event-bus templates of @starci/hfs with `no-raw-sql` (R334).
340
348
 
341
349
  ## 3.8.1 - 2026-10-29
342
350
 
@@ -347,12 +355,12 @@
347
355
 
348
356
  ## 3.8.0 - 2026-10-29
349
357
 
350
- - Added: `jobs-scheduler-owner` (R335 `BE_JOBS_SCHEDULER_OWNER`, ruling lite-official-postgres-image): only `platform/jobs/job-tick.service.ts`, its spec and `jobs.module.ts` import `@nestjs/schedule` or `cron`, the `Cron`, `Interval` and `Timeout` decorators are refused everywhere, and a `job-tick.service.ts` must call `advisoryXactLock` and `callDbFunction(..., "job_tick_claim", ...)`. `infra-import-owner` (R90) reads `@nestjs/schedule` and `cron` as owned by `platform/jobs` from the bundled manifest.
358
+ - Added: `jobs-scheduler-owner` (R335 `BE_JOBS_SCHEDULER_OWNER`): only `platform/jobs/job-tick.service.ts`, its spec and `jobs.module.ts` import `@nestjs/schedule` or `cron`, the `Cron`, `Interval` and `Timeout` decorators are refused everywhere, and a `job-tick.service.ts` must call `advisoryXactLock` and `callDbFunction(..., "job_tick_claim", ...)`. `infra-import-owner` (R90) reads `@nestjs/schedule` and `cron` as owned by `platform/jobs` from the bundled manifest.
351
359
  - Changed: the bundled slot manifest 3.11.0 adds the managed lite slot `app.db.image` (`db/Dockerfile`), narrows `ruleParams.db.extensions` to what the official postgres image plus pgvector carries (pgcrypto, pg_trgm, vector, uuid-ossp, unaccent, btree_gist; no pgmq, pg_cron, pg_net or supabase_vault) and gives `@nestjs/schedule` and `cron` one owner, `platform/jobs`, in `infraOwners`; the bundled rule catalog adds R335 `BE_JOBS_SCHEDULER_OWNER` and its R250 and R276 laws name the platform/jobs tick and the db image; the bundled canon pins name hfs 4.11.0, eslint-canon-be 3.8.0, eslint-canon-fe 9.5.2 and the Grammar family 0.15.13 and pin `@nestjs/schedule` 6.1.3 (CommonJS on the Nest 11 line) and `cron` 4.4.0.
352
360
 
353
361
  ## 3.7.1 - 2026-10-29
354
362
 
355
- - Changed: the entity registry (persistence.md BE-PERSISTENCE-3, Debug ruling on lite-persistence-typeorm-entities): the bundled slot manifest 3.10.0 adds the lite slot `be.platform.database.entities`, the entity registry (slot fields `role: entity-registry` and `importedBy`, validated by the manifest shape); the bundled architecture machine reads it (`architecture/entity-registry.mjs`): `tier-direction` (R26 `BE_TIER_DIRECTION`) admits the registry's import of a domain or platform capability's `index.ts` that binds only that capability's `<c>Entities`, and `owner-export-bypass` (R30 `ARCH_OWNER_EXPORT_BYPASS`) admits a direct import of the registry from the files `importedBy` names (`apps/*/src/compose/*.ts`, `apps/*/src/app.module.ts`, `src/tests/world/**`); every other import of either shape stays refused, and full has no registry. `import-owner-entry` (R30) admits the deep path `@modules/platform/database/entities` from the same importers only. Spec: `src/entity-registry.spec.ts`.
363
+ - Changed: the entity registry (persistence.md BE-PERSISTENCE-3): the bundled slot manifest 3.10.0 adds the lite slot `be.platform.database.entities`, the entity registry (slot fields `role: entity-registry` and `importedBy`, validated by the manifest shape); the bundled architecture machine reads it (`architecture/entity-registry.mjs`): `tier-direction` (R26 `BE_TIER_DIRECTION`) admits the registry's import of a domain or platform capability's `index.ts` that binds only that capability's `<c>Entities`, and `owner-export-bypass` (R30 `ARCH_OWNER_EXPORT_BYPASS`) admits a direct import of the registry from the files `importedBy` names (`apps/*/src/compose/*.ts`, `apps/*/src/app.module.ts`, `src/tests/world/**`); every other import of either shape stays refused, and full has no registry. `import-owner-entry` (R30) admits the deep path `@modules/platform/database/entities` from the same importers only. Spec: `src/entity-registry.spec.ts`.
356
364
  - Changed: the bundled canon pins name hfs 4.10.1, eslint-canon-be 3.7.1, eslint-canon-fe 9.5.1 and the Grammar family 0.15.12.
357
365
  - Changed: the owner-cycle check (R27 `ARCH_OWNER_CYCLE`) counts the entity registry as a unit of its own, not part of `platform/database`, so naming every `<c>Entities` closes no cycle among capabilities while any other platform/database file importing a domain still does (spec in `src/entity-registry.spec.ts`); the bundled rule catalog's R26 and R30 laws name the entity registry.
358
366
 
@@ -425,7 +433,7 @@
425
433
 
426
434
  ## 3.4.57 - 2026-10-27
427
435
 
428
- - Changed: the bundled runtime copy follows the two-grammars ruling: the Grammar catalog declares `core` and `offset-pop` only, and the canon pins follow the harness packages. The spec fixture app selects `core`. No rule changes.
436
+ - Changed: the bundled runtime copy follows the two Grammar families: the Grammar catalog declares `core` and `offset-pop` only, and the canon pins follow the harness packages. The spec fixture app selects `core`. No rule changes.
429
437
 
430
438
  ## 3.4.56 - 2026-10-27
431
439
 
@@ -433,7 +441,7 @@
433
441
 
434
442
  ## 3.4.55 - 2026-10-26
435
443
 
436
- - Changed: the bundled runtime copies and canon pins move with the alpha.31 cohort (light push gate, owner rulings of 2026-10-26).
444
+ - Changed: the bundled runtime copies and canon pins move with the alpha.31 cohort (light push gate).
437
445
 
438
446
  ## 3.4.54 - 2026-10-26
439
447
 
@@ -501,7 +509,7 @@
501
509
  - Changed: the bundled rule catalog and slot manifest name the specs that moved into this package (they drive its rules and fixtures and now pass from its own clean install); 3.4.35 was published with the old spec paths and is superseded.
502
510
 
503
511
  ## 3.4.35 - 2026-10-23
504
- - Changed: `BE_AMBIENT_ID` has no exemption for the test world (owner ruling 2026-10-22: a loosening is always red); the world asks the injected `Ids` port like everything else.
512
+ - Changed: `BE_AMBIENT_ID` has no exemption for the test world (a loosening is always red); the world asks the injected `Ids` port like everything else.
505
513
  - Changed: the bundled canon pins select @starci/hfs 4.7.28 and @starci/cli 1.7.28.
506
514
 
507
515
  ## 3.4.34 - 2026-10-23
@@ -516,7 +524,7 @@
516
524
  ## 3.4.31 - 2026-10-23
517
525
  - Changed: the `spec-no-skip` rule text says nothing skips, the contract layer included: a missing sandbox is a failing test of `sandbox.describe` from `@starci/test-world` 1.2.3.
518
526
  - Changed: the bundled canon pins select @starci/hfs 4.7.24 and @starci/cli 1.7.24.
519
- - Changed: no Sonar way rule is left to the server (owner ruling 2026-10-22, no loosening): S3403 `different-types-comparison`, S3800 `function-return-type`, S3782 `argument-type` and S6582 `@typescript-eslint/prefer-optional-chain` run at error, `unicorn/consistent-function-scoping` runs with its default options (arrow functions included). S7785 (top-level await) is recorded as not applicable to a CommonJS back end (`SONAR_WAY_NOT_APPLICABLE`).
527
+ - Changed: no Sonar way rule is left to the server (no loosening): S3403 `different-types-comparison`, S3800 `function-return-type`, S3782 `argument-type` and S6582 `@typescript-eslint/prefer-optional-chain` run at error, `unicorn/consistent-function-scoping` runs with its default options (arrow functions included). S7785 (top-level await) is recorded as not applicable to a CommonJS back end (`SONAR_WAY_NOT_APPLICABLE`).
520
528
  - Added: the `@typescript-eslint/no-unsafe-assignment`, `-member-access`, `-call`, `-return` and `-argument` rules at error.
521
529
 
522
530
  ## 3.4.30 - 2026-10-22
@@ -607,15 +615,15 @@
607
615
 
608
616
  ## 3.4.1 - 2026-10-17
609
617
 
610
- - Changed: the bundled runtime copies follow the runtime of 1.0.0-alpha.19 (owner ruling no-runtime-specs, 2026-10-17): the failure codes, the slot manifest (`exampleNa`) and the rule catalog (`specNa`, `exampleNa`) carry the removal of the runtime's own specs; package behavior is unchanged.
611
- - Fixed (R263 `BE_WEBHOOK_SCOPE`, a18.1 NIVO requests G and J): a third-party OAuth redirect (a GET route with `PublicReason.AuthHandshake` on a path that is not a webhook or events path) is no longer judged as a webhook door (owner ruling `oauth-redirect-not-webhook`); a call on a domain receipt port (no base class, constructor of platform ports only, one of them the Inbox) inside the receipt transaction is the inbox record and not processing (owner ruling `webhook-receipt-port`); an intake that does process the delivery is now reported with its own `intake` finding instead of the signed-metadata text.
618
+ - Changed: the bundled runtime copies follow the runtime of 1.0.0-alpha.19: the failure codes, the slot manifest (`exampleNa`) and the rule catalog (`specNa`, `exampleNa`) carry the removal of the runtime's own specs; package behavior is unchanged.
619
+ - Fixed (R263 `BE_WEBHOOK_SCOPE`, a18.1 NIVO requests G and J): a third-party OAuth redirect (a GET route with `PublicReason.AuthHandshake` on a path that is not a webhook or events path) is no longer judged as a webhook door; a call on a domain receipt port (no base class, constructor of platform ports only, one of them the Inbox) inside the receipt transaction is the inbox record and not processing; an intake that does process the delivery is now reported with its own `intake` finding instead of the signed-metadata text.
612
620
  - Known gaps (planned for alpha.19, Nest lifecycle conformance): no enforcer yet for exactly one validation pipe per app, for interceptors limited to logging, timeout and serialization and registered once, or for the absence of authentication middleware. Templates and examples conform today: one `APP_PIPE`, no interceptor, security-headers middleware only.
613
621
  - Added: `no-guard-injects-guard` (R41 `BE_DEFAULT_DENY`, a18 lifecycle conformance): a guard class (implements `CanActivate` or named `...Guard`) has no constructor parameter that is another guard (a `...Guard` or `CanActivate` type, `Type<CanActivate>`, or `@Inject(SomeGuard)`); the app registers `RateLimitGuard`, `OriginGuard`, `CredentialGuard` and `AuthGuard` as four global `APP_GUARD`s and `@Credential({ kind })` selects the credential behavior.
614
- - Added: R278 `BE_REST_DOOR_EVIDENCE` / `BE_REST_ROUTE_UNDECLARED` accept a credential-guarded route (owner ruling `credential-guarded-rest-door`, 2026-10-16): `@Credential({ kind: "<literal>" })` from the domain identity capability on the route or controller, with the capability declaring a `CredentialGuard implements CanActivate`, resolved by TypeScript symbol. A local decorator, another `@UseGuards` guard and a computed kind still fail.
622
+ - Added: R278 `BE_REST_DOOR_EVIDENCE` / `BE_REST_ROUTE_UNDECLARED` accept a credential-guarded route: `@Credential({ kind: "<literal>" })` from the domain identity capability on the route or controller, with the capability declaring a `CredentialGuard implements CanActivate`, resolved by TypeScript symbol. A local decorator, another `@UseGuards` guard and a computed kind still fail.
615
623
  - Fixed (R281 `BE_SPEC_FORM_ALL_ROLES`, a18 NIVO request A): `spec-infra-double-from-kit` judges a function subject by the callable subset of the sibling's exports (constants, enums, `export ... from` re-exports and overload signatures no longer disable the check; overloads collapse to the implementation); a value-object subject (an undecorated class whose constructor parameters carry no injection token) may be built with `new` (`spec-no-new-subject`, `spec-builds-with-testing-module`, and `useValue: new Subject(...)` in `spec-infra-double-from-kit`) while a decorated or token-injected class stays mandatory; a member of a kit `mock<T>()` object (`mock<{ open: F }>().open`) counts as a kit double.
616
624
 
617
625
  ## 3.4.0 - 2026-10-15
618
- - Added: `module-definition-required` (R295 `BE_MODULE_DEFINITION_MISSING`, owner ruling 2026-10-15 `owner:module-definition-everywhere`): every `<x>.module.ts` of a feature, capability or projection has a sibling `<x>.module-definition.ts` and `<x>.options.ts`, its class extends the `ConfigurableModuleClass` of that definition, and a module of the product is listed in an `imports` array only as `X.register(...)`.
626
+ - Added: `module-definition-required` (R295 `BE_MODULE_DEFINITION_MISSING`): every `<x>.module.ts` of a feature, capability or projection has a sibling `<x>.module-definition.ts` and `<x>.options.ts`, its class extends the `ConfigurableModuleClass` of that definition, and a module of the product is listed in an `imports` array only as `X.register(...)`.
619
627
  - Changed: `capability-module-shape` judges the definition of every module: the representative module of a capability keeps `.setExtras({ isGlobal: false }, ...)` and the one `register` override; a sub-module, feature, transport module or cli group builds `.setClassMethodName("register").build()` and overrides nothing. A module definition in a feature is no longer refused.
620
628
 
621
629
  ## 3.3.1 - 2026-10-15
@@ -628,7 +636,7 @@
628
636
  - Changed: the bundled architecture machine carries `HFS_DUPLICATE_CODE` canon-shape exclusions, staged dead-export consumers and the `<app>.env.ts` role.
629
637
 
630
638
 
631
- - Added: law `app-composition` (R245 and R246, owner ruling 2026-10-14). `app-options-composition-free` (`BE_APP_OPTIONS_COMPOSITION`) keeps `apps/<app>/src/<app>.options.ts` to env-derived options and port bindings (provider maps such as `{ approvalGate: X }`): an array that lists a `*Module` class, a `X.register(...)`/`forRoot(...)`/`registerQueue(...)` call, a `*SchedulerOf(...)`/`*Queue(...)` entry or a spread of such a list, and an `imports`, `modules`, `schedulers` or `processors` array are refused, pointing to `compose/<area>.ts`. `app-file-budget` (`BE_APP_COMPOSITION_BUDGET`) holds `main.ts` (80), `<app>.options.ts` (200), `compose/<area>.ts` (120) and `app.module.ts` (250) to the `budget` of their app slot; the budget is absolute. The role of an app file is the slot entry it matches (`lib/app-roles.mjs`), never a path list.
639
+ - Added: law `app-composition` (R245 and R246). `app-options-composition-free` (`BE_APP_OPTIONS_COMPOSITION`) keeps `apps/<app>/src/<app>.options.ts` to env-derived options and port bindings (provider maps such as `{ approvalGate: X }`): an array that lists a `*Module` class, a `X.register(...)`/`forRoot(...)`/`registerQueue(...)` call, a `*SchedulerOf(...)`/`*Queue(...)` entry or a spread of such a list, and an `imports`, `modules`, `schedulers` or `processors` array are refused, pointing to `compose/<area>.ts`. `app-file-budget` (`BE_APP_COMPOSITION_BUDGET`) holds `main.ts` (80), `<app>.options.ts` (200), `compose/<area>.ts` (120) and `app.module.ts` (250) to the `budget` of their app slot; the budget is absolute. The role of an app file is the slot entry it matches (`lib/app-roles.mjs`), never a path list.
632
640
  - Changed: `is-global-only-in-app` accepts `isGlobal: true` in the composition groups `apps/<app>/src/compose/<area>.ts` (they are part of the app root), and the bundled architecture machine reads an app's root and its groups as one composition (register-once, module-per-transport, the connection and context maps).
633
641
  - Changed: carry the runtime mirror of HFS manifest 3.1.0 (rule catalog 3.1.0) and the canon pins of eslint-canon-fe 8.2.17, HFS 4.3.0 and CLI 1.2.16.
634
642
 
@@ -642,7 +650,7 @@
642
650
 
643
651
  ## 3.2.17 - 2026-10-13
644
652
 
645
- - Changed: the bundled canon-pins copy carries `@heroicons/react` 2.2.0 and `@starci/heroicons` 0.3.3 in place of `@phosphor-icons/react` (the heroicons family is the one icon set, owner ruling 2026-10-13) and the pins of eslint-canon-fe 8.2.16, HFS 4.2.15 and CLI 1.2.15. ESLint rule implementations are unchanged.
653
+ - Changed: the bundled canon-pins copy carries `@heroicons/react` 2.2.0 and `@starci/heroicons` 0.3.3 in place of `@phosphor-icons/react` (the heroicons family is the one icon set) and the pins of eslint-canon-fe 8.2.16, HFS 4.2.15 and CLI 1.2.15. ESLint rule implementations are unchanged.
646
654
 
647
655
  ## 3.2.16 - 2026-10-13
648
656
 
@@ -811,7 +819,7 @@
811
819
  - Added: the Operations law (R95 `BE_OPERATION_CONTRACT`, `operations.mjs`): `operation-contract-decidable` refuses an `OperationContract` whose input or output is `any`, `unknown`, `Record<string, unknown>`, an unbound generic, a function or a standard-library class, or whose refusal codes are not a closed union of string literals; `operation-route-driven-by-table` requires a route that takes `OperationRequest<Table>` or answers `OperationReply<Table>` to do both, of one table. The canon types are recognised by where they are declared (the platform capability `operations`).
812
820
  - Changed: `no-non-ascii-source` (R89) folds each line to NFC before it looks for a Vietnamese letter, so a decomposed spelling is caught like the precomposed one, and it exempts the i18n fixtures slot `be.tests.fixtures.i18n` (`src/tests/fixtures/i18n/`) beside the message-catalog slots; a test title, an identifier and a string in any other spec or fixture are still refused. The detection is `scripts/lib/language.mjs`, shipped in `runtime/`.
813
821
 
814
- - Changed: the messages and header of `tests-no-override` and `tests-infra-only-in-world` (`test-world.mjs`) follow the owner refinement 2026-09-30 of R47: a service of the repository's own stack runs real and is failed on purpose through `world.infra.<service>`, only an external SaaS is a network fake (`world.fake.<provider>`). Detection is unchanged.
822
+ - Changed: the messages and header of `tests-no-override` and `tests-infra-only-in-world` (`test-world.mjs`) follow R47: a service of the repository's own stack runs real and is failed on purpose through `world.infra.<service>`, only an external SaaS is a network fake (`world.fake.<provider>`). Detection is unchanged.
815
823
  - Breaking: one configuration, `export default starciBeConfig({ hfs: loadHfs(import.meta.url) })`. The factory is async
816
824
  (ESLint awaits it), turns typed linting on for every `.ts/.mts/.cts/.js/.mjs/.cjs` (`parserOptions.projectService`),
817
825
  ignores only `dist/`, `coverage/`, `node_modules/`, borrows `@typescript-eslint/{consistent-type-assertions (never),
@@ -907,7 +915,7 @@ Round 3 back-end rules (catalog R78 to R82), each with RuleTester specs and a wh
907
915
 
908
916
  - New: `user-copy-through-catalog` (R78 `BE_USER_COPY_LITERAL`, new law `user-copy`): a literal exception message, a `subject`/`title`/`body`/`text`/`message` property of a `notify`/`send`/`publish` call, or a `message`/`description`/`title` property of a `transport/` response comes from the per-capability messages catalog through the typed `MessageCatalog` port; a short code-shaped literal (`UPPER_SNAKE`, a bare word) and a template literal are left alone. `no-ambient-clock` (R79 `BE_AMBIENT_CLOCK`, new law `temporal`): `Date.now()`, a bare `new Date()` and `performance.now()` are read only inside `platform/clock`; `new Date(value)` built from a value the caller already holds is exempt. `inbox-dedupe-required` (R80 `BE_INBOX_DEDUPE_MISSING`, new law `idempotency`): a `@Public()` webhook controller and an outbox/queue consumer (`<event>.consumer.ts`) show a reference to an inbox or dedupe port before they act. `no-hand-rolled-retry` (R81 `BE_HAND_ROLLED_RETRY`, in `resilience`): a `for`, `while` or `do...while` loop that both catches an error and calls something shaped like a delay (`sleep`, `delay`, `wait`, `backoff`, `setTimeout`) goes through `platform/retry`; a polling loop with no `catch` is exempt, same as `no-query-in-loop` exempts a polling `while`. `no-external-call-in-transaction` (R82 `BE_TRANSACTION_EXTERNAL_CALL`, in `data-access`): `fetch`, an HTTP client call or any method of a `*Client`/`*Sdk` receiver does not run inside `.transaction(async (tx) => ...)`.
909
917
  - Slot manifest (`knowledge/hfs/slots.yaml`, no version bump, additions stamped `since: 1.0.0`): `be.domain.messages` (`src/modules/{domain,integrations}/<capability>/messages/`) and `be.feature.messages` (`src/features/<feature>/messages/`), each an optional per-capability or per-feature vi/en catalog; `be.platform`'s required instances gain `clock` (the injected `Clock` port) and `i18n` (the `MessageCatalog` port); `be.domain` and `be.feature` allow a `messages/` folder.
910
- - Deferred (owner ruling, no rule): floating promises; core `no-await-in-loop` is not adopted.
918
+ - Deferred (no rule): floating promises; core `no-await-in-loop` is not adopted.
911
919
 
912
920
  ## 1.5.0 - 2026-09-30
913
921
 
package/README.md CHANGED
@@ -43,7 +43,7 @@ A sample, not the list:
43
43
  | **Model calls** (R326, R327, R344) | Every model call goes through the `@starci/ai-router` gateway: an upstream provider key variable (`PROVIDER_KEY_VARIABLES` of `src/ai-gateway.ts`, with its `_FILE` twin) is named only in the gateway's custody owner `integrations/ai-gateway`, specs and the test world included; code builds only `ChatOpenAI` and `OpenAIEmbeddings` of `@langchain/openai`, each from an inline options object whose `configuration.baseURL` is read from a `<c>.options.ts` type and whose `apiKey` is a `platform/config` `Secret` revealed; `integrations/ai` reads exactly `STARCI_AI_KEY`, the one virtual key of every client, and the custody owner passes the gateway no `adminToken`. Which owner may import LangChain, `openai`, a provider SDK or an agent framework is the infrastructure table (`provider-key-custody`, `ai-client-through-gateway`, `ai-virtual-key-name`, `infra-import-owner`) |
44
44
  | **Ambient ids** (R142) | `randomUUID` of Node's crypto (named, namespace or global), the `v1`, `v4`, `v6` and `v7` generators of `uuid`, `nanoid` and `ulid` are used only inside `platform/ids`, specs included: code asks the injected `Ids` port and a spec provides `fakeIds()`; the generators are found by the module they are imported from, never by a local name (`no-ambient-id`) |
45
45
  | **App composition** (R245, R246) | `apps/<app>/src/<app>.env.ts` exports an explicit typed `<App>Env` interface and `read<App>Env(env: EnvSource): <App>Env` (for example `ApiEnv` and `readApiEnv`). The interface declares its own readonly parsed members, such as `readonly server: ReturnType<typeof parseServerConfig>`, structurally compatible with the app's options. The role name stays `<app>.env.ts`, never `env.ts`; capability `<capability>.config.ts` files stay unchanged. `main.ts` creates `EnvSource` once, imports and calls the reader, builds options and boots. The env file holds fail-fast parsing only, with no localhost or default host fallback, logic, module composition, business code or feature imports; `<app>.options.ts` holds env-derived options and port bindings only, with no parsing. Both refuse an array listing `*Module` classes, module or queue registrations (`register`, `forRoot`, `registerQueue`) or scheduler entries, and an `imports`, `modules`, `schedulers` or `processors` list; the env file also refuses standalone module or queue registration calls. Composition belongs in a `compose/<area>.ts` group that `app.module.ts` spreads (`app-options-composition-free`, `BE_APP_OPTIONS_COMPOSITION`). Each app file stays within its slot's line budget: `main.ts` 80, env 150, options 200, group 120, root 250 (`app-file-budget`, `BE_APP_COMPOSITION_BUDGET`). The interface and reader exports are a documented scaffold contract; they need no new lint rule |
46
- | **Sonar parity** (R235) | The smells SonarCloud measures that a lint rule can decide: no `await` inside a loop (`no-await-in-loop`, S9382; `for (;;)` and `while (true)` are spared), no `charCodeAt`/`fromCharCode` (`prefer-code-point`), no string that only escapes backslashes (`prefer-string-raw`), no nested conditional (`no-nested-conditional`), `void` only on a call (`no-void-operator`), no unused import (`no-unused-import`), `export ... from` for an import that is only handed on (`prefer-export-from`); the factory also turns on typescript-eslint `no-deprecated`, `no-base-to-string` and `require-await`. The files `*.spec.ts` and `*.e2e-spec.ts` are outside the scan, so outside these rules |
46
+ | **Sonar parity** (R235) | The smells SonarCloud measures that a lint rule can decide: no `await` inside a loop (`no-await-in-loop`, S9382; `for (;;)` and `while (true)` are spared), no `charCodeAt`/`fromCharCode` (`prefer-code-point`), no string that only escapes backslashes (`prefer-string-raw`), no nested conditional (`no-nested-conditional`), `void` only on a call (`no-void-operator`), no unused import (`no-unused-import`), `export ... from` for an import that is only handed on (`prefer-export-from`), no raw U+2028, U+2029 or U+0085 in any file, specs included (`no-line-separator-literal`: the scanner counts them as line breaks and aborts; the finding names the escape); the factory also turns on typescript-eslint `no-deprecated`, `no-base-to-string` and `require-await`. The files `*.spec.ts` and `*.e2e-spec.ts` are outside the scan, so outside these rules |
47
47
  | **Cookies** (R141) | A cookie a door writes through the response of Express or Fastify (`cookie`, `setCookie`) states `httpOnly: true`, `secure: true` and `sameSite` `lax` or `strict` in options typed with those literals, and `Set-Cookie` is never written as a header; the call is recognised by where its signature is declared (`response-cookie-attributes`). A secret-derived value is compared with `timingSafeEqual`: a `Secret` of `platform/config` and the `.digest()` of a `Hash` or `Hmac` of Node's crypto are recognised by type (`secret-compare-timing-safe`) |
48
48
  | **Default deny** | Typed bodies and arguments, no `GraphQLJSON` tunnel, no `switch (operation)`, `@Public` carries a `PublicReason` member of `domain/identity`, no `@UseGuards` (the global `APP_GUARD` chain decides) and no guard injected into another guard (`no-untyped-body`, `public-needs-reason`, `no-auth-use-guards`, `no-guard-injects-guard`) |
49
49
  | **Module shape** | No `@Global()`; `isGlobal: true` only in an app's `app.module.ts`; no import of another owner's module; typed `ConfigurableModuleBuilder`; `static register` is the only factory; every module (capability, sub-module, feature, transport, cli group) has a sibling `<x>.module-definition.ts` and `<x>.options.ts`, extends its own `ConfigurableModuleClass` and is listed only as `X.register(...)` (`module-definition-required`); only a capability's representative module keeps `.setExtras({ isGlobal: false })` and the `register` override (`capability-module-shape`); one module per file; no `new` of a provider; no module-level `let` (`no-global-decorator`, `is-global-only-in-app`, `no-cross-owner-module-import`, `static-module-register`) |
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The rules that hold the composition files of a back-end app (catalog R245 `BE_APP_OPTIONS_COMPOSITION`, R265
3
3
  * `BE_COMPOSITION_UNTYPED` and R246
4
- * `BE_APP_COMPOSITION_BUDGET`, owner ruling 2026-10-14). An app's `src/` holds five roles, named by the entries of its `be.app.*` slot (`lib/app-roles.mjs`):
4
+ * `BE_APP_COMPOSITION_BUDGET`). An app's `src/` holds five roles, named by the entries of its `be.app.*` slot (`lib/app-roles.mjs`):
5
5
  * `main.ts`, `app.module.ts`, `<app>.env.ts`, `<app>.options.ts` and the composition groups `compose/<area>.ts`.
6
6
  *
7
7
  * - `app-options-composition-free` (`BE_APP_OPTIONS_COMPOSITION`) keeps `<app>.env.ts` to typed, fail-fast environment
@@ -27,7 +27,7 @@ const RAW_CONNECTION_CALLS = new Set(["InjectEntityManager", "InjectDataSource",
27
27
  const FUNCTION_LIKE = new Set(["ArrowFunctionExpression", "FunctionExpression", "CallExpression"]);
28
28
  /** Whether a file may build connections: the platform database capability and the cli app. */
29
29
  const mayBuildConnections = (hfs, file) => inDatabaseCapability(hfs, file) || inCli(hfs, file);
30
- /** `new DataSource(` also in the test world (`src/tests/world`), which owns the shared test infrastructure (owner ruling 2026-09-30). */
30
+ /** `new DataSource(` also in the test world (`src/tests/world`), which owns the shared test infrastructure. */
31
31
  const mayConstructDataSource = (hfs, file) => mayBuildConnections(hfs, file) || inTestWorld(hfs, file);
32
32
  /** The connection whose name a string literal spells, or undefined. */
33
33
  const connectionNamed = (hfs, node) => node?.type === "Literal" && typeof node.value === "string" ? connectionsOf(hfs).find((connection) => connection.name === node.value) : undefined;
@@ -84,8 +84,8 @@ export const entityExtendsBase = {
84
84
  docs: { description: "An @Entity class does not repeat created_at / updated_at (or the generated uuid id beside them); it extends AbstractEntity or UuidAbstractEntity of @modules/platform/database." },
85
85
  schema: [],
86
86
  messages: {
87
- timestamp: `\`{{entity}}\` maps \`{{column}}\` itself. Columns every table shares are inherited, never repeated (BE-PERSISTENCE-3, ruling entity-base): extend \`{{base}}\` imported from \`${DATABASE_MODULE}\` and drop this property. A table whose timestamps the application sets, or that lacks one of them, extends nothing and maps its own with a plain \`@Column\`.`,
88
- key: `\`{{entity}}\` maps the generated uuid \`id\` beside \`created_at\` and \`updated_at\` itself. Columns every table shares are inherited, never repeated (BE-PERSISTENCE-3, ruling entity-base): extend \`${UUID_BASE_ENTITY}\` imported from \`${DATABASE_MODULE}\` and drop the three properties.`,
87
+ timestamp: `\`{{entity}}\` maps \`{{column}}\` itself. Columns every table shares are inherited, never repeated (BE-PERSISTENCE-3): extend \`{{base}}\` imported from \`${DATABASE_MODULE}\` and drop this property. A table whose timestamps the application sets, or that lacks one of them, extends nothing and maps its own with a plain \`@Column\`.`,
88
+ key: `\`{{entity}}\` maps the generated uuid \`id\` beside \`created_at\` and \`updated_at\` itself. Columns every table shares are inherited, never repeated (BE-PERSISTENCE-3): extend \`${UUID_BASE_ENTITY}\` imported from \`${DATABASE_MODULE}\` and drop the three properties.`,
89
89
  },
90
90
  },
91
91
  create(context) {
@@ -306,7 +306,7 @@ const isCqrsDataConstructor = (context, node) => {
306
306
  /**
307
307
  * `registerEnumType(...)` of `@nestjs/graphql` at module top level of a `<name>.type.ts` file of the GraphQL transport slot
308
308
  * (`be.transport.graphql`). It declares a schema enum: `starci app emit` loads only the resolver, scalar and `include` module files, so the
309
- * registration must sit in a file the resolver imports, and the `.type.ts` is that file (owner ruling 2026-10-16 "Theo y tro", docs/microservices.md#r264).
309
+ * registration must sit in a file the resolver imports, and the `.type.ts` is that file (docs/microservices.md#r264).
310
310
  * The same call in any other role or slot, or nested in a function, stays executable logic.
311
311
  */
312
312
  const isEnumRegistration = (context, hfs, node, role) => role === "type"
@@ -10,7 +10,7 @@ export const functionLineBudget = {
10
10
  },
11
11
  },
12
12
  create(context) {
13
- // C08 adds this common parameter to the shipped manifest; keep the owner-decided cap while it lands.
13
+ // A manifest without `ruleParams.functionLines` gets the cap of 80 lines.
14
14
  const max = hfsOf(context).ruleParams.functionLines ?? 80;
15
15
  if (!Number.isInteger(max) || max < 1)
16
16
  throw new RangeError("ruleParams.functionLines must be a positive integer");
@@ -2,7 +2,7 @@
2
2
  export declare const PACKAGE_ROOT: string;
3
3
  /**
4
4
  * The runtime of the installed @starci/hfs (its peer, a same-minor range): the slot manifest, the rule catalog, the canon pins and the architecture
5
- * machine are read from it at run time, never from a copy bundled here, so an hfs data change releases hfs alone (decision release-only-what-changed).
5
+ * machine are read from it at run time, never from a copy bundled here, so an hfs data change releases hfs alone.
6
6
  */
7
7
  export declare const RUNTIME_ROOT: string;
8
8
  /** The files this package keeps of its own in runtime/ (the project graph rule, the jsdoc and sonar helpers, the package-scripts template). */
@@ -9,7 +9,7 @@ import { fileURLToPath } from "node:url";
9
9
  export const PACKAGE_ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
10
10
  /**
11
11
  * The runtime of the installed @starci/hfs (its peer, a same-minor range): the slot manifest, the rule catalog, the canon pins and the architecture
12
- * machine are read from it at run time, never from a copy bundled here, so an hfs data change releases hfs alone (decision release-only-what-changed).
12
+ * machine are read from it at run time, never from a copy bundled here, so an hfs data change releases hfs alone.
13
13
  */
14
14
  export const RUNTIME_ROOT = join(dirname(createRequire(import.meta.url).resolve("@starci/hfs/package.json")), "runtime");
15
15
  /** The files this package keeps of its own in runtime/ (the project graph rule, the jsdoc and sonar helpers, the package-scripts template). */
@@ -2,7 +2,7 @@
2
2
  * Type-aware helpers: a rule asks what a node IS (its TypeScript type and where that type is declared), never what it
3
3
  * is called. `starciBeConfig` turns typed linting on for every file (`parserOptions.projectService`), so these
4
4
  * helpers refuse to run without the program instead of falling back to a name match: a rule that silently degrades to
5
- * a heuristic is the loophole the owner closed.
5
+ * a heuristic is a loophole.
6
6
  */
7
7
  import ts from "typescript";
8
8
  import type { ParserServicesWithTypeInformation } from "@typescript-eslint/utils";
package/dist/lib/types.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Type-aware helpers: a rule asks what a node IS (its TypeScript type and where that type is declared), never what it
3
3
  * is called. `starciBeConfig` turns typed linting on for every file (`parserOptions.projectService`), so these
4
4
  * helpers refuse to run without the program instead of falling back to a name match: a rule that silently degrades to
5
- * a heuristic is the loophole the owner closed.
5
+ * a heuristic is a loophole.
6
6
  */
7
7
  import ts from "typescript";
8
8
  /**
@@ -56,7 +56,7 @@ const isBusinessOrigin = (hfs, origin) => {
56
56
  /**
57
57
  * A domain receipt port records a delivery and processes nothing: a class with no base class whose constructor takes only platform
58
58
  * ports (and TypeORM), at least one of them the platform `Inbox` (or its `EntityInbox` extension). It cannot reach another domain service or the CQRS buses, so a call
59
- * on it inside the receipt transaction is the inbox record itself (owner ruling 2026-10-17 "Theo y tro": the owner delegated the decision to main).
59
+ * on it inside the receipt transaction is the inbox record itself.
60
60
  */
61
61
  const isReceiptPort = (checker, hfs, type) => {
62
62
  const declaration = type.getSymbol()?.getDeclarations()?.find(ts.isClassDeclaration);
@@ -16,7 +16,7 @@ export declare const noModuleLet: RuleModule;
16
16
  /** One `@Module` class per file. */
17
17
  export declare const oneModulePerFile: RuleModule;
18
18
  /**
19
- * The shape of a module's definition (BE-CONVENTION 1.2, owner ruling module-definition-everywhere): the representative
19
+ * The shape of a module's definition (BE-CONVENTION 1.2): the representative
20
20
  * module of a capability builds `new ConfigurableModuleBuilder<XOptions>().setExtras({ isGlobal: false }, ...).build()` and
21
21
  * may override only `static register(options: typeof OPTIONS_TYPE): DynamicModule`; every other module (a sub-module, a feature,
22
22
  * a transport, a cli group) builds `new ConfigurableModuleBuilder<XOptions>().setClassMethodName("register").build()` and
@@ -24,7 +24,7 @@ export declare const oneModulePerFile: RuleModule;
24
24
  */
25
25
  export declare const capabilityModuleShape: RuleModule;
26
26
  /**
27
- * Every Nest module has a module definition and is registered through it (owner ruling module-definition-everywhere): its
27
+ * Every Nest module has a module definition and is registered through it: its
28
28
  * `<x>.module.ts` has a sibling `<x>.module-definition.ts` and `<x>.options.ts`, its class extends the `ConfigurableModuleClass`
29
29
  * of that definition, and a module of the product is listed in an `imports` array only as `X.register(...)`, never as a bare
30
30
  * class. The `AppModule` of an app root and the test world are composition roots and are not judged here.
@@ -12,7 +12,7 @@
12
12
  * capability's representative module is reached through its `Inject*()` decorators, never by import. One owner may
13
13
  * import its own modules (a transport module its feature's application module, a representative its sub-modules);
14
14
  * the app composes every owner.
15
- * - `capability-module-shape` holds the definition of every module (owner ruling module-definition-everywhere): the representative
15
+ * - `capability-module-shape` holds the definition of every module: the representative
16
16
  * `<c>.module-definition.ts` of a capability is `defineCapabilityModule<XOptions>()` of `@starci/nest-kit` (or a typed
17
17
  * `ConfigurableModuleBuilder` with `.setExtras({ isGlobal: false }, ...)` and `.build()`); every other module's definition (a
18
18
  * sub-module, a feature, a transport, a cli group) is `defineConfigurableModule<XOptions>()` (or
@@ -419,7 +419,7 @@ const moduleFileOf = (hfs, filename) => {
419
419
  return { kind: suffix === ".module.ts" ? "module" : "definition", tier, name, representative };
420
420
  };
421
421
  /**
422
- * The shape of a module's definition (BE-CONVENTION 1.2, owner ruling module-definition-everywhere): the representative
422
+ * The shape of a module's definition (BE-CONVENTION 1.2): the representative
423
423
  * module of a capability builds `new ConfigurableModuleBuilder<XOptions>().setExtras({ isGlobal: false }, ...).build()` and
424
424
  * may override only `static register(options: typeof OPTIONS_TYPE): DynamicModule`; every other module (a sub-module, a feature,
425
425
  * a transport, a cli group) builds `new ConfigurableModuleBuilder<XOptions>().setClassMethodName("register").build()` and
@@ -502,7 +502,7 @@ const importsArrayOf = (property) => (!property.computed && keyName(property.key
502
502
  /** The PascalCase options type name a module file name implies: `sepay-feed-http` gives `SepayFeedHttpOptions`. */
503
503
  const optionsTypeOf = (name) => `${name.replace(/(?:^|-)(\w)/g, (_, letter) => letter.toUpperCase())}Options`;
504
504
  /**
505
- * Every Nest module has a module definition and is registered through it (owner ruling module-definition-everywhere): its
505
+ * Every Nest module has a module definition and is registered through it: its
506
506
  * `<x>.module.ts` has a sibling `<x>.module-definition.ts` and `<x>.options.ts`, its class extends the `ConfigurableModuleClass`
507
507
  * of that definition, and a module of the product is listed in an `imports` array only as `X.register(...)`, never as a bare
508
508
  * class. The `AppModule` of an app root and the test world are composition roots and are not judged here.
@@ -490,7 +490,7 @@ const credentialGuardDeclared = (context, decoratorCallee_) => {
490
490
  return false;
491
491
  };
492
492
  /**
493
- * Credential-guarded route (BE_REST_DOOR_EVIDENCE, owner delegation 2026-10-16): the route, or its controller class, carries
493
+ * Credential-guarded route (BE_REST_DOOR_EVIDENCE): the route, or its controller class, carries
494
494
  * `@Credential({ kind: "<literal>" })` imported from the domain identity capability, and that capability declares a
495
495
  * `CredentialGuard implements CanActivate`. A same-named local decorator, a `@UseGuards` of any other guard and a non-literal kind prove nothing.
496
496
  */
@@ -508,7 +508,7 @@ const credentialGuardEvidence = (context, method) => {
508
508
  return false;
509
509
  };
510
510
  /**
511
- * Event-stream evidence (BE_REST_DOOR_EVIDENCE, owner:lite-sse-door): the route is an `@Sse` method of `@nestjs/common` inside the sse slot of a
511
+ * Event-stream evidence (BE_REST_DOOR_EVIDENCE): the route is an `@Sse` method of `@nestjs/common` inside the sse slot of a
512
512
  * realtime channel. It is structural, not a name list: the same `@Sse` anywhere else, or any other route inside the sse slot, proves nothing.
513
513
  */
514
514
  const eventStreamEvidence = (context, method) => hfsOf(context).slotOf(context.filename) === SSE_SLOT
@@ -10,7 +10,7 @@
10
10
  * `require-await` the factory turns on.
11
11
  */
12
12
  import { SONAR_SYNTAX_RULES } from "../runtime/scripts/lib/sonar-syntax-rules.mjs";
13
- const NAMES = ["no-await-in-loop", "prefer-code-point", "prefer-string-raw", "no-nested-conditional", "no-void-operator", "no-unused-import", "prefer-export-from", "max-params"];
13
+ const NAMES = ["no-await-in-loop", "prefer-code-point", "prefer-string-raw", "no-nested-conditional", "no-void-operator", "no-unused-import", "prefer-export-from", "max-params", "no-line-separator-literal"];
14
14
  /** The rules this law contributes to the plugin. */
15
15
  export const rules = Object.fromEntries(NAMES.flatMap((name) => {
16
16
  const rule = SONAR_SYNTAX_RULES[name];
@@ -124,7 +124,7 @@ export const specNoSourceRead = {
124
124
  },
125
125
  };
126
126
  /**
127
- * R48 (unit-test standard 2026-09-30): a unit spec takes its database double from the kit, `mockEntityManager()` (or
127
+ * R48: a unit spec takes its database double from the kit, `mockEntityManager()` (or
128
128
  * `fakeTransaction()`) imported from `@starci/jest-preset`. It never builds an ad-hoc `EntityManager`, `QueryRunner`,
129
129
  * `DataSource` or query builder, never types a `mock<EntityManager>()` and never takes a double from a repository fixture.
130
130
  * Refused in a `*.spec.ts`: a call whose result is one of those typeorm types unless the called function is
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The rules that hold the test layout (catalog R47 `BE_TEST_TOPOLOGY`, owner test layout 2026-09-30).
2
+ * The rules that hold the test layout (catalog R47 `BE_TEST_TOPOLOGY`).
3
3
  *
4
4
  * Unit specs sit beside their subject. Everything else lives under `src/tests/`, one folder per kind:
5
5
  * - `world/` the ONLY test infrastructure (slot `be.tests.world`): `global-setup.ts` starts (or attaches to) the stack
package/dist/webhooks.js CHANGED
@@ -297,7 +297,7 @@ const routePaths = (context, decorator) => {
297
297
  return decoratorArguments(decorator).flatMap((argument) => read(toTs(argument)));
298
298
  };
299
299
  /**
300
- * A third-party OAuth redirect into the API (owner ruling 2026-10-17 "Theo y tro": the owner delegated the decision to main):
300
+ * A third-party OAuth redirect into the API:
301
301
  * a GET named `callback` that declares the closed reason `PublicReason.AuthHandshake`. It is a browser redirect with no
302
302
  * signature to verify, so it is not a webhook door. A POST, a `webhook` or `events` path, or any other reason is still judged.
303
303
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-canon-be",
3
- "version": "3.19.1",
3
+ "version": "3.19.3",
4
4
  "description": "The StarCi back-end lint canon: every rule its laws publish, gathered as one flat-config plugin.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "node": ">=22.13.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@starci/hfs": "~5.13.0",
43
+ "@starci/hfs": "~6.0.0",
44
44
  "eslint": ">=9",
45
45
  "typescript": ">=5.9"
46
46
  },
@@ -247,6 +247,23 @@ const mediaHasCaption = {
247
247
  },
248
248
  };
249
249
 
250
+ /** The line breaks the scanner counts and the language does not: a raw U+2028 or U+2029 inside a string, template, regular expression or comment is legal source, and U+0085 is no line terminator in it. */
251
+ const SCANNER_LINE_BREAKS = /[\u2028\u2029\u0085]/gu;
252
+ const LINE_BREAK_NAMES = Object.freeze({ '\u2028': ['U+2028', 'LINE SEPARATOR', '\\u2028'], '\u2029': ['U+2029', 'PARAGRAPH SEPARATOR', '\\u2029'], '\u0085': ['U+0085', 'NEXT LINE', '\\u0085'] });
253
+ /** Sonar scanner crash ("Line n is out of range ... File has m lines"): the scanner splits a file at U+2028, U+2029 and U+0085, the language service does not, so their line numbers disagree and the analysis aborts. Applies to every file the scan reads, specs included. */
254
+ const noLineSeparatorLiteral = {
255
+ meta: { type: 'problem', schema: [], messages: { raw: 'The scanner splits lines at a raw {{ code }} ({{ name }}) and TypeScript does not, so its analysis aborts with "Line n is out of range". Write the escape `{{ escape }}` in a string, template or regular expression, or delete the character anywhere else.' } },
256
+ create: (context) => ({
257
+ Program: () => {
258
+ const { text } = context.sourceCode;
259
+ for (const found of text.matchAll(SCANNER_LINE_BREAKS)) {
260
+ const [code, name, escape] = LINE_BREAK_NAMES[found[0]];
261
+ context.report({ loc: context.sourceCode.getLocFromIndex(found.index), messageId: 'raw', data: { code, name, escape } });
262
+ }
263
+ },
264
+ }),
265
+ };
266
+
250
267
  /** The files the example scans leave out: a unit spec and an end-to-end spec (the regex, and the flat-config globs of the same set). */
251
268
  const OUTSIDE_THE_SCAN = /\.(?:e2e-)?spec\.[cm]?[jt]sx?$/;
252
269
  export const OUTSIDE_THE_SCAN_FILES = Object.freeze(['**/*.spec.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', '**/*.e2e-spec.{js,mjs,cjs,ts,mts,cts,jsx,tsx}']);
@@ -266,4 +283,5 @@ export const SONAR_SYNTAX_RULES = Object.freeze({
266
283
  'no-unused-prop-types': scanned(noUnusedPropTypes),
267
284
  'media-has-caption': scanned(mediaHasCaption),
268
285
  'max-params': scanned(maxParams),
286
+ 'no-line-separator-literal': noLineSeparatorLiteral,
269
287
  });