@yemi33/minions 0.1.2163 → 0.1.2165

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.
@@ -0,0 +1,69 @@
1
+ # Deprecation tracker — schema and audit process
2
+
3
+ Source of truth: [`docs/deprecated.json`](./deprecated.json) — array of deprecation entries the `cleanup-deprecated` skill walks weekly.
4
+
5
+ Each entry documents one deprecated symbol / config field / endpoint, why it
6
+ exists, when (and under what signal) it is safe to remove, and which tests
7
+ pin its contract until the removal lands.
8
+
9
+ ## Common fields
10
+
11
+ The schema is loose — entries grow fields as their gating story matures. The
12
+ following are all optional unless called out as required.
13
+
14
+ - `id` — **required**, kebab-case unique identifier (e.g. `completion-fallback-parsers`).
15
+ - `description` / `reason` — free-form prose explaining what is deprecated and why.
16
+ - `file` / `location` / `code` — pointer(s) to the deprecated symbol(s). `code` is
17
+ the structured form: an array of `{ file, lines, note }` objects.
18
+ - `lines` — comma-separated string of line numbers (drift-prone; cross-check before
19
+ acting).
20
+ - `deprecated` / `targetRemovalDate` — calendar dates (YYYY-MM-DD) marking when
21
+ the entry was registered and when it may be removed. `targetRemovalDate: null`
22
+ signals a non-calendar gate (telemetry / signal-based).
23
+ - `removalGate` — prose describing the signal that must clear before removal.
24
+ - `notes` — free-form post-removal scope or rollout caveats.
25
+
26
+ ## Counter-gated entries (telemetry sentinels)
27
+
28
+ When the removal gate is "this counter must read 0 across a sweep window," the
29
+ entry uses these fields:
30
+
31
+ - `telemetryGate` — string referencing the metrics counter that must read zero.
32
+ - `sweepWindowDays` — positive integer (window length in days).
33
+ - `sweepStartDate` — `YYYY-MM-DD` window start.
34
+ - `enforcingTest` / `enforcingSweepWindowTest` — paths to the unit tests that
35
+ pin the gate contract.
36
+
37
+ ## Static call-site audit fields (P-c5d9e7b4)
38
+
39
+ Counter-gated entries also opt in to the static call-site audit
40
+ (`test/unit/deprecated-call-site-audit.test.js`). The audit enumerates live
41
+ call sites of the entry's symbols across `engine/`, `dashboard/`, and the
42
+ root-level `.js` files, then asserts every discovered call site is declared
43
+ in either `removalSites` or `allowedCallers`.
44
+
45
+ - `symbols` — **required for the audit to run**. Array of bare identifier
46
+ strings (e.g. `["parseStructuredCompletion", "parseCompletionFieldSummary"]`).
47
+ The audit builds a `\b<symbol>\s*\(` regex per name and skips matches that
48
+ sit immediately after the `function` keyword (i.e. it does not count the
49
+ definition itself as a caller). If `symbols` is missing or empty, the audit
50
+ fails the entry — there is no fallback parse of `description`.
51
+ - `removalSites` — array of `{ file, line, symbol?, reason? }` objects listing
52
+ the call sites that WILL be removed when the deprecation gate clears (the
53
+ "expected, planned" callers). Paths are forward-slash relative to the repo
54
+ root.
55
+ - `allowedCallers` — array of `{ site, reason }` objects (or
56
+ `{ file, line, reason }` — both shapes are accepted) listing call sites that
57
+ are intentionally preserved past the gate (e.g. a sibling deprecation that
58
+ will retire separately). Defaults to `[]` when absent.
59
+
60
+ The audit assertion is `discoveredCallers ⊆ (removalSites ∪ allowedCallers)`.
61
+ On failure, the assertion message names every unexpected `file:line` so the
62
+ audit author can immediately classify each one as a new `removalSites` entry
63
+ or a new `allowedCallers` entry.
64
+
65
+ Entries WITHOUT a `telemetryGate` field are skipped by the audit — calendar-
66
+ gated entries (e.g. `qa-json-sidecars`) and signal-gated entries that don't
67
+ hang on a counter (e.g. `config-claude-binary-override`) don't carry the
68
+ `symbols` / `removalSites` / `allowedCallers` triple and are not enforced by
69
+ the static audit. Add them later if the gate evolves into a counter sentinel.
@@ -27,14 +27,21 @@
27
27
  "id": "completion-fallback-parsers",
28
28
  "description": "parseStructuredCompletion and parseCompletionFieldSummary in engine/lifecycle.js",
29
29
  "file": "engine/lifecycle.js",
30
- "lines": "3075, 3273",
30
+ "lines": "3410, 3608",
31
31
  "telemetryGate": "_engine.completionFallbacks must read 0 (both fenced and summary counters) across sweepWindowDays starting from sweepStartDate",
32
32
  "sweepWindowDays": 14,
