@cosyte/synth 0.0.4 → 0.0.5

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -547,6 +547,44 @@ its public history at `0.0.x`, per the cosyte version ladder (`0.0.x` until firs
547
547
 
548
548
  ### Fixed
549
549
 
550
+ - **A file that appeared and disappeared while the PHI gate was running made it refuse the whole
551
+ sweep.** A full scan lists every file under `src/`, `test/` and `scripts/` and then reads them one
552
+ by one. Anything created and deleted between those two steps was read after it was gone, and the
553
+ scanner stopped with an error rather than a verdict. That is reachable in this repository rather
554
+ than theoretical: the gate's own test suite writes short-lived files into two of the three
555
+ directories it scans, and sweeping the working tree while that suite ran stopped 8 of 165 sweeps.
556
+ A sibling package hit the same shape from its build tool and it blocked a release.
557
+
558
+ **The refusal was right; the file list was wrong, so the list is what changed.** Exactly one case
559
+ is now tolerated: a file the scan listed itself, that is not committed, and that is missing when
560
+ the scan reaches it. It is reported on stderr as skipped, never dropped in silence, and the
561
+ "files scanned" figure counts what was actually read, so a skip lowers it instead of padding it.
562
+
563
+ **Everything else still stops the scan.** A committed file that cannot be read, a read that fails
564
+ for any other reason (unreadable is not the same as absent), a skipped file that is back on disk
565
+ when the scan finishes, and a repository that cannot report what it tracks. A full scan that ends
566
+ up having read nothing at all is refused outright, so tolerating a missing file can never turn
567
+ into a clean report of a tree nothing was read from. Pre-commit scans read committed content
568
+ directly and never depended on any of this.
569
+
570
+ Each of those bounds is pinned by a test that reds when the bound is widened, verified by widening
571
+ each one in turn. **One is not pinned and is named here rather than implied:** the check that a
572
+ skipped file has not come back. Reaching it needs a timing-dependent test, which is the failure
573
+ this defect teaches, so it is left uncovered deliberately; losing it would cost that re-check, not
574
+ the tolerance's limits. **One residual is disclosed rather than closed:** the re-check matches on
575
+ the file's path, not its contents, so an uncommitted file _renamed_ mid-scan goes unread under a
576
+ clean report. Committing it makes it tracked and no longer tolerable, and pre-commit reads
577
+ committed content either way. Closing it in general needs a content-addressed scan; re-listing the
578
+ scanned directories afterwards would close the in-directory half more cheaply, at the cost of a
579
+ second walk and a new way to refuse. Both are a design trade for a later change rather than
580
+ something impossible.
581
+
582
+ **Two smaller limits are recorded rather than closed, and both fail in the refusing direction.**
583
+ When the repository cannot report what it tracks the scan still stops, but the message names the
584
+ file it could not read rather than that reason. And the tracked-file list is read through a 1 MiB
585
+ buffer, so a repository large enough to exceed it would quietly stop applying the tolerance —
586
+ measured here at 6,556 bytes, three orders of magnitude of headroom.
587
+
550
588
  - **The test suite could fail on a busy machine while the code under test was correct.** The
551
589
  per-test timeout is a wall-clock budget, so it measures the machine as much as the code. These
552
590
  suites are CPU-bound, in that their running time is set by how much processor they actually get
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosyte/synth",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Deterministic, seedable synthetic healthcare-fixture generator for Node.js and TypeScript — spec-clean by construction, never real PHI.",
5
5
  "keywords": [
6
6
  "synth",