circle-ir-ai 4.36.0 → 4.38.0

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 (207) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/dist/blast-radius/import-map.d.ts +121 -0
  3. package/dist/blast-radius/import-map.d.ts.map +1 -0
  4. package/dist/blast-radius/import-map.js +735 -0
  5. package/dist/blast-radius/import-map.js.map +1 -0
  6. package/dist/blast-radius/index.d.ts +48 -4
  7. package/dist/blast-radius/index.d.ts.map +1 -1
  8. package/dist/blast-radius/index.js +427 -46
  9. package/dist/blast-radius/index.js.map +1 -1
  10. package/dist/blast-radius/radius.d.ts +300 -7
  11. package/dist/blast-radius/radius.d.ts.map +1 -1
  12. package/dist/blast-radius/radius.js +1486 -7
  13. package/dist/blast-radius/radius.js.map +1 -1
  14. package/dist/blast-radius/types.d.ts +106 -2
  15. package/dist/blast-radius/types.d.ts.map +1 -1
  16. package/dist/blast-radius/types.js +2 -2
  17. package/dist/dead-code/detector.d.ts.map +1 -1
  18. package/dist/dead-code/detector.js +6 -2
  19. package/dist/dead-code/detector.js.map +1 -1
  20. package/dist/health-score/calculator.d.ts.map +1 -1
  21. package/dist/health-score/calculator.js +12 -4
  22. package/dist/health-score/calculator.js.map +1 -1
  23. package/dist/index.d.ts +4 -3
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +10 -6
  26. package/dist/index.js.map +1 -1
  27. package/dist/llm/ax-client.d.ts.map +1 -1
  28. package/dist/llm/ax-client.js +4 -0
  29. package/dist/llm/ax-client.js.map +1 -1
  30. package/dist/llm/index.d.ts +1 -0
  31. package/dist/llm/index.d.ts.map +1 -1
  32. package/dist/llm/index.js +3 -0
  33. package/dist/llm/index.js.map +1 -1
  34. package/dist/llm/model-route-dispatcher.d.ts +64 -0
  35. package/dist/llm/model-route-dispatcher.d.ts.map +1 -0
  36. package/dist/llm/model-route-dispatcher.js +115 -0
  37. package/dist/llm/model-route-dispatcher.js.map +1 -0
  38. package/dist/llm/model-route.d.ts +33 -4
  39. package/dist/llm/model-route.d.ts.map +1 -1
  40. package/dist/llm/model-route.js +100 -12
  41. package/dist/llm/model-route.js.map +1 -1
  42. package/dist/llm/non-public-address.d.ts +37 -0
  43. package/dist/llm/non-public-address.d.ts.map +1 -0
  44. package/dist/llm/non-public-address.js +155 -0
  45. package/dist/llm/non-public-address.js.map +1 -0
  46. package/dist/mcp/tools/blast-radius.d.ts +6 -4
  47. package/dist/mcp/tools/blast-radius.d.ts.map +1 -1
  48. package/dist/mcp/tools/blast-radius.js +64 -11
  49. package/dist/mcp/tools/blast-radius.js.map +1 -1
  50. package/dist/scope/product-paths.d.ts +109 -18
  51. package/dist/scope/product-paths.d.ts.map +1 -1
  52. package/dist/scope/product-paths.js +300 -43
  53. package/dist/scope/product-paths.js.map +1 -1
  54. package/dist/secret-scan/scanner.d.ts.map +1 -1
  55. package/dist/secret-scan/scanner.js +2 -1
  56. package/dist/secret-scan/scanner.js.map +1 -1
  57. package/dist/security-scan/scanner.d.ts +13 -0
  58. package/dist/security-scan/scanner.d.ts.map +1 -1
  59. package/dist/security-scan/scanner.js +79 -18
  60. package/dist/security-scan/scanner.js.map +1 -1
  61. package/dist/selectors/exclude.d.ts +5 -1
  62. package/dist/selectors/exclude.d.ts.map +1 -1
  63. package/dist/selectors/exclude.js +15 -2
  64. package/dist/selectors/exclude.js.map +1 -1
  65. package/dist/skills/bundle-loader.d.ts.map +1 -1
  66. package/dist/skills/bundle-loader.js +6 -3
  67. package/dist/skills/bundle-loader.js.map +1 -1
  68. package/dist/spec-gap/analyzer.d.ts +8 -0
  69. package/dist/spec-gap/analyzer.d.ts.map +1 -1
  70. package/dist/spec-gap/analyzer.js +6 -3
  71. package/dist/spec-gap/analyzer.js.map +1 -1
  72. package/dist/specifica/environment/index.d.ts.map +1 -1
  73. package/dist/specifica/environment/index.js +5 -3
  74. package/dist/specifica/environment/index.js.map +1 -1
  75. package/dist/specifica/environment/read-code.d.ts +9 -2
  76. package/dist/specifica/environment/read-code.d.ts.map +1 -1
  77. package/dist/specifica/environment/read-code.js +12 -5
  78. package/dist/specifica/environment/read-code.js.map +1 -1
  79. package/dist/specifica/generator.js +1 -0
  80. package/dist/specifica/generator.js.map +1 -1
  81. package/dist/specifica/index.d.ts +3 -2
  82. package/dist/specifica/index.d.ts.map +1 -1
  83. package/dist/specifica/index.js +3 -1
  84. package/dist/specifica/index.js.map +1 -1
  85. package/dist/specifica/learned-diff.d.ts.map +1 -1
  86. package/dist/specifica/learned-diff.js +3 -2
  87. package/dist/specifica/learned-diff.js.map +1 -1
  88. package/dist/specifica/learned-tree.d.ts +8 -0
  89. package/dist/specifica/learned-tree.d.ts.map +1 -1
  90. package/dist/specifica/learned-tree.js.map +1 -1
  91. package/dist/specifica/level-design.d.ts +14 -0
  92. package/dist/specifica/level-design.d.ts.map +1 -1
  93. package/dist/specifica/level-design.js +17 -7
  94. package/dist/specifica/level-design.js.map +1 -1
  95. package/dist/specifica/modules.d.ts +58 -1
  96. package/dist/specifica/modules.d.ts.map +1 -1
  97. package/dist/specifica/modules.js +181 -2
  98. package/dist/specifica/modules.js.map +1 -1
  99. package/dist/specifica/spec-tree.d.ts +14 -2
  100. package/dist/specifica/spec-tree.d.ts.map +1 -1
  101. package/dist/specifica/spec-tree.js +90 -53
  102. package/dist/specifica/spec-tree.js.map +1 -1
  103. package/dist/specifica/tree-types.d.ts +40 -0
  104. package/dist/specifica/tree-types.d.ts.map +1 -1
  105. package/dist/specifica/tree-types.js +5 -0
  106. package/dist/specifica/tree-types.js.map +1 -1
  107. package/dist/specifica/tree-writer.d.ts +7 -2
  108. package/dist/specifica/tree-writer.d.ts.map +1 -1
  109. package/dist/specifica/tree-writer.js +10 -3
  110. package/dist/specifica/tree-writer.js.map +1 -1
  111. package/dist/specifica/types.d.ts +13 -0
  112. package/dist/specifica/types.d.ts.map +1 -1
  113. package/dist/specifica/use-cases.d.ts +6 -0
  114. package/dist/specifica/use-cases.d.ts.map +1 -1
  115. package/dist/specifica/use-cases.js +6 -2
  116. package/dist/specifica/use-cases.js.map +1 -1
  117. package/dist/trust/passes/ai-config-detect.d.ts.map +1 -1
  118. package/dist/trust/passes/ai-config-detect.js +2 -1
  119. package/dist/trust/passes/ai-config-detect.js.map +1 -1
  120. package/dist/trust/passes/ai-generated-fingerprint.d.ts +2 -1
  121. package/dist/trust/passes/ai-generated-fingerprint.d.ts.map +1 -1
  122. package/dist/trust/passes/ai-generated-fingerprint.js +3 -2
  123. package/dist/trust/passes/ai-generated-fingerprint.js.map +1 -1
  124. package/dist/trust/passes/code-complexity.d.ts +2 -1
  125. package/dist/trust/passes/code-complexity.d.ts.map +1 -1
  126. package/dist/trust/passes/code-complexity.js +3 -2
  127. package/dist/trust/passes/code-complexity.js.map +1 -1
  128. package/dist/trust/passes/conformance-attestation.d.ts.map +1 -1
  129. package/dist/trust/passes/conformance-attestation.js +2 -1
  130. package/dist/trust/passes/conformance-attestation.js.map +1 -1
  131. package/dist/trust/passes/cross-skill-interaction.d.ts +2 -1
  132. package/dist/trust/passes/cross-skill-interaction.d.ts.map +1 -1
  133. package/dist/trust/passes/cross-skill-interaction.js +4 -3
  134. package/dist/trust/passes/cross-skill-interaction.js.map +1 -1
  135. package/dist/trust/passes/data-exfiltration.d.ts +3 -2
  136. package/dist/trust/passes/data-exfiltration.d.ts.map +1 -1
  137. package/dist/trust/passes/data-exfiltration.js +5 -4
  138. package/dist/trust/passes/data-exfiltration.js.map +1 -1
  139. package/dist/trust/passes/dep-manifests.d.ts.map +1 -1
  140. package/dist/trust/passes/dep-manifests.js +2 -1
  141. package/dist/trust/passes/dep-manifests.js.map +1 -1
  142. package/dist/trust/passes/deprecated-usage.d.ts +2 -1
  143. package/dist/trust/passes/deprecated-usage.d.ts.map +1 -1
  144. package/dist/trust/passes/deprecated-usage.js +3 -2
  145. package/dist/trust/passes/deprecated-usage.js.map +1 -1
  146. package/dist/trust/passes/deprecation-no-replacement.d.ts +2 -1
  147. package/dist/trust/passes/deprecation-no-replacement.d.ts.map +1 -1
  148. package/dist/trust/passes/deprecation-no-replacement.js +3 -2
  149. package/dist/trust/passes/deprecation-no-replacement.js.map +1 -1
  150. package/dist/trust/passes/doc-coverage.d.ts +2 -1
  151. package/dist/trust/passes/doc-coverage.d.ts.map +1 -1
  152. package/dist/trust/passes/doc-coverage.js +3 -2
  153. package/dist/trust/passes/doc-coverage.js.map +1 -1
  154. package/dist/trust/passes/eu-ai-act-flags.d.ts.map +1 -1
  155. package/dist/trust/passes/eu-ai-act-flags.js +3 -2
  156. package/dist/trust/passes/eu-ai-act-flags.js.map +1 -1
  157. package/dist/trust/passes/excessive-permissions.d.ts.map +1 -1
  158. package/dist/trust/passes/excessive-permissions.js +2 -1
  159. package/dist/trust/passes/excessive-permissions.js.map +1 -1
  160. package/dist/trust/passes/inconsistent-error-handling.d.ts +2 -1
  161. package/dist/trust/passes/inconsistent-error-handling.d.ts.map +1 -1
  162. package/dist/trust/passes/inconsistent-error-handling.js +3 -2
  163. package/dist/trust/passes/inconsistent-error-handling.js.map +1 -1
  164. package/dist/trust/passes/inconsistent-naming.d.ts +2 -1
  165. package/dist/trust/passes/inconsistent-naming.d.ts.map +1 -1
  166. package/dist/trust/passes/inconsistent-naming.js +52 -13
  167. package/dist/trust/passes/inconsistent-naming.js.map +1 -1
  168. package/dist/trust/passes/inconsistent-param-order.d.ts +2 -1
  169. package/dist/trust/passes/inconsistent-param-order.d.ts.map +1 -1
  170. package/dist/trust/passes/inconsistent-param-order.js +3 -2
  171. package/dist/trust/passes/inconsistent-param-order.js.map +1 -1
  172. package/dist/trust/passes/missing-guard-dom.d.ts +2 -1
  173. package/dist/trust/passes/missing-guard-dom.d.ts.map +1 -1
  174. package/dist/trust/passes/missing-guard-dom.js +8 -7
  175. package/dist/trust/passes/missing-guard-dom.js.map +1 -1
  176. package/dist/trust/passes/performance-passes.d.ts +2 -1
  177. package/dist/trust/passes/performance-passes.d.ts.map +1 -1
  178. package/dist/trust/passes/performance-passes.js +3 -2
  179. package/dist/trust/passes/performance-passes.js.map +1 -1
  180. package/dist/trust/passes/prompt-injection.d.ts +2 -1
  181. package/dist/trust/passes/prompt-injection.d.ts.map +1 -1
  182. package/dist/trust/passes/prompt-injection.js +3 -2
  183. package/dist/trust/passes/prompt-injection.js.map +1 -1
  184. package/dist/trust/passes/throws-mismatch.d.ts +2 -1
  185. package/dist/trust/passes/throws-mismatch.d.ts.map +1 -1
  186. package/dist/trust/passes/throws-mismatch.js +3 -2
  187. package/dist/trust/passes/throws-mismatch.js.map +1 -1
  188. package/dist/trust/passes/tool-poisoning.d.ts +2 -1
  189. package/dist/trust/passes/tool-poisoning.d.ts.map +1 -1
  190. package/dist/trust/passes/tool-poisoning.js +6 -5
  191. package/dist/trust/passes/tool-poisoning.js.map +1 -1
  192. package/dist/trust/passes/unnecessary-object-hotspot.d.ts +2 -1
  193. package/dist/trust/passes/unnecessary-object-hotspot.d.ts.map +1 -1
  194. package/dist/trust/passes/unnecessary-object-hotspot.js +3 -2
  195. package/dist/trust/passes/unnecessary-object-hotspot.js.map +1 -1
  196. package/dist/trust/scoring.d.ts.map +1 -1
  197. package/dist/trust/scoring.js +6 -2
  198. package/dist/trust/scoring.js.map +1 -1
  199. package/dist/utils/analyze-pool.d.ts +7 -6
  200. package/dist/utils/analyze-pool.d.ts.map +1 -1
  201. package/dist/utils/analyze-pool.js +77 -7
  202. package/dist/utils/analyze-pool.js.map +1 -1
  203. package/dist/utils/dirent-order.d.ts +21 -0
  204. package/dist/utils/dirent-order.d.ts.map +1 -0
  205. package/dist/utils/dirent-order.js +21 -0
  206. package/dist/utils/dirent-order.js.map +1 -0
  207. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,114 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.38.0] - 2026-11-21
