@afokapu/atdd-bun 0.10.21 → 0.10.23

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.
@@ -27,6 +27,9 @@ for (const root of readRoots()) {
27
27
  if (!text) continue;
28
28
  const masked = maskLiteralsAndComments(text);
29
29
  for (const m of masked.matchAll(BARE_FETCH)) {
30
+ // A method DEFINED as fetch is not a call: Bun.serve({ async fetch(request) { … } }) is the inbound handler, and
31
+ // Bun requires that name (resolver-os #iFlkkL7jvEbC). A definition's parameter list is followed by its body.
32
+ if (m[0].startsWith("fetch") && /^\([^()]*\)\s*(?::\s*[^{=;]+)?\{/.test(masked.slice(m.index + m[0].length - 1))) continue;
30
33
  violations.push({ rule_id: RULE, file, ...locate(text, m.index),
31
34
  evidence: `${layerOf(file)} layer calls the platform HTTP primitive directly; route it through the centralized client in integration/` });
32
35
  }
@@ -5,6 +5,7 @@
5
5
  // (route resolution) and TrainRunner (linear execution), core afokapu/atdd#1251 — and MUST NOT
6
6
  // substitute a mock/spy/hand-built resolver for them. Bun mirror of core
7
7
  // tester.interlocking.production-runner-used. Scans `e2e/**/*.ts` interlocking tests.
8
+ import { join } from "node:path";
8
9
  import {
9
10
  parseJsonEnv,
10
11
  readText,
@@ -32,6 +33,11 @@ const violations = [];
32
33
 
33
34
  for (const scanRoot of roots) {
34
35
  for (const croot of findConsumerRoots(scanRoot)) {
36
+ // A test that imports the Station Master drives the runners it composes: the call model's entry point
37
+ // (FWS #sEW3F9b49iA7). It counts only when the Station Master module itself references both production runners;
38
+ // substitutes are still caught by FORBIDDEN_PATTERNS above.
39
+ const station = ["server.ts", join("src", "server.ts")].map((name) => readText(join(croot, name))).find((t) => t && tokenCovered(PROD_INTERLOCKING, maskComments(t)) && tokenCovered(PROD_TRAIN, maskComments(t)));
40
+ const drivesStationMaster = (text) => Boolean(station) && /\bfrom\s+["'][^"']*\bserver(?:\.ts)?["']|import\(\s*["'][^"']*\bserver(?:\.ts)?["']\s*\)/.test(text);
35
41
  const records = interlockingFiles(croot)
36
42
  .map((f) => parseInterlocking(readText(f)))
37
43
  .filter(Boolean);
@@ -61,7 +67,7 @@ for (const scanRoot of roots) {
61
67
  }
62
68
  }
63
69
 
64
- const missing = [PROD_INTERLOCKING, PROD_TRAIN].filter((sym) => !tokenCovered(sym, text));
70
+ const missing = drivesStationMaster(text) ? [] : [PROD_INTERLOCKING, PROD_TRAIN].filter((sym) => !tokenCovered(sym, text));
65
71
  if (missing.length) {
66
72
  violations.push(
67
73
  mk(
package/integrity.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.10.21",
2
+ "version": "0.10.23",
3
3
  "files": {
4
4
  "HOOK_AUDIT.md": "5329d840db37671b1918f688ead26865473b87db73dbc75f7c8b2a8bbe8d6d43",
5
5
  "PLANNER_PORT.md": "fb5935bac8b7ac18994de21e43ace3a5ef8cd55f85b0e3349fca261280054f11",
@@ -196,7 +196,7 @@
196
196
  "detectors/atdd_traceability_closure/fixtures/dirty/test/no-binding.test.ts": "ea8b5b0d0bfdc397b93fb0e7d1ad99fac1a2f52f4f46bc8c9f0e9783d7402c55",
197
197
  "detectors/bun_clean_architecture_detector/atdd.implementation.yaml": "c8682568ee3489c4e79661a59a71cfa3c25f444b03bbe151997e3650ea7e1110",
198
198
  "detectors/bun_clean_architecture_detector/checks/_map.json": "7d680405e8514bb3c35f1e44d7441c7fd4595a231e9e6a8a1969fd30c4327f88",
199
- "detectors/bun_clean_architecture_detector/checks/a_boundaries_http_client.mjs": "46486e6e9ddd0e3de4681d440bc730ed18b1e0b1357ce45807c6d331a87bbe26",
199
+ "detectors/bun_clean_architecture_detector/checks/a_boundaries_http_client.mjs": "87ff421176965a782c4c371a27fd34be1877ced147598245a465f7ca9bb4e4d4",
200
200
  "detectors/bun_clean_architecture_detector/checks/a_commons_application_no_integration.mjs": "08ae694a2d8b9284f1042eef188e5ea3e51bcc0c753a693bff09a0e5ef0fd74d",
201
201
  "detectors/bun_clean_architecture_detector/checks/a_commons_cross_feature.mjs": "e501e1dfc2dc9cc8894e2220cd5a04c76749647a42d9cc982f21fbbe8216a0ea",
202
202
  "detectors/bun_clean_architecture_detector/checks/a_commons_domain_no_outbound.mjs": "f61e52fbe3554d095cc47cff131d5c8a6e8020adf79fe6312362ab9580539f1f",
@@ -382,7 +382,7 @@
382
382
  "detectors/bun_interlocking_coverage/_shared/interlocking.mjs": "4946e582f1ddee7346a6d546bd8309f622ffeb383f9f8ac1a02de9d20a72723d",
383
383
  "detectors/bun_interlocking_coverage/atdd.implementation.yaml": "f160517a8138ba3ca05e3d130e6fbfb796e643376f25743fdef4fc210196525b",
384
384
  "detectors/bun_interlocking_coverage/checks/_map.json": "0a218ea319cc6258af7bd721c2154cb9561fe67e80d80ef32d08fc77bc9403c3",
385
- "detectors/bun_interlocking_coverage/checks/interlocking_production_runner.mjs": "136eb0955052f2485740adfb888f5ba6f1414dcdb53d505034b8db40420a611a",
385
+ "detectors/bun_interlocking_coverage/checks/interlocking_production_runner.mjs": "a1edd5aa15892564aa8d46a93dca2d17001901e90085cd660be192a2ec747c1f",
386
386
  "detectors/bun_interlocking_coverage/checks/interlocking_route_coverage.mjs": "2d73c401adf77b3147e11271653c528d02dfc50f4eebde8be35795707023fb6d",
387
387
  "detectors/bun_interlocking_coverage/checks/interlocking_smoke_coverage.mjs": "ad53b606c325f87b09ac89c848c75ba5618e7073223fe528cf048343147638ce",
388
388
  "detectors/bun_interlocking_coverage/checks/interlocking_trace_binds.mjs": "61dcb8a8d04e9764aab7920f346bd3684fc98e2c294aa5c58eefec555145a1d0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afokapu/atdd-bun",
3
- "version": "0.10.21",
3
+ "version": "0.10.23",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/afokapu/atdd-bun.git"