instar 1.3.282 → 1.3.284
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/dist/scheduler/MentorAutonomousGuardian.d.ts.map +1 -1
- package/dist/scheduler/MentorAutonomousGuardian.js +1 -0
- package/dist/scheduler/MentorAutonomousGuardian.js.map +1 -1
- package/package.json +1 -1
- package/scripts/check-repo-invariants.mjs +40 -0
- package/scripts/instar-dev-precommit.js +10 -0
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.284.md +34 -0
- package/upgrades/ci-fragment-invariant.eli16.md +3 -0
- package/upgrades/decision-audit-self-commit.eli16.md +3 -0
- package/upgrades/mentor-prompt-tonight-gates.eli16.md +3 -0
- package/upgrades/side-effects/ci-fragment-invariant.md +46 -0
- package/upgrades/side-effects/decision-audit-self-commit.md +40 -0
- package/upgrades/side-effects/mentor-prompt-tonight-gates.md +34 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorAutonomousGuardian.d.ts","sourceRoot":"","sources":["../../src/scheduler/MentorAutonomousGuardian.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,WAAW,sBAAsB;IACrC,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB;oFACgF;IAChF,QAAQ,EAAE,OAAO,CAAC;IAClB;8EAC0E;IAC1E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,0EAA0E;IAC1E,kBAAkB,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd;;qCAEiC;IACjC,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB;0EACsE;IACtE,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpF,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,wBAAwB,GAChC,UAAU,GACV,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,wBAAwB,CAAC;IACjC,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,wBAAwB,CAAC,CAyBnC;AAED,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,eAAe,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,kBAAkB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"MentorAutonomousGuardian.d.ts","sourceRoot":"","sources":["../../src/scheduler/MentorAutonomousGuardian.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,WAAW,sBAAsB;IACrC,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB;oFACgF;IAChF,QAAQ,EAAE,OAAO,CAAC;IAClB;8EAC0E;IAC1E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,0EAA0E;IAC1E,kBAAkB,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd;;qCAEiC;IACjC,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB;0EACsE;IACtE,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpF,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,wBAAwB,GAChC,UAAU,GACV,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,wBAAwB,CAAC;IACjC,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,wBAAwB,CAAC,CAyBnC;AAED,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,eAAe,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAqB/D"}
|
|
@@ -84,6 +84,7 @@ export function buildAutoloopGoal(p) {
|
|
|
84
84
|
``,
|
|
85
85
|
`Discipline (non-negotiable): verify before you claim — never write a result or a number before the producing tool has returned it. Never narrate a tool call you did not make. One cycle, then exit cleanly — do NOT spawn another copy of this loop or schedule a follow-up; the guardian starts the next cycle on its own heartbeat.`,
|
|
86
86
|
`Gate compliance (ratchet gates): an intentional best-effort/fail-open catch must either report through DegradationReporter or carry an inline @silent-fallback-ok justification — never bump a ratchet baseline to pass CI. When you author a task brief or spec for another agent, spell these gate notes out explicitly: a spec that says "best-effort, never throws" without them invites the exact ratchet failure it is trying to avoid.`,
|
|
87
|
+
`Before you build (parallel-claim check): run \`instar dev:claim-check <paths you intend to touch> [--keywords ...]\` FIRST — if an open/recently-merged PR or a spec already owns a layer of the problem, claim a DIFFERENT layer explicitly (division-of-labor; earned 2026-06-05 when two parallel sessions built the same incident fix twice). And every PR DESCRIPTION must include an \`## ELI16\` section (a required CI gate) — write it in from the start, not after the gate goes red.`,
|
|
87
88
|
].join('\n');
|
|
88
89
|
}
|
|
89
90
|
//# sourceMappingURL=MentorAutonomousGuardian.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorAutonomousGuardian.js","sourceRoot":"","sources":["../../src/scheduler/MentorAutonomousGuardian.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AA8CH;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,IAA4B;IAE5B,qEAAqE;IACrE,IAAI,CAAC,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAE7D,4EAA4E;IAC5E,uEAAuE;IACvE,IAAI,CAAC,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAE5D,+EAA+E;IAC/E,sEAAsE;IACtE,mEAAmE;IACnE,IAAI,IAAI,CAAC,gBAAgB;QAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;IAExE,6EAA6E;IAC7E,2DAA2D;IAC3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AAC,CAAC;QACjE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAChE,CAAC;AACH,CAAC;AAaD;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAqB;IACrD,MAAM,OAAO,GAAG,CAAC,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5F,MAAM,UAAU,GACd,CAAC,CAAC,aAAa,KAAK,SAAS;QAC3B,CAAC,CAAC,oGAAoG,CAAC,CAAC,aAAa,uCAAuC;QAC5J,CAAC,CAAC,6GAA6G,CAAC;IACpH,OAAO;QACL,iFAAiF,CAAC,CAAC,eAAe,KAAK,CAAC,CAAC,eAAe,4BAA4B;QACpJ,6KAA6K;QAC7K,EAAE;QACF,eAAe;QACf,0BAA0B,CAAC,CAAC,eAAe,+OAA+O;QAC1R,+GAA+G,OAAO,+CAA+C;QACrK,+PAA+P;QAC/P,6BAA6B,CAAC,CAAC,eAAe,4YAA4Y;QAC1b,MAAM,UAAU,EAAE;QAClB,EAAE;QACF,wUAAwU;QACxU,+aAA+a;QAC/a,ieAAie;KACle,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -12,6 +12,15 @@
|
|
|
12
12
|
* 2. No fixture stowaway files at the repo root. file-0.txt and
|
|
13
13
|
* seed are signature artifacts of the test-fixture pollution
|
|
14
14
|
* class; they should never exist on main.
|
|
15
|
+
* 3. Release-note fragments (upgrades/next/*.md + legacy NEXT.md)
|
|
16
|
+
* assemble and validate cleanly — using the SAME assembler +
|
|
17
|
+
* validator the pre-push gate and publish workflow use. The
|
|
18
|
+
* pre-push gate already catches this locally, but local hooks are
|
|
19
|
+
* bypassable (admin/web merges, pre-guard history): a malformed
|
|
20
|
+
* fragment that reaches main jams EVERY subsequent fleet release
|
|
21
|
+
* at publish-time (lived twice: the v1.3.180 jam and #781 on
|
|
22
|
+
* 2026-06-05). This server-side check runs on every PR and on
|
|
23
|
+
* main, so the jam is loud and attributable instead of silent.
|
|
15
24
|
*
|
|
16
25
|
* Exit 0 = invariants hold. Exit 1 = at least one violated; the
|
|
17
26
|
* specific failures are printed to stderr.
|
|
@@ -19,6 +28,8 @@
|
|
|
19
28
|
|
|
20
29
|
import fs from 'node:fs';
|
|
21
30
|
import path from 'node:path';
|
|
31
|
+
import { validateGuideContent } from './upgrade-guide-validator.mjs';
|
|
32
|
+
import { assembleNextMd, gatherFragmentInputs } from './assemble-next-md.mjs';
|
|
22
33
|
|
|
23
34
|
const ROOT = process.cwd();
|
|
24
35
|
const MIN_README_LINES = Number(process.env.INSTAR_README_MIN_LINES || 100);
|
|
@@ -55,6 +66,35 @@ for (const name of FIXTURE_STOWAWAYS) {
|
|
|
55
66
|
}
|
|
56
67
|
}
|
|
57
68
|
|
|
69
|
+
// ── Release-note fragments assemble + validate ────────────────────
|
|
70
|
+
// Mirrors scripts/pre-push-gate.js §1 exactly (same shared functions), so a
|
|
71
|
+
// fragment that would jam publish.yml can never sit quietly on main. No
|
|
72
|
+
// fragments at all is FINE here — "src changed without a fragment" is the
|
|
73
|
+
// pre-push gate's per-branch concern; this invariant only asserts that
|
|
74
|
+
// whatever fragments DO exist are publishable.
|
|
75
|
+
{
|
|
76
|
+
const upgradesDir = path.join(ROOT, 'upgrades');
|
|
77
|
+
if (fs.existsSync(upgradesDir)) {
|
|
78
|
+
try {
|
|
79
|
+
const { inputs } = gatherFragmentInputs(upgradesDir);
|
|
80
|
+
if (inputs.length > 0) {
|
|
81
|
+
const assembled = assembleNextMd(inputs);
|
|
82
|
+
for (const issue of validateGuideContent(assembled)) {
|
|
83
|
+
failures.push(
|
|
84
|
+
`Release-note fragments (upgrades/next/*.md + NEXT.md) fail validation: ${issue} ` +
|
|
85
|
+
`— this would jam the publish workflow for EVERY release until fixed.`,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
} catch (err) {
|
|
90
|
+
failures.push(
|
|
91
|
+
`Release-note fragments are malformed (assembly failed): ${err instanceof Error ? err.message : err} ` +
|
|
92
|
+
`— this would jam the publish workflow for EVERY release until fixed.`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
58
98
|
if (failures.length === 0) {
|
|
59
99
|
console.log('✅ Repository invariants hold.');
|
|
60
100
|
process.exit(0);
|
|
@@ -780,6 +780,15 @@ function blockCommit(files, reason) {
|
|
|
780
780
|
// Append exactly one JSON line to .instar/instar-dev-decisions.jsonl for every
|
|
781
781
|
// in-scope commit (regardless of tier branch). Best-effort: a logging failure
|
|
782
782
|
// must never crash the gate.
|
|
783
|
+
//
|
|
784
|
+
// The line is then STAGED so it rides the very commit it describes. Without
|
|
785
|
+
// this, a pre-commit-hook append always lands AFTER staging, leaving the line
|
|
786
|
+
// uncommitted in the building worktree's tracked decisions file — one-PR
|
|
787
|
+
// worktrees never commit it, worktree reclaim deletes it, and the audit trail
|
|
788
|
+
// silently leaks (the task-#62 "decision-audit didn't fire" mystery: it DID
|
|
789
|
+
// fire, the line just evaporated with the worktree). If the commit is later
|
|
790
|
+
// blocked by the gate, the staged line simply rides the retry commit — both
|
|
791
|
+
// lines describe real gate evaluations.
|
|
783
792
|
function writeDecisionAudit({ slug, suggestedTier, declaredTier, riskFloor, riskFloorReasons, belowFloor, files, loc }) {
|
|
784
793
|
try {
|
|
785
794
|
fs.mkdirSync(path.dirname(DECISIONS_LOG), { recursive: true });
|
|
@@ -799,6 +808,7 @@ function writeDecisionAudit({ slug, suggestedTier, declaredTier, riskFloor, risk
|
|
|
799
808
|
loc,
|
|
800
809
|
}) + '\n',
|
|
801
810
|
);
|
|
811
|
+
execSync(`git add ${JSON.stringify(path.relative(ROOT, DECISIONS_LOG))}`, { cwd: ROOT });
|
|
802
812
|
} catch {
|
|
803
813
|
// best-effort — never block on audit I/O
|
|
804
814
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-06-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-06-05T10:00:50.492Z",
|
|
5
|
+
"instarVersion": "1.3.284",
|
|
6
6
|
"entryCount": 198,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
`scripts/check-repo-invariants.mjs` gains invariant #3 (assemble + validate fragments in-memory; throws and validator issues are failures; zero fragments passes). Reuses `assembleNextMd` + `validateGuideContent` — no duplicated rules, no drift. Tests cover all four boundary states (valid, malformed-assembly, missing-section, empty). Task #42.
|
|
9
|
+
|
|
10
|
+
One change in `writeDecisionAudit` (auto-stage after append) + a regression test (`tests/unit/instar-dev-precommit-audit-staging.test.ts`) pinning that the line is written AND staged even when the gate blocks. Root cause of the task-#62 "decision-audit didn't fire" mystery: it fired; the line sat uncommitted in the building worktree and was deleted with it.
|
|
11
|
+
|
|
12
|
+
One discipline line appended in `buildAutoloopGoal` (`src/scheduler/MentorAutonomousGuardian.ts`), pinned by the existing deterministic prompt-assembly unit test (2 new assertions). Earned from the 2026-06-05 double parallel-collision and the live #813 eli16-gate hit.
|
|
13
|
+
|
|
14
|
+
## What to Tell Your User
|
|
15
|
+
|
|
16
|
+
Nothing user-visible. A release-pipeline failure mode is closed: a malformed release-note fragment can no longer sit silently on the main branch and jam every subsequent release — it now turns CI red immediately on the PR that carries it (or on main itself, loudly attributable).
|
|
17
|
+
|
|
18
|
+
Nothing user-visible. An internal audit-trail leak is closed: the per-commit build-decision record (tier declared vs suggested) used to evaporate with reclaimed worktrees; it now travels inside the commit it describes.
|
|
19
|
+
|
|
20
|
+
Nothing user-visible. The autonomous mentor-development loop's built-in working instructions now include two recently-earned ship rules, so future cycles don't rediscover them the hard way.
|
|
21
|
+
|
|
22
|
+
## Summary of New Capabilities
|
|
23
|
+
|
|
24
|
+
- The Repo Invariants required CI check now assembles and validates all release-note fragments (`upgrades/next/*.md` + legacy `NEXT.md`) using the same shared validators the publish workflow uses.
|
|
25
|
+
- Admin/web merges can no longer bypass fragment validation (the pre-push hook was local-only).
|
|
26
|
+
|
|
27
|
+
- `scripts/instar-dev-precommit.js` stages `.instar/instar-dev-decisions.jsonl` right after appending the audit line, so the line lands in the same commit it audits.
|
|
28
|
+
- A gate-blocked commit leaves the line staged; it rides the retry commit (both evaluations were real).
|
|
29
|
+
|
|
30
|
+
- The mentor autoloop goal prompt instructs each cycle to run `instar dev:claim-check` before starting a build (parallel-claim collision prevention) and to include the `## ELI16` section in every PR description from the start (the required CI gate).
|
|
31
|
+
|
|
32
|
+
## Evidence
|
|
33
|
+
|
|
34
|
+
Reproduced live twice on 2026-06-05 before the fix: two build worktrees (`keychain-per-agent`, then `dev-claim-check`) each held an orphaned, uncommitted `+{"ts":"2026-06-05T08:49:24Z","slug":"keychain-per-agent-master-key",...}` line in the tracked `.instar/instar-dev-decisions.jsonl` after their PR commit — `git status` showed ` M .instar/instar-dev-decisions.jsonl` post-commit, and removing the worktree would have deleted the only copy (one line was hand-rescued before reclaim). After the fix, observed on PR #814's own commit: `git status --short .instar/instar-dev-decisions.jsonl` is CLEAN immediately post-commit and the commit diff contains the gate's own audit line for that very commit — the dogfood proof quoted in the PR body.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Release-note fragments are now checked by CI, not just local hooks
|
|
2
|
+
|
|
3
|
+
Every release ships with release notes assembled from per-PR fragment files. If one fragment is malformed, the release pipeline jams — and not just for that one change: EVERY release for EVERY agent stops until someone finds and fixes the bad fragment. We had local protection (a check that runs on your machine before you push), but local checks can be bypassed — merging from the GitHub website or with admin rights skips them entirely, which is exactly how a bad fragment reached the main branch twice. Now the same fragment validation also runs on GitHub's servers as part of the required CI checks on every PR and on main itself: a bad fragment turns the checks red immediately, named and attributable, instead of silently waiting to jam the next release.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Decision-audit lines now ride their own commit
|
|
2
|
+
|
|
3
|
+
Every gated commit writes one audit line recording what tier was declared vs suggested — the accountability record for build decisions. But the line was written DURING the commit (by the pre-commit hook), which means it landed just after the files were staged — so it sat uncommitted in the building worktree. Most worktrees produce exactly one PR and then get deleted, taking the audit line with them. The record looked like it "never fired" when it actually fired and evaporated. Now the hook stages the audit file right after writing it, so the line travels inside the very commit it describes. If the gate blocks the commit, the staged line simply rides the retry — both lines describe real evaluations.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# The autonomous-mentor loop now teaches two new ship rules
|
|
2
|
+
|
|
3
|
+
The mentor system can run an autonomous develop-and-fix loop whose working instructions are encoded in code (so every cycle gets the same discipline, not whatever someone remembers to type). Two rules earned the hard way on 2026-06-05 are now part of those durable instructions: (1) before starting any build, run the new claim-check command so two parallel builders never construct the same fix twice — that exact collision happened twice in one night and wasted hours; (2) every PR description must include a plain-English ELI16 section from the start, because a required CI gate now rejects PRs without one — better to write it up front than to discover the red check after pushing.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Side-Effects Review — CI fragment invariant (server-side publish-jam guard)
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `ci-fragment-invariant`
|
|
4
|
+
**Date:** `2026-06-05`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `self-review under the Tier-1 lite lane (CI check addition reusing existing shared validators; no runtime surface)`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`scripts/check-repo-invariants.mjs` (the Repo Invariants required CI check) gains invariant #3: release-note fragments (`upgrades/next/*.md` + legacy `NEXT.md`) must assemble and validate cleanly, using the SAME `assembleNextMd` + `validateGuideContent` the pre-push gate and publish workflow use. Closes the bypass path of the publish-jam class (task #42): local pre-push hooks are skipped by admin/web merges, so a malformed fragment could reach main and jam every subsequent fleet release at publish-time (lived twice: v1.3.180, #781 on 2026-06-05).
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `check-repo-invariants.mjs` invariant #3 — add — assemble-in-memory + validate; assembly throw → failure; validator issues → failures; no upgrades dir / zero fragments → pass.
|
|
15
|
+
|
|
16
|
+
## 1. Over-block
|
|
17
|
+
|
|
18
|
+
Two considered cases:
|
|
19
|
+
- **Inherited red:** a malformed fragment already on main turns Repo Invariants red on EVERY open PR until fixed (same blast shape as tonight's ratchet debt). Intentional — Zero-Failure treats main breakage as everyone's loudest problem; the alternative (silent until publish) jams the whole fleet's release train invisibly.
|
|
20
|
+
- **Cross-fragment validator coupling:** validation runs on the ASSEMBLED guide, so one PR's red can be caused by another's fragment. This mirrors the pre-push gate's long-standing behavior exactly (same functions), so no NEW over-block class is introduced.
|
|
21
|
+
- "src changed without any fragment" is deliberately NOT asserted here (stays a per-branch pre-push concern); docs-only states and post-release-cut states (no fragments) pass.
|
|
22
|
+
|
|
23
|
+
## 2. Over-permit
|
|
24
|
+
|
|
25
|
+
None — purely additive check; nothing previously blocked becomes allowed.
|
|
26
|
+
|
|
27
|
+
## 3. Drift risk
|
|
28
|
+
|
|
29
|
+
Validation logic is imported from the shared modules (`assemble-next-md.mjs`, `upgrade-guide-validator.mjs`) — no duplicated rules, so the CI check can never drift from what publish actually enforces.
|
|
30
|
+
|
|
31
|
+
## 4. Failure modes
|
|
32
|
+
|
|
33
|
+
- Validator/assembler module missing or broken → the invariants script itself fails to load → Repo Invariants red (loud, correct).
|
|
34
|
+
- Empty `upgrades/next/` dir or absent `upgrades/` dir → pass (post-release-cut normal state; verified on the live tree and pinned by test).
|
|
35
|
+
|
|
36
|
+
## 5. Migration parity
|
|
37
|
+
|
|
38
|
+
None needed — repo-internal CI script; ships with the repo.
|
|
39
|
+
|
|
40
|
+
## 6. Token/cost impact
|
|
41
|
+
|
|
42
|
+
None. Pure-node in-memory assembly per CI run (milliseconds).
|
|
43
|
+
|
|
44
|
+
## 7. Rollback
|
|
45
|
+
|
|
46
|
+
Revert the commit; the invariant disappears, local pre-push remains the only fragment guard (the prior, bypassable state).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Side-Effects Review — decision-audit self-commit
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `decision-audit-self-commit`
|
|
4
|
+
**Date:** `2026-06-05`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `self-review under the Tier-1 lite lane (one-line hook change, audit-integrity fix)`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`writeDecisionAudit` in `scripts/instar-dev-precommit.js` now stages `.instar/instar-dev-decisions.jsonl` immediately after appending the audit line, so the line rides the very commit it describes. Closes the task-#62 audit leak: pre-commit-hook appends land after staging, leaving the line uncommitted in the building worktree; one-PR worktrees never commit it and worktree reclaim deletes it (confirmed live twice on 2026-06-05).
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `writeDecisionAudit` — modified — `git add <decisions file>` inside the existing best-effort try block, after a successful append.
|
|
15
|
+
|
|
16
|
+
## 1. Over-block
|
|
17
|
+
|
|
18
|
+
None. The `git add` lives inside the existing best-effort catch — any failure (git unavailable, index lock) is swallowed exactly like an audit-write failure today; the gate never blocks on audit I/O.
|
|
19
|
+
|
|
20
|
+
## 2. Over-permit
|
|
21
|
+
|
|
22
|
+
None. Staging one known repo-tracked file adds no permissive path. The file was already tracked and union-style appended; lines now simply become part of commits.
|
|
23
|
+
|
|
24
|
+
## 3. Behavioral notes
|
|
25
|
+
|
|
26
|
+
- **Blocked commit:** the audit line is written + staged, then the gate may block. The staged line rides the author's retry commit — both evaluations were real; the record gains fidelity, not noise.
|
|
27
|
+
- **Out-of-scope commits** (docs/tests-only) still exit before the audit by design — unchanged.
|
|
28
|
+
- **Merge-conflict surface:** parallel PRs already both append to this tracked file; lines now actually LAND, so conflicts become possible where silent loss was before. The file is append-only JSONL — union-merge resolution is trivial and already practiced.
|
|
29
|
+
|
|
30
|
+
## 4. Migration parity
|
|
31
|
+
|
|
32
|
+
None needed — `scripts/` ships with the repo; agents get it on update like any source change. No config/hook-template/skill changes.
|
|
33
|
+
|
|
34
|
+
## 5. Token/cost impact
|
|
35
|
+
|
|
36
|
+
None. One `git add` of one file per gated commit.
|
|
37
|
+
|
|
38
|
+
## 6. Rollback
|
|
39
|
+
|
|
40
|
+
Revert the commit; audit lines return to being orphaned working-tree modifications (the prior, leaky behavior).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Side-Effects Review — mentor autoloop prompt: claim-check + ELI16-body rules
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `mentor-prompt-tonight-gates`
|
|
4
|
+
**Date:** `2026-06-05`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `self-review under the Tier-1 lite lane (one prompt line in a pure, unit-tested string builder; no control-flow change)`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`buildAutoloopGoal` (the durable goal prompt for the mentor autonomous-fix loop, `MentorAutonomousGuardian.ts`) gains one discipline line encoding two 2026-06-05 lessons: run `instar dev:claim-check` before starting a build (the double parallel-collision night — #802 vs the keychain spec, #810 vs #808), and write the `## ELI16` section into the PR DESCRIPTION from the start (the new required CI gate, hit live on #813).
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `buildAutoloopGoal` — modified — one appended prompt line; pure function, no behavioral branch added.
|
|
15
|
+
|
|
16
|
+
## 1. Over-block / 2. Over-permit
|
|
17
|
+
|
|
18
|
+
None — prompt text only. The loop's gates (budget, single-instance, dark-by-default `mentor.autonomousFix.enabled`) are untouched. A host overriding via `mentor.autonomousFix.goalTemplate` is unaffected (the override path bypasses the built-in string entirely, unchanged).
|
|
19
|
+
|
|
20
|
+
## 3. Drift note
|
|
21
|
+
|
|
22
|
+
The prompt references the `dev:claim-check` CLI (shipped in #813) and the ELI16 PR-body gate (shipped 2026-06-05). If either is ever removed, this line goes stale — both are referenced by name so a grep finds them.
|
|
23
|
+
|
|
24
|
+
## 4. Migration parity
|
|
25
|
+
|
|
26
|
+
None — src-internal constant; ships with the package.
|
|
27
|
+
|
|
28
|
+
## 5. Token/cost impact
|
|
29
|
+
|
|
30
|
+
~90 extra prompt tokens per autoloop cycle spawn. Negligible.
|
|
31
|
+
|
|
32
|
+
## 6. Rollback
|
|
33
|
+
|
|
34
|
+
Revert the commit; the prompt loses the two reminders (structural gates still enforce both server-side — this line just saves the cycle from discovering them red).
|