11
+
12
+ Minor, still on circle-ir 4.23.0. Blast radius adds `tests`, the tests that reach a change (#1072); it is on by default and costs more, and `tests: false` restores the earlier cost, with the same answer apart from `tests`. The product-scope rule moves to `product-paths/2` and changes which files it keeps: a test-file marker counts only right before the extension (`r.$id.spec.index.tsx` is product code), and test source sets (Maven, Gradle, Android, Kotlin Multiplatform), .NET test projects and Python test packages are tests wherever they sit, as are test and fixture folders in a package's `lib/` and `cypress/`. So default scan, quality, trust and spec results can move. `productScope: false` / `SCOPE_ALL_PATHS=1` still reads every path, and with it scan now reaches `test/e2e` trees too. The learned spec tree keeps Java packages named `samples`, `spec` or `fixtures` and names the repository level after the repository, and the trust and quality walkers read directories in sorted order. No root export or output field is removed or renamed.
13
+
14
+ Blast radius tests (#1087) merged after 4.37.0 was staged from 3d2063d4, and its entry first landed under [4.37.0]. It is in this release; 4.37.0 does not contain it.
15
+
16
+ ### Added
17
+ - **Blast radius lists the tests that reach a change (#1072, architect map A3).** Every radius (each item's and the batch's) carries `tests: { reached, unreached, unresolved_sites, status, max_hops, rule }`. `reached` holds the declarations in test files (the product-scope rule, reason `test`: `*.test.*`, `*.spec.*`, `src/test/`, `__tests__/`, `*_test.go`, `test_*.py` and the rest of `product-paths/2`; always the rule itself, whatever the call's own product scope) that reach a changed declaration, followed backwards over the call graphs blast radius already builds (`ts-call-edges`, `java-graph`, `python-graph`, `go-graph`) up to `max_hops` steps (option `maxHops`, an integer from 1 to 8, default 4; anything else is refused). A step is a call, or a reference: a function or class used as a value (passed as an argument, stored in a table, rendered as `<Component/>`, returned), which may run and so counts as `inferred`. Each is a `BlastTest` `{ file, symbol, line, reaches, hops, tier }`: the test function or method (the file itself for top-level test code), every changed declaration it reaches within the bound, the steps on its shortest path, and that path's weakest edge (`inferred` reads "may reach"). Code nested in a function's body (a callback, a local function) is reached, at `inferred`, by whatever reaches the function, and the walk steps out the same way at every hop: a change called only from an inline callback (`cs.map((c) => parseConfig(c))` in `createTaintConfig`) is reached by the tests that call the enclosing function (stepping out adds no hop). Test files are not stepped out of: their nested callbacks are tests themselves. A class does not carry its uncalled methods. `unreached` lists the changed declarations no test reaches within the bound through resolved calls or references, and that no other way in may reach: a declaration is left out of it (with a note) when an unresolved call of any reason (an import from outside the tree included) names a declaration on a path to it (for `.call` / `.apply` / `.bind`, which the graph reports by those names, the name they are called on, read from the source at the site, at most 400 characters and across a line break: `k.b.call(k, 1)` names `b`, `k['i'].call` names `i`; when the receiver cannot be read (`pick(k).call(k)`), every declaration on a path its file spells counts; cognium-dev to emit the edge), when a route, listener, program main or other framework entry is on such a path (a test can reach it over HTTP or through a container), or when a test file that did not parse completely names such a declaration. `status` is `known` when every changed declaration is reached or unreached. Otherwise it is `unknown` and `unreached` is empty, so nothing is said to be untested: some declaration may be reached another way, or the answer cannot be backed at all (the repository walk was cut, a changed file had no call graph, a location named no declaration, the item changes none or also bumps a dependency (a bump's tests, through its import sites, are not followed), a test file of the language was too large to read, the test walk stopped at its budget or could not widen as far as it needed, or the call passed `tests: false`). `unresolved_sites` counts calls in test files the graph could not resolve, of any reason, by the name of a declaration on a path. This is which tests reach a change through resolved calls and references, not a selection of tests to run: a test not listed can still exercise the change. With the prefilter on, the graph is widened one hop at a time to the files that name a declaration reached so far (by name, or by importing its module, through re-exporting modules too; at the last hop, test files only; test code only from test files that import its module, for Go its package directory, or name it from the same directory) and rebuilt; over the fixtures and on ControlDeck the widened answer equals the whole repository's graph. For TypeScript the rebuilt graph resolves imports the call graph does not follow by itself: each file's non-relative import specifiers are rewritten to relative paths the way TypeScript resolves them (`src/blast-radius/import-map.ts`). A file is governed by the nearest `tsconfig.json` above it when its `files` / `include` / `exclude` take the file in, else by the first config its `references` lead to that does (a solution-style root with `files: []`), else by none (nothing rewritten). Each config's `extends` chain is followed (relative files and package specifiers under the repository's `node_modules`; arrays in order; one that cannot be read is let go only when the config sets `baseUrl` and `paths` itself) and `compilerOptions`, `files`, `include` and `exclude` merged; `baseUrl` is relative to the config that sets it, and `paths` resolve against the effective `baseUrl`, else the declaring config's directory, so each app keeps its own `@/`; an exact key tries only its own targets. Export conditions are tried in their own order, and a subpath an `exports` map does not list is not rewritten. Then workspace package names (`@repo/core/app-routes`, `@acme/core`, through `exports`, `module`, `main`, `types`), only for members of a declared workspace (`package.json` `workspaces` or `pnpm-workspace.yaml`) and for files inside it. The test graph is built with these rewrites whenever any file in it has one, with or without a widening round, so the prefilter does not change the answer. Nothing is rewritten when a config in the chain cannot be read, or for a name two members claim: those imports stay unresolved, so what they may reach is not known. Only files inside the repository are read, each at most 1 MB. Declaration ids do not change. `call_sites`, `reach`, `level`, `label` and `levels` still come from the first, unrewritten graph and are unchanged (a direct call from a test file stays a call site, as before). The batch joins its items' tests by file and symbol (fewest hops, strongest tier at those hops, the union of what each reaches), and says `unreached` only when every item's tests are known; `unionRadius` does the same over presented radii. Cost bound: option `tests: false` (MCP `tests`) turns the walk off, so the call costs exactly what the rest of the radius costs and every `tests` is not known; and the test walk has a file budget per language, `maxTestFiles`, by default the larger of 2,000 and 4 times the first graph's files (`BLAST_TEST_BUDGET`), never more than `walk.maxFiles`, past which the tests are not known, with a note. The walk often ends at nearly every TypeScript/JavaScript file of a repository (box2 measured 357 of 357, 1,259 of 1,261 and 1,320 of 1,322 on Cognium's repositories), so callers should send the items of one pass in one `blastRadius` call (with or without `batchId`): the items share the walk, about 1.6 s per item instead of about 18 s per call one at a time. The MCP tool `blast_radius` takes `max_hops` (1-8) and `tests`, and declares `tests` in its output schema; tests past the first 500 are cut like call sites. The CLI's `-f json` and circle-pack's `/api/blast-radius` pass the engine object through, so they carry `tests` (at the default bound) once they move to this release. Also exported from the package root: the `BlastTest`, `BlastTests` and `BlastTestStatus` types, `BLAST_TEST_HOPS`, `BLAST_TEST_RULE` and `BLAST_TEST_BUDGET`; from `src/blast-radius`, the pure parts as well (`walkBackwards`, `testsOf`, `carriersOf`, `joinTests`, `unknownTests`). `assembleRadius` takes an optional `tests` (without one, the tests are not known). Cost, on ControlDeck: 1,272 TypeScript files, one changed function, warm, median of 3, on a 2-vCPU box. Against the radius before #1087 (`e2605ff`): `isAppRoute` 0.13 → 0.23 s (5 tests), `CountsStrip` 0.2 → 12.9 s (18), `cweFor` 8.7 → 27.9 s (182), `openFindings` 1.8 → 28.9 s (18), `createAuth` 22.5 → 48.2 s (not known: a framework entry and an unresolved call by its name are on its path). References and resolved imports connect a TypeScript monorepo far more than calls alone, so within 4 steps the walk reaches most of the repository. With `tests: false` each is back at the earlier cost (8.0, 1.7, 0.2, 0.13, 23.6 s) and the answer is byte-identical to the earlier one apart from `tests`.
18
+
19
+ ### Changed
20
+ - **Scan text report newcomer hints (cognium-ai#1090 item 8).** When the default report truncates findings after 20 rows it now prints one next-step line: `-f json -o report.json` (or `-f sarif -o report.sarif`), `--severity high`, `-e`. The OWASP section labels the `Unknown` bucket as `Not mapped to OWASP Top 10` (internal keys unchanged). Review of #1097: the first version of the line named `-f markdown -o report.md`, which `cognium-ai scan` refuses (it takes `json`, `summary` and `sarif` only), and the label said "Not in OWASP Top 10", though the bucket also holds findings with no CWE and CWEs the mapping does not know. A test now reads `scan`'s format list from `cognium-ai/src/cli/program.ts` and fails if the hint names any other format.
21
+ - **Product scope `product-paths/2`: a file marker counts only right before the extension.** `*.test.*`, `*.spec.*`, `*.stories.*` and `*.bench.*` matched anywhere in a file name, so TanStack Router route files such as `r.$repoId.spec.index.tsx` (a `spec` path segment) were treated as tests. They were left out of scan, design.md, quality and trust (box1 res-014: a product zod schema missing from ControlDeck's design.md). A name now has to end `<marker>.<ext>` (`a.spec.ts`, `a.e2e.test.ts`); the globs are `**/*.<marker>.+([!.])`. The same shape replaces scan's own default test excludes, trust's BLOCKED-override paths and dead-code's test excludes. A route file that ends `.spec.tsx` (`r.$id.spec.tsx`) is still read as a test. `rule_version` is now `product-paths/2`.
22
+
23
+ ### Fixed
24
+ - **The walkers behind `trust` and `quality` read each directory in sorted order (cognium-ai#1086).** They walked in `readdir` order, the filesystem's (ext4 hashes names with a per-filesystem seed; APFS and tmpfs differ again), so the same checkout could give a different answer on another machine: a pass with a `maxFiles` cap kept a different set of files, eu-ai-act-flags kept whichever of two same-named Markdown files (`README.md`, `docs/README.md`) it read last, and every pass listed its findings in a different order. Each directory's entries are now sorted by name in UTF-16 code-unit order (not locale), the order the scanner's discovery uses since #1076: the trust passes ai-config-detect (`walkAiConfigFiles`, also read by prompt-injection and excessive-permissions), ai-generated-fingerprint, code-complexity, conformance-attestation (an attestations directory), cross-skill-interaction (both walks), data-exfiltration, dep-manifests (`parseAllManifests`, read by osv-dependency-audit and conformance-attestation), deprecated-usage, deprecation-no-replacement, doc-coverage, eu-ai-act-flags (both walks), excessive-permissions (the ungated shell-exec walk), inconsistent-error-handling, inconsistent-naming, inconsistent-param-order, missing-guard-dom, performance-passes, prompt-injection (root Markdown), throws-mismatch, tool-poisoning (both walks) and unnecessary-object-hotspot; the secret scanner's file list (hardcoded-secrets, and the health and quality secret check); the health-score metrics walk (`quality`, `health`); dead-code's legacy walk; and the product-scope rule's directory walk (so `excludedDirs` comes out in one order). One shared comparator, `src/utils/dirent-order.ts` (`compareNames`, `byName`). cognium-ai's own collector (`collectFiles`, trust's CircleIR file list) sorts the same way since cognium-ai#1089. The spec-gap analyzer (trust's spec-gap-report) and the learned-vs-intent diff (`diffLearnedIntent`, the MCP spec-drift and conformance tools) already sorted their spec files (and the analyzer its `environment/` folder), but with `localeCompare`, which depends on the machine's locale; `specFilesUnder`, the learned-tree module listing in `learned-diff.ts` and `readIntentEnvironment` now use the same code-unit order (so with mixed-case or `_`-prefixed names, files are read `Zeta` before `_notes` before `alpha`). Not changed, as they feed neither command: the LLM doc-pattern passes, the MCP tools' walk, BOM, selectors, Specifica generation and the caches.
25
+ - **Quality and the other walkers use the `product-paths/2` markers (review of #1093).** Quality's file walk sorted tests from source with its own `/\.test\./` and `/\.spec\./`, so a route file such as `app/routes/r.$id.spec.index.tsx` was still a test there: it counted in `testFiles` (a tree with that route, `src/a.ts` and `src/a.test.ts` reported `testFiles: 2, sourceFiles: 1`) and skipped the circle-ir metrics. `HealthScoreCalculator` now asks the rule's own test markers (`FILE_MARKERS`, reason `test`), plus the `_test.<ext>`, `*Test.java` and `test_*.py` shapes it always counted, so the same tree reports `testFiles: 1, sourceFiles: 2`, with product scope on (quality) or off (health). The same end-anchored test replaces the old shape in selector evidence (`DEFAULT_EVIDENCE_EXCLUDES`' `*.test.*` and `*.spec.*` are read as the rule's markers, since its hand-rolled glob matcher cannot say "one extension") and in the in-memory skill loader (`createSkillBundleFromFiles`). The skill test-path gate (`isTestOrFixturePath`) and the on-disk skill walker already ended the marker at the extension and are unchanged.
26
+ - **`a.spec.d.ts` stays a test.** Under #1093 a marker followed by a `.d.ts`, `.d.mts` or `.d.cts` ending became product code, because that ending holds a dot. It is one extension again, as under `product-paths/1`: each marker has a second glob, `**/*.<marker>.d.@(ts|mts|cts)` (the four marker entries of `FILE_MARKERS` become eight, each glob agreeing with its own test), also in scan's default test excludes, trust's BLOCKED-override paths and dead-code's test excludes. `r.$id.spec.index.d.ts` and `a.spec.d.tsx` are product code.
27
+ - The product-scope header and cognium-ai's README list the markers as `*.<marker>.<ext>`.
28
+ - **Blast radius tests: four ways to say `known` with a false `unreached` (review of #1095).** The rule is that `unreached` never lists a changed declaration a test may run; when that cannot be backed, the answer is `unknown` with an empty `unreached` and a note. Each case below answered `known` and listed the declaration as unreached.
29
+ - **The `.call` / `.apply` / `.bind` receiver is read from the text the graph was built from.** The test graph is built with tsconfig and workspace imports rewritten to relative paths, which changes the length of the line they are on, so its columns are columns in the rewritten text. The receiver was read from the original text, so a rewritten import on the same line as the site (`import { Calc } from '@/calc'; it(… k.b.call(k, 1) …)`, or `await import('@/calc')`) moved the read onto the wrong name. `testsOf` now gets each graph's own text (the original for the first graph, the rewritten text after a rebuild), for the receiver read and for partly parsed test files.
30
+ - **The receiver is read only when it is a plain member chain.** `callLikeReceiver` returns a name only for identifiers (`this` among them) joined by `.`, `?.` or `['literal']`, in wrapping parentheses or not, with spaces between its parts, on one line, right up to the `.call(`; a line break may come only between the whole receiver and its `.call`. Anything else returns nothing, so every declaration on a path the site's file spells counts, as for any receiver that cannot be read: a cast (`(k.b as Fn)`, `satisfies`, `k.b!`), `||` / `&&` / `??`, a ternary in either order, a comma, a call (`getK().b.call`), a comment (`k.b // bound for callbacks` with `.bind(k)` on the next line), a line break inside the receiver, a literal with an escape or `${`, a name that is not ASCII, a site in the middle of a name, `Reflect.apply(fn, …)` and `f.call.call(g)` (the function is not the receiver's last name). Two call-like sites that start at the same column are a chain with a call in it (`a.b.call(x).c.call(y)`), so neither is read; a site with no column is not read; and when the file's text cannot be had, every declaration on a path counts.
31
+ - **Code that runs without a call edge.** Some code runs with no call the graph records: on import, when a class is defined or built, on a property access, or by the runtime. When such code is on a path to a changed declaration within `max_hops`, or is the changed code itself, that declaration is not listed as unreached (new `NotKnownReasons.uncalled`, with a note), unless a test reaches it another way. The cases covered are:
32
+ - field initializers, module-level and class fields, static ones too (`export const CONFIG = parseConfig('abc')`);
33
+ - functions nested in a field's initializer. The walk now steps out of a function into the field that holds it, as it does into an enclosing function. That covers module-level wrappers (`export const GET = withAuth((req) => parseConfig(req))`, `memo(...)`), module-level `.map` callbacks and class field callbacks;
34
+ - inline functions directly under a module or a class that no call or reference enters. The walk steps out of them into the module or the class. An inline function is one the engine flags `unstable:anonymous`, that is, not a declaration a caller can name. That covers:
35
+ - `RAW.forEach((c) => …)` at module level, reached through a named import, a side-effect import or an index that imports it for effect;
36
+ - `setTimeout(…)` and `bus.on('x', …)` at module level;
37
+ - `Object.defineProperty(o, 'size', { get: … })`, with an arrow or a method getter;
38
+ - a callback in a class `static {}` block, which a test that uses the class reaches at `inferred`, because defining the class runs the block;
39
+ - a decorator argument;
40
+ - `module.exports = function () {}`.
41
+
42
+ A named function or method that nobody calls still stays unreached, and a default-exported function is a declaration: a test that calls it through a default import has an edge to it;
43
+ - plain decorators, written `@Name` with no call after it, on a class, a method, an accessor or a parameter (`plainDecoratorNames`). A plain decorator is neither a call nor a reference in the graph. A decorator factory call (`@Log()`) is an edge on the class and was already followed. The name is matched as written, through an `import { Log as L }` rename, and as a default import of the module whose default export it is (`import Logger from './log'`). Renames are followed through re-exports to every declaration they may name (`followImport`): `export { Log as Logger } from '../log'`, `export { default as Logger } from '../log'`, `export * from './inner'` for a name no list of the module exports, and a barrel's own `export { Inner as Logger }`, `export default Log` or `export = Log` whose name it imports (`import { Log as Inner } from '../log'`, `import Log from '../log'`). A cycle ends; a search past 10,000 (module, name) pairs stops and fails closed: every TypeScript function then counts as a plain decorator. CommonJS `module.exports = Log` / `exports.default = Log` and TypeScript's `export = Log` count as default exports, and `import Logger = require('./log')` as a default import. Comments, string and template contents and regular-expression literals are not read, so JSDoc `@param` / `@link`, `'@repo/email'` and `` /`([^`]+)`/ `` neither are nor hide decorators (`codeOnly`). Whether a `/` starts a regex is guessed from what comes before it, and a wrong guess (a JSX `</b>` or `<I />`, `el.w! / 2`, `i++ / 2`, a division that starts a line, or a regex after `)`) can hide the names after it, so the text is read twice, with regex literals and without, and a name either reading finds counts. A regex literal is read for at most 1,000 characters, so the reading stays linear in the text (a crafted 180 KB line took 15 s). When a reading ends inside a template literal or a block comment, its names are read from the raw text;
44
+ - code in a function's or method's definition header, which runs when the class or module defines it: its decorators' arguments (`@Reg(() => parseConfig('a'))` on a method, where the arrow's parent is the method, and Python `@deco(parse_config("a"))` / `@deco(lambda: …)`, where the engine puts the call on the function at its decorator line, however many decorator lines there are), and the arguments of a parameter decorator factory (`run(@Inject(parseConfig('a')) x)`). A TypeScript default parameter runs on call and is not part of the header, so a function no one calls with one stays unreached. When the header's end cannot be found (no Python `def` signature in the declaration's lines, or a scan that does not reach the body within 20,000 characters), all of the declaration counts as header: it fails closed;
45
+ - calls a class makes of its own: static blocks, decorator factory calls, Java instance initializers. Also Java static initializers (`<clinit>`);
46
+ - getters and setters: the engine's signature starts with `get ` / `set `, or for Python, a `@property`, `cached_property` or `.setter` / `.getter` / `.deleter` decorator;
47
+ - methods the runtime calls with no call site in the repository (`RUNTIME_CALLED`):
48
+ - TypeScript / JavaScript: `toString`, `toJSON`, `valueOf`, `then`, iterator `next` / `return` / `throw`, `[Symbol.iterator]` and the other well-known symbols, `[inspect.custom]` in any spelling (`[util.inspect.custom]`, `[Symbol.for('nodejs.util.inspect.custom')]`), `handleEvent`, Node stream methods (`_write`, `_writev`, `_read`, `_transform`, `_flush`, `_final`, `_destroy`, `_construct`), custom-element callbacks, and the lifecycle methods of React (`render`, `componentDidMount` …), Angular (`ngOnInit` …), NestJS (`onModuleInit`, `onApplicationBootstrap`, `onModuleDestroy`, `beforeApplicationShutdown`, `onApplicationShutdown`), Lit (`firstUpdated`, `updated`, `willUpdate`, `shouldUpdate`, `update`) and Vue class components (`data`, `created`, `mounted` …). `update` and `data` count only on a Lit or Vue class, because CRUD repositories and stores use both names: one whose header extends `LitElement`, `ReactiveElement` or `Vue` anywhere in its heritage clause (`extends SignalWatcher(LitElement)`, `extends` on the next line) or carries `@Component` / `@Options` (the decorators above the class are read whole, however many lines their arguments take, and the class's own text up to the `{` of its body), or one in a file that imports `lit`, `lit-element`, `@lit/…`, `vue`, `vue-class-component`, `vue-property-decorator`, `vue-facing-decorator` or `nuxt-property-decorator`. They match class methods only (a React function component is a function, and the Vue options API is already covered by the module and field rules);
49
+ - Python: every dunder but `__init__` (construction is an edge to it);
50
+ - Java: `toString`, `equals`, `hashCode`, `compareTo`, `compare`, `close`, `run`, `call`, iteration and serialization hooks;
51
+ - Go: `String`, `Error`, `Format`, the `encoding` and `json` marshalers, `ServeHTTP`, `sort.Interface`, `io` and `sql` interfaces.
52
+
53
+ The Java and Go lists trade precision for soundness: they hold common method names (Java `run`, `call`, `close`, `next`, `compare`; Go `Read`, `Write`, `Close`, `Scan`, `Value`, `Is`, `As`), and the graph does not say which classes implement the interface, so every such method on a path makes the changes it reaches `unknown`, whether or not the runtime calls it. Narrowing them to implementing classes needs facts from circle-ir;
54
+ - a module's top-level code that calls into the path, or references it other than as the whole operand of an export. `export default X;`, `export = X;`, `module.exports = X;` and `exports.x = X;` run nothing, so they still leave `X` unreached; `export default memo(X)` and `[a, b].forEach(run)` do not;
55
+ - Python default arguments and annotations, which run when the `def` runs: on import for a module's function, and when the class body runs for a method. With a function's decorator lines, as above.
56
+
57
+ It claims no `reached` the graph does not back. A test that imports a module or constructs a class is not said to reach the initializers that run, because neither an import nor a property read is an edge. The one new `reached` is the static-block callback above, which comes through the test's edge or reference to the class. A repository with no test file in the language still answers `known`, since no test can run that code. A constructor still runs on `new`, as before.
58
+
59
+ What it does not cover: a function run through a local alias (`const f = k.b; f()`), a plain decorator hidden from both readings of the text (a regex right after `)` or `export default`, JSX text holding a backquote or `/*`), a namespace re-export (`export * as d from`) or a CommonJS `require` binding other than `import X = require()`, a Python decorator argument that is a string holding `def name(`, a CommonJS module passing on its own export (`process.on('exit', exports.run)`: the graph records no reference for that read, asked of circle-ir in cogniumhq/cognium-dev#1340), reflection, `eval`, a runtime- or framework-called method not in the lists above, and dependency-injection containers that are not framework entries. These stay as the graph has them.
60
+ - **Two configs that take a file in and map a specifier differently.** A file was governed by the first referenced tsconfig that takes it in, so with `tsconfig.app.json` (`@/*` to `./src/*`) and `tsconfig.test.json` (`@/*` to `./test/mocks/*` first), both including `src`, the answer depended on the order of `references`. One order said the real `fmt` was reached and the mock unreached; the other said the opposite. Now every config the references lead to that takes the file in (and the nearest config itself when it does) is asked. A specifier is rewritten only when they all send it to the same file. Otherwise it stays unresolved, so what it may reach is not known, because which config applies depends on the tool that runs the tests: tsserver and vite-tsconfig-paths take the first, `tsc -b` builds the file in each, and jest maps paths from the one its `moduleNameMapper` names. Configs that agree still rewrite. On purpose, a config without `paths` next to one with `paths` (`tsconfig.app.json` with `@/*` and `tsconfig.spec.json` with only `include: ["src/**/*.test.ts"]`) is also a disagreement: under the spec config `@/lib/fmt` resolves nowhere, and a runner using it would fail the import, so the answer is not known where main reached the test. A referenced config that cannot be read stops all rewriting in the file, wherever it is in the list, when it may take the file in; before, it did so only when it came before the first config that took the file in. Whether it may take the file in is read from its own settings: when it sets `include` itself and extends only packages, its own `include`, `files` and `exclude` decide. One residual is accepted: a package base's inherited `files` could name the project's own files through `${configDir}`, which nothing can see while the package is not installed; a published base listing a project's test files is not expected. `${configDir}` (TypeScript 5.5) is now replaced by the leaf config's directory in `files`, `include`, `exclude`, `baseUrl` and `paths`, whichever config in the `extends` chain wrote it, for readable configs and for those read from their own settings. Before, it was joined on as a literal, so an `include` with it took nothing in, and two configs that map `@/` differently could again rewrite as if only one did (main has the same gap for readable configs). So the Vite-style `tsconfig.node.json` (`extends: "@tsconfig/node20/tsconfig.json"`, `include: ["vite.config.ts"]`, with the package not installed) leaves `src/` rewritten in either order of `references`, where main reached the test in one order only. A reference to a config file that is not there is skipped.
61
+
62
+ `tests: false` output is byte-identical to before. On ControlDeck `@69bf259`, tests on, the four items and the batch give the same bytes as before (`isAppRoute` 5 tests, `CountsStrip` 18, `openFindings` 18, `createAuth` not known, batch 41), and narrowed equals whole. On the review of #1103's sample of 40 more ControlDeck declarations, eight `known` answers listing the change as unreached become `unknown`. Seven are constants a test or a tested file reads, and one is called from tRPC procedure callbacks, so main's claim was false for all eight. The other 32 answers, the batch (664 tests reached) and narrowed against whole are unchanged, and no `reached` test is lost. The cost of a function with thousands of calls is upstream, in circle-ir's `buildTsCallGraph` (cogniumhq/cognium-dev#1338).
63
+ - **The learned spec tree keeps a Java package named `samples`, `spec` or `fixtures`, and drops tests by the product-scope rule, not by private regexes.** On cogniumhq/spring-petclinic (a fork of the Spring sample, Start on loop.cognium.dev) the spec was empty: `spec-tree.ts` had its own `TEST_FILE` regex with `examples?|samples?` (and `benchmarks?`, `fixtures?`, `tests?`, `spec`, `e2e`) anywhere in a path, so every file of the package `org/springframework/samples/petclinic/` was dropped from the level's use cases, rules and conventions. The level kept 12 HTML templates and spec.md said "No entry points found at this level." The product-scope rule already got this right (generic names count only directly under a package root, and nothing under `src/main/` is ever left out): it left out only the 20 test files. Now every such filter uses the rule. The spec tree's use cases, rules and conventions, design.md's code files and the learned environment's env reads in code leave out tests only, by the rule's reason `test` (`testPathPredicate(root)`, new in `src/scope/product-paths.ts`: the rule read from the repository, whatever the call's own scope, plus a test file inside a folder the rule leaves out for another reason, such as `examples/app/a.test.ts`). Everything else the caller read stays: the generator's file walk has already left out what product scope leaves out, so with `productScope: false` (or the all-paths fallback) examples, fixtures and benchmarks give use cases, and tests still do not. `extractUseCases` takes `isTestFile` (the spec tree passes the rule), and `languageForEnvReads` / `readEnvReads` take the same predicate. Without one, both use `isTestPath(rel)` (new, exported): the rule's test reason read from the path alone, which counts `test/`, `tests/` and `e2e/` only as the first segment, since a deeper package root cannot be known from a path. Removed: `use-cases.ts`'s second `TEST_FILE` (`tests?|spec|e2e|fixtures?` anywhere, so a Java package `spec` or `fixtures` vanished the same way), `level-design.ts`'s (`tests?|e2e|fixtures?` anywhere, and `-test` / `-spec` / `-stories` file names), and the env-read learner's (`test|tests|e2e` anywhere). What the rule does not call a test is no longer one here: `foo-spec.ts`, `*.e2e.ts`, `*.tp.ts`, `test.js`, a `*Test.java` outside a test folder, a `spec/` folder, and `test/` or `fixtures/` below a package root (the rule keeps `src/feature/test/`; what it reads as tests inside a `lib/` or `app/` folder, in Android and Gradle source sets, in Python test packages and under `cypress/` is in the product-scope entry below, review of #1104). spring-petclinic, same engine otherwise: 0 use cases, 0 rules → 17 use cases in 5 areas (Owners, Vets, Oups, System, Vets html) and 1 domain rule, with L5 and L7 layer lines and 4 conventions in principles.md. cognium-ai's own repository: every file of the learned tree byte-identical. ControlDeck: every spec.md and rules.json byte-identical. Three other lines differ: two design.md lines gain product code the old `-spec.ts` match had dropped (`db`: the `learned_spec` table in `db/schema/learned-spec.ts`; `api`: the `BLOB_CACHE_LIMIT` limit in `apps/api/lib/architect-spec.ts`), and `modules/app/principles.md`'s L5 line gained `UI` from `apps/app/lib/test/render-app.tsx`, a test helper the rule then kept as product code because it sat in the package's `lib/`. With the product-scope entry below, `lib/test/` is a test and that line is back as it was. The modules walk's own non-product folder list (`modules.ts`, only for folders that hold a module manifest) is unchanged.
64
+ - **The learned tree's repository level is named after the repository, not the folder it was read from.** A checkout in a temporary folder was named after that folder: circle-pack's clones gave "Spec — circle-secrets-MlGIlG" (generate-spec had reused the secrets job's clone from the source cache). `generateSpecificaForDirectory` and `buildSpecTree` take `repositoryName` (it names the repository level, its spec.md and principles.md titles and rules.json `module`; blank is ignored), and circle-pack passes the name from `repo_url` (circle-pack entry). Without the option, `repositoryName(root)` now reads more root manifests before the folder's name: `package.json` `name` (first, as before), `pom.xml` the project's own `artifactId` (not the `<parent>`'s), `settings.gradle(.kts)` `rootProject.name`, `go.mod` the module path's last segment (a `/v2` suffix skipped), `Cargo.toml` `[package]` `name`, `pyproject.toml` `[project]`, else `[tool.poetry]`, `name`. A `${…}` placeholder or an empty value falls through to the next. So spring-petclinic is `spring-petclinic` even without the option (its pom). The name feeds no rule key and no use-case id: a rule key is the rule's derivation, text and anchors, a use-case id the module name (empty at the repository level), kind and trigger. Checked on spring-petclinic and on a TypeScript fixture: with and without the option, only the titles and `module` differ. Blast radius places files with the same `repositoryName(root)`, so its repository level's `name` follows the manifest too (`path` is still `''`). A repository with none of these manifests is still named after its folder.
65
+ - **Product scope: real tests inside a `lib/` or `app/` folder, Android and Gradle test source sets, Python test packages below the root and `cypress/` are tests (review of #1104).** Under a `lib/` or `app/` directly under a package root, the rule left out only `__tests__`, `__mocks__` and `__fixtures__`, before it looked for `src/test`. So Gradle's own layout (`gradle init`: `app/src/test/java`, `lib/src/test/java`) and Android's test source sets were product code for scan, quality, trust and the learned spec tree, and so were `lib/test/`, `lib/fixtures/`, a Django app's `tests/` package helpers (`tests/factories.py`, `tests/base.py`) and `cypress/e2e/`. Since #1104 the spec tree follows the rule, so the tests started giving use cases, rules, conventions and env reads. Now, still `product-paths/2` (first released here):
66
+ - Test source sets, .NET test projects and Python test packages are tests wherever they sit, inside `lib/` and `app/` too. A test source set is `src/test/` in any `src/`, and in a Maven or Gradle module the sets beside `src/main/`: `src/it/`, any camelCase `src/<name>Test(s)/` (`androidTest`, `sharedTest`, `integrationTest`, `screenshotTest`) and `src/test<Variant>/` / `src/androidTest<Variant>/`. `src/testFixtures/` is a fixture. A Python test package is a `tests` directory that holds `__init__.py`, `conftest.py` or a `test_*.py` / `*_test.py`, or a `test` directory with such a test file in it or below it. A library can ship a package named `test`: Django's public `django/test/` (`client.py`, `testcases.py` ...) holds no test file and stays product code (review round 2).
67
+ - In a Gradle module, Kotlin Multiplatform's `src/<name>Main/` (`commonMain`, `jvmMain`, `iosMain`) marks `src/` as a source directory, as `src/main` does, so `commonTest`, `jvmTest`, `iosTest`, `androidUnitTest`, `androidInstrumentedTest` and `androidHostTest` are tests. Folders under a `<name>Main/` are protected as under `src/main/`: `commonMain/kotlin/com/x/fixtures/` is product code.
68
+ - A `lib/` or `app/` with a manifest of its own is a package (a Gradle or Android module), not a library folder or a router.
69
+ - In `app/` (Next.js's router, where `app/test/page.tsx` serves `/test`) nothing else is left out, as before.
70
+ - In `lib/`, test and fixture folders go as they do elsewhere (`lib/test/`, `lib/fixtures/`, `lib/*-test/`). Every other name stays the library's (`lib/scripts/`, `lib/examples/`).
71
+ - `cypress/` directly under a package root is a test.
72
+ - `isTestPath` reads the same from the path alone, except what needs the listing: the test source sets beside `src/main/` other than `src/test/` (camelCase `src/<name>Test(s)/`, `src/test<Variant>/`, `src/it/`) and Kotlin Multiplatform's, which count only in a Maven or Gradle module, so `isTestPath` reads neither (`src/abTest/` in a TypeScript package is product code to both); Python test packages; a `lib/` or `app/` holding its own manifest or below the first segment.
73
+
74
+ Measured against main at d165ce69, both engines built from source:
75
+ - **Reviewer's 46-file fixture:** 8 paths leave product scope. The use cases and env keys that leave the tree are exactly those from `app/src/test`, `app/src/androidTest`, `cypress/e2e`, `lib/test`, `lib/fixtures` (scope on; with `productScope: false` it is a fixture and stays, as designed), `packages/web/lib/test` and `mypkg/tests/helpers.py`. No product route or key moves.
76
+ - **`gradle init` layout:** `modules/app` drops the `AppTest.java` use case, and environment.md drops `TEST_ONLY_KEY`.
77
+ - **android/testing-samples:** 0 → 43 files left out, all tests, and no file outside `src/main` is still read. principles.md's conventions are counted over product code ("try/catch 5/181" goes).
78
+ - **HackSoftware/Django-Styleguide-Example:** 21 files → test. "Factory suffix 5/9; corroborated" is back to "2/2; verified".
79
+ - **ControlDeck:** 8 files leave scope: 4 under `apps/api/lib/fixtures/` (fixture), and `apps/api/lib/test-utils/` and `apps/app/lib/test/` (test). Every spec.md and design.md is identical. `rules.json` changes only `filesAnalyzed` (api 190 → 184, app 367 → 365). `modules/app/principles.md`'s L5 line loses the `UI` that #1104 added from `lib/test/render-app.tsx`. A static scan reads 750 files instead of 756 and gives 3148 findings instead of 3154: the 6 removed are 4 in `lib/fixtures/cortex-admin-fake.ts` (3 CWE-1109) and 2 in `lib/test-utils/gateway-principal.ts`.
80
+ - **No path moves:** cognium-ai's own tree (spec tree and a static scan byte-identical: 523 files, 3674 findings), cortex, pallets/click, spf13/cobra and spring-petclinic.
81
+
82
+ Not changed: `*.e2e.ts` without `.test`/`.spec`, a root `test.js`, a `spec/` folder (Jasmine, RSpec) and a `test/` folder below a package root that is no Python package (`src/feature/test/`) are still product code.
83
+ - **The `repositoryName` option is held to one plain line (review of #1104).** `buildSpecTree` only trimmed it, so `"evil\n\n## Injected heading\n\n- fake use case"` wrote a heading and a bullet into spec.md and principles.md. `plainRepositoryName` drops format characters (`\p{Cf}`: bidi controls including U+061C, zero-width characters, soft hyphen, BOM, tag characters, interlinear annotations), turns controls and line breaks (`\p{Cc}`, `\p{Zl}`, `\p{Zp}`) into spaces, collapses white space, trims, and cuts the result to 214 characters (`MAX_REPOSITORY_NAME_LENGTH`, code points). That example now gives one H1 line, `# Spec — evil ## Injected heading - fake use case`. A name with nothing left (`"\u200d\u200d"` included) falls back to the manifest. A manifest name holding any such character, or longer than 214 characters, is not a name and falls through to the next manifest. The folder-name fallback goes through the same function (`repository` when nothing is left), so a folder named `evil\n## Injected` gives `evil ## Injected`. circle-pack only ever sends `[A-Za-z0-9._-]{1,100}`.
84
+ - **`pom.xml`: the project's own `artifactId`, a direct child of `<project>` (review of #1104).** The reader took the first `<artifactId>` outside `<parent>`, so a pom that lists `<dependencies>` or `<build>` before its own `artifactId` (Maven allows any order) was named after a dependency or a plugin. It now tracks element depth: comments and processing instructions are skipped, and a CDATA name is read. Comments and CDATA are stripped in one pass, so a `<!--` inside a CDATA description swallows nothing. A pom with no `artifactId` of its own, an unclosed one or an empty one is not a name. The same reader names Maven modules (`declaredName`).
85
+ - **Trust inconsistent-naming (cognium-ai#1090 item 9).** In JS/TS files, camelCase is the expected function style; the pass no longer flags camelCase names as inconsistent when snake_case names appear in the same file (snake_case outliers are still reported).
86
+ - **Scan `--all-paths` reaches `test/e2e` trees (cognium-ai#1090 item 7).** `SecurityScanner`'s walk applied its test-tree excludes (`test/**`, nested `.../test/...`, …) even with `productScope: false`, so `--all-paths` still skipped them. They now apply only with product scope on, as the vendor and build default excludes already did; with `productScope: false` only infrastructure folders (`node_modules`, `.git` and the like) stay out.
87
+
88
+ ### Known issues
89
+ - `engines.node` still says `>=18.0.0`, but the model route's `undici` 8 needs Node 22.19 or later. On Node 18 or 20, routed model calls fail closed: they are refused, not sent unguarded. Static analysis is unaffected. Tracked in #1080.
90
+
91
+ ## [4.37.0] - 2026-11-20
92
+
93
+ Minor, still on circle-ir 4.23.0. It adds fields and options: blast radius `levels`, `useCases` on each learned tree level, and a per-call product-scope switch on trust passes. It also makes static scans deterministic and hardens the model route. No output field is removed or renamed.
94
+
95
+ ### Added
96
+ - **Trust passes take the product-scope switch per call.** The 16 source-walking trust passes (the `filterToProductScope` callers: code-complexity, missing-guard-dom, prompt-injection, inconsistent-naming, deprecation-no-replacement, unnecessary-object-hotspot, ai-generated-fingerprint, doc-coverage, data-exfiltration, inconsistent-error-handling, cache-invalidation, tool-poisoning, deprecated-usage, throws-mismatch, cross-skill-interaction, inconsistent-param-order) take `productScope?: boolean` and `scopeInclude?: string[]` in their options (`ProductScopeCallOptions`, exported). `productScope: false` reads every path for that call, as `SCOPE_ALL_PATHS=1` does for the process; `scopeInclude` brings places back, in place of `SCOPE_INCLUDE`. Defaults unchanged. A caller such as circle-pack can now honour a request's `all_paths: true` without touching the environment. `filterToProductScope(root, files, options?)` takes the same options; its cache is keyed by the include override too.
97
+ - **More of the product-scope rule is exported from the package root:** `SCOPE_INCLUDE_ENV`, `FILE_MARKERS`, `MAX_ANCHORED_PATTERNS`, `escapeGlob`, `anchoredDirPattern` (cognium-ai and circle-pack had to redefine or work around them).
98
+ - **Blast radius names the learned spec tree's levels (#1070, architect map A1).** Every radius (each item's and the batch's) carries `levels: { touched, reached }`: the tree levels its touched files sit in, and the levels of its call-site and import-site files outside them, each a `BlastLevelRef` `{ path, source_root, name, files }` keyed exactly as `SpecLevel` (`path` is `''` or `modules/<name>`), so a caller joins the answer to a stored `learned_spec.tree` on `path`. Before, the answer held only directories (`touched.modules`), which the tree never uses. A file in no module is at the repository level (`path: ''`); whether that counts as untraced is the caller's call. Additive: `touched.modules`, `reach`, `level` and `label` are unchanged (still directory-based). The MCP tool `blast_radius` declares the field in its output schema; the CLI's `-f json` and circle-pack's `/api/blast-radius` pass the engine object through, so they carry it once they move to this release.
99
+ - **One rule places a file in the tree, for both answers.** `specifica/modules.ts` exports `ownerModule(rel, modules)` (the deepest module root that contains the path) and `levelOf(rel, modules, repositoryName)` (its `SpecLevel` key), plus `repositoryName(root)`; `buildSpecTree` now places files with `levelOf` instead of its private `ownerOf`, and `blastRadius` uses the same function. `blastRadius` detects the modules once per call with `detectModules` and takes generate-spec's `productScope` / `scopeInclude` options, so a folder product scope leaves out (a `testharness/` package) is a level in neither answer. The learned tree's bytes are unchanged (compared against main on a two-package and a nested-module workspace). Also exported: `detectModules`, `ownerModule`, `levelOf`, `repositoryName` from the specifica index; `BlastLevelRef`, `BlastLevelKey`, `LevelLookup` types from the package root. `assembleRadius` and `unionRadius` take an optional level lookup; without one, `unionRadius` places each file where the items placed it, and `assembleRadius` places every file at an unnamed repository level.
100
+ - **Each learned spec tree level carries its use cases, with ids and code paths (architect map A2, #1071).** `SpecLevel.useCases?: LevelUseCase[]` (additive), in spec.md order: `id` (the `UseCase.id`, `uc-` + 16 hex, unchanged), `area` (the engine's area), `shownAs` (`"Other areas"`, only when spec.md's compact or public-surface table merged the area into that row, so every use case can still be placed), `title`, `kind`, `trigger` (`POST /billing/refunds/:id`, the command, topic or schedule, as spec.md shows it), `codePaths` (the anchor and at most `MAX_USE_CASE_EVIDENCE_PATHS` = 5 more, in the order SR-E2 found them, with `stableId` (ids@0.1) where the generator found one; `omittedCodePaths` counts the rest, as on rules) and `ruleKeys` (its domain rules after layer classification, all in the level's `requirements`). The full code-path lists stay in `LevelBuild.useCases`. **On disk** they are the last key of each level's `rules.json`, `useCases` (`RulesSidecar.useCases`, optional); every other key and byte of the file is as before, and `readLearnedRules` / spec-diff / promote read `requirements` only. Size: on ControlDeck (static) the 13 rules.json files grow from 496 KB to 697 KB in all; the largest, `modules/api` (166 use cases, 447 rules), from 440 KB to 521 KB. The stable ids for the use cases' paths come from the same `attachStableIds` call as the use-case rules (no extra parse). Exported from `circle-ir-ai/specifica`: `LevelUseCase`, `MAX_USE_CASE_EVIDENCE_PATHS`, `OTHER_AREAS`. ControlDeck keeping them is its own task.
101
+
102
+ ### Fixed
103
+ - **A static scan gives the same findings on the same input (cognium-ai#1076).** With parse isolation off, the scanner's file workers (10 by default) all called circle-ir `analyze()` on the one thread at once, and each file's parse deadline (`withTimeout`, at least 5 s) started when its call did, so it also counted the CPU time of every file analysed while it waited at an `await`. Files that take under 400 ms alone "timed out", a different set on each run, and their findings went missing: `cognium-ai scan --no-llm -f json` on cortex at 3f24a6fc (149 files) gave 782, 769, 790, 775 and 766 findings over five runs, with 3 to 9 parse timeouts each, against 801 and none single-threaded. Now (1) in-process `analyze()` calls run one at a time in arrival order (`runAnalyzeGuarded`, `src/utils/analyze-pool.ts`), and a call's deadline starts when it gets the lane; the lane is held until the call settles (a timed-out in-process `analyze()` cannot be cancelled), or at most one more `timeoutMs` after its deadline if it never settles. That grace timer is armed only when the deadline passes on a call still running, cleared when the call settles, and kept ref'd, so a call that never settles (only a stub could do this) cannot let a CLI process exit half-way: the scan finishes and reports that file as a timeout. All in-process callers share the one lane: the static scan and its fallback, the LLM path's `runPatternMatch`, the Mastra step, the MCP tools, and the exported `runAnalyzeGuarded`'s callers outside this package (cognium-ai `trust`; circle-pack's runners only with isolation off, since circle-pack runs `SCAN_PARSE_ISOLATION=1` and `ENGINE_ISOLATION=1` by default, where each worker thread has its own lane). `analyze()` is CPU-bound, so this costs no throughput (cortex: about 10 s either way), and LLM calls still overlap. Worker isolation (`SCAN_PARSE_ISOLATION=1`) is unchanged: its deadline already starts at dispatch. (2) `SecurityScanner` returns per-file results in input order, not in the order the workers finished, so the `findings` array is the same list in the same order on every run. (3) File discovery sorts each directory's entries by name (code-unit order), so file order, and which files a `maxFiles` cap keeps, no longer depend on the filesystem's readdir order. After: five runs on cortex give 801 findings and byte-identical `findings` JSON (`--all-paths`: 998, three runs, identical). What stays time-dependent: (a) a file whose own analysis takes longer than its deadline still times out, so a file near its deadline can go either way under load; (b) while a file holds the lane and waits at one of `analyze()`'s `await`s, other workers' work outside `analyze()` (`generateFindings` and the per-file steps after a parse) still runs and counts against its deadline, which is small next to the 5 s minimum but not zero; (c) the cross-file pass (off by default) and `--max-scan-time` keep their wall-clock budgets. cognium-ai `trust` still walks files with its own unsorted `readdirSync` (`collectFiles`), so its file order is left for a follow-up.
104
+ - **design.md reads product code only (#1068).** `collectDesignFacts` (and so `generateLevelDesigns` / `generateLevelDesign`) walked every path, so a test harness or example that declared a status union produced a state machine and module edges in the learned `design.md` (cognium-ai's own root design.md showed `ScanStatus` from `testharness/java/scan-completeness.ts`). The walk now follows the same product-scope rule as the spec's file walk. `LevelDesignOptions` takes `productScope` (`false` reads every path, as does `SCOPE_ALL_PATHS=1`) and `scopeInclude` (`SCOPE_INCLUDE` when not given), and `buildSpecTree` / `generateSpecificaForDirectory` pass their own through (including the all-paths fallback when the rule leaves nothing).
105
+
106
+ ### Changed
107
+ - `minimatch` ^11.0.9 (was ^10, #1031). Glob matching is otherwise unchanged; the product-scope and file-walker tests pass as before.
108
+ - `src/scope/product-paths.ts`'s header no longer says copies live in cognium-ai and circle-pack: since cognium-ai 4.28.0 (#1066) and circle-pack 4.34.0 (#1067) they import it.
109
+
110
+ ### Security
111
+ - **The model route never follows a redirect and never connects to a non-public address (#1073).** A route's endpoint may be one an organisation typed (the gateway's custom OpenAI-compatible endpoint, still off), so the engine's own request must not leave it. (1) `makeRouteFetch` sends every request with `redirect: 'manual'`: a 3xx answer (or an `opaqueredirect`) is a fatal route failure, `kind: 'http_error'` with the redirect's `status` and the key-free message "The model route (host) answered with a redirect (HTTP 307); redirects are not followed.", and no second request goes out. Before, Node followed it, and a 307/308 re-sent the prompt (the repository's code) to wherever `Location` pointed, `http://169.254.169.254/…` included. (2) Every routed request connects through one dispatcher (`src/llm/model-route-dispatcher.ts`): an undici `Agent` whose `connect.lookup` refuses a name when any address it resolves to is non-public, so the check runs on the address actually connected (a name that rebinds after the gateway's key test is caught). Non-public (`isNonPublicAddress`, `src/llm/non-public-address.ts`): loopback, RFC 1918, 169.254/16 and fe80::/10, 100.64/10, fc00::/7, unspecified, multicast, reserved and documentation ranges (IPv6 also benchmarking 2001:2::/48, ORCHID 2001:10::/28 and 2001:20::/28, documentation 3fff::/20, SRv6 SIDs 5f00::/16), and the IPv4-mapped, translated, compatible, NAT64 (64:ff9b::/96, 64:ff9b:1::/48) and 6to4 forms of those; a mapped or NAT64 form of a public address is public. An IP-literal route host is never looked up, so the route fetch checks it before connecting. Both are a fatal `kind: 'unreachable'` failure ("The model route (host) is or resolves to a non-public address …; the engine does not connect to it."; the address is not named), refused before a byte is sent, and the LLM client sees the usual connection error (`TypeError('fetch failed')`, cause `code: 'ERR_MODEL_ROUTE_NON_PUBLIC_ADDRESS'`), which it treats as a hard one (as `ECONNREFUSED`): it trips at once, with no retry, and falls back to static. `MODEL_ROUTE_ALLOW_PRIVATE=1` lifts the address check, for local development only (off by default; never on a deployed engine). Only the exact value `1` turns it on; `true`, `yes`, `on`, ` 1` and any other value leave the check on, since the switch turns a safety check off. Unrouted calls (the engine's own `LLM_BASE_URL`, e.g. a local Ollama) are unchanged.
112
+ - **New dependency `undici` ^8.13.0**, loaded only when a routed call is made. The dispatcher is handed to Node's built-in fetch, which is undici of the version bundled with Node (6.29 on Node 22, 8.12 on Node 26); Node 22's fetch speaks undici's older handler interface, which an undici 8 `Agent` refuses ("invalid onRequestStart method"), so the agent is wrapped in undici's `Dispatcher1Wrapper`, which takes both (and uses HTTP/1.1 for routed calls). Checked on Node 22.23 and 26.13: headers, request body, streamed (SSE) bodies, abort, TLS, the manual 3xx and the refused lookup behave the same. The lockfile keeps undici 6.29.1 nested under `@ai-sdk/provider-utils` v6.
113
+ - Exported from the package root: `isNonPublicAddress`, `modelRouteAllowsPrivate`, `MODEL_ROUTE_ALLOW_PRIVATE_ENV`. circle-pack keeps a byte-identical copy of `non-public-address.ts` for its `model_route` 400 until it moves to this release.
114
+
115
+ ### Known issues
116
+ - `engines.node` still says `>=18.0.0`, but the model route's `undici` 8 needs Node 22.19 or later. On Node 18 or 20, routed model calls fail closed: they are refused, not sent unguarded. Static analysis is unaffected. Tracked in #1080.
117
+
10
118
  ## [4.36.0] - 2026-11-20
11
119
 
12
120
  **On `circle-ir` 4.23.0**, pinned exactly, as in 4.35.2. **One product-scope rule** (`src/scope/product-paths.ts`, #1055) decides what is product code for the spec, scan, quality and trust: tests, fixtures, examples, harnesses, benchmarks, tooling, vendored and generated code are left out by default. **This changes default results** (fewer files and findings, scores move, spec modules change); `productScope: false` / `SCOPE_ALL_PATHS=1` restores every path. Secret scanning is unchanged and still reads everything. Spec recovery 0.2 follow-ups: library surfaces grouped by area, other domain rules kept in `spec.md`, module detection and the learned environment on the shared rule (#1063, #1064), CI-only keys out of learned config (#1062). `cognium-ai` and `circle-pack` carry byte-identical copies of the rule until they move to this version; they swap the copies for imports then.
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Import specifiers the TypeScript call graph does not resolve by itself
3
+ * (it follows relative paths, and aliases only through one global
4
+ * `moduleAliases` map): tsconfig `paths` and `baseUrl` (`@/lib/fmt`) and
5
+ * workspace package names (`@repo/core/app-routes`, `@acme/core`). For the
6
+ * test walk only, each file's non-relative specifiers that name a file in
7
+ * the repository are rewritten to relative paths before its graph is
8
+ * built, the way TypeScript resolves them, so two apps can each have their
9
+ * own `@/`. Declaration ids do not change (they come from the file's path
10
+ * and declarations, not its import lines); `call_sites` keep coming from
11
+ * the unrewritten graph.
12
+ *
13
+ * - **tsconfig:** a file is governed by the nearest `tsconfig.json` above
14
+ * it, with or without `paths`, when its `files` / `include` / `exclude`
15
+ * take the file in, and by each config its `references` lead to that
16
+ * does (a solution file with `files: []` governs nothing itself), and by
17
+ * none if none does. When two that take it in send a specifier to
18
+ * different files, that specifier is not rewritten: which one applies
19
+ * depends on the tool that runs the tests. Each config's `extends` chain is followed (relative files, and
20
+ * package specifiers through `node_modules` inside the repository; an
21
+ * array is applied in order), `compilerOptions`, `files`, `include` and
22
+ * `exclude` merged, later wins. `baseUrl` is relative to the config that
23
+ * sets it; `paths` resolve against the effective `baseUrl`, else against
24
+ * the directory of the config that declares them; an exact key tries only
25
+ * its own targets. If a config in the chain cannot be read (and the config
26
+ * does not set both `baseUrl` and `paths` itself) and may take the file
27
+ * in, or no config governs the file, nothing in it is rewritten: its
28
+ * imports stay unresolved, so what they may reach is not known (sound).
29
+ * Whether such a config may take the file in is read from its own
30
+ * `include` (and `files`, `exclude`) when it sets `include` and extends
31
+ * only packages; otherwise it may. A reference to a config file that is
32
+ * not there is skipped.
33
+ * - **packages:** only the members of a declared workspace (a
34
+ * `package.json` `workspaces`, or a `pnpm-workspace.yaml`), for files
35
+ * inside that workspace, nearest workspace first. A name two members
36
+ * claim is not rewritten.
37
+ *
38
+ * Reads only files inside the repository (a path whose real location is
39
+ * outside it is not read), each at most 1 MB.
40
+ */
41
+ interface PathPattern {
42
+ /** The part before `*`. */
43
+ prefix: string;
44
+ suffix: string;
45
+ /** Root-relative, with `*` kept. */
46
+ targets: string[];
47
+ }
48
+ interface CompiledOptions {
49
+ /** Root-relative effective `baseUrl`, when one is set in the chain. */
50
+ baseUrl?: string;
51
+ exact: Map<string, string[]>;
52
+ /** Longest prefix first. */
53
+ wildcards: PathPattern[];
54
+ }
55
+ /** A config with its `extends` chain applied: what it resolves, which files it covers, and what it references. */
56
+ interface EffectiveConfig {
57
+ /**
58
+ * What it resolves; `null` when its `extends` chain cannot be read but its
59
+ * own `include` says which files it takes in (`coverageOnly`): it may map
60
+ * a specifier any way, so a file it takes in is not rewritten.
61
+ */
62
+ options: CompiledOptions | null;
63
+ /** Does the config's `files` / `include` / `exclude` take in this root-relative file? */
64
+ covers: (file: string) => boolean;
65
+ /** Its `references`, each read the same way; `null` for one that cannot be read. */
66
+ references: Array<EffectiveConfig | null>;
67
+ }
68
+ /** One `tsconfig.json`: `config` is `null` when its chain could not be read (no rewriting). */
69
+ interface TsConfigInfo {
70
+ /** The config's directory, root-relative (`''` at the root). */
71
+ dir: string;
72
+ config: EffectiveConfig | null;
73
+ }
74
+ interface WorkspacePackage {
75
+ name: string;
76
+ /** Root-relative (`''` at the root). */
77
+ dir: string;
78
+ /** Subpath (`.`, `./x`, `./*`) to its targets relative to the package, conditions in order. */
79
+ exports: Map<string, string[]>;
80
+ /** `module`, `main` or `types`, when there is no `exports['.']`. */
81
+ main?: string;
82
+ }
83
+ interface Workspace {
84
+ /** Root-relative directory that declares it. */
85
+ dir: string;
86
+ /** Member packages by name; `null` for a name two members claim. */
87
+ byName: Map<string, WorkspacePackage | null>;
88
+ }
89
+ export interface ImportMap {
90
+ /** Deepest directory first. */
91
+ tsconfigs: TsConfigInfo[];
92
+ /** Deepest directory first. */
93
+ workspaces: Workspace[];
94
+ }
95
+ /** JSON with comments and trailing commas (tsconfig's dialect). */
96
+ export declare function parseJsonc(text: string): unknown;
97
+ /** Every `tsconfig.json` and every declared workspace under `root`. */
98
+ export declare function loadImportMap(root: string, maxDepth: number): ImportMap;
99
+ export declare function importMapIsEmpty(map: ImportMap): boolean;
100
+ /** Resolves a root-relative candidate to a file as TypeScript would (`.ts` for `.js`, extensions, `index`). */
101
+ export declare class FileResolver {
102
+ private readonly root;
103
+ private readonly cache;
104
+ constructor(root: string);
105
+ private isFile;
106
+ resolve(candidate: string): string | null;
107
+ }
108
+ /** Where a non-relative specifier in `fromFile` lands in the repository, or `null` (left as it is). */
109
+ export declare function resolveSpecifier(fromFile: string, specifier: string, map: ImportMap, files: FileResolver): string | null;
110
+ /**
111
+ * `code` with each non-relative import specifier that lands in the
112
+ * repository replaced by a relative path to the file, and the files it
113
+ * lands on. Lines are kept (only the specifiers change), so call sites keep
114
+ * their line numbers.
115
+ */
116
+ export declare function rewriteImports(fromFile: string, code: string, map: ImportMap, files: FileResolver): {
117
+ code: string;
118
+ targets: string[];
119
+ };
120
+ export {};
121
+ //# sourceMappingURL=import-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-map.d.ts","sourceRoot":"","sources":["../../src/blast-radius/import-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAMH,UAAU,WAAW;IACnB,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,UAAU,eAAe;IACvB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7B,4BAA4B;IAC5B,SAAS,EAAE,WAAW,EAAE,CAAC;CAC1B;AAED,kHAAkH;AAClH,UAAU,eAAe;IACvB;;;;OAIG;IACH,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,yFAAyF;IACzF,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,oFAAoF;IACpF,UAAU,EAAE,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;CAC3C;AAED,+FAA+F;AAC/F,UAAU,YAAY;IACpB,gEAAgE;IAChE,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;CAChC;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,+FAA+F;IAC/F,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/B,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,SAAS;IACjB,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,SAAS;IACxB,+BAA+B;IAC/B,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,+BAA+B;IAC/B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAMD,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CA8ChD;AAySD,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CAmFvE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAKxD;AA0ED,+GAA+G;AAC/G,qBAAa,YAAY;IAEX,OAAO,CAAC,QAAQ,CAAC,IAAI;IADjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoC;IAC1D,YAA6B,IAAI,EAAE,MAAM,EAAI;IAE7C,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkBxC;CACF;AA6BD,uGAAuG;AACvG,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAiBxH;AAID;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAWvI"}