@am_shork/attest 0.1.3 → 0.1.4

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
@@ -7,6 +7,77 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ Remaining work from the 0.1.3 adoption reports. The breaking items are held for
11
+ **0.2.0** (under 0.x SemVer a breaking change bumps the minor); the non-breaking
12
+ `--vitest-config` item is not yet shipped, pending a design decision. "Breaking"
13
+ means it changes the exit code of an existing valid setup, rejects
14
+ previously-valid input, removes/renames a public API or `--json` field, or
15
+ changes a default runtime behavior an existing invocation relies on — diagnostic
16
+ message text is not API.
17
+
18
+ ### Planned for 0.2.0 (breaking)
19
+
20
+ - **A vacuous green stops passing.** Today `attest verify` on a spec that ran no
21
+ scenarios (an empty or requirement-less directory) prints
22
+ `✓ No issues. — 0 error, …` and exits `0`, because `runAndCollect` reads "no
23
+ failing tests" as `passed`. `verify` will instead emit a new `empty-spec`
24
+ ERROR when zero scenarios executed (or the registry has zero requirements),
25
+ so `ok` becomes `false` and the exit code follows the existing `hasError`
26
+ path. Wires up `hasSpecs()` (present in `pipeline.ts`, never called today).
27
+ *Breaking:* an "empty directory → exit 0" run flips to exit 1 — which is the
28
+ point, since that run attests nothing. *Non-breaking companion (may land
29
+ earlier in 0.1.x):* requirement/scenario counts in the summary line
30
+ (`— 33 requirements / 59 scenarios, 0 error, …`).
31
+ - **Default spec discovery ignores files with no `requirement()`.** `verify` at
32
+ a repo root currently sweeps every `**/*.spec.ts` — including a pre-existing
33
+ suite — into a runner with no aliases/DOM, a guaranteed red unrelated to the
34
+ code. The default will change to run only spec files that declare at least one
35
+ `requirement()`, so an incumbent suite is left untouched without forcing a
36
+ directory layout. *Breaking:* a repo relying on the root scan to pick up
37
+ requirement-less specs sees a different set run. *Non-breaking companion (may
38
+ land earlier in 0.1.x):* a pre-run report of how many spec files were located
39
+ and how many contain a `requirement()` call.
40
+
41
+ ### Planned for 0.1.x (non-breaking, not yet shipped)
42
+
43
+ - **Opt-in Vitest config** (`--vitest-config <path>` or `attest.config.ts`) so
44
+ framework code (`.vue`, DOM, aliases, auto-imports) can be specified at all.
45
+ `config: false` stays the default, so the deterministic child run is unchanged.
46
+ Deferred: it needs a design decision on config-file precedence and how it
47
+ interacts with the enforced `include`/`exclude`/`root` overrides, so it is not
48
+ bundled with the schema/heuristic/packaging changes above.
49
+
50
+ ## [0.1.4] - 2026-07-24
51
+
52
+ Non-breaking fixes from two independent 0.1.3 adoptions — a plain-TS
53
+ re-onboarding and a first Nuxt 4 adoption.
54
+
55
+ ### Added
56
+
57
+ - **`params` accepts an array of scalars, not just a lone scalar.** List-shaped
58
+ constants — vendor blacklists, id sets — are the values most prone to drift,
59
+ and rejecting arrays kept exactly those out of the single-source mechanism.
60
+ An array still has one owner (the spec) read from one place (the scenario).
61
+ Existing scalar registries are unaffected; the `params` type union widens to
62
+ admit `Array<number | string | boolean>`. `schemaVersion` is unchanged (no
63
+ `--json` shape change).
64
+
65
+ ### Changed
66
+
67
+ - **The `possible-drift` heuristic is now evaluated per requirement, not per
68
+ scenario.** A requirement that owns params is quiet as soon as *any* one of
69
+ its covering scenarios reads them, so a correct multi-facet requirement is no
70
+ longer flagged forever by the facets that legitimately don't touch params. The
71
+ INFO is emitted at most once per requirement (anchored at its first covering
72
+ scenario). INFO only — the verdict and exit code are unaffected.
73
+ - **Widened peer ranges** to `vite ^5 || ^6 || ^7 || ^8` and
74
+ `vitest ^2 || ^3 || ^4`. Current generations (Vitest 4 / Vite 7–8) work against
75
+ the `startVitest` / `state.getFiles()` / `configDefaults` surface Attest uses;
76
+ the old ranges emitted peer warnings an adopter could only silence by
77
+ downgrading their framework's test stack. Verified by the packaging test.
78
+ - **Documented `cover --json`'s `scenarioCount`** — the README JSON section now
79
+ states the coverage row shape (`{ reqId, covered, scenarioCount }`).
80
+
10
81
  ## [0.1.3] - 2026-07-24
