@afokapu/atdd-bun 0.10.21 → 0.10.22

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.
@@ -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.22",
3
3
  "files": {
4
4
  "HOOK_AUDIT.md": "5329d840db37671b1918f688ead26865473b87db73dbc75f7c8b2a8bbe8d6d43",
5
5
  "PLANNER_PORT.md": "fb5935bac8b7ac18994de21e43ace3a5ef8cd55f85b0e3349fca261280054f11",
@@ -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.22",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/afokapu/atdd-bun.git"