@clossys/architect 0.1.4 → 0.1.8

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
@@ -5,6 +5,80 @@ All notable changes to this package are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.8] - 2026-09-16
9
+
10
+ ### Note
11
+
12
+ - **0.1.7 was never published; this release supersedes it without repeating
13
+ its work.** 0.1.7 (below) carried the same `architect-check` entry-point
14
+ fix as this release, and its qualification record
15
+ (`governance/release-qualifications/clossys-architect-0.1.7.json`) was
16
+ generated and retained, binding candidate `packageTreeSha1
17
+ 45714600108521d00ca95f9d43a72092acbf8d42`. Before publication, #919
18
+ corrected the new `bin-entry.test.ts` added by #909/0.1.7 so it chmods a
19
+ temporary copy of `dist/cli.js` instead of the real packed file — a fix
20
+ needed because CI packs immediately after running the package's tests, so
21
+ the original test left CI publishing a tarball in the wrong file mode.
22
+ That correction touched a file inside `packages/architect/`, which moved
23
+ the package tree to `9233ea5efff49257bcebc7e6e5882753591f5aee` and left the
24
+ retained 0.1.7 record qualified against a package tree that no longer
25
+ exists. Qualification records are immutable — each file path is
26
+ introduced exactly once and is never corrected in place — so the 0.1.7
27
+ record cannot be updated to match, and 0.1.7 cannot be published. This
28
+ release reuses the already-fixed and already-corrected source unchanged
29
+ and exists solely to obtain a fresh, never-before-used record path. See
30
+ #909 (the original `architect-check` defect) and #919 (the test
31
+ correction that made 0.1.7 unpublishable).
32
+
33
+ ## [0.1.7] - 2026-09-16
34
+
35
+ ### Fixed
36
+
37
+ - **The published `architect-check` binary was completely dead.** The
38
+ entry-point guard in `src/cli.ts` compared `import.meta.url` (which Node
39
+ always resolves through symlinks) against `process.argv[1]` (which, for
40
+ an installed CLI, is the `node_modules/.bin` symlink itself, never the
41
+ real file). The two paths were never equal, so `run()` never fired.
42
+ Every documented invocation of the published package — `--help`,
43
+ `architect-check topology <file>` against both valid and invalid input,
44
+ even an unrecognized subcommand — returned exit `0` with zero bytes of
45
+ output, including invalid input the documented contract says must exit
46
+ `1` with a `"state":"violated"` report. A consumer who wired
47
+ `architect-check` into CI got a gate that could not fail on any input.
48
+ Fixed by resolving both sides with `realpathSync` before comparing, the
49
+ same pattern already used elsewhere in this repository (for example
50
+ `designer/src/cli.ts` and `writer/src/cli.ts`). See #909.
51
+ - Added a test that spawns the compiled `dist/cli.js` through a real
52
+ `node_modules/.bin`-shaped symlink built in a temp directory, the only
53
+ shape that actually exercises the entry-point guard — the existing
54
+ `cli.test.ts` suite calls the exported `main(argv)` directly and never
55
+ touched `process.argv[1]`, which is exactly why this defect shipped
56
+ undetected.
57
+
58
+ ## [0.1.6] - 2026-09-14
59
+
60
+ ### Changed
61
+
62
+ - Patch version bump only, to obtain a fresh, never-before-used
63
+ `governance/release-qualifications/` record path. The 0.1.5 qualification
64
+ record added by #811 was orphaned when that pull request was squash-merged
65
+ (#821) and had to be removed (#834); the immutability gate that protects
66
+ already-introduced record paths (`check-candidate-qualification.mjs`'s
67
+ single-introduction-commit invariant) means a valid record can never again
68
+ be introduced at the `0.1.5` path, so this package moves to `0.1.6`
69
+ purely to regain one. No functional or behavioral change.
70
+
71
+
72
+ ## [0.1.5] - 2026-09-09
73
+
74
+ ### Changed
75
+
76
+ - Historical entries below now describe the previous npm scope without naming
77
+ the producer account this catalogue no longer publishes under, and links to
78
+ this repository use its current `clossys/foundry` path. No date, version,
79
+ or recorded fact changed — only the way the retired scope is referred to.
80
+
81
+
8
82
  ## [0.1.4] - 2026-09-02
9
83
 
10
84
  ### Fixed
@@ -49,4 +123,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
49
123
  - Evidence-based architecture exception assessment with explicit indeterminate
50
124
  results when no material changes have been observed.
51
125
  - `architect-check` topology and exception-assessment commands.
52
- - Ontology model and snapshot API under `@vespeneventures/architect/ontology`.
126
+ - Ontology model and snapshot API under `@clossys/architect/ontology`.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { existsSync, readFileSync, statSync } from "node:fs";
2
+ import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
3
3
  import { resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { assessArchitectureExceptions } from "./assessment.js";
@@ -91,6 +91,26 @@ function run() {
91
91
  process.exitCode = 2;
92
92
  }
93
93
  }
94
- if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === resolve(process.argv[1]))
94
+ /**
95
+ * Same real-path guard `designer`'s `cli.ts` and `writer`'s `cli.ts` both
96
+ * use, for the same reason: `npm install` publishes `bin` entries as
97
+ * symlinks, so comparing `process.argv[1]` to `import.meta.url` without
98
+ * resolving symlinks on both sides fails the moment this file is actually
99
+ * invoked the only way it ships — as an installed CLI — and does so
100
+ * silently (`run()` never fires, nothing prints, exit code 0).
101
+ */
102
+ function detectMainModule() {
103
+ const argvPath = process.argv[1];
104
+ if (argvPath === undefined)
105
+ return false;
106
+ const modulePath = fileURLToPath(import.meta.url);
107
+ try {
108
+ return realpathSync(resolve(argvPath)) === realpathSync(modulePath);
109
+ }
110
+ catch {
111
+ return resolve(argvPath) === modulePath;
112
+ }
113
+ }
114
+ if (detectMainModule())
95
115
  run();