11
82
 
12
83
  ### Added
@@ -118,7 +189,9 @@ Initial release.
118
189
  (MIT), whose four-stage engine and diff-first change model Attest's
119
190
  architecture is adapted from (re-implemented from scratch, no source copied).
120
191
 
121
- [Unreleased]: https://gitlab.com/Pseudorca/attest/-/compare/v0.1.2...main
192
+ [Unreleased]: https://gitlab.com/Pseudorca/attest/-/compare/v0.1.4...main
193
+ [0.1.4]: https://gitlab.com/Pseudorca/attest/-/tags/v0.1.4
194
+ [0.1.3]: https://gitlab.com/Pseudorca/attest/-/tags/v0.1.3
122
195
  [0.1.2]: https://gitlab.com/Pseudorca/attest/-/tags/v0.1.2
123
196
  [0.1.1]: https://gitlab.com/Pseudorca/attest/-/tags/v0.1.1
124
197
  [0.1.0]: https://gitlab.com/Pseudorca/attest/-/tags/v0.1.0
package/README.md CHANGED
@@ -10,7 +10,9 @@ by a stable ID and continuously detects drift.
10
10
 
11
11
  The killer move against drift: values that change (timeouts, limits) live **once**
12
12
  in a requirement's `params`, and tests read them from there — so a number is
13
- physically impossible to drift between the spec and the assertion.
13
+ physically impossible to drift between the spec and the assertion. A param may be
14
+ a scalar or an array of scalars, so list-shaped constants (vendor blacklists, id
15
+ sets) get the same single source as a lone number.
14
16
 
