instar 1.3.136 → 1.3.138

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.
Files changed (40) hide show
  1. package/dashboard/index.html +62 -0
  2. package/dashboard/preferences-learning.js +388 -0
  3. package/dist/commands/server.d.ts.map +1 -1
  4. package/dist/commands/server.js +15 -0
  5. package/dist/commands/server.js.map +1 -1
  6. package/dist/config/ConfigDefaults.d.ts.map +1 -1
  7. package/dist/config/ConfigDefaults.js +3 -0
  8. package/dist/config/ConfigDefaults.js.map +1 -1
  9. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  10. package/dist/core/PostUpdateMigrator.js +31 -10
  11. package/dist/core/PostUpdateMigrator.js.map +1 -1
  12. package/dist/core/types.d.ts +11 -0
  13. package/dist/core/types.d.ts.map +1 -1
  14. package/dist/core/types.js.map +1 -1
  15. package/dist/monitoring/CorrectionLedger.d.ts +6 -0
  16. package/dist/monitoring/CorrectionLedger.d.ts.map +1 -1
  17. package/dist/monitoring/CorrectionLedger.js +17 -0
  18. package/dist/monitoring/CorrectionLedger.js.map +1 -1
  19. package/dist/monitoring/CorrectionLoopDriver.d.ts +59 -9
  20. package/dist/monitoring/CorrectionLoopDriver.d.ts.map +1 -1
  21. package/dist/monitoring/CorrectionLoopDriver.js +87 -12
  22. package/dist/monitoring/CorrectionLoopDriver.js.map +1 -1
  23. package/dist/scaffold/templates.d.ts.map +1 -1
  24. package/dist/scaffold/templates.js +3 -2
  25. package/dist/scaffold/templates.js.map +1 -1
  26. package/dist/server/CapabilityIndex.js +4 -4
  27. package/dist/server/CapabilityIndex.js.map +1 -1
  28. package/dist/server/routes.d.ts.map +1 -1
  29. package/dist/server/routes.js +88 -6
  30. package/dist/server/routes.js.map +1 -1
  31. package/package.json +1 -1
  32. package/scripts/framework-issue-backfill/codex-session-findings.json +116 -0
  33. package/scripts/framework-issue-backfill/import-findings.mjs +75 -0
  34. package/src/data/builtin-manifest.json +62 -62
  35. package/src/scaffold/templates.ts +3 -2
  36. package/upgrades/1.3.135.md +80 -36
  37. package/upgrades/1.3.137.md +97 -0
  38. package/upgrades/1.3.138.md +58 -0
  39. package/upgrades/side-effects/correction-preference-learning-sentinel-slice2.md +86 -0
  40. package/upgrades/side-effects/framework-issue-observe-write-path.md +44 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.136",
