instar 1.3.151 → 1.3.153

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.
@@ -1 +1 @@
1
- {"version":3,"file":"MachineIdentity.d.ts","sourceRoot":"","sources":["../../src/core/MachineIdentity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAgC1I;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAMlF;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAMrF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAK1C;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,iBAAiB,EAAE,CAIxD;AAID;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK/C;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAE9F;AAID,qBAAa,sBAAsB;IACjC,OAAO,CAAC,SAAS,CAAS;gBAEd,SAAS,EAAE,MAAM;IAI7B,8FAA8F;IAC9F,IAAI,OAAO,IAAI,M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back to it so a legacy-keyed agent's lease coordinator still attaches.
25
25
  const LEGACY_SIGNING_KEY_FILE = 'signing-private.pem';
26
26
  const ENCRYPTION_KEY_FILE = 'encryption-key.pem';
27
+ // Pre-canonical-rename name; loadEncryptionKey falls back to it for the same reason
28
+ // loadSigningKey does (the mesh transport loads BOTH keys at lease/transport setup).
29
+ const LEGACY_ENCRYPTION_KEY_FILE = 'encryption-private.pem';
27
30
  const REGISTRY_FILE = 'registry.json';
28
31
  const KEY_FILE_MODE = 0o600;
29
32
  const REGISTRY_VERSION = 1;
@@ -223,7 +226,23 @@ export class MachineIdentityManager {
223
226
  * Load this machine's X25519 encryption private key (PEM format).
224
227
  */
225
228
  loadEncryptionKey() {
226
- return fs.readFileSync(this.encryptionKeyPath, 'utf-8');
229
+ try {
230
+ return fs.readFileSync(this.encryptionKeyPath, 'utf-8');
231
+ }
232
+ catch (err) {
233
+ // Same legacy fallback as loadSigningKey: identities created before the
234
+ // canonical rename wrote the encryption key as 'encryption-private.pem'.
235
+ // The mesh lease/transport setup loads this key too — found live
236
+ // 2026-05-31: with the signing key resolved, the mini's transport setup
237
+ // still threw ENOENT on the canonical 'encryption-key.pem', so the
238
+ // legacy-keyed machine's transport couldn't fully initialize.
239
+ if (err?.code === 'ENOENT') {
240
+ const legacy = path.join(this.machineDir, LEGACY_ENCRYPTION_KEY_FILE);
241
+ if (fs.existsSync(legacy))
242
+ return fs.readFileSync(legacy, 'utf-8');
243
+ }
244
+ throw err;
245
+ }
227
246
  }
228
247
  // ── Registry Management ──────────────────────────────────────────
229
248
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MachineIdentity.js","sourceRoot":"","sources":["../../src/core/MachineIdentity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE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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",
@@ -0,0 +1,311 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * assemble-next-md — fold per-PR release-note FRAGMENTS into a single NEXT.md.
4
+ *
5
+ * ── Why this exists ───────────────────────────────────────────────────
6
+ * The release pipeline consumes a single shared `upgrades/NEXT.md` per merge.
7
+ * With many agents merging concurrently, EVERY PR rewrote that one file, so
8
+ * every PR collided on it within minutes — the release notes became an
9
+ * un-landable hot file. The fix is per-PR FRAGMENTS: each PR ships its note as
10
+ * `upgrades/next/<slug>.md`, touching a distinct file, so two PRs never
11
+ * collide. This script concatenates the fragments into `upgrades/NEXT.md`
12
+ * BEFORE the existing publish pipeline runs, leaving everything downstream
13
+ * unchanged.
14
+ *
15
+ * ── What it does ──────────────────────────────────────────────────────
16
+ * 1. Reads every `upgrades/next/*.md` fragment (deterministic filename sort).
17
+ * 2. Folds in a legacy `upgrades/NEXT.md` too, if one exists (backward compat).
18
+ * 3. Merges by section: the result has ONE "## What Changed", ONE
19
+ * "## Summary of New Capabilities", ONE "## What to Tell Your User", ONE
20
+ * "## Evidence" — each section is the concatenation of that section across
21
+ * all inputs (in source order). Any non-canonical H2 section is preserved
22
+ * and appended after the canonical ones (also concatenated by title).
23
+ * 4. The bump directive is the HIGHEST tier among the inputs
24
+ * (major > minor > patch), emitted as `<!-- bump: X -->`. This is a
25
+ * documentation hint only — the REAL release tier is
26
+ * `.instar/release-tier.json`, which this script never touches.
27
+ * 5. Writes the merged result to `upgrades/NEXT.md`.
28
+ *
29
+ * ── No-op / failure semantics ─────────────────────────────────────────
30
+ * - NO fragments AND NO legacy NEXT.md → does nothing, exits 0 quietly. The
31
+ * existing publish "skip if no NEXT.md" logic then fires unchanged.
32
+ * - A real malformation (a fragment with content but no parseable H2 section
33
+ * at all) → exits non-zero with a clear message, so the workflow fails
34
+ * loudly rather than shipping a broken guide.
35
+ * - Idempotent: running twice produces the same NEXT.md. (When a generated
36
+ * NEXT.md is the ONLY input — no fragments — it is re-emitted byte-stable.)
37
+ *
38
+ * The core `assembleNextMd()` function is pure (string in / string out) and is
39
+ * exported for unit testing. The CLI wrapper at the bottom handles I/O.
40
+ *
41
+ * Usage:
42
+ * node scripts/assemble-next-md.mjs # assemble + write upgrades/NEXT.md
43
+ * node scripts/assemble-next-md.mjs --upgrades-dir <path> # override (tests)
44
+ */
45
+
46
+ import fs from 'node:fs';
47
+ import path from 'node:path';
48
+ import { fileURLToPath, pathToFileURL } from 'node:url';
49
+
50
+ // ── Canonical section order ───────────────────────────────────────────
51
+ // These four are the sections check-upgrade-guide.js / upgrade-guide-validator
52
+ // know about. We emit them in this order; any other H2 is appended after.
53
+ export const CANONICAL_SECTIONS = [
54
+ 'What Changed',
55
+ 'What to Tell Your User',
56
+ 'Summary of New Capabilities',
57
+ 'Evidence',
58
+ ];
59
+
60
+ const BUMP_RANK = { patch: 0, minor: 1, major: 2 };
61
+ const RANK_BUMP = ['patch', 'minor', 'major'];
62
+
63
+ const H1_HEADER = '# Upgrade Guide — vNEXT';
64
+
65
+ // Stable marker stamped into every machine-assembled NEXT.md. It lets us
66
+ // recognize (and skip re-folding) a NEXT.md that this script generated, which
67
+ // is what keeps the on-disk assemble idempotent: a second run shouldn't fold
68
+ // the previous run's output back in on top of the still-present fragments. A
69
+ // hand-authored legacy NEXT.md (no marker) is still folded for backward compat.
70
+ export const GENERATED_MARKER = '<!-- assembled-by: assemble-next-md -->';
71
+
72
+ /** True when content was produced by this assembler (carries the marker). */
73
+ export function isAssembledOutput(content) {
74
+ return String(content).includes(GENERATED_MARKER);
75
+ }
76
+
77
+ /**
78
+ * Parse the declared bump type from a fragment's `<!-- bump: TYPE -->` comment.
79
+ * Returns 'patch' | 'minor' | 'major' | null.
80
+ */
81
+ export function parseBumpType(content) {
82
+ const match = /<!--\s*bump:\s*(patch|minor|major)\s*-->/i.exec(content);
83
+ return match ? match[1].toLowerCase() : null;
84
+ }
85
+
86
+ /**
87
+ * Split a fragment body into H2 sections: [{ title, body }] in source order.
88
+ * `body` excludes the heading line itself and is right-trimmed.
89
+ * Content before the first H2 (H1 header, bump comment, stray prose) is dropped
90
+ * from the section map — the assembler synthesizes a fresh H1 + bump comment.
91
+ */
92
+ export function parseSections(content) {
93
+ const out = [];
94
+ const lines = String(content).replace(/\r\n/g, '\n').split('\n');
95
+ let current = null;
96
+ for (const line of lines) {
97
+ const m = /^##\s+(.+?)\s*$/.exec(line);
98
+ if (m) {
99
+ if (current) out.push(current);
100
+ current = { title: m[1].trim(), lines: [] };
101
+ } else if (current) {
102
+ current.lines.push(line);
103
+ }
104
+ }
105
+ if (current) out.push(current);
106
+ return out.map((s) => ({ title: s.title, body: s.lines.join('\n').replace(/\s+$/, '') }));
107
+ }
108
+
109
+ /**
110
+ * Is this fragment content "empty" for assembly purposes? True when stripping
111
+ * HTML comments and whitespace leaves nothing.
112
+ */
113
+ function isEffectivelyEmpty(content) {
114
+ return String(content).replace(/<!--[\s\S]*?-->/g, '').trim().length === 0;
115
+ }
116
+
117
+ /**
118
+ * Core assembler. Pure: takes named fragment inputs, returns the merged NEXT.md
119
+ * string (or throws on a real malformation).
120
+ *
121
+ * @param {Array<{ name: string, content: string }>} fragments
122
+ * Each input fragment, in the order they should be concatenated. `name` is
123
+ * used only for error messages.
124
+ * @returns {string} the assembled NEXT.md content (with trailing newline).
125
+ * @throws {Error} when a fragment has content but no parseable H2 section.
126
+ */
127
+ export function assembleNextMd(fragments) {
128
+ // Idempotency guard: a previously-assembled NEXT.md (carrying GENERATED_MARKER)
129
+ // is the FOLD of the current fragments — folding it again on top of the same
130
+ // fragments would duplicate every section. So when at least one non-generated
131
+ // input is present, drop the generated one(s). When a generated output is the
132
+ // SOLE input (no fragments), keep it: parse→emit is stable, so it re-emits
133
+ // identically.
134
+ const nonGenerated = fragments.filter((f) => !isAssembledOutput(f.content ?? ''));
135
+ const effective = nonGenerated.length > 0 ? nonGenerated : fragments;
136
+
137
+ // Map title -> array of section bodies (in source order).
138
+ const merged = new Map();
139
+ // Preserve first-seen order of non-canonical titles.
140
+ const extraOrder = [];
141
+ let maxBumpRank = 0;
142
+ let sawAnyBump = false;
143
+
144
+ for (const frag of effective) {
145
+ const content = frag.content ?? '';
146
+ const bump = parseBumpType(content);
147
+ if (bump) {
148
+ sawAnyBump = true;
149
+ maxBumpRank = Math.max(maxBumpRank, BUMP_RANK[bump]);
150
+ }
151
+
152
+ const sections = parseSections(content);
153
+ if (sections.length === 0) {
154
+ // No H2 sections. An effectively-empty fragment (only comments/whitespace)
155
+ // is malformed — a fragment file should always carry real notes.
156
+ // A fragment with real prose but no headings is also malformed: we can't
157
+ // place its content under a known section.
158
+ throw new Error(
159
+ `release-note fragment "${frag.name}" has no recognizable "## " section. ` +
160
+ `Every fragment must contain at least one section heading ` +
161
+ `(e.g. "## What Changed"). Fix or remove this fragment.`,
162
+ );
163
+ }
164
+
165
+ for (const sec of sections) {
166
+ const body = sec.body.trim();
167
+ // Skip a section whose body is only whitespace/comments — nothing to fold.
168
+ if (isEffectivelyEmpty(body)) continue;
169
+ if (!merged.has(sec.title)) {
170
+ merged.set(sec.title, []);
171
+ if (!CANONICAL_SECTIONS.includes(sec.title)) extraOrder.push(sec.title);
172
+ }
173
+ merged.get(sec.title).push(body);
174
+ }
175
+ }
176
+
177
+ // If after folding there is genuinely nothing to say, that's a malformation
178
+ // for a non-empty input set (every fragment was comments-only).
179
+ if (merged.size === 0) {
180
+ throw new Error(
181
+ 'release-note fragments produced no content — every section was empty. ' +
182
+ 'Fill in at least "## What Changed" in one fragment.',
183
+ );
184
+ }
185
+
186
+ // Emit canonical sections first (only when present), then extras in
187
+ // first-seen order.
188
+ const titleOrder = [
189
+ ...CANONICAL_SECTIONS.filter((t) => merged.has(t)),
190
+ ...extraOrder,
191
+ ];
192
+
193
+ const bump = sawAnyBump ? RANK_BUMP[maxBumpRank] : 'patch';
194
+
195
+ const parts = [];
196
+ parts.push(H1_HEADER);
197
+ parts.push('');
198
+ parts.push(GENERATED_MARKER);
199
+ parts.push(`<!-- bump: ${bump} -->`);
200
+ parts.push('');
201
+ for (const title of titleOrder) {
202
+ const bodies = merged.get(title);
203
+ parts.push(`## ${title}`);
204
+ parts.push('');
205
+ // Concatenate each fragment's body for this section, separated by a blank
206
+ // line. Bodies were already trimmed.
207
+ parts.push(bodies.join('\n\n'));
208
+ parts.push('');
209
+ }
210
+
211
+ // Single trailing newline, no duplicate blank lines at EOF.
212
+ return parts.join('\n').replace(/\n+$/, '\n');
213
+ }
214
+
215
+ // ── CLI entry point ────────────────────────────────────────────────────
216
+
217
+ /**
218
+ * Gather fragment inputs from disk in deterministic order: legacy NEXT.md first
219
+ * (so its content leads), then `next/*.md` sorted by filename.
220
+ */
221
+ export function gatherFragmentInputs(upgradesDir) {
222
+ const inputs = [];
223
+
224
+ const legacyPath = path.join(upgradesDir, 'NEXT.md');
225
+ const fragmentsDir = path.join(upgradesDir, 'next');
226
+
227
+ let legacyContent = null;
228
+ if (fs.existsSync(legacyPath)) {
229
+ legacyContent = fs.readFileSync(legacyPath, 'utf-8');
230
+ }
231
+
232
+ let fragmentFiles = [];
233
+ if (fs.existsSync(fragmentsDir)) {
234
+ fragmentFiles = fs
235
+ .readdirSync(fragmentsDir)
236
+ .filter((f) => f.endsWith('.md'))
237
+ .sort((a, b) => a.localeCompare(b, 'en'));
238
+ }
239
+
240
+ // Fold the legacy NEXT.md in first — only when it carries real content
241
+ // (skip a bare template/empty file so re-runs are idempotent and a fresh
242
+ // template doesn't masquerade as content).
243
+ if (legacyContent !== null && !isEffectivelyEmpty(legacyContent)) {
244
+ inputs.push({ name: 'NEXT.md', content: legacyContent });
245
+ }
246
+
247
+ for (const file of fragmentFiles) {
248
+ const content = fs.readFileSync(path.join(fragmentsDir, file), 'utf-8');
249
+ inputs.push({ name: `next/${file}`, content });
250
+ }
251
+
252
+ return { inputs, hadLegacy: legacyContent !== null, fragmentCount: fragmentFiles.length };
253
+ }
254
+
255
+ function main() {
256
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
257
+ const ROOT = path.resolve(__dirname, '..');
258
+
259
+ // Allow tests / callers to point at an alternate upgrades dir.
260
+ const argIdx = process.argv.indexOf('--upgrades-dir');
261
+ const upgradesDir =
262
+ argIdx !== -1 && process.argv[argIdx + 1]
263
+ ? path.resolve(process.argv[argIdx + 1])
264
+ : path.join(ROOT, 'upgrades');
265
+
266
+ const { inputs, hadLegacy, fragmentCount } = gatherFragmentInputs(upgradesDir);
267
+
268
+ if (inputs.length === 0) {
269
+ // No fragments and no (content-bearing) legacy NEXT.md. Do nothing — the
270
+ // existing publish skip logic handles the "nothing to publish" case.
271
+ console.log(
272
+ `[assemble-next-md] no fragments in ${path.join(upgradesDir, 'next')} ` +
273
+ `and no content-bearing NEXT.md — nothing to assemble.`,
274
+ );
275
+ process.exit(0);
276
+ }
277
+
278
+ let assembled;
279
+ try {
280
+ assembled = assembleNextMd(inputs);
281
+ } catch (err) {
282
+ console.error(`[assemble-next-md] ERROR: ${err instanceof Error ? err.message : String(err)}`);
283
+ process.exit(1);
284
+ }
285
+
286
+ const nextPath = path.join(upgradesDir, 'NEXT.md');
287
+ fs.mkdirSync(upgradesDir, { recursive: true });
288
+ fs.writeFileSync(nextPath, assembled);
289
+
290
+ console.log(
291
+ `[assemble-next-md] assembled ${fragmentCount} fragment(s)` +
292
+ `${hadLegacy ? ' + legacy NEXT.md' : ''} → ${path.relative(ROOT, nextPath)}`,
293
+ );
294
+ process.exit(0);
295
+ }
296
+
297
+ // Only run main() when invoked directly (not when imported by tests).
298
+ // Compare resolved file URLs rather than string-concatenating argv[1] — that
299
+ // naive form breaks on relative paths and paths containing spaces.
300
+ function invokedDirectly() {
301
+ if (!process.argv[1]) return false;
302
+ try {
303
+ return import.meta.url === pathToFileURL(fs.realpathSync(process.argv[1])).href;
304
+ } catch {
305
+ return import.meta.url === pathToFileURL(process.argv[1]).href;
306
+ }
307
+ }
308
+
309
+ if (invokedDirectly()) {
310
+ main();
311
+ }
@@ -14,11 +14,11 @@ 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
18
 
18
19
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
19
20
  const ROOT = path.resolve(__dirname, '..');
20
21
  const upgradesDir = path.join(ROOT, 'upgrades');
21
- const nextPath = path.join(ROOT, 'upgrades', 'NEXT.md');
22
22
  const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'));
23
23
  const version = pkg.version;
24
24
 
@@ -34,38 +34,66 @@ const REQUIRED_SECTIONS = [
34
34
  let errors = [];
35
35
  let warnings = [];
36
36
 
37
- // ── 1. NEXT.md validation ─────────────────────────────────────────────
37
+ // ── 1. Release-note validation (fragment-aware) ───────────────────────
38
+ //
39
+ // Release notes are authored as per-PR FRAGMENTS in upgrades/next/<slug>.md
40
+ // (so concurrent PRs never collide on a single shared NEXT.md). The pre-push
41
+ // gate validates the ASSEMBLED result — fragments folded together with any
42
+ // legacy upgrades/NEXT.md — so a PR that ships only a fragment passes the same
43
+ // section/content checks the publish gate enforces. We assemble in-memory and
44
+ // NEVER write NEXT.md to disk here: the PR keeps its fragment, not a generated
45
+ // guide. publish.yml runs the real assemble step before publishing.
38
46
 
39
47
  const versionedGuidePath = path.join(upgradesDir, `${version}.md`);
40
48
  const versionedGuideExists = fs.existsSync(versionedGuidePath);
41
- const nextExists = fs.existsSync(nextPath);
42
-
43
- // Pick the active guide for this push. NEXT.md wins if present (in-flight
44
- // release notes); fall back to the versioned guide once NEXT.md has been
45
- // renamed during a publish.
46
- const activeGuidePath = nextExists
47
- ? nextPath
48
- : (versionedGuideExists ? versionedGuidePath : null);
49
- const activeGuideLabel = nextExists
50
- ? 'NEXT.md'
51
- : (versionedGuideExists ? `${version}.md` : null);
52
49
 
53
- if (activeGuidePath && activeGuideLabel) {
54
- const content = fs.readFileSync(activeGuidePath, 'utf-8');
50
+ // Assemble fragments + legacy NEXT.md in-memory.
51
+ let assembledContent = null;
52
+ let assembleError = null;
53
+ {
54
+ const { inputs } = gatherFragmentInputs(upgradesDir);
55
+ if (inputs.length > 0) {
56
+ try {
57
+ assembledContent = assembleNextMd(inputs);
58
+ } catch (err) {
59
+ assembleError = err instanceof Error ? err.message : String(err);
60
+ }
61
+ }
62
+ }
55
63
 
64
+ // The active guide for validation: the assembled fragments/NEXT.md (in-flight
65
+ // release notes) win when present; otherwise fall back to the versioned guide
66
+ // (post-release-cut state, when NEXT.md has been renamed and no new fragment is
67
+ // staged yet).
68
+ const activeGuideLabel = assembledContent !== null
69
+ ? 'assembled release notes (upgrades/next/*.md + NEXT.md)'
70
+ : (versionedGuideExists ? `${version}.md` : null);
71
+
72
+ if (assembleError) {
73
+ // A malformed fragment must fail the push loudly — the same loud failure the
74
+ // publish workflow would hit.
75
+ errors.push(`Release-note fragments are malformed: ${assembleError}`);
76
+ } else if (assembledContent !== null) {
56
77
  // Run the shared validator (same checks as check-upgrade-guide.js at publish
57
78
  // time). This catches the publish-blocker bugs that previously slipped past
58
79
  // pre-push: inline code / fenced blocks / camelCase config keys in "What to
59
80
  // Tell Your User", and missing "## Evidence" when "What Changed" claims a fix.
60
81
  // Before this gate, those defects only surfaced as silently-dropped publish
61
82
  // runs on main — agents never received the merged code.
62
- const validatorIssues = validateGuideContent(content);
83
+ const validatorIssues = validateGuideContent(assembledContent);
63
84
  for (const issue of validatorIssues) {
64
85
  errors.push(`${activeGuideLabel}: ${issue}`);
65
86
  }
87
+ } else if (versionedGuideExists) {
88
+ const content = fs.readFileSync(versionedGuidePath, 'utf-8');
89
+ const validatorIssues = validateGuideContent(content);
90
+ for (const issue of validatorIssues) {
91
+ errors.push(`${version}.md: ${issue}`);
92
+ }
66
93
  } else {
67
94
  errors.push(
68
- `No upgrade guide found. Create upgrades/NEXT.md with sections: ${REQUIRED_SECTIONS.join(', ')}`
95
+ `No upgrade guide found. Create a release-note fragment ` +
96
+ `upgrades/next/<slug>.md (or legacy upgrades/NEXT.md) with sections: ${REQUIRED_SECTIONS.join(', ')}`
69
97
  );
70
98
  }
71
99
 
@@ -221,14 +249,16 @@ if (!process.env.CI) {
221
249
  /\bnew\b/i,
222
250
  ];
223
251
 
224
- // When NEXT.md exists, it represents the *next* shipment being prepared in
225
- // this push — prefer it over the (frozen) versioned guide, which describes
226
- // the already-released version and isn't what this PR is changing. This is
227
- // the post-release-cut + new-PR state: both files coexist, but only NEXT.md
228
- // is in flight. Falls back to the versioned guide when no NEXT.md is staged.
229
- const guidePath = nextExists ? nextPath : (versionedGuideExists ? versionedGuidePath : null);
230
- if (guidePath && fs.existsSync(guidePath)) {
231
- const guideContent = fs.readFileSync(guidePath, 'utf-8');
252
+ // The in-flight release notes (assembled fragments + legacy NEXT.md) represent
253
+ // the *next* shipment being prepared in this push — prefer them over the
254
+ // (frozen) versioned guide, which describes the already-released version and
255
+ // isn't what this PR is changing. Falls back to the versioned guide when no
256
+ // fragment / NEXT.md is staged (post-release-cut state).
257
+ const inFlight = assembledContent !== null;
258
+ const guideContent = inFlight
259
+ ? assembledContent
260
+ : (versionedGuideExists ? fs.readFileSync(versionedGuidePath, 'utf-8') : null);
261
+ if (guideContent !== null) {
232
262
  // Extract "## What Changed" section
233
263
  const whatChangedMatch = guideContent.match(/## What Changed\s*([\s\S]*?)(?=\n##\s|$)/);
234
264
  const whatChanged = whatChangedMatch ? whatChangedMatch[1] : '';
@@ -237,10 +267,10 @@ if (!process.env.CI) {
237
267
 
238
268
  if (qualifies) {
239
269
  const sideEffectsDir = path.join(ROOT, 'upgrades', 'side-effects');
240
- // If NEXT.md is the active guide, any fresh artifact (last 24h) counts —
241
- // the versioned-filename requirement only applies when a versioned guide
242
- // is being validated without an in-flight NEXT.md.
243
- const artifactName = (!nextExists && versionedGuideExists) ? `${version}.md` : null;
270
+ // When in-flight notes (fragments/NEXT.md) drive the push, any fresh
271
+ // artifact (last 24h) counts — the versioned-filename requirement only
272
+ // applies when a versioned guide is being validated without in-flight notes.
273
+ const artifactName = (!inFlight && versionedGuideExists) ? `${version}.md` : null;
244
274
  let artifactFound = false;
245
275
 
246
276
  if (fs.existsSync(sideEffectsDir)) {
@@ -248,9 +278,9 @@ if (!process.env.CI) {
248
278
  if (artifactName) {
249
279
  artifactFound = files.includes(artifactName);
250
280
  } else {
251
- // For NEXT.md, any fresh artifact from the last 24h counts.
252
- // The expectation is that during release cut, NEXT.md -> <version>.md
253
- // rename will pair with the artifact rename as well.
281
+ // For in-flight notes (fragments/NEXT.md), any fresh artifact from the
282
+ // last 24h counts. The expectation is that during release cut, the
283
+ // fragment/NEXT.md -> <version>.md rename pairs with an artifact rename.
254
284
  const recent = files.filter((f) => {
255
285
  const stat = fs.statSync(path.join(sideEffectsDir, f));
256
286
  return Date.now() - stat.mtimeMs < 24 * 60 * 60 * 1000;
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-05-31T08:16:51.978Z",
5
- "instarVersion": "1.3.151",
4
+ "generatedAt": "2026-05-31T09:19:20.889Z",
5
+ "instarVersion": "1.3.153",
6
6
  "entryCount": 193,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -0,0 +1,50 @@
1
+ ---
2
+ review-convergence: complete
3
+ approved: true
4
+ approved-by: echo (standing 12h deploy mandate, topic 13481; multi-machine live-transfer cascade)
5
+ ---
6
+
7
+ # Instar Upgrade Guide — vNEXT
8
+
9
+ <!-- bump: patch -->
10
+
11
+ ## What Changed — the encryption key now has the same legacy-name fallback the signing key got
12
+
13
+ A direct follow-up to the previous release. Each machine in a multi-machine setup
14
+ opens an encrypted channel to the others using two key files: a signing key and an
15
+ encryption key. The project renamed these files to canonical names at some point,
16
+ and a machine set up before that rename keeps its keys under the older names.
17
+
18
+ The previous release taught the signing-key loader to fall back to the older
19
+ filename. Deploying that revealed the identical gap one layer down: the
20
+ encryption-key loader was still looking only for the canonical name, so a
21
+ legacy-named machine got past the signing key and then threw an ENOENT on the
22
+ encryption key, leaving its mesh transport unable to fully initialize. This release
23
+ gives the encryption-key loader the same fallback.
24
+
25
+ ## Summary of New Capabilities
26
+
27
+ - `MachineIdentity.loadEncryptionKey()` falls back to the legacy
28
+ `encryption-private.pem` when the canonical `encryption-key.pem` is absent
29
+ (rethrows if neither exists), mirroring `loadSigningKey()`.
30
+ - A machine whose identity predates the canonical key rename now resolves BOTH
31
+ keys and completes its lease/transport setup without a hand-placed key file.
32
+
33
+ ## What to Tell Your User
34
+
35
+ If you run your agent across more than one machine, a machine that was set up a
36
+ while ago will now join the encrypted group channel on its own, without needing
37
+ anyone to copy a key file into place by hand. This closes the second half of a pair
38
+ of identical gaps that were quietly stopping an older machine from fully joining.
39
+ Nothing to configure — it applies on the next update.
40
+
41
+ ## Evidence
42
+
43
+ - Found live on the Mac mini: after the prior release resolved the signing key, the
44
+ mini still logged a startup error, no such file encryption-key.pem, at mesh
45
+ transport setup because it had only the legacy encryption-private.pem.
46
+ - Unit, `tests/unit/machine-identity.test.ts`: loadEncryptionKey falls back to the
47
+ legacy name and still throws when neither file exists.
48
+ - 68 machine-identity tests pass; tsc --noEmit clean.
49
+ - Spec, `docs/specs/encryption-key-fallback.md` plus the .eli16.md sibling.
50
+ - Side-effects, `upgrades/side-effects/encryption-key-fallback.md`.
@@ -0,0 +1,51 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: minor -->
5
+
6
+ ## What Changed
7
+
8
+ Release notes are now authored as per-PR **fragments** instead of a single shared
9
+ `upgrades/NEXT.md`. Each PR drops its release note at `upgrades/next/<slug>.md`,
10
+ touching a distinct file, so two concurrent PRs never collide on the release
11
+ notes — the bottleneck that made many-agent merges un-landable in real time.
12
+
13
+ A new pure script, `scripts/assemble-next-md.mjs`, folds every fragment (sorted
14
+ deterministically by filename) — plus any legacy `upgrades/NEXT.md`, for backward
15
+ compatibility — into a single `upgrades/NEXT.md`, merging by section: one What
16
+ Changed, one What to Tell Your User, one Summary of New Capabilities, one Evidence,
17
+ each being the concatenation of that section across all inputs. Non-canonical
18
+ sections are preserved and appended. The emitted bump directive is the highest tier
19
+ among the fragments (major beats minor beats patch); it is a documentation hint only
20
+ — the real release tier still comes from `.instar/release-tier.json`, which is
21
+ untouched.
22
+
23
+ The publish workflow gains ONE new step, "Assemble release-note fragments", placed
24
+ immediately before the existing "Check if NEXT.md has content to publish" step.
25
+ Everything downstream — the tier gate, version resolution, the rename, the upgrade
26
+ guide check, publish, and commit — is unchanged. With no fragments and no legacy
27
+ NEXT.md, the assemble step does nothing and the existing skip logic fires exactly as
28
+ before, so the no-fragments path reproduces current behavior byte-for-byte. After a
29
+ release is cut, consumed fragments are deleted (`rm -f upgrades/next/*.md`) and the
30
+ existing commit step stages the deletions. The pre-push gate is now fragment-aware:
31
+ it validates the assembled result in-memory (never writing NEXT.md to disk during
32
+ pre-push), so a PR that ships only a fragment passes the same section and content
33
+ checks the publish gate enforces, and a malformed fragment fails the push loudly.
34
+ `upgrades/NEXT.md` remains fully supported as a legacy, backward-compatible path.
35
+
36
+ ## What to Tell Your User
37
+
38
+ Behind the scenes, the way I prepare release notes got a lot more robust. Each
39
+ change now writes its own small note in its own file, instead of every change
40
+ fighting over one shared notes file. That means when several updates are being
41
+ prepared at the same time, they no longer block each other, so improvements reach
42
+ you faster and with less risk of a release getting stuck. Nothing changes about how
43
+ I talk to you — this is purely a smoother release pipeline on my side.
44
+
45
+ ## Summary of New Capabilities
46
+
47
+ | Capability | How to Use |
48
+ |-----------|-----------|
49
+ | Per-PR release-note fragments | Write `upgrades/next/<slug>.md` (one file per change) |
50
+ | Fragment assembler | `node scripts/assemble-next-md.mjs` (runs automatically in publish) |
51
+ | Legacy NEXT.md | Still supported — folded in for backward compatibility |
@@ -0,0 +1,85 @@
1
+ # Side-Effects Review — loadEncryptionKey legacy-name fallback
2
+
3
+ **Version / slug:** `encryption-key-fallback`
4
+ **Date:** `2026-05-31`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required`
7
+
8
+ ## Summary of the change
9
+
10
+ `MachineIdentity.loadEncryptionKey()` now mirrors `loadSigningKey()` (shipped in
11
+ #610): read the canonical `encryption-key.pem`; on ENOENT, fall back to the legacy
12
+ `encryption-private.pem` if present, else rethrow. Adds one module constant
13
+ `LEGACY_ENCRYPTION_KEY_FILE`.
14
+
15
+ ## Decision-point inventory
16
+
17
+ - **loadEncryptionKey catch branch** — canonical read throws ENOENT → legacy file
18
+ exists? read it : rethrow. Both branches covered by unit tests (falls back; still
19
+ throws when neither exists).
20
+
21
+ ## 1. Over-block
22
+
23
+ **What legitimate inputs does this change reject?** Nothing new. It only ADDS a
24
+ second lookup location before the same terminal rethrow. Callers that previously
25
+ succeeded (canonical present) are unaffected; callers that previously threw ENOENT
26
+ with a legacy-only key now succeed.
27
+
28
+ ## 2. Under-block
29
+
30
+ **What does this still miss?** Only the one known legacy name
31
+ (`encryption-private.pem`) is tried, matching the signing-key fallback's single
32
+ legacy name — not an open-ended search. A machine missing BOTH the canonical and
33
+ the legacy file still throws (correct — there is no key to load).
34
+
35
+ ## 3. Level-of-abstraction fit
36
+
37
+ **Right layer?** Yes. The fix lives in the single `loadEncryptionKey()` loader that
38
+ every encryption-key consumer already calls, directly beside the `loadSigningKey()`
39
+ fallback it mirrors. One constant beside `LEGACY_SIGNING_KEY_FILE`. No duplication.
40
+
41
+ ## 4. Signal vs authority compliance
42
+
43
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
44
+
45
+ No blocking authority added. A pure read-path widen with an unchanged terminal
46
+ rethrow; gates nothing.
47
+
48
+ ## 5. Interactions
49
+
50
+ `loadEncryptionKey` feeds the mesh transport's X25519 E2E encryption setup.
51
+ Widening it only makes a previously-throwing legacy-keyed machine succeed — no
52
+ consumer observes a different value, only present-vs-throw. Idempotent. Pairs with
53
+ #610's signing-key fallback so a legacy-keyed machine resolves BOTH keys and its
54
+ lease/transport setup completes.
55
+
56
+ ## 6. External surfaces
57
+
58
+ None. No HTTP routes, config, notifications, or Telegram. The visible effect is the
59
+ absence of the `Lease/transport setup: ENOENT … encryption-key.pem` boot warning on
60
+ a legacy-keyed machine.
61
+
62
+ ## 7. Rollback cost
63
+
64
+ Low. Revert the method to canonical-only and drop the constant; a legacy-keyed
65
+ machine then re-trips the ENOENT at transport setup. No schema, no migration, no
66
+ persisted state.
67
+
68
+ ## Conclusion
69
+
70
+ Minimal additive read-path fallback, both branches unit-tested, no new authority,
71
+ no external surface, cheap revert. Closes the encryption-key half of the legacy-key
72
+ defect pair (#610 closed the signing-key half).
73
+
74
+ ## Second-pass review (if required)
75
+
76
+ Not required — no new blocking authority, no destructive op, both branches tested,
77
+ reversible; direct mirror of the already-reviewed #610 fallback.
78
+
79
+ ## Evidence pointers
80
+
81
+ - `tests/unit/machine-identity.test.ts` — loadEncryptionKey legacy fallback + still-throws.
82
+ - 68 machine-identity tests green; `tsc --noEmit` clean.
83
+ - Found live on the mini: `Lease/transport setup: ENOENT … encryption-key.pem`
84
+ after #610 resolved the signing key.
85
+ - Spec: `docs/specs/encryption-key-fallback.md` (+ `.eli16.md`).
@@ -0,0 +1,151 @@
1
+ # Side-Effects Review — Per-PR release-note fragments
2
+
3
+ **Version / slug:** `nextmd-release-note-fragments`
4
+ **Date:** `2026-05-31`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `required` (release-pipeline blast radius — see §1, §7)
7
+
8
+ ## Summary of the change
9
+
10
+ The release pipeline consumed a single shared `upgrades/NEXT.md` per merge. With
11
+ many agents merging concurrently, every PR rewrote NEXT.md, so every PR collided on
12
+ it within minutes — the release notes became an un-landable hot file. This change
13
+ introduces per-PR release-note FRAGMENTS (`upgrades/next/<slug>.md`): two PRs touch
14
+ different fragment files and never collide.
15
+
16
+ The mechanism is an ASSEMBLE PRE-STEP. A new pure script
17
+ (`scripts/assemble-next-md.mjs`) folds every fragment (deterministic filename sort)
18
+ plus any legacy `upgrades/NEXT.md` into a single `upgrades/NEXT.md`, merging by
19
+ section. The publish workflow runs it immediately BEFORE the existing
20
+ "Check if NEXT.md has content to publish" step; everything downstream is unchanged.
21
+ The pre-push gate validates the assembled result in-memory (never writing NEXT.md).
22
+
23
+ ## Decision-point inventory
24
+
25
+ 1. **No-fragments / no-legacy-NEXT.md → no-op (exit 0 quietly).** The existing skip
26
+ logic then fires. This is the load-bearing backward-compat boundary.
27
+ 2. **Malformed fragment (content but no parseable `## ` section, or only
28
+ comments/whitespace) → loud non-zero exit.** Fails the workflow rather than
29
+ shipping a broken guide.
30
+ 3. **Idempotency guard:** an input carrying `GENERATED_MARKER` is dropped when any
31
+ non-generated input is present; folded straight through (stable re-emit) when it
32
+ is the sole input. Decides "is this a fresh fragment set or a re-run on prior
33
+ output?"
34
+ 4. **Bump tier = MAX(fragments).** A hint only; the real tier is
35
+ `.instar/release-tier.json` (untouched).
36
+ 5. **pre-push gate active-guide selection:** assembled in-flight notes win; else fall
37
+ back to the versioned guide; else "no guide" error.
38
+
39
+ ## 1. Over-block
40
+
41
+ **What legitimate inputs does this change reject?** A fragment with real prose but no
42
+ `## ` heading is rejected — intentional, because the assembler can't place headless
43
+ prose under a known section. An effectively-empty fragment (comments/whitespace only)
44
+ is rejected — intentional, an empty fragment file is a mistake. A hand-authored legacy
45
+ `upgrades/NEXT.md` is NOT rejected: it is folded in (backward compat). The
46
+ no-fragments-and-no-NEXT.md case is NOT an error — it is a clean exit-0 no-op, so the
47
+ existing "nothing to publish" skip is preserved exactly. **No legitimate current input
48
+ is newly rejected:** today's flow ships a NEXT.md, which still validates and publishes
49
+ unchanged.
50
+
51
+ ## 2. Under-block
52
+
53
+ **What does this still miss?** The assembler does not deep-validate each fragment's
54
+ section CONTENT (camelCase keys, inline code, missing Evidence) — that remains the job
55
+ of `validateGuideContent`, which runs against the ASSEMBLED result in both the pre-push
56
+ gate and (post-rename) `check-upgrade-guide.js`. So a defect in a fragment is caught at
57
+ the assembled layer, not per-fragment; this is acceptable because the assembled doc is
58
+ exactly what publishes. It does not detect two fragments making contradictory claims —
59
+ out of scope (humans review notes). It does not garbage-collect stale fragments that
60
+ were never released; the publish path deletes only the fragments it just consumed.
61
+
62
+ ## 3. Level-of-abstraction fit
63
+
64
+ **Right layer?** Yes. The assembler is a pure string→string function with a thin CLI
65
+ wrapper (same shape as `resolve-release-tier.mjs` / `resolve-publish-version.mjs`),
66
+ unit-tested in isolation. The workflow change is one additive step plus one `rm` in the
67
+ existing consumption path — it does not touch the tier gate, version resolution, rename,
68
+ guide check, publish, or commit logic. The pre-push gate reuses the SAME assemble
69
+ function (single source of truth), so pre-push and publish can never diverge on how
70
+ fragments fold.
71
+
72
+ ## 4. Signal vs authority compliance
73
+
74
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
75
+
76
+ No new blocking AUTHORITY over releases is added. The assembler is a transform, not a
77
+ gate: its only failure mode is a malformation (exit non-zero), which is the same loud
78
+ behavior the publish workflow already wants. The real publish AUTHORITY is unchanged —
79
+ `.instar/release-tier.json` (Layer 2) and `validateGuideContent` (the section/content
80
+ gate) still decide what ships. The emitted bump comment is explicitly a documentation
81
+ SIGNAL, not authority (the code comment and the artifact both say so).
82
+
83
+ ## 5. Interactions
84
+
85
+ - **UpgradeGuideProcessor**: scans `upgrades/` for files matching
86
+ `^(\d+\.\d+\.\d+)\.md$`. `readdirSync` returns the subdir name `next` (no `.md`
87
+ suffix) → not matched → ignored. Verified by reading `getAvailableGuides`. The
88
+ `upgrades/next/` directory is invisible to guide delivery.
89
+ - **check-upgrade-guide.js**: iterates `upgrades/*.md` files (skips `NEXT.md`); the
90
+ `next/` subdir is not a `.md` file → skipped. By publish time fragments are already
91
+ deleted and NEXT.md renamed, so it validates the assembled+renamed guide. Verified
92
+ end-to-end in a scratch dir (assemble → rename → check → exit 0).
93
+ - **pre-push-gate.js**: now imports the assembler; assembles in-memory; the side-effects
94
+ artifact check (§5 of the gate) reads the assembled "What Changed" instead of raw
95
+ NEXT.md. No NEXT.md is written during pre-push.
96
+ - **Idempotency / re-runs**: the `GENERATED_MARKER` guard prevents a re-run from
97
+ double-folding prior output back over still-present fragments.
98
+ - No interaction with SessionReaper, sentinels, recovery, or any runtime path — this is
99
+ build/CI tooling only.
100
+
101
+ ## 6. External surfaces
102
+
103
+ - New directory `upgrades/next/` and new file convention `upgrades/next/<slug>.md`.
104
+ - New script `scripts/assemble-next-md.mjs` (build-time only; never shipped to agent
105
+ runtime paths).
106
+ - One new publish workflow step + one `rm` in the existing rename step.
107
+ - New CLAUDE.md / build-skill guidance instructing fragment authoring; a
108
+ `PostUpdateMigrator` CLAUDE.md backfill for deployed agents.
109
+ - No HTTP routes, no config keys, no Telegram, no agent runtime behavior change.
110
+
111
+ ## 7. Rollback cost
112
+
113
+ **Low and clean.** Three independent revert points, each safe on its own:
114
+ - Remove the "Assemble release-note fragments" workflow step + the `rm` line → publish
115
+ reverts to consuming NEXT.md directly (NEXT.md authoring still works).
116
+ - Revert the pre-push gate to validating NEXT.md directly.
117
+ - Delete `scripts/assemble-next-md.mjs` + its test.
118
+ Because the no-fragments path is a byte-for-byte no-op, a half-rollback (e.g. removing
119
+ only the workflow step while authors still write fragments) degrades gracefully: the
120
+ release simply skips (no NEXT.md), which the release-readiness sentinel surfaces — it
121
+ never ships a wrong or partial guide. No state, no schema, no irreversible op, no data
122
+ migration. Fragments are plain markdown files.
123
+
124
+ ## Conclusion
125
+
126
+ Additive, backward-compatible, pure-function-at-the-core change to build/CI tooling.
127
+ The release-critical invariant — "the no-fragments path reproduces exact current
128
+ behavior" — is enforced by code (clean exit-0 no-op) and covered by tests (CLI exits 0
129
+ and writes nothing; pre-push accepts a fragment-only push and rejects a malformed one).
130
+ Blast radius is contained to the assemble pre-step; the tier gate, version resolution,
131
+ and content validation that actually authorize a release are untouched.
132
+
133
+ ## Second-pass review (if required)
134
+
135
+ Required (release-pipeline). Reviewer focus: confirm the publish.yml diff is additive
136
+ (the assemble step precedes the unchanged skip-check; the `rm` rides the existing
137
+ `if:` guard and the existing `git add upgrades/`), and that the no-fragments path still
138
+ skips cleanly. Pending.
139
+
140
+ ## Evidence pointers
141
+
142
+ - `tests/unit/assemble-next-md.test.ts` — 25 tests: section merge, deterministic order,
143
+ max bump tier, single fragment, legacy fold, no-op/quiet, malformed→loud, idempotent
144
+ (in-memory + on-disk CLI), WTTYU backtick-free.
145
+ - `tests/unit/pre-push-gate.test.ts` — fragment-aware integration: accepts fragment-only
146
+ push (writes no NEXT.md), rejects WTTYU inline code via assembled validation, rejects
147
+ malformed fragment loudly.
148
+ - Manual end-to-end (scratch dir): fragment → `assemble-next-md.mjs` →
149
+ `mv NEXT.md <version>.md` + `rm next/*.md` → `check-upgrade-guide.js` exit 0.
150
+ - `upgrades/next/release-note-fragments.md` — this PR's own release note (dogfoods the
151
+ mechanism; the PR does not touch `upgrades/NEXT.md`).