33
- "sweepStartDate": "2026-05-27",
34
- "sweepRationale": "14 days matches the dead-code audit cadence (one full weekly audit cycle plus a buffer week). Policy decision pending confirmation in open-question #1 of the 2026-05-27 Bug Audit Review meeting conclusion — if the human teammate prefers a different cadence, repin this field and the matching enforcingSweepWindowTest fixture.",
33
+ "sweepStartDate": "2026-06-11",
34
+ "sweepRationale": "14 days matches the dead-code audit cadence (one full weekly audit cycle plus a buffer week). Window restarted on 2026-06-11 (= merge_date(P-a7b2c1d9) + 1 day, anchor commit eb544aa80dbd64c87b78ad08a17ca3560e627094 merged 2026-06-10T18:04:12Z) because the original 2026-05-27 window was invalidated: the engine/timeout.js caller of parseStructuredCompletion (commit 0f4b9787, 2026-04-30) predated the telemetry counter (commit cea61119, 2026-05-13), so the hidden caller was never instrumented and a zero reading proved nothing. P-a7b2c1d9 removed that hidden caller; the new window measures only callers that the counter actually instruments. Policy decision pending confirmation in open-question #1 of the 2026-05-27 Bug Audit Review meeting conclusion — if the human teammate prefers a different cadence, repin this field and the matching enforcingSweepWindowTest fixture.",
35
35
  "enforcingTest": "test/unit/completion-fallback-telemetry.test.js:217-234",
36
36
  "enforcingSweepWindowTest": "test/unit/completion-fallback-sweep-window.test.js",
37
- "notes": "Do NOT set removedAt until telemetry confirms zero usage across the sweepWindowDays from sweepStartDate. The follow-up code-removal PR (dropping parseStructuredCompletion at engine/lifecycle.js:3075, parseCompletionFieldSummary at :3273, and the gated fallback at :4240-4266) is dispatched separately once the window is observed clean."
37
+ "symbols": ["parseStructuredCompletion", "parseCompletionFieldSummary"],
38
+ "removalSites": [
39
+ { "file": "engine/lifecycle.js", "line": 4675, "symbol": "parseStructuredCompletion", "reason": "Gated fallback at engine/lifecycle.js:4675-4700 — removed in the same follow-up PR that drops the parser definitions." },
40
+ { "file": "engine/lifecycle.js", "line": 4676, "symbol": "parseCompletionFieldSummary", "reason": "Gated fallback at engine/lifecycle.js:4675-4700 — removed in the same follow-up PR that drops the parser definitions." }
41
+ ],
42
+ "allowedCallers": [],
43
+ "schemaRef": "docs/deprecated-process.md (see 'Static call-site audit fields')",
44
+ "notes": "Do NOT set removedAt until telemetry confirms zero usage across the sweepWindowDays from sweepStartDate. The follow-up code-removal PR (dropping parseStructuredCompletion at engine/lifecycle.js:3410, parseCompletionFieldSummary at :3608, and the gated fallback at :4675-4700) is dispatched separately once the window is observed clean. The symbols/removalSites/allowedCallers triple is enforced by test/unit/deprecated-call-site-audit.test.js — see docs/deprecated-process.md for the schema."
38
45
  },
39
46
  {
40
47
  "id": "config-claude-binary-override",
package/engine/timeout.js CHANGED
@@ -594,7 +594,15 @@ function checkTimeouts(config) {
594
594
  const engineRestartGraceUntil = engine().engineRestartGraceUntil;
595
595
  const engineRestartGraceExempt = engine().engineRestartGraceExempt;
596
596
  const { completeDispatch } = dispatch();
597
- const { runPostCompletionHooks, parseAgentOutput, parseStructuredCompletion, parseCompletionReportFile, detectNonTerminalResultSummary } = require('./lifecycle');
597
+ // P-a7b2c1d9: fenced ```completion stdout parser (formerly destructured here)
598
+ // deliberately dropped from this destructure. The recovery path uses the
599
+ // sidecar (parseCompletionReportFile) as the sole structured-completion
600
+ // source. The stdout parser added no new signal on the timeout/exit-recovery
601
+ // path — only a disagreement risk between the sidecar and the stdout block.
602
+ // Removing this caller unblocks the completion-fallback-parsers deprecation
603
+ // sweep window in docs/deprecated.json (its `counter==0 ⇒ parser unused`
604
+ // claim is now logically sound).
605
+ const { runPostCompletionHooks, parseAgentOutput, parseCompletionReportFile, detectNonTerminalResultSummary } = require('./lifecycle');
598
606
 
599
607
  const timeout = config.engine?.agentTimeout || ENGINE_DEFAULTS.agentTimeout;
600
608
  const defaultStaleOrphanTimeout = config.engine?.heartbeatTimeout || ENGINE_DEFAULTS.heartbeatTimeout;
@@ -642,8 +650,12 @@ function checkTimeouts(config) {
642
650
  const runtimeName = item.meta?.runtimeName || item.runtimeName || 'claude';
643
651
  outputResultSummary = parseAgentOutput(fullLogForHooks, runtimeName).resultSummary || '';
644
652
  const gateSummary = outputResultSummary || (!fullLogForHooks.includes('"type":') ? fullLogForHooks : '');
653
+ // P-a7b2c1d9: pass `null` for structuredCompletion. By the time
654
+ // checkTimeouts runs, the sidecar `completion.json` (parseCompletionReportFile)
655
+ // is the documented source of truth; the fenced ```completion stdout
656
+ // parser is intentionally bypassed here.
645
657
  completionDetection = isSuccess
646
- ? detectNonTerminalResultSummary(gateSummary, parseStructuredCompletion(fullLogForHooks, runtimeName), parseCompletionReportFile(item), { detectPhantom: true })
658
+ ? detectNonTerminalResultSummary(gateSummary, null, parseCompletionReportFile(item), { detectPhantom: true })
647
659
  : null;
648
660
  } catch (e) { log('warn', 'completion summary gate: ' + e.message); }
649
661
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2163",
3
+ "version": "0.1.2165",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"