@descent-vtt/spec-guard 0.2.0 → 0.4.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.
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Search scope: what an assertion actually looked at.
3
+ *
4
+ * An assertion's answer is worth exactly as much as the set of files behind it.
5
+ * "`LegacyThing` appears nowhere in `src`" is a useful claim; "`LegacyThing`
6
+ * appears nowhere in the part of `src` we happened to walk" is not, and the two
7
+ * are indistinguishable in a report that only prints a count.
8
+ *
9
+ * So every file under a target lands in exactly one of three states, and the
10
+ * third one is never silent:
11
+ *
12
+ * inspected - read and searched.
13
+ * excluded - the assertion's own `exclude`/`glob` said so. Not reported:
14
+ * the user asked for it and already knows.
15
+ * skipped - spec-guard decided. Always counted, always reported.
16
+ *
17
+ * Skips split further, because two very different things were being conflated:
18
+ *
19
+ * policy - `.git`, `node_modules`. Deliberate, uninteresting, and not a
20
+ * gap in the analysis. Reported as a total.
21
+ * uncertainty - a file that could not be read, or whose bytes are not text.
22
+ * These are gaps: the file might contain the symbol and nobody
23
+ * knows. Reported individually, and `--strict` fails on them.
24
+ *
25
+ * The policy list is deliberately tiny. Every name on it is a place where the
26
+ * tool can be sure it is not looking at your code: version-control object
27
+ * stores, which hold compressed copies of code you already deleted, and
28
+ * dependency trees, which hold code you did not write. Names like `dist`,
29
+ * `build`, `out` and `coverage` are **not** on it, because spec-guard cannot
30
+ * tell a build output directory from a directory of build scripts, and a guess
31
+ * that goes the wrong way is exactly the silent false green this module exists
32
+ * to prevent. Narrowing scope is the assertion's job, through `exclude`.
33
+ */
34
+ /** Why spec-guard, rather than the user, left a path out. */
35
+ export type SkipReason = 'vcs' | 'dependencies' | 'unreadable' | 'binary';
36
+ /**
37
+ * Reasons that represent a gap in the analysis rather than a deliberate
38
+ * omission. These are what `--strict` refuses to pass over.
39
+ */
40
+ export declare const UNCERTAIN_REASONS: ReadonlySet<SkipReason>;
41
+ /**
42
+ * Directory names skipped unless `--no-default-skips` is given.
43
+ *
44
+ * Four names, each one a place where anything found would be misleading rather
45
+ * than merely noisy: a version-control store answers "did this ever exist",
46
+ * not "does this exist", and a dependency tree answers for somebody else's
47
+ * code.
48
+ */
49
+ export declare const DEFAULT_SKIPPED_DIRECTORIES: ReadonlyMap<string, SkipReason>;
50
+ /**
51
+ * What a run is allowed to look at.
52
+ *
53
+ * One object, shared by both engines: the JavaScript walker consults it
54
+ * directly and the ripgrep arguments are derived from it, so the two cannot
55
+ * drift apart without a test noticing.
56
+ */
57
+ export interface ScopePolicy {
58
+ /** Directory names to skip, and why. Empty under `--no-default-skips`. */
59
+ readonly skippedDirectories: ReadonlyMap<string, SkipReason>;
60
+ }
61
+ export declare const DEFAULT_SCOPE: ScopePolicy;
62
+ /** A policy that walks everything, for when only certainty will do. */
63
+ export declare const SCAN_EVERYTHING: ScopePolicy;
64
+ export declare function createScope(useDefaultSkips: boolean): ScopePolicy;
65
+ /** One path spec-guard declined to inspect, with the reason. */
66
+ export interface SkippedPath {
67
+ /** Path relative to the run root, POSIX separators. */
68
+ readonly path: string;
69
+ readonly reason: SkipReason;
70
+ /**
71
+ * Matches found inside a file that was not counted.
72
+ *
73
+ * Only meaningful for `binary`: the bytes were searched, so we know whether
74
+ * ignoring the file mattered. A binary file with no match is a non-event; a
75
+ * binary file *with* one is the difference between a real pass and a lie.
76
+ */
77
+ readonly matches?: number;
78
+ }
79
+ /** How many paths were skipped, by reason, plus a sample for the report. */
80
+ export interface ScopeLedger {
81
+ readonly skipped: readonly SkippedPath[];
82
+ }
83
+ export declare const EMPTY_LEDGER: ScopeLedger;
84
+ /** Longest list of skipped paths a single result will carry. */
85
+ export declare const MAX_LEDGER_ENTRIES = 100;
86
+ /** Accumulates skips without letting a pathological tree exhaust memory. */
87
+ export declare class LedgerBuilder {
88
+ private readonly entries;
89
+ private readonly counts;
90
+ add(path: string, reason: SkipReason, matches?: number): void;
91
+ /** How many paths carried this reason, including any beyond the sample cap. */
92
+ count(reason: SkipReason): number;
93
+ build(): ScopeLedger;
94
+ }
95
+ /** Totals per reason, computed from a ledger. */
96
+ export declare function tallyLedger(ledger: ScopeLedger): Map<SkipReason, number>;
97
+ /** Merges ledgers from several searches into one. */
98
+ export declare function mergeLedgers(ledgers: readonly ScopeLedger[]): ScopeLedger;
99
+ /**
100
+ * True when the bytes are not text.
101
+ *
102
+ * A NUL anywhere means binary, which is the same question ripgrep answers when
103
+ * it reports a `binary_offset` and stops. Checking only a prefix - the usual
104
+ * shortcut - would disagree with ripgrep on any file whose first NUL comes
105
+ * late, and disagreeing engines are the defect this module exists to remove.
106
+ */
107
+ export declare function isBinary(buffer: Buffer): boolean;
108
+ //# sourceMappingURL=scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,6DAA6D;AAC7D,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,cAAc,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,UAAU,CAAiD,CAAC;AAExG;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAKtE,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,0EAA0E;IAC1E,QAAQ,CAAC,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC9D;AAED,eAAO,MAAM,aAAa,EAAE,WAAiE,CAAC;AAE9F,uEAAuE;AACvE,eAAO,MAAM,eAAe,EAAE,WAA+C,CAAC;AAE9E,wBAAgB,WAAW,CAAC,eAAe,EAAE,OAAO,GAAG,WAAW,CAEjE;AAED,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;CAC1C;AAED,eAAO,MAAM,YAAY,EAAE,WAA6B,CAAC;AAEzD,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,4EAA4E;AAC5E,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IAExD,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAK5D;IAED,+EAA+E;IAC/E,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAEhC;IAED,KAAK,IAAI,WAAW,CAEnB;CACF;AAED,iDAAiD;AACjD,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAMxE;AAED,qDAAqD;AACrD,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,CAYzE;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD"}
package/dist/scope.js ADDED
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Search scope: what an assertion actually looked at.
3
+ *
4
+ * An assertion's answer is worth exactly as much as the set of files behind it.
5
+ * "`LegacyThing` appears nowhere in `src`" is a useful claim; "`LegacyThing`
6
+ * appears nowhere in the part of `src` we happened to walk" is not, and the two
7
+ * are indistinguishable in a report that only prints a count.
8
+ *
9
+ * So every file under a target lands in exactly one of three states, and the
10
+ * third one is never silent:
11
+ *
12
+ * inspected - read and searched.
13
+ * excluded - the assertion's own `exclude`/`glob` said so. Not reported:
14
+ * the user asked for it and already knows.
15
+ * skipped - spec-guard decided. Always counted, always reported.
16
+ *
17
+ * Skips split further, because two very different things were being conflated:
18
+ *
19
+ * policy - `.git`, `node_modules`. Deliberate, uninteresting, and not a
20
+ * gap in the analysis. Reported as a total.
21
+ * uncertainty - a file that could not be read, or whose bytes are not text.
22
+ * These are gaps: the file might contain the symbol and nobody
23
+ * knows. Reported individually, and `--strict` fails on them.
24
+ *
25
+ * The policy list is deliberately tiny. Every name on it is a place where the
26
+ * tool can be sure it is not looking at your code: version-control object
27
+ * stores, which hold compressed copies of code you already deleted, and
28
+ * dependency trees, which hold code you did not write. Names like `dist`,
29
+ * `build`, `out` and `coverage` are **not** on it, because spec-guard cannot
30
+ * tell a build output directory from a directory of build scripts, and a guess
31
+ * that goes the wrong way is exactly the silent false green this module exists
32
+ * to prevent. Narrowing scope is the assertion's job, through `exclude`.
33
+ */
34
+ /**
35
+ * Reasons that represent a gap in the analysis rather than a deliberate
36
+ * omission. These are what `--strict` refuses to pass over.
37
+ */
38
+ export const UNCERTAIN_REASONS = new Set(['unreadable', 'binary']);
39
+ /**
40
+ * Directory names skipped unless `--no-default-skips` is given.
41
+ *
42
+ * Four names, each one a place where anything found would be misleading rather
43
+ * than merely noisy: a version-control store answers "did this ever exist",
44
+ * not "does this exist", and a dependency tree answers for somebody else's
45
+ * code.
46
+ */
47
+ export const DEFAULT_SKIPPED_DIRECTORIES = new Map([
48
+ ['.git', 'vcs'],
49
+ ['.hg', 'vcs'],
50
+ ['.svn', 'vcs'],
51
+ ['node_modules', 'dependencies'],
52
+ ]);
53
+ export const DEFAULT_SCOPE = { skippedDirectories: DEFAULT_SKIPPED_DIRECTORIES };
54
+ /** A policy that walks everything, for when only certainty will do. */
55
+ export const SCAN_EVERYTHING = { skippedDirectories: new Map() };
56
+ export function createScope(useDefaultSkips) {
57
+ return useDefaultSkips ? DEFAULT_SCOPE : SCAN_EVERYTHING;
58
+ }
59
+ export const EMPTY_LEDGER = { skipped: [] };
60
+ /** Longest list of skipped paths a single result will carry. */
61
+ export const MAX_LEDGER_ENTRIES = 100;
62
+ /** Accumulates skips without letting a pathological tree exhaust memory. */
63
+ export class LedgerBuilder {
64
+ entries = [];
65
+ counts = new Map();
66
+ add(path, reason, matches) {
67
+ this.counts.set(reason, (this.counts.get(reason) ?? 0) + 1);
68
+ if (this.entries.length < MAX_LEDGER_ENTRIES) {
69
+ this.entries.push(matches === undefined ? { path, reason } : { path, reason, matches });
70
+ }
71
+ }
72
+ /** How many paths carried this reason, including any beyond the sample cap. */
73
+ count(reason) {
74
+ return this.counts.get(reason) ?? 0;
75
+ }
76
+ build() {
77
+ return { skipped: this.entries };
78
+ }
79
+ }
80
+ /** Totals per reason, computed from a ledger. */
81
+ export function tallyLedger(ledger) {
82
+ const totals = new Map();
83
+ for (const entry of ledger.skipped) {
84
+ totals.set(entry.reason, (totals.get(entry.reason) ?? 0) + 1);
85
+ }
86
+ return totals;
87
+ }
88
+ /** Merges ledgers from several searches into one. */
89
+ export function mergeLedgers(ledgers) {
90
+ const seen = new Set();
91
+ const skipped = [];
92
+ for (const ledger of ledgers) {
93
+ for (const entry of ledger.skipped) {
94
+ const key = `${entry.reason}:${entry.path}`;
95
+ if (seen.has(key))
96
+ continue;
97
+ seen.add(key);
98
+ if (skipped.length < MAX_LEDGER_ENTRIES)
99
+ skipped.push(entry);
100
+ }
101
+ }
102
+ return { skipped };
103
+ }
104
+ /**
105
+ * True when the bytes are not text.
106
+ *
107
+ * A NUL anywhere means binary, which is the same question ripgrep answers when
108
+ * it reports a `binary_offset` and stops. Checking only a prefix - the usual
109
+ * shortcut - would disagree with ripgrep on any file whose first NUL comes
110
+ * late, and disagreeing engines are the defect this module exists to remove.
111
+ */
112
+ export function isBinary(buffer) {
113
+ return buffer.includes(0);
114
+ }
115
+ //# sourceMappingURL=scope.js.map
@@ -0,0 +1 @@
1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E,SAAS;YAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB;gBAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAc;IACrC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { ScopeLedger, ScopePolicy } from './scope.js';
1
2
  /**
2
3
  * Shared types for spec-guard.
3
4
  *
@@ -5,7 +6,14 @@
5
6
  * parser -> Directive[] -> runner (+ engine) -> AssertionResult[] -> reporter
6
7
  */
