instar 1.3.1009 → 1.3.1010
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/package.json
CHANGED
|
@@ -22,9 +22,13 @@ try {
|
|
|
22
22
|
const status = execSync('git status --porcelain -- src/', { cwd: ROOT, encoding: 'utf-8' }).trim();
|
|
23
23
|
if (status) {
|
|
24
24
|
console.warn('\n⚠️ WARNING: Working tree has uncommitted changes in src/.');
|
|
25
|
-
console.warn(' The generated manifest
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
console.warn(' The generated manifest reflects your WORKING TREE, not committed source.');
|
|
26
|
+
// The old wording named a test that no longer exists and said the manifest
|
|
27
|
+
// could be committed. It cannot: src/data/builtin-manifest.json is
|
|
28
|
+
// gitignored (.gitignore:87). The test compares the ON-DISK artifact
|
|
29
|
+
// against a fresh regeneration, so the remedy is always to rebuild.
|
|
30
|
+
console.warn(' The manifest is a gitignored build artifact — it is never committed.');
|
|
31
|
+
console.warn(' Stash WIP first if you want a clean-source manifest: git stash push -u\n');
|
|
28
32
|
}
|
|
29
33
|
} catch { /* not a git repo or git not available — skip check */ }
|
|
30
34
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-07-27T19:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-07-27T19:42:20.485Z",
|
|
5
|
+
"instarVersion": "1.3.1010",
|
|
6
6
|
"entryCount": 202,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
`tests/unit/builtin-manifest.test.ts` failed with `…is stale — run the generator and commit the
|
|
9
|
+
result`. `src/data/builtin-manifest.json` is gitignored (`.gitignore:87`) and absent from git, so
|
|
10
|
+
"commit the result" was not actionable, and the real remedy — rebuild — was never named.
|
|
11
|
+
`scripts/generate-builtin-manifest.cjs:26` carried the same wrong advice plus a reference to a test
|
|
12
|
+
name that had since changed.
|
|
13
|
+
|
|
14
|
+
Corrected both messages, renamed a misleading local (`committed` → `onDisk`), documented the one real
|
|
15
|
+
limitation (on a fresh checkout `beforeAll` creates the file, so the comparison is then trivially
|
|
16
|
+
satisfied — the check has teeth only when a prior artifact exists), and added one assertion pinning
|
|
17
|
+
the gitignored premise the corrected advice depends on.
|
|
18
|
+
|
|
19
|
+
Detection is unchanged. Only the remediation text and one new assertion.
|
|
20
|
+
|
|
21
|
+
## What to Tell Your User
|
|
22
|
+
|
|
23
|
+
None — internal change (no user-facing surface).
|
|
24
|
+
|
|
25
|
+
## Summary of New Capabilities
|
|
26
|
+
|
|
27
|
+
None — internal change (no user-facing surface).
|
|
28
|
+
|
|
29
|
+
## Evidence
|
|
30
|
+
|
|
31
|
+
- Stale on-disk artifact (`instarVersion` forced to `0.0.1-STALE`): 1 failed | 9 passed, message names
|
|
32
|
+
rebuild and explicitly rules out committing.
|
|
33
|
+
- Gitignored premise flipped: 1 failed | 9 passed, message says the advice needs revisiting.
|
|
34
|
+
- Restored: 10 passed; `tsc --noEmit` exit 0.
|
|
35
|
+
- The real staleness this found first time out: on-disk `1.3.987` vs regenerated `1.3.990`.
|
|
36
|
+
|
|
37
|
+
## Known limits
|
|
38
|
+
|
|
39
|
+
No committed-baseline check is added — there is nothing committed to compare against, and tracking a
|
|
40
|
+
generated artifact to satisfy a test would be the wrong trade. Fresh-checkout blindness remains by
|
|
41
|
+
design, since `beforeAll` exists to keep the test self-sufficient. The generator's warning is still
|
|
42
|
+
heuristic (fires on any uncommitted `src/` change). The value here is wording, and the new assertion
|
|
43
|
+
guards the premise, not the phrasing. <!-- tracked: CMT-1044 -->
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Side-Effects Review — a failing test whose remediation advice was impossible
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `builtin-manifest-honest-remediation`
|
|
4
|
+
**Date:** `2026-07-26`
|
|
5
|
+
**Author:** `Echo (instar-dev agent)`
|
|
6
|
+
**Second-pass reviewer:** `see Phase 5`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`tests/unit/builtin-manifest.test.ts` compares the on-disk `src/data/builtin-manifest.json` against a
|
|
11
|
+
fresh regeneration. On mismatch it failed with:
|
|
12
|
+
|
|
13
|
+
> `src/data/builtin-manifest.json is stale — run scripts/generate-builtin-manifest.cjs and commit the result`
|
|
14
|
+
|
|
15
|
+
That artifact is **gitignored** (`.gitignore:87`) and **absent from git entirely**. "Commit the result"
|
|
16
|
+
is not actionable, and the correct action — *rebuild* — was never stated. `scripts/generate-builtin-
|
|
17
|
+
manifest.cjs:26` carried the same wrong advice plus a reference to a test name that had since changed.
|
|
18
|
+
|
|
19
|
+
Changes: corrected the failure message to name the real remedy (rebuild, never commit) and the reason;
|
|
20
|
+
corrected the generator's warning; renamed a misleading local (`committed` → `onDisk`); documented the
|
|
21
|
+
one genuine limitation; added one assertion pinning the gitignored premise the new advice rests on.
|
|
22
|
+
|
|
23
|
+
## Refusal evidence (constraint 2)
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
REFUSAL 1 — stale on-disk artifact (the real detection this test provides)
|
|
27
|
+
Set instarVersion to 0.0.1-STALE in the on-disk manifest:
|
|
28
|
+
× the on-disk build artifact is not older than current source
|
|
29
|
+
→ "…on disk is STALE relative to current source — REBUILD it … Do NOT try to commit it:
|
|
30
|
+
it is a generated, gitignored artifact (.gitignore:87)…"
|
|
31
|
+
Tests 1 failed | 9 passed (10)
|
|
32
|
+
|
|
33
|
+
REFUSAL 2 — pretend the artifact became git-tracked
|
|
34
|
+
× REGRESSION: the manifest is a gitignored artifact, never a committed baseline
|
|
35
|
+
→ "…is now TRACKED by git. The staleness check above says 'rebuild, do NOT commit', which was
|
|
36
|
+
correct only while this artifact was gitignored…"
|
|
37
|
+
Tests 1 failed | 9 passed (10)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Restored: **10 passed (10)**, `tsc --noEmit` exit 0.
|
|
41
|
+
|
|
42
|
+
## I was wrong about this twice, and the test corrected me
|
|
43
|
+
|
|
44
|
+
Recorded because the correction is the substance.
|
|
45
|
+
|
|
46
|
+
**My first analysis was that the check is tautological** — that `beforeAll` generates the file, the
|
|
47
|
+
test regenerates it, and the assertion is therefore `generate(src) === generate(src)`, incapable of
|
|
48
|
+
failing. I acted on that: I renamed the test to "generates deterministically" and rewrote its message
|
|
49
|
+
around non-determinism.
|
|
50
|
+
|
|
51
|
+
**Running it falsified that immediately.** It went red — not on determinism, but because my own on-disk
|
|
52
|
+
artifact was genuinely stale: `instarVersion 1.3.987` on disk against `1.3.990` regenerated, with
|
|
53
|
+
differing `contentHash` values. The check was doing precisely the job I had just argued it could not do.
|
|
54
|
+
`beforeAll` generates only **when the file is missing**; with a stale artifact present, the comparison
|
|
55
|
+
is real.
|
|
56
|
+
|
|
57
|
+
I reverted the rename and corrected only what was genuinely broken. **The rewrite would have deleted a
|
|
58
|
+
working safeguard and replaced it with a weaker one on the strength of an untested argument** — the
|
|
59
|
+
same over-claiming shape as the two corrections on the increment before this.
|
|
60
|
+
|
|
61
|
+
The grain of truth is retained as documentation, not as an action: on a **fresh checkout** the file is
|
|
62
|
+
created by `beforeAll`, so the comparison is then trivially satisfied. The check has teeth only when a
|
|
63
|
+
prior artifact exists. Green means "no stale local build found", which on clean CI usually means there
|
|
64
|
+
was none to find. That is now stated in the test rather than assumed either way.
|
|
65
|
+
|
|
66
|
+
## Decision-point inventory
|
|
67
|
+
|
|
68
|
+
| point | classification | note |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| on-disk vs regenerated diff | `invariant` | Unchanged behaviour; byte comparison with `generatedAt` normalised. |
|
|
71
|
+
| artifact must be untracked | `invariant` | `git ls-files --error-unmatch`, try/catch → boolean. No model. |
|
|
72
|
+
|
|
73
|
+
No judgment points, no LLM, nothing gated.
|
|
74
|
+
|
|
75
|
+
## 1. Over-block
|
|
76
|
+
|
|
77
|
+
Nothing new is blocked; this is a test-only + warning-text change. The added assertion can only fail
|
|
78
|
+
if the artifact becomes git-tracked, which is a deliberate repo decision — and if that happens, failing
|
|
79
|
+
is correct, because the corrected advice ("never commit") would then be wrong. The message says exactly
|
|
80
|
+
that rather than merely going red.
|
|
81
|
+
|
|
82
|
+
Over-block risk I explicitly did NOT take: my first version would have removed the staleness detection
|
|
83
|
+
entirely. Rejected once the test falsified the premise.
|
|
84
|
+
|
|
85
|
+
## 2. Under-block
|
|
86
|
+
|
|
87
|
+
**No committed-baseline check is added.** There is nothing committed to compare against, and tracking a
|
|
88
|
+
generated artifact to satisfy a test would be the wrong trade. Stated in the test so it is not silently
|
|
89
|
+
re-litigated.
|
|
90
|
+
|
|
91
|
+
**Fresh-checkout blindness remains.** `beforeAll` generating the file makes the comparison vacuous in
|
|
92
|
+
that case. Fixing it would mean failing when the artifact is absent, which would break the
|
|
93
|
+
self-sufficiency the `beforeAll` exists to provide. Documented, not changed. <!-- tracked: CMT-1044 -->
|
|
94
|
+
|
|
95
|
+
**The generator's own warning is heuristic** — it fires on any uncommitted `src/` change, which during
|
|
96
|
+
active development is nearly always. Unchanged in behaviour; only its text is corrected.
|
|
97
|
+
|
|
98
|
+
## 3. Level-of-abstraction fit
|
|
99
|
+
|
|
100
|
+
The correction lives in the two places that speak to a human — the assertion message and the generator
|
|
101
|
+
warning. No production code path is touched. The duplicated advice in the generator is what made this
|
|
102
|
+
worth fixing in both places at once: correcting only the test would have left the same false instruction
|
|
103
|
+
reachable from the other direction.
|
|
104
|
+
|
|
105
|
+
## 4. Signal vs authority compliance
|
|
106
|
+
|
|
107
|
+
Pure test/diagnostic text. `docs/signal-vs-authority.md` is satisfied trivially — nothing gates, blocks,
|
|
108
|
+
or decides.
|
|
109
|
+
|
|
110
|
+
## 4b. Judgment-point check (Judgment Within Floors standard)
|
|
111
|
+
|
|
112
|
+
None introduced.
|
|
113
|
+
|
|
114
|
+
## 5. Interactions
|
|
115
|
+
|
|
116
|
+
- **`package-completeness.test.ts`** — runs a full build that regenerates the same artifact. The
|
|
117
|
+
temp-path generation (from an earlier fix, retained) keeps this check read-only and race-free.
|
|
118
|
+
- **`prepublishOnly`** — regenerates the manifest before publish; unaffected.
|
|
119
|
+
- **`.gitignore:87`** — the premise the new assertion pins. If it changes, the assertion fails loudly.
|
|
120
|
+
|
|
121
|
+
## 6. External surfaces
|
|
122
|
+
|
|
123
|
+
None. No route, no config, no persisted state, no user-visible behaviour. Test assertion text and one
|
|
124
|
+
CLI warning.
|
|
125
|
+
|
|
126
|
+
## 6b. Operator-surface quality
|
|
127
|
+
|
|
128
|
+
The failure now names the action (`npm run build`, or the generator directly), names why committing is
|
|
129
|
+
wrong, and adds the one honest ambiguity: if it is red in CI rather than locally, suspect generator
|
|
130
|
+
non-determinism instead. That last clause is the residue of my wrong first analysis, kept because it is
|
|
131
|
+
a real alternative explanation.
|
|
132
|
+
|
|
133
|
+
## 7. Multi-machine posture (Cross-Machine Coherence)
|
|
134
|
+
|
|
135
|
+
Machine-local by nature — the artifact is a per-checkout build output. No replication, no lease, no
|
|
136
|
+
generated URL. A stale artifact on one machine says nothing about another, which is exactly why the
|
|
137
|
+
remedy is "rebuild here".
|
|
138
|
+
|
|
139
|
+
## 8. Rollback cost
|
|
140
|
+
|
|
141
|
+
Trivial. One test file, one warning block in a script, two docs. No persisted state, no migration.
|
|
142
|
+
|
|
143
|
+
## Phase 5 — Second-pass review
|
|
144
|
+
|
|
145
|
+
Not a gate, sentinel, guard or watchdog; no block/allow authority; no session lifecycle or trust
|
|
146
|
+
surface. High-risk trigger list not engaged. Author lenses:
|
|
147
|
+
|
|
148
|
+
**Adversarial — "how would I make this useless?"** Two ways, both now asserted: let a stale artifact
|
|
149
|
+
pass (refusal 1), or let the gitignored premise silently flip (refusal 2).
|
|
150
|
+
|
|
151
|
+
**"Would it have caught the incident?"** The incident is mine: I hit the real failure, misread it as
|
|
152
|
+
tautology, and nearly deleted the check. The corrected message states the actual remedy in the first
|
|
153
|
+
clause, which is what I needed and did not have.
|
|
154
|
+
|
|
155
|
+
**"Symptom or cause?"** Cause, for the misleading-advice defect — the wrong instruction existed in two
|
|
156
|
+
places and both are corrected. Symptom-level for fresh-checkout blindness, which is named and left.
|
|
157
|
+
|
|
158
|
+
**Weakest point:** the value here is entirely in wording, and wording is the easiest thing to regress.
|
|
159
|
+
The gitignored assertion guards the premise but not the phrasing; nothing stops someone reintroducing
|
|
160
|
+
"commit the result" tomorrow.
|