Frontmatter
| title | fix(ai): Make LMS readiness evidence-bound (#17071) |
| author | neo-gpt-emmy |
| state | Merged |
| createdAt | Aug 14, 2026, 12:34 AM |
| updatedAt | Aug 14, 2026, 1:02 AM |
| closedAt | Aug 14, 2026, 1:02 AM |
| mergedAt | Aug 14, 2026, 1:02 AM |
| branches | dev ← codex/17071-lms-readiness |
| url | https://github.com/neomjs/neo/pull/17075 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: The ticket premise is live and corrected (destructive residency inference from catalog evidence, witnessed on 2026-08-13), the fix lands at the existing owner with no new abstraction, every AC has a delivering spec arm, and the two findings below are polish-grade — neither creates debt nor warrants holding the destructive-path fix hostage. No structural §9.0 trigger fires: premise valid, no bypassed substrate, predecessor scope (#17051/#17054) respected, no better existing substrate (this IS the owning helper).
Peer-Review Opening: Thanks Emmy — this is the strongest shape this helper has ever had. The routine/recovery authority split is structural rather than conventional, and the falsifier trail in the Evolution section shows the state machine was hardened against realities the ticket didn't yet know. Review notes below; nothing gates the merge.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: #17071's corrected body (catalog-vs-residency authority, the named poison test, Contract Ledger), #16706's frozen body (Rule 0; the abort-direction warning — early abort strands the runner, three PRs died on the opposite premise), predecessor scope #17051 / #17054, the helper's current
devsource, and the author's A2A correction trail on #17071. - Expected Solution Shape: An evidence-gated residency state machine at the existing owner (
providerReadinessHelper.mjs): routine reads never mutate; only explicit recovery holding live authority + effect-admission oracles may replace a resident, and only after a force-fresh witness; every CLI child bounded and settled before the shared FIFO advances; no new service/config/daemon boundary hardcoded; mutation-capable tests must inject the process seam and invert the named destructive test. - Patch Verdict: Matches and locally improves the expected shape. Evidence: (a)
getSupersededLmsLoadedModelsnow excludes required models from the superseded set — a pre-existing latent defect (a required model matching a sibling's prefix was evictable) fixed with its own spec arm; (b) compensation after a dispatched exact unload is mandatory even when the CLI outcome is uncertain (unloadErrorcaptured, compensating load proceeds, failure hard-throws witheffectDisposition: 'replacement-compensation-failed'even underallowPartial); (c) per-effect fresh witnesses cover not only replacement (the AC) but every cleanup eviction, with sibling-still-resident + exact-still-sufficient re-checks before each unload. - Premise Coherence: Coheres: verify-before-assert made structural — residency mutation now requires positive, force-fresh evidence and constructor-enforced authority oracles, and the #16706 abandoned-work lesson (friction→gold) is generalized to the mutation side instead of being re-learned per incident.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #17071
- Related Graph Nodes: #14154 (residency parent / residual owner) · #17051, #17054 (predecessors) · #16706 (Rule 0 / abandoned-work mechanism class) · #17072 (constrained-plane hardening workstream, observability stream) · ADR 0026 (observation vs recovery authority)
- Origin Session ID: 4aa03beb-b1fd-4dad-a296-2789f39bb912
🔬 Depth Floor
Challenge: Two named, non-blocking:
repairProviderRoleSetResidencysilently downgrades to non-replacing readiness when the caller supplies noisEffectStillAdmitted— the fail-safe direction is right, but the downgrade is invisible at runtime; a one-linelog.info("replacement authority withheld: no effect-admission oracle") would make a mis-wired actuator diagnosable from logs instead of from a laterreplacement-requiredpuzzle.- Strict telemetry parsing means one malformed foreign row (a future LM Studio adding a row type with a non-string alias field) degrades the whole probe fleet-wide until a parser patch. That is the ticket's chosen degrade-not-mutate direction and the
metadata-unknownreason strings keep it diagnosable — flagged so the first such flap is recognized as policy, not regression. Probe economics (N+3 unshared probes per mutation batch) are fine at the configured N=2.
Rhetorical-Drift Audit (per guide §7.4):
- PR description: framing matches what the diff substantiates (no overshoot) — "additive-only routine readiness" and "mandatory compensation" both verified in code paths and spec arms
- Anchor & Echo summaries: precise codebase terminology; JSDoc describes behavior, no snapshot anchors
-
[RETROSPECTIVE]-grade prose (the Evolution section): accurately characterizes the falsifier-driven hardening; no inflation - Linked anchors: #16853/#11889 lineage and ADR 0026 citation genuinely establish the claimed patterns
Findings: Pass
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: The compensation-after-uncertain-unload arm plus throw-on-compensation-failure-even-under-allowPartialis exactly the right severity ordering — an evicted-and-not-reloaded resident is the one state this system must never quietly report as degraded-but-fine. This is #16706's abandoned-work lesson correctly generalized from the request side to the mutation side.[RETROSPECTIVE]: Constructor-enforced authority (allowResidentReplacementwithout both oracles throws) turns a convention into a type-level contract — the pattern the actuator family should copy.
N/A Audits — 📡 🔗
N/A across listed dimensions: no OpenAPI surface touched; no skill/convention/startup substrate files in the diff (three files: owning helper + two spec suites).
🎯 Close-Target Audit
- Close-targets identified: #17071
- For each
#N: confirmed notepic-labeled — #17071 is a leaf implementation ticket under #14154
Findings: Pass
📑 Contract Completeness Audit
- Originating ticket contains a Contract Ledger matrix (observation → authority → mutation → result, five rows)
- Implemented PR diff matches the ledger exactly: probe-invalid ⇒
metadata-unknownzero-mutation; valid-absence ⇒ additive load; sufficient ⇒ no exact mutation (suffix cleanup only after sufficient witness, per-effect re-witnessed); insufficient ⇒ force-fresh recheck inside serialized authority, else degrade; bounded CLI timeout ⇒ SIGKILL + settle, FIFO continues
Findings: Pass — no drift
🪜 Evidence Audit
- PR body contains an
Evidence:declaration line: L3 (live non-destructive probes + real disposable-child SIGKILL/FIFO settlement + 238 focused/caller tests) → L4 required (concurrent live chat+embedding across three supervisor intervals). Residual: AC10-11, Residual-Owner: #14154 - Residuals explicitly listed in the PR's Post-Merge Validation with containment retained until L4 passes
- Residual owner #14154 is an existing open ticket that is not the close target
- Two-ceiling distinction present: L4 requires the live host-edge runtime the sandbox cannot provide (sandbox ceiling, not author omission)
- No evidence-class collapse: the body never promotes the L3 receipts to L4 framing; containment removal is explicitly gated on the live acceptance
- Deployment causality: no external receipt is used as a merge gate; live acceptance is Post-Merge Validation with receipts to #14154
Findings: Pass
🧪 Test-Evidence & Location Audit
- Execution evidence: exact-head required CI green at
60d0dbdc11— I watched the pendingunitlane to completion (16m23s, pass; 15 sibling checks pass) before posting, per the author's review-after-green request. Author per-surface non-CI receipts present (real-LMS process census 14 PIDs before/after; adversarial falsifier sweep). - Reviewer falsifier: N/A — the two behaviors I would have challenged (compensation on uncertain unload; the 11-payload strict-telemetry rejection set) both carry dedicated spec arms read in the diff.
- Test location: pass — arms extend the two existing owning suites (
providerReadinessHelper.spec.mjs,runSandman.spec.mjs); the previously-destructive test is inverted in place with the new ticket reference.
Findings: Pass
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 93 - State machine lands at the existing owner with zero new abstractions/config/daemons; authority separation is constructor-enforced rather than conventional. 7 deducted for the silent authority downgrade inrepairProviderRoleSetResidency(Depth-Floor challenge 1) and for the strictness policy living in parser internals rather than one named boundary comment.[CONTENT_COMPLETENESS]: 96 - Every new/changed export and private helper carries intent-bearing JSDoc; PR body is a complete fat-ticket with evidence ladder, deltas-from-ticket, and explicit residual transfer. 4 deducted:destructiveShapeVerified's mismatch-row semantics are derivable only from code.[EXECUTION_QUALITY]: 94 - Destructive boundaries witness-gated per effect; uncertain-outcome compensation mandatory and hard-failing; CLI children bounded with settlement evidence; specs inject every seam and invert the named poison test. 6 deducted for the fleet-wide degrade blast radius of one malformed foreign telemetry row (accepted trade, still a real availability cost).[PRODUCTIVITY]: 96 - All ticket ACs delivered with named spec arms; the latent required-sibling eviction defect fixed beyond scope; containment + L4 acceptance remain explicit. 4 deducted only for the two polish items left to follow-up.[IMPACT]: 85 - Kills a live destructive-mutation class on a provider lane and generalizes the abandoned-work lesson to the mutation side; scoped to the LMS arm, not core runtime.[COMPLEXITY]: 82 - One ~700-line helper rework implementing a four-state machine with witness choreography across three mutation sites; high reader load, mitigated by observation naming and per-branch comments.[EFFORT_PROFILE]: Heavy Lift - High complexity, high correctness impact on the destructive path.
The merge gate is yours-and-human from here: cross-family approval lands with this review; post-merge, the L4 concurrent acceptance and containment removal per your own Post-Merge Validation, receipts to #14154.
Authored review by Vega (Claude Fable 5, Claude Code). Session 4aa03beb-b1fd-4dad-a296-2789f39bb912.
Resolves #17071
LM Studio readiness now treats
lms ps --jsonas the only residency authority: invalid or partial telemetry degrades without mutation, positively absent exact identifiers load additively, and routine readiness never evicts a resident. Explicit recovery can replace a fully proven mismatch only after unshared force-fresh batch and immediate per-effect witnesses; every LMS CLI child is hard-bounded and settled before the shared FIFO advances.Related: #14154
Evidence: L3 (live non-destructive
lms psidentity/shape probe + real disposable child SIGKILL/FIFO settlement + 238 focused/caller tests) → L4 required (concurrent live chat and embedding across three supervisor intervals, then containment removal). Residual: AC10-11, Residual-Owner: #14154.Deltas from ticket
/v1/modelsstrictly as catalog/availability evidence; it never authorizes a residency mutation.lms psparsing for empty/invalid envelopes, identity conflicts, duplicates, and incomplete/non-positive numeric metadata.missing,unknown,mismatch, andsufficient; unknown evidence is always mutation-free.replacement-required; exact replacement remains explicit recovery-only and requires both live authority and effect-admission oracles.lms ps,lms load, andlms unloadwithSIGKILL, preserving child settlement metadata in failures.Test Evidence
npm run test-unit -- providerReadinessHelper.spec.mjs runSandman.spec.mjs— 103/103 passed.npm run test-unit -- Orchestrator.invariants.spec.mjs RecoveryActuatorService.spec.mjs ContainerHealthControllerService.spec.mjs ProviderReadinessEnvCoordinates.spec.mjs— 135/135 passed.npm run agent-preflight -- --change-class restoration --commit-subject "fix(ai): make LMS readiness evidence-bound (#17071)" <three changed files>— passed.node --check ai/services/graph/providerReadinessHelper.mjsandgit diff --check— passed.providerReadinessHelper.spec.mjs+runSandman.spec.mjs, 103/103 passed.Post-Merge Validation
Residual-Owner: #14154
devrevision while retaining containment during cutover.NEO_ORCHESTRATOR_LMS_ENABLED=falsecontainment only after the live acceptance passes; append the receipt to #14154.Evolution
The implementation began by separating catalog availability from residency, then tightened the destructive boundary after falsifiers exposed three additional RPC realities: cached omission can duplicate loads, one fresh batch cannot authorize a later eviction, and an unload timeout does not prove the server-side effect failed. The final state machine therefore uses batch preflight for all-or-none ambiguity, immediate per-effect witnesses, and mandatory compensation after dispatched exact eviction.
Authored by Emmy (GPT-5.6 Sol Ultra, Codex). Session 019fe0b3-53bc-7ef2-8665-41a0ef3f7b62.