96
116
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,yBAAyB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AAC,oBAAoB,OAAO,GAAG,CAAC,CAAC;AACrH,CAAC;AAED,SAAS,GAAG;IACV,IAAI,CAAC;QAAC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAAC,CAAC;IACvD,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,oBAAoB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC5F,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,gBAAgB;IACvB,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,YAAY,CAAC,UAAU,CAAC,CAAC;IACtE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC;IAC1C,CAAC;AACH,CAAC;AAED,IAAI,gBAAgB,EAAE;IAAE,GAAG,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clossys/architect",
3
- "version": "0.1.4",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -58,9 +58,9 @@
58
58
  "test": "vitest run"
59
59
  },
60
60
  "devDependencies": {
61
- "@types/node": "^22.10.0",
61
+ "@types/node": "^26.5.1",
62
62
  "typescript": "~6.0.0",
63
- "vitest": "^4.1.9"
63
+ "vitest": "^5.0.0"
64
64
  },
65
65
  "publishConfig": {
66
66
  "registry": "https://registry.npmjs.org",
package/src/cli.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { existsSync, readFileSync, statSync } from "node:fs";
2
+ import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
3
3
  import { resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { assessArchitectureExceptions } from "./assessment.js";
@@ -71,4 +71,23 @@ function run(): void {
71
71
  }
72
72
  }
73
73
 
74
- if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === resolve(process.argv[1])) run();
74
+ /**
75
+ * Same real-path guard `designer`'s `cli.ts` and `writer`'s `cli.ts` both
76
+ * use, for the same reason: `npm install` publishes `bin` entries as
77
+ * symlinks, so comparing `process.argv[1]` to `import.meta.url` without
78
+ * resolving symlinks on both sides fails the moment this file is actually
79
+ * invoked the only way it ships — as an installed CLI — and does so
80
+ * silently (`run()` never fires, nothing prints, exit code 0).
81
+ */
82
+ function detectMainModule(): boolean {
83
+ const argvPath = process.argv[1];
84
+ if (argvPath === undefined) return false;
85
+ const modulePath = fileURLToPath(import.meta.url);
86
+ try {
87
+ return realpathSync(resolve(argvPath)) === realpathSync(modulePath);
88
+ } catch {
89
+ return resolve(argvPath) === modulePath;
90
+ }
91
+ }
92
+
93
+ if (detectMainModule()) run();