3
+ "version": "1.3.138",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,116 @@
1
+ {
2
+ "_comment": "Engineering-discovered codex-cli framework issues found while onboarding Codey (codex) onto Instar, May 2026. These are the substantive compat issues found by code-auditing + fixing — the ones the live mentor-tick forensics never sees. Backfilled into the FrameworkIssueLedger via POST /framework-issues/observe so they feed the next-framework onboarding playbook (the framework-limitation + instar-integration-gap buckets generalize). dedupKey is stable so re-running is idempotent.",
3
+ "framework": "codex-cli",
4
+ "findings": [
5
+ {
6
+ "dedupKey": "codex-jsonlexists-claude-only",
7
+ "bucket": "instar-integration-gap",
8
+ "severity": "high",
9
+ "title": "Thread/TopicResumeMap jsonlExists was Claude-only → get() returned null for ALL codex sessions (no resume)",
10
+ "evidence": "PR #572; ThreadResumeMap/TopicResumeMap.jsonlExists assumed ~/.claude/projects",
11
+ "observedVersion": "1.3.121",
12
+ "fixedInVersion": "1.3.122",
13
+ "status": "fixed"
14
+ },
15
+ {
16
+ "dedupKey": "codex-watchdog-exec-json-blind",
17
+ "bucket": "instar-integration-gap",
18
+ "severity": "high",
19
+ "title": "SessionWatchdog was claude-PID/pane-only → an 8.5h-hung codex `exec` job went uncaught",
20
+ "evidence": "PR #574; silence-watchdog gained codex `exec --json` coverage",
21
+ "observedVersion": "1.3.121",
22
+ "fixedInVersion": "1.3.122",
23
+ "status": "fixed"
24
+ },
25
+ {
26
+ "dedupKey": "codex-relay-dup-reply-mcp-retry",
27
+ "bucket": "instar-integration-gap",
28
+ "severity": "medium",
29
+ "title": "Relay duplicate-reply on codex: MCP retries emit a fresh event id per retry → id-dedup misses it",
30
+ "evidence": "PR #573 content-hash dedup; symptom: 2 distinct-id messages 23s apart",
31
+ "observedVersion": "1.3.126",
32
+ "fixedInVersion": "1.3.127",
33
+ "status": "fixed"
34
+ },
35
+ {
36
+ "dedupKey": "codex-ratelimitsentinel-blind",
37
+ "bucket": "instar-integration-gap",
38
+ "severity": "high",
39
+ "title": "RateLimitSentinel was codex-blind in BOTH detection (claude pane strings) and recovery (claude-only readJsonlBaseline)",
40
+ "evidence": "PR #33 (codex parity v2); account-wide newest-rollout growth signal",
41
+ "observedVersion": "1.3.133",
42
+ "fixedInVersion": "1.3.134",
43
+ "status": "fixed"
44
+ },
45
+ {
46
+ "dedupKey": "codex-compactionsentinel-blind",
47
+ "bucket": "instar-integration-gap",
48
+ "severity": "high",
49
+ "title": "CompactionSentinel recovery-verification was codex-blind → re-injected recovery xN then false compaction:failed every codex compaction",
50
+ "evidence": "PR #593; findNewestRolloutSync codex branch in readJsonlBaseline",
51
+ "observedVersion": "1.3.135",
52
+ "fixedInVersion": "1.3.136",
53
+ "status": "fixed"
54
+ },
55
+ {
56
+ "dedupKey": "codex-no-autonomous-loop-driver",
57
+ "bucket": "framework-limitation",
58
+ "bucketPrimary": "framework-limitation",
59
+ "severity": "high",
60
+ "title": "Codex `exec` runs ONE turn then exits — no native Stop-hook-driven multi-turn loop, so codex can't sustain autonomous multi-turn work",
61
+ "evidence": "PR #28; autonomous-stop-hook.sh --codex rides the existing codex Stop group (dark)",
62
+ "observedVersion": "1.3.128",
63
+ "fixedInVersion": "1.3.129",
64
+ "status": "fixed"
65
+ },
66
+ {
67
+ "dedupKey": "codex-stophook-arm-trust-gap",
68
+ "bucket": "instar-integration-gap",
69
+ "severity": "high",
70
+ "title": "Codex hook trust-flow does not trust the newly-armed autonomous Stop slot (stop:0:N) → driver registered but unarmed; trusted_hash is opaque",
71
+ "evidence": "CMT-826; live-verify on Codey showed stop:0:4 not trusted; must-fix BEFORE enabling codexLoopDriver",
72
+ "observedVersion": "1.3.130",
73
+ "status": "open"
74
+ },
75
+ {
76
+ "dedupKey": "codex-status-usage-reader",
77
+ "bucket": "instar-integration-gap",
78
+ "severity": "medium",
79
+ "title": "No codex usage observability — needed a /codex/usage reader of the codex rollout rate-limit windows (claude had none equivalent)",
80
+ "evidence": "directive #4a; GET /codex/usage reads codex session rollout primary/secondary windows",
81
+ "observedVersion": "1.3.120",
82
+ "fixedInVersion": "1.3.123",
83
+ "status": "fixed"
84
+ },
85
+ {
86
+ "dedupKey": "codex-autoswap-spark-on-limit",
87
+ "bucket": "instar-integration-gap",
88
+ "severity": "medium",
89
+ "title": "No model-swap on codex rate-limit exhaustion — auto-swap to a fallback codex model when the secondary window is spent",
90
+ "evidence": "directive #4b; ships dark, awaiting confirmed GPT-5.3-Codex-Spark model id + live fall-back proof",
91
+ "observedVersion": "1.3.120",
92
+ "status": "spec'd"
93
+ },
94
+ {
95
+ "dedupKey": "codex-shipgate-llm-bound-cost",
96
+ "bucket": "framework-limitation",
97
+ "bucketPrimary": "framework-limitation",
98
+ "severity": "medium",
99
+ "title": "The instar ship-gate is disproportionately costly for codex agents — codex is LLM-bound for every step (no programmatic fast-path), so the gate stalls a loaded box",
100
+ "evidence": "task #25; codex exec spawns ephemeral per-turn processes that narrate intent with no persistent worker",
101
+ "observedVersion": "1.3.120",
102
+ "status": "open"
103
+ },
104
+ {
105
+ "dedupKey": "codex-no-subagent-lifecycle-events",
106
+ "bucket": "framework-limitation",
107
+ "bucketPrimary": "framework-limitation",
108
+ "severity": "low",
109
+ "title": "Codex emits no SubagentStart/Stop lifecycle events (capability FALSE) → the ReapGuard active-subagent guard is blind for codex",
110
+ "evidence": "capabilities.ts:12 SubagentLifecycleHooks:FALSE; verified SessionReaper transcript-growth + positive-idle layers (SessionReaper.ts:242,263) are codex-aware and still protect the session, so the guard is redundant",
111
+ "observedVersion": "1.3.136",
112
+ "status": "wont-fix",
113
+ "wontFixReason": "Codex declares no subagent lifecycle events by design; the SessionReaper's codex-aware transcript-growth + positive-idle layers already protect a codex session running a subagent, so the per-subagent guard is redundant, not a wrong-reaping risk."
114
+ }
115
+ ]
116
+ }
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env node
2
+ // Bulk-import engineering-discovered framework issues into the FrameworkIssueLedger
3
+ // via POST /framework-issues/observe. Idempotent: the ledger dedups on dedupKey, so
4
+ // re-running updates rather than duplicates. Generic — point it at any findings JSON.
5
+ //
6
+ // Usage:
7
+ // INSTAR_AUTH_TOKEN=... node import-findings.mjs <findings.json> [--port 4042] [--dry-run]
8
+ //
9
+ // findings.json shape: { "framework": "codex-cli", "findings": [ { dedupKey, bucket,
10
+ // severity, title, evidence?, observedVersion?, fixedInVersion?, status?,
11
+ // wontFixReason?, bucketPrimary?, signature?, relatedSpec? }, ... ] }
12
+
13
+ import fs from 'node:fs';
14
+
15
+ const args = process.argv.slice(2);
16
+ const file = args.find((a) => !a.startsWith('--'));
17
+ const dryRun = args.includes('--dry-run');
18
+ const portArg = args.indexOf('--port');
19
+ const port = portArg >= 0 ? args[portArg + 1] : process.env.INSTAR_PORT || '4042';
20
+ const token = process.env.INSTAR_AUTH_TOKEN || '';
21
+
22
+ if (!file) {
23
+ console.error('usage: node import-findings.mjs <findings.json> [--port N] [--dry-run]');
24
+ process.exit(2);
25
+ }
26
+ if (!token && !dryRun) {
27
+ console.error('INSTAR_AUTH_TOKEN env is required (or pass --dry-run)');
28
+ process.exit(2);
29
+ }
30
+
31
+ const doc = JSON.parse(fs.readFileSync(file, 'utf8'));
32
+ const framework = doc.framework;
33
+ const findings = Array.isArray(doc.findings) ? doc.findings : [];
34
+ if (!framework || findings.length === 0) {
35
+ console.error('findings JSON must have { framework, findings: [...] }');
36
+ process.exit(2);
37
+ }
38
+
39
+ const url = `http://localhost:${port}/framework-issues/observe`;
40
+ let created = 0;
41
+ let updated = 0;
42
+ let failed = 0;
43
+
44
+ for (const f of findings) {
45
+ const body = { framework, ...f };
46
+ delete body._comment;
47
+ if (dryRun) {
48
+ console.log(`[dry-run] ${f.bucket}/${f.severity} ${f.dedupKey} :: ${f.title}`);
49
+ continue;
50
+ }
51
+ try {
52
+ const res = await fetch(url, {
53
+ method: 'POST',
54
+ headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
55
+ body: JSON.stringify(body),
56
+ });
57
+ const json = await res.json();
58
+ if (!res.ok) {
59
+ failed++;
60
+ console.error(` FAIL ${f.dedupKey}: ${res.status} ${json.error || ''}`);
61
+ continue;
62
+ }
63
+ if (json.created) created++;
64
+ else updated++;
65
+ console.log(
66
+ ` ${json.created ? 'CREATE' : 'update'} ${f.dedupKey} → ${json.issueId} (${f.status || 'open'}, seen×${json.recurrenceCount})`,
67
+ );
68
+ } catch (err) {
69
+ failed++;
70
+ console.error(` ERROR ${f.dedupKey}: ${err.message}`);
71
+ }
72
+ }
73
+
74
+ console.log(`\nDone: ${created} created, ${updated} updated, ${failed} failed (of ${findings.length}).`);
75
+ process.exit(failed > 0 ? 1 : 0);