7
8
  /** The three assertion kinds understood by the parser. */
8
- export type DirectiveKind = 'assert-absence' | 'assert-count' | 'assert-present';
9
+ export type DirectiveKind = 'assert-absence' | 'assert-count' | 'assert-present' | 'assert-import-absence' | 'assert-import-count';
10
+ /** Extra scope carried by the import assertions. */
11
+ export interface ImportQuery {
12
+ /** Module patterns, matched with gitignore-style rules. */
13
+ modules: string[];
14
+ /** Whether `import type` / `export type` count as dependencies. */
15
+ includeTypes: boolean;
16
+ }
9
17
  /** Source location of a directive inside a spec file. */
10
18
  export interface SourceLocation {
11
19
  /** Absolute path to the spec file. */
@@ -45,6 +53,26 @@ export interface SearchOptions {
45
53
  ignoreCase: boolean;
46
54
  /** Include-only glob filters, e.g. `*.ts`. Empty means "every file". */
47
55
  globs: string[];
56
+ /**
57
+ * Paths to leave out, gitignore-style: a bare name matches any segment, so
58
+ * `tests` excludes that directory wherever it appears.
59
+ */
60
+ excludeGlobs: string[];
61
+ /**
62
+ * Skip matches that sit inside comments.
63
+ *
64
+ * On by default: the comment recording that a symbol was removed should not
65
+ * be what proves the symbol is still there.
66
+ */
67
+ ignoreComments: boolean;
68
+ /**
69
+ * What the walk is allowed to look at.
70
+ *
71
+ * Lives on the options, not on the engine, because both engines read it: the
72
+ * scanner consults it while walking and the ripgrep arguments are derived
73
+ * from it. One policy, so the two cannot drift.
74
+ */
75
+ scope: ScopePolicy;
48
76
  /** Absolute file paths to exclude from results (the spec files themselves). */
49
77
  excludeFiles: ReadonlySet<string>;
50
78
  }
@@ -69,6 +97,12 @@ export interface MatchLocation {
69
97
  export interface SearchResult {
70
98
  /** Total number of matched occurrences (not lines). */
71
99
  count: number;
100
+ /** Matches excluded because they were inside comments. */
101
+ commentMatches: number;
102
+ /** Files whose language has no known comment syntax, so nothing was excluded. */
103
+ unclassifiedFiles: number;
104
+ /** What was not inspected, and why. Never empty for a reason nobody stated. */
105
+ scope: ScopeLedger;
72
106
  /** Up to `maxSnippets` match locations, in file order. */
73
107
  matches: MatchLocation[];
74
108
  /** Engine that produced this result. */
@@ -91,6 +125,8 @@ export interface Assertion {
91
125
  files: string[];
92
126
  bounds: Bounds;
93
127
  search?: SearchOptions;
128
+ /** Present on the import assertions. */
129
+ imports?: ImportQuery;
94
130
  /** Targets that do not exist on disk. */
95
131
  missingTargets: string[];
96
132
  }
@@ -110,6 +146,16 @@ export interface AssertionResult {
110
146
  message: string;
111
147
  matches: MatchLocation[];
112
148
  warnings: string[];
149
+ /**
150
+ * Matches that were found but not counted because they sat inside comments.
151
+ * Reported rather than discarded: comment exclusion is the only thing that
152
+ * can turn a failure into a pass without anyone touching code.
153
+ */
154
+ commentMatches: number;
155
+ /** Matching files whose language is unknown, so their comments counted as code. */
156
+ unclassifiedFiles: number;
157
+ /** What this assertion did not inspect, and why. */
158
+ scope: ScopeLedger;
113
159
  engine?: EngineName;
114
160
  durationMs: number;
115
161
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0DAA0D;AAC1D,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG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,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,mFAAmF;IACnF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,UAAU,CAAC;IACpB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,oEAAoE;IACpE,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,kDAAkD;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
package/dist/types.js CHANGED
@@ -1,8 +1,2 @@
1
- /**
2
- * Shared types for spec-guard.
3
- *
4
- * The pipeline is deliberately linear and side-effect free until the very edge:
5
- * parser -> Directive[] -> runner (+ engine) -> AssertionResult[] -> reporter
6
- */
7
1
  export {};
8
2
  //# sourceMappingURL=types.js.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descent-vtt/spec-guard",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Executable architecture assertions for Markdown specs & ADRs.",
5
5
  "keywords": [
6
6
  "adr",
@@ -32,6 +32,7 @@
32
32
  "files": [
33
33
  "bin",
34
34
  "dist",
35
+ "CHANGELOG.md",
35
36
  "README.md",
36
37
  "LICENSE"
37
38
  ],