15
17
  See the authoritative design — [English](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/attest-design.md) · [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/attest-design.md) — and the rest of the [docs](https://gitlab.com/Pseudorca/attest/-/tree/main/docs).
16
18
 
@@ -102,7 +104,8 @@ attest check --json
102
104
  ```
103
105
 
104
106
  `verify` adds `passed` (was the test run itself green, independent of the
105
- overall verdict); `cover` adds `coverage[]` and a `requirements` roll-up;
107
+ overall verdict); `cover` adds `coverage[]` one `{ reqId, covered,
108
+ scenarioCount }` row per requirement — plus a `requirements` roll-up;
106
109
  `archive` adds `change`. `schemaVersion` is bumped on any breaking change to
107
110
  the shape. The TypeScript type is exported as `JsonReport`.
108
111
 
@@ -3,34 +3,34 @@ import { z } from 'zod';
3
3
  export declare const RequirementSchema: z.ZodObject<{
4
4
  statement: z.ZodEffects<z.ZodString, string, string>;
5
5
  rationale: z.ZodString;
6
- params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean]>>>;
6
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean]>, "many">]>>>;
7
7
  outOfScope: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
8
  }, "strip", z.ZodTypeAny, {
9
- params: Record<string, string | number | boolean>;
9
+ params: Record<string, string | number | boolean | (string | number | boolean)[]>;
10
10
  statement: string;
11
11
  rationale: string;
12
12
  outOfScope: string[];
13
13
  }, {
14
14
  statement: string;
15
15
  rationale: string;
16
- params?: Record<string, string | number | boolean> | undefined;
16
+ params?: Record<string, string | number | boolean | (string | number | boolean)[]> | undefined;
17
17
  outOfScope?: string[] | undefined;
18
18
  }>;
19
19
  /** The requirement registry: stable ID -> requirement (design §2, §5.1). */
20
20
  export declare const RegistrySchema: z.ZodRecord<z.ZodString, z.ZodObject<{
21
21
  statement: z.ZodEffects<z.ZodString, string, string>;
22
22
  rationale: z.ZodString;
23
- params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean]>>>;
23
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean]>, "many">]>>>;
24
24
  outOfScope: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
25
25
  }, "strip", z.ZodTypeAny, {
26
- params: Record<string, string | number | boolean>;
26
+ params: Record<string, string | number | boolean | (string | number | boolean)[]>;
27
27
  statement: string;
28
28
  rationale: string;
29
29
  outOfScope: string[];
30
30
  }, {
31
31
  statement: string;
32
32
  rationale: string;
33
- params?: Record<string, string | number | boolean> | undefined;
33
+ params?: Record<string, string | number | boolean | (string | number | boolean)[]> | undefined;
34
34
  outOfScope?: string[] | undefined;
35
35
  }>>;
36
36
  /** Parsed (output) shapes — defaults applied. */
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/core/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iDAAiD;AACjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAW5B,CAAC;AAEH,4EAA4E;AAC5E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;GAG1B,CAAC;AAEF,iDAAiD;AACjD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/core/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iDAAiD;AACjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAkB5B,CAAC;AAEH,4EAA4E;AAC5E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;GAG1B,CAAC;AAEF,iDAAiD;AACjD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -10,8 +10,15 @@ export const RequirementSchema = z.object({
10
10
  message: 'statement must contain the RFC-2119 keyword SHALL or MUST',
11
11
  }),
12
12
  rationale: z.string().min(10, 'rationale must not be empty (the intent layer has to say why)'),
13
+ // A param is a scalar or a homogeneous-enough list of scalars. Lists (vendor
14
+ // blacklists, id sets) are the most drift-prone constants, so keeping them out
15
+ // of params left the highest-risk values unguarded; an array still has exactly
16
+ // one owner (the spec) read by exactly one place (the scenario).
13
17
  params: z
14
- .record(z.string(), z.union([z.number(), z.string(), z.boolean()]))
18
+ .record(z.string(), (() => {
19
+ const scalar = z.union([z.number(), z.string(), z.boolean()]);
20
+ return z.union([scalar, z.array(scalar)]);
21
+ })())
15
22
  .default({}),
16
23
  outOfScope: z.array(z.string()).default([]),
17
24
  });
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/core/schema.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,4EAA4E;AAC5E,gEAAgE;AAEhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iDAAiD;AACjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QACzC,OAAO,EAAE,2DAA2D;KACrE,CAAC;IACJ,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,+DAA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C,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAC9D,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,EAAE,CAAC;SACJ,OAAO,CAAC,EAAE,CAAC;IACd,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC5C,CAAC,CAAC;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CACpC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,0BAA0B,CAAC,EAC5D,iBAAiB,CAClB,CAAC"}
@@ -7,9 +7,12 @@ import type { AttestPlan, Issue, ParamRef, Registry } from './types.js';
7
7
  */
8
8
  export declare function validateStructure(registry: Registry, plan: AttestPlan): Issue[];
9
9
  /**
10
- * Weak anti-drift heuristic (design §6, mechanism 3). Emits an INFO when a
11
- * scenario covers a requirement that has params but the scenario does not
12
- * reference them a place a drifting hardcoded literal could hide.
10
+ * Weak anti-drift heuristic (design §6, mechanism 3). Evaluated per requirement,
11
+ * not per scenario: a requirement that owns params is quiet as soon as *any* one
12
+ * of its covering scenarios reads them. Flagging each individual scenario that
13
+ * happens not to read params punishes correct multi-facet requirements with
14
+ * noise that can never be cleared — and noise that can never be cleared stops
15
+ * being read, the exact failure this heuristic exists to prevent.
13
16
  */
14
17
  export declare function detectPotentialDrift(registry: Registry, plan: AttestPlan, refs: ParamRef[]): Issue[];
15
18
  //# sourceMappingURL=validator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/core/validator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,GAAG,KAAK,EAAE,CA+C/E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,QAAQ,EAAE,GACf,KAAK,EAAE,CAoBT"}
1
+ {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/core/validator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,GAAG,KAAK,EAAE,CA+C/E;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,QAAQ,EAAE,GACf,KAAK,EAAE,CAuBT"}
@@ -51,27 +51,34 @@ export function validateStructure(registry, plan) {
51
51
  return issues;
52
52
  }
53
53
  /**
54
- * Weak anti-drift heuristic (design §6, mechanism 3). Emits an INFO when a
55
- * scenario covers a requirement that has params but the scenario does not
56
- * reference them a place a drifting hardcoded literal could hide.
54
+ * Weak anti-drift heuristic (design §6, mechanism 3). Evaluated per requirement,
55
+ * not per scenario: a requirement that owns params is quiet as soon as *any* one
56
+ * of its covering scenarios reads them. Flagging each individual scenario that
57
+ * happens not to read params punishes correct multi-facet requirements with
58
+ * noise that can never be cleared — and noise that can never be cleared stops
59
+ * being read, the exact failure this heuristic exists to prevent.
57
60
  */
58
61
  export function detectPotentialDrift(registry, plan, refs) {
59
- return plan.scenarios.flatMap((s) => {
60
- const req = registry[s.reqId];
61
- const hasParams = req !== undefined && Object.keys(req.params).length > 0;
62
- const referencesParams = refs.some((r) => r.reqId === s.reqId && r.scenario === s.name);
63
- return hasParams && !referencesParams
64
- ? [
65
- {
66
- level: 'INFO',
67
- code: 'possible-drift',
68
- reqId: s.reqId,
69
- file: s.file,
70
- line: s.line,
71
- message: `scenario "${s.name}" attests ${s.reqId} (which has params) without reading them — a hardcoded literal could be drifting here.`,
72
- },
73
- ]
74
- : [];
75
- });
62
+ const readsParams = new Set(refs.map((r) => r.reqId));
63
+ const issues = [];
64
+ for (const [id, req] of Object.entries(registry)) {
65
+ if (Object.keys(req.params).length === 0)
66
+ continue;
67
+ const covering = plan.scenarios.filter((s) => s.reqId === id);
68
+ if (covering.length === 0 || readsParams.has(id))
69
+ continue;
70
+ // Anchor the hint at the first covering scenario so it stays clickable,
71
+ // even though the verdict is now about the requirement as a whole.
72
+ const at = covering[0];
73
+ issues.push({
74
+ level: 'INFO',
75
+ code: 'possible-drift',
76
+ reqId: id,
77
+ file: at.file,
78
+ line: at.line,
79
+ message: `${id} owns params, but none of its scenarios read them — a hardcoded literal could be drifting here.`,
80
+ });
81
+ }
82
+ return issues;
76
83
  }
77
84
  //# sourceMappingURL=validator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/core/validator.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,8EAA8E;AAI9E;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAkB,EAAE,IAAgB;IACpE,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/D,yDAAyD;IACzD,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YACT,IAAI,EAAE,EAAE,CAAC,IAAI;YACb,IAAI,EAAE,EAAE,CAAC,IAAI;YACb,OAAO,EAAE,GAAG,EAAE,iGAAiG;SAChH,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@am_shork/attest",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "TDD-native spec framework: tests are the source of truth for verification, ID-bound requirements the source of truth for intent.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -50,8 +50,8 @@
50
50
  "zod": "^3.23.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "vite": "^5.0.0 || ^6.0.0",
54
- "vitest": "^2.0.0 || ^3.0.0"
53
+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
54
+ "vitest": "^2.0.0 || ^3.0.0 || ^4.0.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@eslint/js": "^9.9.0",