instar 1.3.252 → 1.3.253
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
|
@@ -83,6 +83,22 @@ export function parseBumpType(content) {
|
|
|
83
83
|
return match ? match[1].toLowerCase() : null;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Does this fragment opt into the internal-only ship lane via an
|
|
88
|
+
* `<!-- internal-only -->` marker? Such a fragment has no user-facing surface,
|
|
89
|
+
* so it may omit the "What to Tell Your User" / "Summary of New Capabilities"
|
|
90
|
+
* sections — the assembler auto-fills them ONLY when EVERY contributing fragment
|
|
91
|
+
* is internal-only (see assembleNextMd). The pre-push gate independently verifies
|
|
92
|
+
* the marker against the staged diff (an internal-only fragment whose PR touches
|
|
93
|
+
* runtime `src/` is rejected), so the marker cannot be misused.
|
|
94
|
+
*/
|
|
95
|
+
export function hasInternalOnlyMarker(content) {
|
|
96
|
+
return /<!--\s*internal-only\s*-->/i.test(String(content));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Canonical text auto-filled into the user-facing sections of an all-internal release. */
|
|
100
|
+
export const INTERNAL_ONLY_FILL = 'None — internal change (no user-facing surface).';
|
|
101
|
+
|
|
86
102
|
/**
|
|
87
103
|
* Split a fragment body into H2 sections: [{ title, body }] in source order.
|
|
88
104
|
* `body` excludes the heading line itself and is right-trimmed.
|
|
@@ -140,9 +156,15 @@ export function assembleNextMd(fragments) {
|
|
|
140
156
|
const extraOrder = [];
|
|
141
157
|
let maxBumpRank = 0;
|
|
142
158
|
let sawAnyBump = false;
|
|
159
|
+
// The internal-only lane auto-fills the user-facing sections ONLY when every
|
|
160
|
+
// contributing fragment opts in. Starts true for a non-empty input set and is
|
|
161
|
+
// cleared by the first fragment WITHOUT an <!-- internal-only --> marker, so a
|
|
162
|
+
// single user-facing fragment keeps the full user-section requirement.
|
|
163
|
+
let allInternal = effective.length > 0;
|
|
143
164
|
|
|
144
165
|
for (const frag of effective) {
|
|
145
166
|
const content = frag.content ?? '';
|
|
167
|
+
if (!hasInternalOnlyMarker(content)) allInternal = false;
|
|
146
168
|
const bump = parseBumpType(content);
|
|
147
169
|
if (bump) {
|
|
148
170
|
sawAnyBump = true;
|
|
@@ -183,6 +205,20 @@ export function assembleNextMd(fragments) {
|
|
|
183
205
|
);
|
|
184
206
|
}
|
|
185
207
|
|
|
208
|
+
// Internal-only lane: when EVERY contributing fragment is marked
|
|
209
|
+
// <!-- internal-only -->, the change has no user-facing surface, so the two
|
|
210
|
+
// user-facing sections are auto-filled rather than hand-written. This keeps the
|
|
211
|
+
// shared validator (pre-push AND publish) satisfied without forcing
|
|
212
|
+
// "None — internal" boilerplate by hand. We auto-fill ONLY missing sections, so
|
|
213
|
+
// an internal fragment that DOES say something user-facing is preserved as-is;
|
|
214
|
+
// and because `allInternal` is false whenever any fragment lacks the marker, a
|
|
215
|
+
// genuinely user-facing change that omits these sections still fails validation.
|
|
216
|
+
if (allInternal) {
|
|
217
|
+
for (const title of ['What to Tell Your User', 'Summary of New Capabilities']) {
|
|
218
|
+
if (!merged.has(title)) merged.set(title, [INTERNAL_ONLY_FILL]);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
186
222
|
// Emit canonical sections first (only when present), then extras in
|
|
187
223
|
// first-seen order.
|
|
188
224
|
const titleOrder = [
|
package/scripts/pre-push-gate.js
CHANGED
|
@@ -14,7 +14,7 @@ import fs from 'node:fs';
|
|
|
14
14
|
import path from 'node:path';
|
|
15
15
|
import { fileURLToPath } from 'node:url';
|
|
16
16
|
import { validateGuideContent } from './upgrade-guide-validator.mjs';
|
|
17
|
-
import { assembleNextMd, gatherFragmentInputs } from './assemble-next-md.mjs';
|
|
17
|
+
import { assembleNextMd, gatherFragmentInputs, hasInternalOnlyMarker } from './assemble-next-md.mjs';
|
|
18
18
|
|
|
19
19
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
20
20
|
const ROOT = path.resolve(__dirname, '..');
|
|
@@ -186,6 +186,29 @@ try {
|
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
// ── 3c. Internal-only lane verification (objective gate) ──────────────
|
|
190
|
+
// A release fragment marked <!-- internal-only --> may omit the user-facing
|
|
191
|
+
// sections — the assembler auto-fills "None — internal" for an all-internal
|
|
192
|
+
// release. That is ONLY valid for changes with no shipped runtime surface.
|
|
193
|
+
// Verify against the diff: if any staged internal-only fragment accompanies a
|
|
194
|
+
// runtime src/ change, REJECT — a user-facing change must not skip
|
|
195
|
+
// "What to Tell Your User" / "Summary of New Capabilities". This is the
|
|
196
|
+
// objective gate that keeps the marker from being misused (the agent sets it,
|
|
197
|
+
// the diff verifies it). tests/docs/scripts-only changes are fine.
|
|
198
|
+
const internalOnlyFragments = fragmentChanges.filter(f => {
|
|
199
|
+
try { return hasInternalOnlyMarker(fs.readFileSync(path.join(ROOT, f), 'utf-8')); }
|
|
200
|
+
catch { return false; }
|
|
201
|
+
});
|
|
202
|
+
if (internalOnlyFragments.length > 0 && srcChanges.length > 0) {
|
|
203
|
+
errors.push(
|
|
204
|
+
`Internal-only release fragment(s) accompany ${srcChanges.length} runtime src/ change(s):\n` +
|
|
205
|
+
internalOnlyFragments.slice(0, 5).map(f => ` • ${f} (marked <!-- internal-only -->)`).join('\n') + '\n' +
|
|
206
|
+
` The internal-only lane (which auto-fills the user-facing release sections) is ONLY for changes ` +
|
|
207
|
+
`with no shipped runtime surface (tests / docs / scripts). Either remove the marker and write the ` +
|
|
208
|
+
`"What to Tell Your User" + "Summary of New Capabilities" sections, or split the src/ change into its own PR.`
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
189
212
|
// ── 4. Adapter contract test gate ─────────────────────────────────────
|
|
190
213
|
// If messaging adapter source files changed, require contract test evidence.
|
|
191
214
|
// This prevents shipping integration code verified only by mocked unit tests.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-06-04T23:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-06-04T23:12:21.750Z",
|
|
5
|
+
"instarVersion": "1.3.253",
|
|
6
6
|
"entryCount": 198,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Added an internal-only release-note lane to the instar-dev ship gate. A release-note
|
|
9
|
+
fragment that has no user-facing surface (test-only, docs-only, or build/CI scripts
|
|
10
|
+
with no `src/` runtime change) can now carry an `<!-- internal-only -->` marker and
|
|
11
|
+
OMIT the two user-facing sections ("What to Tell Your User", "Summary of New
|
|
12
|
+
Capabilities"). The shared assembler (`scripts/assemble-next-md.mjs`) auto-fills those
|
|
13
|
+
sections with "None — internal change (no user-facing surface)." — but ONLY when every
|
|
14
|
+
fragment in the release is internal-only, so a real user-facing change can never skip
|
|
15
|
+
telling the user.
|
|
16
|
+
|
|
17
|
+
The marker is verified objectively: `scripts/pre-push-gate.js` rejects an
|
|
18
|
+
`<!-- internal-only -->` fragment whose diff touches a runtime `src/` file. The
|
|
19
|
+
side-effects review and decision-trace are unchanged — only the user-facing release
|
|
20
|
+
boilerplate is lifted, and only for changes that provably have no user-facing surface.
|
|
21
|
+
|
|
22
|
+
This very fragment uses the new lane (this PR is scripts + tests only), dogfooding it.
|
|
23
|
+
|
|
24
|
+
## What to Tell Your User
|
|
25
|
+
|
|
26
|
+
None — internal change (no user-facing surface).
|
|
27
|
+
|
|
28
|
+
## Summary of New Capabilities
|
|
29
|
+
|
|
30
|
+
None — internal change (no user-facing surface).
|
|
31
|
+
|
|
32
|
+
## Evidence
|
|
33
|
+
|
|
34
|
+
- 45 tests green across `tests/unit/assemble-next-md.test.ts` (auto-fill on all-internal,
|
|
35
|
+
validator passes the auto-filled guide, real content preserved when any fragment is
|
|
36
|
+
user-facing, marker detection, self-... ) and `tests/unit/pre-push-gate.test.ts` (the
|
|
37
|
+
objective §3c marker-vs-diff gate). `node --check scripts/pre-push-gate.js` clean.
|
|
38
|
+
- The auto-fill lives in the assembler shared by BOTH the pre-push gate and the publish
|
|
39
|
+
gate (`check-upgrade-guide.js`), so the two can never disagree about a release note.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Side-Effects Review — internal-only release-note lane (mechanism)
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `internal-only-ship-lane`
|
|
4
|
+
**Date:** `2026-06-04`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `required (release-critical CI machinery)`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
Every release-note fragment currently must carry all four sections — including the
|
|
11
|
+
two user-facing ones (**What to Tell Your User**, **Summary of New Capabilities**).
|
|
12
|
+
For a change with NO user-facing surface (test-only, docs-only, build/CI scripts with
|
|
13
|
+
no `src/` runtime change) that copy is pure boilerplate ("None — internal"), which is
|
|
14
|
+
disproportionate ceremony (the codex-#25 friction; the #758 telegraph test-flake fix
|
|
15
|
+
had to hand-write two "None — internal" sections).
|
|
16
|
+
|
|
17
|
+
This adds an **internal-only lane** (operator-approved). A fragment opts in with an
|
|
18
|
+
`<!-- internal-only -->` marker and may OMIT the two user-facing sections. The
|
|
19
|
+
assembler auto-fills them with a canonical "None — internal change…" ONLY when
|
|
20
|
+
*every* contributing fragment is internal-only. The objective gate: the pre-push gate
|
|
21
|
+
verifies the marker against the diff — an internal-only fragment whose change touches
|
|
22
|
+
runtime `src/` is REJECTED. Side-effects review + decision-trace are unchanged — safety
|
|
23
|
+
and auditability never get a lighter lane.
|
|
24
|
+
|
|
25
|
+
This PR is the **mechanism** (assembler + pre-push verification + tests). The
|
|
26
|
+
deployed-skill documentation (`skills/instar-dev/SKILL.md` + a PostUpdateMigrator
|
|
27
|
+
migration to redeploy it) is a tracked follow-up.
|
|
28
|
+
|
|
29
|
+
## Decision-point inventory
|
|
30
|
+
|
|
31
|
+
1. **assembler auto-fill** (`assembleNextMd`): when `allInternal` (every fragment
|
|
32
|
+
marked) and a user-facing canonical section is missing from the merged map, inject
|
|
33
|
+
`INTERNAL_ONLY_FILL`. Never auto-fills when any fragment is non-internal.
|
|
34
|
+
2. **pre-push verification** (`pre-push-gate.js` §3c): an internal-only fragment +
|
|
35
|
+
any `src/*.ts` change in the diff → error.
|
|
36
|
+
|
|
37
|
+
## 1. Over-block (what still fails / is required)
|
|
38
|
+
|
|
39
|
+
- A genuinely user-facing change that OMITS the user sections still fails: it is not
|
|
40
|
+
`allInternal` (it has no marker, or the gate rejects the marker on a `src/` diff), so
|
|
41
|
+
the assembler does NOT auto-fill, and `validateGuideContent` reports the missing
|
|
42
|
+
sections. (test: "does NOT auto-fill when any fragment is user-facing".)
|
|
43
|
+
- `What Changed` + `Evidence` are still required; the Evidence-bar (fix-claim →
|
|
44
|
+
Evidence) is untouched.
|
|
45
|
+
- All existing fragment validations (inline-code / camelCase / fenced-block leakage,
|
|
46
|
+
malformed fragment, bump tier) are unchanged — 25 pre-existing assembler tests +
|
|
47
|
+
the full pre-push suite stay green.
|
|
48
|
+
|
|
49
|
+
## 2. Under-block (what it now allows)
|
|
50
|
+
|
|
51
|
+
- An all-internal release may omit the two user-facing sections; the assembler fills
|
|
52
|
+
them. This is gated objectively: the marker is verified against the diff at pre-push,
|
|
53
|
+
so it cannot be set on a runtime `src/` change to hide user-facing impact. The agent
|
|
54
|
+
sets the marker; the diff verifies it. (test: source-presence of the §3c gate +
|
|
55
|
+
`hasInternalOnlyMarker`.)
|
|
56
|
+
- Worst case of a wrong marker on a non-src change (e.g. a scripts change that DOES have
|
|
57
|
+
user impact): the publish notes say "None — internal" for that release. Bounded and
|
|
58
|
+
low-harm — scripts/docs/test changes have no agent-user runtime surface by
|
|
59
|
+
construction.
|
|
60
|
+
|
|
61
|
+
## 3. Blast radius
|
|
62
|
+
|
|
63
|
+
- `scripts/assemble-next-md.mjs` — pure function; new `hasInternalOnlyMarker` +
|
|
64
|
+
`INTERNAL_ONLY_FILL` exports + the auto-fill branch.
|
|
65
|
+
- `scripts/pre-push-gate.js` — one new §3c check (reuses existing `srcChanges` /
|
|
66
|
+
`fragmentChanges`).
|
|
67
|
+
- Tests only otherwise. NO `src/` change, no runtime/agent surface. The assembler is
|
|
68
|
+
shared by BOTH the pre-push gate and the publish gate (`check-upgrade-guide.js`), so
|
|
69
|
+
the auto-fill keeps both consistent — the change was deliberately placed in the shared
|
|
70
|
+
assembler so the two gates can never disagree.
|
|
71
|
+
|
|
72
|
+
## 4. Reversibility
|
|
73
|
+
|
|
74
|
+
Fully reversible: revert the two scripts + test edits. No state, no persisted format
|
|
75
|
+
(the `<!-- internal-only -->` marker is just a fragment comment — a fragment without it
|
|
76
|
+
behaves exactly as before). Verified: 45 tests green (assemble-next-md + pre-push-gate
|
|
77
|
+
suites), `node --check` clean on the gate.
|