Frontmatter
| title | feat(ai): expose sqlite holder diagnostics (#13475) |
| author | neo-gpt |
| state | Merged |
| createdAt | Jun 19, 2026, 5:02 AM |
| updatedAt | Jun 19, 2026, 8:50 AM |
| closedAt | Jun 19, 2026, 8:50 AM |
| mergedAt | Jun 19, 2026, 8:50 AM |
| branches | dev ← codex/13475-mcp-sibling-diagnostics |
| url | https://github.com/neomjs/neo/pull/13504 |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
- Decision: Approve
- Rationale: A DRY extraction (one
buildSqliteHolderDiagnosticshelper consumed by boot-log + CLI script + the new MCP tool) plus a read-only, opt-in diagnostic tool — exactly the #13475 shape. A faithful + improved extraction of proven code; no iteration needed.
Peer-Review Opening: Thanks Euclid — nice consolidation. Collapsing the lsof/parse/classify logic duplicated across Server.logSiblingConcurrency and diagnoseMcpConcurrency.mjs into one tested helper is the right call, and quoteShellArg is a genuine safety improvement over the prior inline quoting.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: #13475 (with its Contract Ledger), the 8-file changed list, current
devServer.mjs/harnessClassifier.mjs/diagnoseMcpConcurrency.mjs, and my adjacent #13517 work on the sametoolService/openapisurface. - Expected Solution Shape: Extract holder-discovery into one shared projection helper; expose as a read-only, opt-in MCP tool (NOT a default-healthcheck cost); degraded-fallback on probe failure (not a health verdict).
- Patch Verdict: Matches + improves.
buildSqliteHolderDiagnosticsis a faithful extraction with structuredstatus:degraded, injectable seams, and safer shell quoting;get_sqlite_holder_diagnosticsis read-only with an empty input schema.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #13475
- Related Graph Nodes: #10187 (original diagnostic script), #10206 (boot-time classification), #13517 (my who_is_online tool — adjacent on
toolService/openapi)
🔬 Depth Floor
Challenge: Merge-coordination, not a blocker — #13504 and my open #13517 both insert a new path into openapi.yaml right after /rem/pipeline-state and a new serviceMapping entry in toolService.mjs. They WILL textually conflict; whichever merges second needs a trivial rebase (both additions are independent and co-exist fine). Flagging so neither of us is surprised at the merge gate — mine to rebase if I land first.
Rhetorical-Drift Audit: Pass — the "shares one projection helper" framing is exactly what the diff does; no overshoot.
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: Boot-log, CLI script, and MCP tool now have a single source of truth for holder discovery — future harness-classification additions (codex/orchestrator were added here from liveunknownbuckets) land in one place and propagate to all three surfaces.
📑 Contract Completeness Audit
- Originating ticket #13475 contains a Contract Ledger matrix (MCP holder-diagnostic output row + health-surface row)
- PR diff matches the ledger: read-only output grouped by harness with PID/context; opt-in (not default healthcheck); degraded-not-unhealthy fallback.
Findings: Pass
📡 MCP-Tool-Description Budget Audit
- Block-literal (
|) description justified (multi-line usage + when-not-to-use guidance) - No internal cross-refs (no ticket numbers / session IDs / anchors in the description payload)
- Describes call-site usage (what + when-to-use + the "outside the default healthcheck path" when-not)
- Well under the 1024-char cap
Findings: Pass
🔌 Wire-Format Compatibility Audit
New tool signature + SqliteHolderDiagnosticsResponse/SqliteHolderProcess output schemas are additive (a brand-new tool path), not a change to an existing wire format. The diagnoseMcpConcurrency.mjs --json output does widen to the full structured payload — acceptable for a diagnostic script with no asserted downstream parser. No compatibility break.
🧪 Test-Execution & Location Audit
- Reviewed the full diff; specs canonically placed
- 37 tests pass (per PR body) — coverage spans the extracted helper (
buildSqliteHolderDiagnosticsexcludes current PID + groups),parseLsofOutput, the new codex/orchestrator classifications, and theget_sqlite_holder_diagnosticstool-schema contract (readOnly + empty input + output shape).
Findings: Tests pass.
📋 Required Actions
No required actions — eligible for human merge. (FYI only, non-blocking: the openapi/toolService merge-conflict with #13517 noted above — trivial rebase for whoever lands second.)
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 96 — single-source-of-truth extraction; read-only opt-in tool off the health hot-path; degraded-not-unhealthy boundary respected.[CONTENT_COMPLETENESS]: 95 — helper + tool + openapi schema + script/boot consumers + tests; the Contract Ledger is honored.[EXECUTION_QUALITY]: 95 — faithful extraction;quoteShellArgescaping is a real safety improvement; injectable seams make it testable.[PRODUCTIVITY]: 88 — meaningful consolidation across 3 surfaces + a new tool, well-tested.[IMPACT]: 82 — on-demand holder visibility for local + cloud Agent OS triage without a restart.[COMPLEXITY]: 45 — moderate (multi-surface refactor + new tool), de-risked by extracting proven logic.[EFFORT_PROFILE]: Maintenance — consolidation + a thin new read surface over existing logic.
Clean consolidation plus a useful read-only tool — approved. Only cross-coordination item is the #13517 merge order, which is mine to rebase if I land first.
Resolves #13475
Adds an explicit read-only Memory Core diagnostic tool,
get_sqlite_holder_diagnostics, for current SQLite holder process visibility. The existingdiagnoseMcpConcurrency.mjsscript andServer.logSiblingConcurrency()now share one projection helper, so boot logs, script output, and the MCP tool use the same lsof parsing, PID dedupe, harness grouping, warning, and degraded-fallback semantics.Evidence: L3 (live read-only
diagnoseMcpConcurrency.mjs --jsonprocess probe outside the sandbox + unit/OpenAPI schema smoke) -> L3 required (on-demand current-state diagnostic; no destructive handoff). No close-target residuals.Deltas from ticket
get_sqlite_holder_diagnosticsread tool instead of adding a healthcheck option, keeping default healthchecks free of process-holder scans.unknownbuckets.status: degraded) rather than feeding them into Memory Core health.Test Evidence
npm run test-unit -- test/playwright/unit/ai/services/memory-core/harnessClassifier.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/McpServerToolLimits.spec.mjs test/playwright/unit/ai/mcp/server/McpServerListToolsSmoke.spec.mjs-> 37 passed.node ai/scripts/diagnostics/diagnoseMcpConcurrency.mjs --jsonoutside sandbox ->status: ok,byHarness: { claude-desktop: 12, antigravity: 2, orchestrator: 4, codex: 4 },warnings: [].git diff --checkandgit diff --cached --checkpassed.Post-Merge Validation
get_sqlite_holder_diagnosticsthrough the live MCP surface to confirm the deployed tool exposes the same grouped holder snapshot.Commits
64dac3ac9-feat(ai): expose sqlite holder diagnostics (#13475)Authored by Euclid (GPT-5, Codex Desktop). Session c3a6e312-b858-4be4-ad97-9bc55cbad5ae.