@cosyte/astm 0.0.19 → 0.0.20

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
@@ -11,6 +11,49 @@ this file is maintained by hand (Changesets handles the version bump and publish
11
11
 
12
12
  ### Added
13
13
 
14
+ - **The PHI commit-gate now reads a stream written as a source string literal, and refuses a sweep
15
+ that did not observe its corpus.** Two separate holes, closed together because closing one alone
16
+ buys only the cross-cutting SSN/email floor.
17
+ - **Scan roots.** The all-mode walk covers `src`, `test` and `scripts`, where it previously
18
+ covered `src` and `test/fixtures` only. Measured against `git ls-files` on the commit before
19
+ this change: 106 of 165 tracked files were scanned by neither enumerating route, 66 of them
20
+ under `test/`, and 33 of those 66 contain a patient-record literal. Those fixtures were read by
21
+ hand before.
22
+ - **A source-embedded view.** The record-aware detector splits on newlines and asks whether a line
23
+ begins with the patient-record type letter. Most of this package's streams are string literals,
24
+ so every one of them arrived as a single line beginning with a quote and was never read,
25
+ including inside `src`, which the walk already covered. The detector now also runs over a view
26
+ with the source escape sequences decoded and the string-literal delimiters treated as record
27
+ boundaries, in addition to the raw bytes. Both are needed: an escape sequence supplies a
28
+ boundary only for a stream written whole in one literal, and this package also writes a single
29
+ record per literal and a stream as array elements joined at run time. The decode is one
30
+ left-to-right pass that consumes an escaped backslash as a pair; it runs only on a closed set of
31
+ source file extensions, so it cannot invent a record boundary in wire data whose backslash is
32
+ the repeat delimiter; and delimiters are read from the line view only, so a quoted fragment of
33
+ prose cannot redefine the delimiter set for a whole file.
34
+ - **An observation rule.** A sweep refuses (exit 2) when a declared root observed no files, when
35
+ the invocation as a whole observed none, and when git tracks in-scope files under a root that
36
+ the walk did not observe. A missing root, an emptied root, a dangling symbolic link as a root,
37
+ and a root that is a regular file are all covered; the last previously raised an uncaught
38
+ `ENOTDIR`, which exits 1, the code that means hits were found.
39
+ - **Two precision guards, each with its bound stated where it is applied.** A line that merely
40
+ starts with the patient-record type letter is not read as a patient record: its second field
41
+ must be a short digit run, which this package's own builder always writes there. And a name
42
+ component of one character is not read, so a bare middle initial does not have to be exempted
43
+ by name for the whole repository.
44
+ - What a green from the scan means is now written out in one place, `scanTarget`, with every
45
+ locus, record shape, token and file it does not cover named there. No other surface restates
46
+ it.
47
+ - The scanner resolves its repository from its own file location rather than from the working
48
+ directory, and every `git` subprocess it runs is pinned to that repository. Run from a parent
49
+ checkout it previously walked that tree and reported clean about this package having never
50
+ opened it.
51
+ - **`pnpm check`, a gate-coverage check** (`scripts/check-gate-coverage.ts`). It asserts that every
52
+ command this repository's own workflows run is reachable as a `pnpm run` script or is declared
53
+ with the reason it is not, that every `run-<x>: true` input passed to a shared pipeline has the
54
+ script that pipeline will call, and that the two gates whose names carry no recognisable prefix
55
+ still exist. Every declared-unreachable entry is printed on every run.
56
+
14
57
  - **Two parse-path warning codes for two readings the parser could not defend, both landing on the
15
58
  profile safety gate** (`ASTM-FRAME-RESIDUALS`, defects 4 and 11). Both are additive: no existing
16
59
  warning was removed or renamed, no split changed, and every extracted value is byte-identical to
package/dist/index.cjs CHANGED
@@ -2902,7 +2902,7 @@ function concatBytes3(chunks) {
2902
2902
  }
2903
2903
 
2904
2904
  // src/index.ts
2905
- var VERSION = "0.0.19";
2905
+ var VERSION = "0.0.20";
2906
2906
 
2907
2907
  exports.ALL_ASTM_WARNING_CODES = ALL_ASTM_WARNING_CODES;
2908
2908
  exports.AMBIGUOUS_CODES = AMBIGUOUS_CODES;