instar 1.3.1158 → 1.3.1159

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.
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "generatedFrom": "source-tree",
4
4
  "registrySha256": "81b53363a440e832672618965540b3e507ae0d93adcc67ec2b93daf7933b3ab4",
5
- "packageVersion": "1.3.1158",
5
+ "packageVersion": "1.3.1159",
6
6
  "guards": [
7
7
  {
8
8
  "ref": "docs/audits/phase-b/f10-triage.md",
@@ -1,5 +1,5 @@
1
1
  {
2
- "sha256": "9cbf312433ed10eafb3f33a245b9ba17546fdd534ce1c2caf3dcaf28157ee33c",
2
+ "sha256": "64b362d2e7aed4d92d9e9948a954ae1c099930efc5972c89842953e81cfd36ff",
3
3
  "registrySha256": "81b53363a440e832672618965540b3e507ae0d93adcc67ec2b93daf7933b3ab4",
4
- "packageVersion": "1.3.1158"
4
+ "packageVersion": "1.3.1159"
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "sha256": "81b53363a440e832672618965540b3e507ae0d93adcc67ec2b93daf7933b3ab4",
3
3
  "articleCount": 88,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1158"
5
+ "packageVersion": "1.3.1159"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.1158",
3
+ "version": "1.3.1159",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-08-15T04:14:15.394Z",
5
- "instarVersion": "1.3.1158",
4
+ "generatedAt": "2026-08-15T04:46:02.884Z",
5
+ "instarVersion": "1.3.1159",
6
6
  "entryCount": 202,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "generatedFrom": "source-tree",
4
4
  "registrySha256": "81b53363a440e832672618965540b3e507ae0d93adcc67ec2b93daf7933b3ab4",
5
- "packageVersion": "1.3.1158",
5
+ "packageVersion": "1.3.1159",
6
6
  "guards": [
7
7
  {
8
8
  "ref": "docs/audits/phase-b/f10-triage.md",
@@ -1,5 +1,5 @@
1
1
  {
2
- "sha256": "9cbf312433ed10eafb3f33a245b9ba17546fdd534ce1c2caf3dcaf28157ee33c",
2
+ "sha256": "64b362d2e7aed4d92d9e9948a954ae1c099930efc5972c89842953e81cfd36ff",
3
3
  "registrySha256": "81b53363a440e832672618965540b3e507ae0d93adcc67ec2b93daf7933b3ab4",
4
- "packageVersion": "1.3.1158"
4
+ "packageVersion": "1.3.1159"
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "sha256": "81b53363a440e832672618965540b3e507ae0d93adcc67ec2b93daf7933b3ab4",
3
3
  "articleCount": 88,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1158"
5
+ "packageVersion": "1.3.1159"
6
6
  }
@@ -0,0 +1,40 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ The two vitest globalSetup files that prepare the packed standards-registry asset
9
+ (`tests/setup/build-dist.globalSetup.ts` and
10
+ `tests/setup/ensure-registry-asset.globalSetup.ts`) decided whether to regenerate it
11
+ on PRESENCE alone — `if (outputs.every(exists)) return`. An asset generated from an
12
+ older revision of `docs/STANDARDS-REGISTRY.md` was therefore never regenerated.
13
+
14
+ Both now consult a shared `registryAssetIsStale()` helper that compares the oldest
15
+ output's mtime against the newest input's (`docs/STANDARDS-REGISTRY.md`,
16
+ `docs/standards-registry-floor.json`, `package.json`) — the same shape the sibling
17
+ `ensureDistBuilt()` twelve lines above already used.
18
+
19
+ ## What to Tell Your User
20
+
21
+ None — internal change (no user-facing surface).
22
+
23
+ ## Summary of New Capabilities
24
+
25
+ None — internal change (no user-facing surface).
26
+
27
+ ## Evidence
28
+
29
+ - Measured 2026-08-15: in a checkout whose asset was generated at 17:59 from a source
30
+ three hours newer, `standards-registry-asset`, `standards-enforcement-auditor` and
31
+ `standards-coverage-route` failed with 8 assertions. Regenerating the asset alone
32
+ made all 77 pass.
33
+ - `tests/unit/registry-asset-freshness.test.ts` — 9/9.
34
+ - Negative controls, both fired: reverting the comparison fails THE DEFECT case
35
+ (1 failed / 8 passed); reverting one call site to the presence check fails the
36
+ wiring case, naming the file. Both sources restored byte-exact.
37
+ - The wiring guard matches the MODULE SPECIFIER, not the imported identifier, so an
38
+ aliased import cannot defeat it — the alias blindness found in an invariant test
39
+ earlier this week.
40
+ - `tsc --noEmit` exit 0; full lint chain exit 0 across 45 lints.
@@ -0,0 +1,76 @@
1
+ # Side-effects review — registry asset freshness
2
+
3
+ ## The change
4
+
5
+ Two vitest globalSetup files decided whether to regenerate the packed
6
+ standards-registry asset by asking only whether its outputs EXIST. Both now share a
7
+ `registryAssetIsStale()` helper that compares the oldest output's mtime against the
8
+ newest input's. Test-only; no runtime surface.
9
+
10
+ ## Review answers
11
+
12
+ 1. **Over-block.** This is the dominant risk and it got the most care, because the
13
+ check runs at the START of every suite and an over-eager rule regenerates on every
14
+ run. Three conservative cases, each with its own test: equal mtimes are NOT stale;
15
+ no readable input is NOT stale; an empty output list is NOT stale. Measured cost of
16
+ a genuine regeneration is one generator invocation (~1s), and it self-limits — a
17
+ freshly written asset is newer than its inputs, so the next run skips.
18
+
19
+ 2. **Under-block.** mtime is a proxy for content, not content itself. A source edited
20
+ and reverted leaves a newer mtime and triggers one unnecessary regeneration
21
+ (harmless). A content-identical touch does the same. Conversely, a filesystem that
22
+ does not preserve mtimes, or a checkout that sets all mtimes equal, would report
23
+ fresh when stale. A content hash would be exact — the generator already writes a
24
+ `sha256` into its metadata — and that is the stronger version of this fix. NOT done
25
+ here: it means reading and hashing a 450KB document on every suite start, where the
26
+ mtime compare is four `stat` calls, and the sibling `ensureDistBuilt()` this mirrors
27
+ uses mtimes too. Stated rather than implied.
28
+
29
+ 3. **Level-of-abstraction fit.** Correct layer: the setup layer is where every test
30
+ file inherits the guarantee. The file's own history says this explicitly — a
31
+ per-file `beforeAll` bootstrap was found to be invisible to the next file that
32
+ needed it.
33
+
34
+ 4. **Signal vs authority.** Not a gate. It decides whether to run a generator; it
35
+ blocks nothing and rejects no input.
36
+
37
+ 5. **Interactions.** `ensureRegistryAsset()` must still run AFTER `ensureDistBuilt()`
38
+ (the generator imports from `dist/`). Unchanged — only the early-return predicate
39
+ moved. The exported `ensureRegistryAsset(root)` keeps its signature, so the
40
+ production-generator parity ratchet that imports it is unaffected.
41
+
42
+ 6. **External surfaces.** None. Test setup only; nothing ships to an agent or a user.
43
+
44
+ 7. **Multi-machine posture.** Machine-local BY DESIGN — a per-checkout build artifact.
45
+ There is nothing to replicate: each checkout generates its own copy, and the whole
46
+ defect was one checkout trusting its own stale copy.
47
+
48
+ 8. **Rollback cost.** Revert the commit. The helper is additive; the two call sites
49
+ return to a presence check.
50
+
51
+ ## Class closure — what this does NOT close
52
+
53
+ - **Only these two sites.** A sweep of `tests/setup/` and `scripts/` for
54
+ regenerate-on-presence guards found exactly these two making a regeneration decision
55
+ on existence alone; the other `existsSync` hits are ordinary existence guards, not
56
+ regeneration decisions. The wiring test pins both and fails if either drifts, but it
57
+ knows only about setups that generate THIS asset.
58
+ - **`src/data/builtin-manifest.json`** is named in the generator's own comment as
59
+ having a related defect (generated only into `src/data/` while its reader resolves
60
+ module-relative from `dist/data/`). Different feature, different defect, untouched.
61
+ - **mtime is not content** — see review answer 2.
62
+
63
+ ## Evidence
64
+
65
+ - `tests/unit/registry-asset-freshness.test.ts` — 9/9 green.
66
+ - Negative controls, BOTH fired and both restored byte-exact: reverting the comparison
67
+ fails THE DEFECT case (1 failed / 8 passed — the 8 passing are the controls, which is
68
+ what makes them controls); reverting one call site to the presence check fails the
69
+ wiring case and names the file.
70
+ - Observed live: running the new test in a fresh checkout regenerated the asset
71
+ ("88 articles → src/data + dist/data"). Under the presence check it would have
72
+ skipped, because the outputs existed.
73
+ - The originating measurement: three test files / eight assertions failing against a
74
+ three-hour-stale asset; regeneration alone made all 77 pass.
75
+ - `tsc --noEmit` exit 0 (run via the real binary — `npx tsc` here is intercepted by a
76
+ shim that exits 0 without typechecking). Full lint chain exit 0 across 45 lints.