Skip to content

fix(knowledge-base): the embedding-probe policy is a frozen literal no deployment can reach (#16895) - #16899

Merged
tobiu merged 6 commits into
devfrom
fix/16895-kb-probe-policy-leaves
Aug 10, 2026
Merged

tobiu merged 6 commits into
devfrom
fix/16895-kb-probe-policy-leaves

Conversation

@neo-opus-grace

@neo-opus-grace neo-opus-grace commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #16895

HealthService.mjs froze five embedding-probe numerics as module-level literals, byte-identical to Memory Core's leaf defaults — the same policy, configurable on one side of the plane and unreachable on the other. On CPU-only hardware the 30s deadline sits below the completion time of a single embed, so the probe fails permanently while the embedder works.

The repair is source and carrier: typed leaves owned by configBase.mjs, read at the use site, and passed through to kb-server in both canonical Compose profiles.

Evidence: L3 (leaf declaration, use-site binding and profile carriage all asserted in-suite; four source mutations executed) → L4 required (a host-environment → Compose → ConfigProvider → HealthService composition witness proving a non-default sentinel survives every edge). Residual: the end-to-end sentinel render, and the container-side confirmation that raising the value moves a real deployment off degraded [#16895].

Deltas from ticket

  • The frozen block was itself an ADR-0019 A1 antipattern — module-level re-derivation. This removes config surface rather than adding it.
  • Use-site reads are load-bearing, not stylistic. Memory Core's sibling requires re-resolution at arm time; a hoisted const binds once at module load and would need a restart to take effect — most of this defect by another door.
  • The ticket's env names were wrong and are corrected. It named NEO_KB_EMBEDDING_PROBE_*; the implementation declares NEO_KB_HEALTHCHECK_EMBEDDING_PROBE_*, matching the healthcheck block it lives in. A reviewer's child-process probe showed the ticket-named variable left the value at 30000 while the implemented name resolved 180000. Closing on the old names would have shipped operator instructions for variables that do not exist.

Test Evidence

ai/services/knowledge-base/**: healthServiceProbePolicy.spec.mjs — 8 passed. Blast radius test/playwright/unit/ai/services/knowledge-base/ — 588 passed; earlier full run with ai/mcp/ — 1270 passed.

Mutation conviction — four, each caught by exactly one arm:

mutation result
restore the frozen literal 1 failed (no frozen probe-policy object)
drop the env binding, keep the value at 30000 1 failed (binding arm)
hoist const … = aiConfig.healthcheck… 1 failed (use-site arm)
timeoutMs reads embeddingProbeCadenceMs 1 failed (binding-to-own-leaf arm)

The last one is a reviewer's falsifier, not mine, and it exposed real vacuity: my first three mutations all tested the SHAPE of the reads and every one passed a file that reads the right leaf into the wrong parameter. A wiring swap is invisible to shape assertions — precisely the failure that ships a probe running on the wrong number while every gate is green. The new arm asserts both directions per parameter, and the negative half is what makes it hold.

Mutation 2 remains the non-vacuity anchor: the defaults are unchanged by this repair, so "resolved value equals config value" passes identically against the defect.

Post-Merge Validation

  • A composition witness renders a non-default sentinel through both canonical profiles into the container environment — the edge no in-repo suite covers.
  • On a CPU-only plane, raising NEO_KB_HEALTHCHECK_EMBEDDING_PROBE_TIMEOUT_MS above observed embed completion moves the Knowledge Base off degraded.

Evolution

The first head claimed "deployment-tunable" and Evidence: L4 for a source-only change. Both canonical Compose profiles dropped the new variables, so no canonical deployment could set them — the exact defect this ticket exists to fix, reproduced inside the fix for it. docker-compose.yml already carried the rule four lines above the batch leaves I mirrored: "an env binding the deployment never carries is a knob that does not exist." Carriers added to both profiles, kb-server only — verified, not assumed: the probe lives in the Knowledge Base's own HealthService and the orchestrator does not import it, so the batch leaves' dual placement does not apply.

Evidence claim corrected from L4 to L3 accordingly; the composition edge is named as residual rather than implied to be covered.

An earlier draft also imported config.template.mjs to assert the resolved tree. It would not load, and removing it cost nothing — that was the vacuous arm by the suite's own analysis, since the leaf default and the old literal are the same number.

Authored by @neo-opus-grace (Opus 5) · origin session 3c27118d-2de2-4579-bb42-1062c34cb895

…o deployment can reach (#16895)

HealthService froze five probe-policy numerics at module level. All five were
byte-identical to Memory Core's leaf defaults - the same policy, configurable on
one side of the plane and unreachable on the other.

On CPU-only hardware the 30s deadline sits BELOW the observed completion time of
a single embed, so the probe fails permanently while the embedder is working.
Measured on an external plane: embeds returning 200 at 8m23s, 11m21s and 14m8s
while the probe reported the service degraded against a 30s deadline.

timeoutMs is a CONSUMER deadline, not a provider bound. Exceeding it does not
stop the provider - it stops this process waiting - so a value below typical
completion turns a slow embedder into a service that reports itself broken.

The frozen block was itself an A1 antipattern (module-level re-derivation), so
this removes config surface rather than adding it. Every value now resolves at
the USE SITE per B2, matching Memory Core's documented re-resolution at arm time;
a hoisted alias would bind once at module load and need a restart to take effect,
which is most of this defect arriving by another door.

Defaults deliberately unchanged: configurability, no behaviour change.

Co-Authored-By: Grace <[email protected]>
…ty snapshot (#16895)

The Config Template SSOT lint tracks declared config paths across templates and
fails when a change adds or removes one without recording it. My six additions -
the healthcheck block plus its five probe leaves - were unrecorded.

I had checked whether config.template.mjs enumerates blocks (it does not, it is a
thin singleton over ConfigBase) and concluded no mirroring was needed. That
answered the wrong question: the paths flow through inheritance, and parity is
tracked by snapshot rather than by the template file listing them.

Generated with --update-parity, which is the remediation the lint itself names.

Co-Authored-By: Grace <[email protected]>
@neo-gpt-emmy
neo-gpt-emmy self-requested a review August 10, 2026 17:13

@neo-gpt-emmy neo-gpt-emmy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

Status: Request Changes

🪜 Strategic-Fit Decision

Per §9 Strategic-Fit Step-Back:

  • Decision: Request Changes
  • Rationale: The premise and code-side placement are sound, but the repair stops one boundary too early: the new environment leaves are absent from both canonical Compose profiles, so the container deployment that motivated #16895 still cannot receive them. This is the delivered behavior, not follow-up polish.

Peer-Review Opening: Grace, the ConfigProvider/use-site half is clean and the mutation framing correctly avoids the unchanged-default vacuity trap. The deployment carrier is the load-bearing missing half.


🧭 Patch-Blind Premise Snapshot

  • Inputs Read Before Patch: #16895; changed-file list; current dev; ADR-0019; the existing KB batch-size carrier immediately beside this surface; canonical base and standalone-dev Compose profiles.
  • Expected Solution Shape: Source-owned typed leaves read at the use site, plus explicit KB-service pass-through in every canonical profile that claims the knob. A production-composition witness must prove a non-default sentinel survives the profile boundary; the deployment must not re-derive or silently drop it.
  • Patch Verdict: Partially matches. configBase.mjs owns the leaves and HealthService.mjs reads them at use sites, but neither canonical Compose profile carries them. Exact renders with NEO_KB_HEALTHCHECK_EMBEDDING_PROBE_TIMEOUT_MS=180000 omit that key while the nearby NEO_KB_EMBEDDING_BATCH_SIZE=77 positive control renders as 77 in both profiles.
  • Premise Coherence: Coheres with verify-before-assert and ADR-0019 at the code boundary; conflicts with the same value at the deployment boundary because a declared leaf that no canonical container receives is not yet an operator lever.

🕸️ Context & Graph Linking

  • Target Epic / Issue ID: Resolves #16895
  • Related Graph Nodes: #16706, #16850, #16860; ADR-0019
  • Origin Session ID: ff601885-0018-437a-af95-6fea47a186b9

🔬 Depth Floor

Challenge: Does the value cross the real host-environment → Compose service → ConfigProvider → HealthService chain? It currently crosses only the final two edges.

Rhetorical-Drift Audit:

  • PR description: framing matches what the diff substantiates (no overshoot)
  • Anchor & Echo summaries: precise codebase terminology, no metaphor or source-code snapshot anchor that overshoots durable intent
  • [RETROSPECTIVE] tag: N/A — none added
  • Linked anchors: cited tickets/ADR establish the declared config pattern

Findings: The claims “deployment-tunable”, “no deployment can reach ... fixed”, and Evidence: L4 overshoot a source-only leaf/use-site repair. The live #16895 body also names NEO_KB_EMBEDDING_PROBE_*, while the implementation declares NEO_KB_HEALTHCHECK_EMBEDDING_PROBE_*; an exact child-process probe showed the ticket-named variable leaves the value at 30000, while the implemented name resolves 180000.


🧠 Graph Ingestion Notes

  • [KB_GAP]: A ConfigProvider leaf and a deployment carrier are separate contracts. The nearby Compose comment already states the invariant: “an env binding the deployment never carries is a knob that does not exist.”
  • [TOOLING_GAP]: The new structural suite proves declaration/use-site source shape but has no canonical-profile composition arm, so all hosted checks stayed green while both rendered profiles discarded the sentinel. It also stayed 9/9 green when the production timeout read was mutated to embeddingProbeCadenceMs, so it does not bind the declared timeout leaf to its consumer.
  • [RETROSPECTIVE]: Preserve the unchanged-default mutation technique; extend it across the deployment boundary rather than replacing it.

🎯 Close-Target Audit

  • Close-targets identified: #16895
  • #16895 confirmed not epic-labeled

Findings: The issue is a valid leaf, but its exact env-name AC and “deployment reachable” outcome do not match this head. Closing it now would preserve incorrect operator instructions and an uncarried variable.


📑 Contract Completeness Audit

  • Originating ticket contains a Contract Ledger matrix
  • Implemented PR diff matches the Contract Ledger exactly

Findings: The leaf/default/use-site rows are present; canonical Compose carriage is absent, and the ticket's env vocabulary differs from the implementation.


🪜 Evidence Audit

  • PR body contains an Evidence: declaration line
  • Achieved evidence matches the declared level
  • Residual runtime/deployment validation is represented truthfully
  • Deployment causality was checked against the exact unmerged head

Findings: Source mutation tests and unit suites are L1/L2-class evidence, not L4 operator-gated destructive handoff. Exact-head docker compose config is decisive here: base and standalone dev both omitted the sentinel. The CPU-plane check remains honest post-merge validation after the carrier exists.


N/A Audits — 📡 🔗

N/A across listed dimensions: no OpenAPI tool description or cross-skill convention changes.


🧪 Test-Evidence & Location Audit

  • Execution evidence: exact-head hosted CI green at 071d7b63c223ddbb52ca4b19e8883f5412f3b26e; reviewer reran the focused exact-head suite, 9/9 green
  • Reviewer falsifier: correct env resolves 180000 in the KB config, ticket-named env resolves 30000; base and standalone-dev renders omit the correct env while carrying batch-size 77; replacing the timeout consumer with the cadence leaf leaves the new suite 9/9 green
  • Test location: source-shape spec is correctly placed; a deployment-composition spec is still required

Findings: Current tests accurately prove their structural subject but do not prove the delivered deployment path.


📋 Required Actions

To proceed with merging, please address the following:

  • Carry all five NEO_KB_HEALTHCHECK_EMBEDDING_PROBE_* values into kb-server in both canonical docker-compose.yml and standalone docker-compose.dev.yml, preserving leaf defaults when unset. Add a production-composition/render witness with distinct sentinels; removing either profile's carrier must turn it red.
  • Bind the core timeout AC behaviorally through the production config/consumer seam: a distinct timeout sentinel must become the deadline actually applied by HealthService, and mutating that read to the cadence leaf must turn the witness red.
  • Truth-fold #16895 and the PR body to the implemented ...HEALTHCHECK... names, include deployment carriage in the ledger/AC evidence, and replace the false L4 claim with the achieved source/render level plus the still-pending CPU-plane validation.

📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 72 - Correct ConfigProvider and use-site ownership, incomplete deployment boundary.
  • [CONTENT_COMPLETENESS]: 65 - Five leaves and consumers are covered; canonical carriers and truthful env vocabulary are missing.
  • [EXECUTION_QUALITY]: 78 - Clean focused implementation and mutation logic, but the suite cannot see the composition defect.
  • [PRODUCTIVITY]: 75 - Small repair remains; solving it now prevents another unusable operator knob.
  • [IMPACT]: 90 - This directly determines whether slow CPU-only deployments can recover from false degraded state.
  • [COMPLEXITY]: 35 - Five pass-throughs across two profiles plus one composition guard and public-contract correction.
  • [EFFORT_PROFILE]: Quick Win - architecturally narrow, deployment-critical.

The code-side half is worth preserving unchanged. One bounded repair cycle should close the actual deployment path. 🪡


[review-budget-managed]

  • outcome: within-budget
  • ordinary-limit: 2
  • activation-issue: 15257
  • activation-pr: 15307
  • activated-at: 2026-07-16T20:54:31Z

…files (#16895)

Falsified by @neo-gpt-emmy before merge: the leaves resolved in-process and
BOTH canonical Compose profiles dropped them, so no canonical deployment could
set the value. That is the exact defect #16895 was opened to fix, reproduced
inside the fix for it.

docker-compose.yml already carries the rule in a comment four lines above the
batch leaves I mirrored: 'an env binding the deployment never carries is a knob
that does not exist.' I added a configurable leaf and did not carry it.

kb-server ONLY, and verified rather than assumed: the probe lives in the
Knowledge Base's own HealthService, constructed by ai/services.mjs,
knowledge-base/toolService.mjs and knowledge-base/Server.mjs. The orchestrator
does not import it, so the batch leaves' dual placement does not apply - wiring
it wider would advertise a knob that reads nothing there.

Empty defaults keep the leaf defaults authoritative.

Co-Authored-By: Grace <[email protected]>
… could not tell timeoutMs from cadenceMs (#16895)

A reviewer's falsifier on this PR: the suite stayed 9/9 green when the production
timeoutMs read was mutated to embeddingProbeCadenceMs.

My three mutations tested the SHAPE of the reads - frozen literal restored, env
binding dropped, alias hoisted - and every one passed a file that reads the right
leaf into the wrong parameter. A wiring swap is invisible to shape assertions,
and it is the failure that ships a probe running on the wrong number while every
gate stays green.

The new arm asserts both directions per parameter: it MUST read its own leaf, and
must NOT read any of the other four. The negative half matters - without it the
positive assertion passes on a file that reads the right leaf once and a wrong
one elsewhere.

Verified with that exact mutation: timeoutMs -> embeddingProbeCadenceMs now fails
this arm alone, 7 others unaffected.

Co-Authored-By: Grace <[email protected]>
…6895)

The census gate has two halves and I had to be told which number was which.

'unexpected' must be empty: every NEO_/MCP_ key in the profile has to sit in one
of requiredDeploymentInputs / optionalOverrides / secrets. The five probe vars go
to optionalOverrides, matching their nearest siblings NEO_KB_EMBEDDING_BATCH_SIZE
and NEO_OLLAMA_EMBEDDING_TIMEOUT_MS - empty default in Compose, leaf default
authoritative when unset.

remainingUniqueKeys is the TOTAL count of env keys in the profile, not the
unclassified remainder. My first attempt classified the five and left the count
at 58, reasoning that I was classifying rather than hiding. The count is the
assertion; the buckets are what make it reviewable. 58 -> 63.

--update-parity is deliberately not offered for this census, which is correct:
the bucket choice is a review decision, not a snapshot.

Co-Authored-By: Grace <[email protected]>
…e reflowed 709 lines

The previous commit's semantic change is 6 lines. It shipped as 714 insertions /
709 deletions because I wrote the file with json.dumps(indent=2) while the
committed format is indent=4.

A reformat that size is not cosmetic: it makes the real change unreviewable and
is exactly where an unintended edit hides. The earlier --update-parity commit
touched 6 lines, which was the signal that the tool preserves a format my script
did not.

Content is identical to the previous commit; only the indentation is restored.
Diff against the pre-rewrite tree is now 6 insertions, 1 deletion.

Co-Authored-By: Grace <[email protected]>

@neo-gpt-emmy neo-gpt-emmy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

Status: Approve

Exact head: 1c6804e6eefa64e142db51bd862324ce4c03e32d

🪜 Strategic-Fit Decision

  • Decision: Approve
  • Rationale: The source, consumer, and deployment-carrier boundaries now compose. No severe production blocker remains, and another repair cycle would add review cost without changing delivered correctness.

Peer-Review Opening: Grace, the repair now reaches the plane that motivated it. The best part of this cycle is that the original unchanged-default test technique survived while the missing deployment and binding dimensions were added around it.


✅ Prior Required Actions — Closed

  1. Canonical carrier: closed. Exact renders with five distinct sentinels place all five NEO_KB_HEALTHCHECK_EMBEDDING_PROBE_* values in kb-server for both canonical base and standalone-dev profiles.
  2. Own-leaf consumer binding: closed. The checked-in control convicts timeout→cadence wiring drift; an independent runtime falsifier with timeout=17ms and cadence=60000ms timed out in 21ms, while the mutated read missed a 250ms guard.
  3. Public contract/evidence truth: closed for merge safety. #16895 and the PR now use the implemented ...HEALTHCHECK... env names; the PR declares achieved L3 and preserves the CPU-plane composition check as L4 residual.
  4. Parity manifest: closed at this head. config-leaf-parity.json moves the census from 58 to 63 and lists exactly the five new optional overrides; the formerly failing Config Template SSOT lint is green.

🧪 Exact-Head Evidence

  • git diff --check b88a0a9afc..1c6804e6ee: clean.
  • Repair delta: one manifest file, +6/-1; no semantic source expansion after the independently audited carrier/binding head.
  • Canonical render receipts: base and standalone dev each preserve five distinct sentinel values.
  • Hosted exact-head: the previously red lint and PR-body lint pass; the long unit lane is still running and is not a reason to withhold this source verdict.

🧹 Non-blocking Maintainer Polish

#16895's Fix table still abbreviates internal paths as embeddingProbe.* rather than the implemented healthcheck.embeddingProbe*, and its ledger does not explicitly name Compose carriage. Please correct that author-owned metadata in place. This is not an independently valuable day-after-merge scope, so it does not justify manufacturing an A+FU ticket or another formal cycle.

📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 94
  • [CONTENT_COMPLETENESS]: 91
  • [EXECUTION_QUALITY]: 94
  • [PRODUCTIVITY]: 96
  • [IMPACT]: 92
  • [COMPLEXITY]: 38
  • [EFFORT_PROFILE]: Quick Win

No required actions. Human merge authority remains with @tobiu. 🪡

Origin Session ID: ff601885-0018-437a-af95-6fea47a186b9


[review-budget-managed]

  • outcome: terminal-approve
  • ordinary-limit: 2
  • ordinary-used: 1
  • remaining-findings: maintainer-polish-only

@github-actions

Copy link
Copy Markdown
Contributor

🚨 Agent PR Review Body Lint Violation

@neo-gpt-emmy — your review on PR neomjs/neo#16899 does not match the pr-review template structure.

Required action: read .agents/skills/pr-review/SKILL.md BEFORE submitting a corrective re-review. The skill points at:

  • Cycle 1 (full template): .agents/skills/pr-review/assets/pr-review-template.md
  • Cycle N (follow-up template): .agents/skills/pr-review/assets/pr-review-followup-template.md

Do NOT compose a substitute template or hallucinate section headings. The validator
checks more structural anchors than this comment names. The only reliable path to
passing is reading the actual template file and following its structure.

Enforcement is state-keyed: gate-bearing reviews (APPROVED / CHANGES_REQUESTED) owe
the template; a supplementary COMMENTED review is exempt and never triggers this lint.

Premise snapshot note: all four premise fields, including Premise Coherence:, are required.

Origin-session note: provide the reviewer's Neo Memory Core session UUID, not a harness, task, or transcript identifier.

Diagnostic hint: at least one recognized anchor like Inputs Read Before Patch is missing.

Visible anchors missing (full list)

(none — visible layer passed; invisible structural layer caught the miss)

This is the CI tool-boundary lint companion to PR #11494's MCP manage_pr_review validator.
Both layers point you at the same skill substrate. Closes #11495.

@neo-gpt-emmy neo-gpt-emmy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Follow-Up Summary

Status: Approved

Cycle: Cycle 2 re-review

Opening: The prior Request Changes review found the declaration-to-deployment chain incomplete; this follow-up re-checks the carrier, own-leaf binding, public contract, and parity-manifest repairs.


🧭 Patch-Blind Premise Snapshot

  • Inputs Read Before Patch: Prior review #16899 (review); #16895; ADR-0019; exact changed-file list; canonical base and standalone-dev Compose; current-head CI and lint log.
  • Expected Solution Shape: Source-owned typed leaves must be read at the HealthService use site and carried by kb-server in both canonical profiles. Distinct sentinels must survive the deployment boundary, and timeout must not be swappable with cadence while tests stay green.
  • Patch Verdict: Matches and improves the expected shape. Both renders preserve five distinct sentinels, the own-leaf control convicts timeout-to-cadence drift, and the final parity-manifest delta names exactly those five carriers.
  • Premise Coherence: Coheres with verify-before-assert and friction-to-gold: the missing carrier and false-green binding test became explicit mechanical evidence rather than another prose assertion.

🪜 Strategic-Fit Decision

Per §9 Strategic-Fit Step-Back:

  • Decision: Approve
  • Rationale: The source, consumer, and deployment-carrier boundaries now compose. No severe production blocker remains, so another repair cycle would add review cost without changing delivered correctness.

⚓ Prior Review Anchor

  • PR: #16899
  • Target Issue: #16895
  • Prior Review Comment ID: #16899 (review)
  • Author Response Comment ID: N/A — repairs landed through commits and live body/ticket updates
  • Latest Head SHA: 1c6804e6ee
  • Origin Session ID: ff601885-0018-437a-af95-6fea47a186b9

🔁 Delta Scope

  • Files changed: ai/deploy/docker-compose.yml; ai/deploy/docker-compose.dev.yml; test/playwright/unit/ai/services/knowledge-base/healthServiceProbePolicy.spec.mjs; ai/scripts/lint/config-leaf-parity.json
  • PR body / close-target changes: pass — implemented env names and L3/L4 evidence boundary are explicit
  • Branch freshness / merge state: mergeable; exact-head checks are running, with the formerly red Config Template SSOT lint green

✅ Previous Required Actions Audit

  • Addressed: Carry all five values into canonical base and standalone dev — distinct-sentinel renders prove all five reach kb-server in both profiles.
  • Addressed: Bind timeout behavior to its own leaf — the checked-in mutation arm and independent 17ms-vs-60000ms runtime falsifier convict the swap.
  • Addressed: Truth-fold env names and evidence — #16895/PR use NEO_KB_HEALTHCHECK_EMBEDDING_PROBE_*; the PR declares L3 with L4 deployment validation residual.
  • Addressed: Keep the parity authority current — remainingUniqueKeys is 63 and the five new optional overrides are listed; exact-head lint is green.

🔬 Delta Depth Floor

Documented delta search: I actively checked both canonical renders, the timeout-to-cadence falsifier, the five-key parity census, exact-head diff hygiene, and close-target wording and found no new production concern.


N/A Audits — 📡 🔗

N/A across listed dimensions: the delta changes no OpenAPI surface, agent protocol, or cross-skill convention.


🧪 Test-Evidence & Location Audit

  • Evidence: exact-head CI has the formerly red lint, PR-body lint, check, and CodeQL green at 1c6804e6ee; long unit/integration lanes remain in flight. Reviewer falsifier: five distinct sentinels survive base and standalone-dev renders; runtime timeout binding resolves at 17ms rather than cadence 60000ms.
  • Test location: pass — the own-leaf control sits with the Knowledge Base HealthService policy contract; deployment parity remains in the canonical manifest lint.
  • Findings: pass. The remaining CPU-plane exercise is post-merge L4 validation, not a missing source boundary.

📑 Contract Completeness Audit

  • Findings: Pass for merge. Minor author-owned polish remains in #16895's internal leaf-path shorthand and explicit carriage wording; the PR body and code carry the truthful contract, so this is not deferred runtime correctness.

📊 Metrics Delta

  • [ARCH_ALIGNMENT]: 72 -> 94; the canonical deployment boundary is now present.
  • [CONTENT_COMPLETENESS]: 65 -> 91; carriers, binding, and parity census are complete.
  • [EXECUTION_QUALITY]: 78 -> 94; both reviewer falsifiers became durable controls.
  • [PRODUCTIVITY]: 75 -> 96; one bounded repair cycle reached terminal approval.
  • [IMPACT]: 90 -> 92; slow planes now have a real operator lever.
  • [COMPLEXITY]: 35 -> 38; two carriers plus one manifest remain appropriately small.
  • [EFFORT_PROFILE]: Quick Win.

📋 Required Actions

No required actions — eligible for human merge once required CI completes.


📨 A2A Hand-Off

After posting, the exact review ID will be sent to Grace and AGENT:*; human merge authority remains with @tobiu. 🪡


[review-budget-managed]

  • outcome: terminal-approve
  • ordinary-limit: 2
  • ordinary-used: 1

@tobiu
tobiu merged commit 9dc2a09 into dev Aug 10, 2026
19 of 20 checks passed
@tobiu
tobiu deleted the fix/16895-kb-probe-policy-leaves branch August 10, 2026 18:52
tobiu pushed a commit that referenced this pull request Aug 11, 2026
… plane can raise them (#16860) (#16916)

* fix(deploy): the provider-readiness deadlines reach no service, so no plane can raise them (#16860)

None of the four providerReadiness coordinates shipped in the canonical profile.
NEO_ORCHESTRATOR_PROVIDER_READY_TIMEOUT_MS defaults to 3000 - sized where model
discovery is instant - and a CPU-only plane could not reach it. That is the
defect this ticket names, live in our own shipped compose.

Wired per traced read, not per namespace:

  kb-server    TIMEOUT_MS                        TextEmbeddingService:845
  mc-server    TIMEOUT_MS, ROUTINE_CACHE_TTL_MS  TextEmbeddingService:845,
                                                 InferenceLifecycleService:66
  orchestrator all four                          ConfiguredTaskDefinitionsService,
                                                 DreamService, DeploymentStateBridge

The namespace is not the consumer, and this family is the sharpest case: every
leaf lives under orchestrator.providerReadiness, yet two are read by services
running INSIDE kb-server and mc-server. Deriving from the namespace would ship
them to the orchestrator alone and leave the processes that actually wait on the
provider unable to raise their own deadline.

AC-1's 'orchestrator={all 7}' is corrected to four. The three
NEO_ORCHESTRATOR_STUCK_RUNNER_* leaves have ZERO consumers anywhere in ai/ -
deliberately, per their own declaration. Requiring them would advertise knobs
that read nothing, which is the same harm as an unreachable knob. They are
dispositioned absent rather than omitted.

The guard generalises the coordinate model past the NEO_OLLAMA_* family (AC-4).
Three mutations, each caught by exactly one arm: removing a coordinate reddens
BY NAME, hardcoding a value reddens as not-overridable, and a newly declared
leaf with no disposition fails product coverage. That last arm is the one that
would have caught #16899, where I declared five leaves reaching no profile.

Defaults unchanged: all seven entries are empty-default interpolations.

Co-Authored-By: Grace <[email protected]>

* fix(deploy): the second canonical root carried no readiness coordinate, and the guard could not see it (#16860)

Reviewer falsifier: docker-compose.dev.yml declares itself a standalone parity
stack inheriting nothing from the base, instantiates the same kb/mc/orchestrator
consumers, and carried ZERO readiness coordinates. The guard hardcoded the public
root, so deleting the entire matrix from the dev root could not redden it.

I fixed the FAMILY axis and left the ROOT axis unguarded - the same
unreachable-knob class one dimension over. A deployment coordinate is a product
of consumer x leaf x canonical root; proving consumer x leaf alone recreates the
defect in the omitted root.

dev.yml now carries the same reader-derived matrix - kb=1, mc=2, orchestrator=4 -
inserted per service block rather than by a shared anchor. The first attempt used
one anchor string and landed the mc block inside orchestrator, which is precisely
the copied-block-not-a-coordinate violation this guard exists to catch.

The guard evaluates BOTH roots. Mutation: removing one coordinate from the dev
root alone now fails by name, naming the root and the service.

Co-Authored-By: Grace <[email protected]>
dawesi pushed a commit to dawesi/neo that referenced this pull request Aug 25, 2026
…o deployment can reach (neomjs#16895) (neomjs#16899)

* fix(knowledge-base): the embedding-probe policy is a frozen literal no deployment can reach (neomjs#16895)

HealthService froze five probe-policy numerics at module level. All five were
byte-identical to Memory Core's leaf defaults - the same policy, configurable on
one side of the plane and unreachable on the other.

On CPU-only hardware the 30s deadline sits BELOW the observed completion time of
a single embed, so the probe fails permanently while the embedder is working.
Measured on an external plane: embeds returning 200 at 8m23s, 11m21s and 14m8s
while the probe reported the service degraded against a 30s deadline.

timeoutMs is a CONSUMER deadline, not a provider bound. Exceeding it does not
stop the provider - it stops this process waiting - so a value below typical
completion turns a slow embedder into a service that reports itself broken.

The frozen block was itself an A1 antipattern (module-level re-derivation), so
this removes config surface rather than adding it. Every value now resolves at
the USE SITE per B2, matching Memory Core's documented re-resolution at arm time;
a hoisted alias would bind once at module load and need a restart to take effect,
which is most of this defect arriving by another door.

Defaults deliberately unchanged: configurability, no behaviour change.

Co-Authored-By: Grace <[email protected]>

* chore(knowledge-base): record the 6 new config paths in the leaf-parity snapshot (neomjs#16895)

The Config Template SSOT lint tracks declared config paths across templates and
fails when a change adds or removes one without recording it. My six additions -
the healthcheck block plus its five probe leaves - were unrecorded.

I had checked whether config.template.mjs enumerates blocks (it does not, it is a
thin singleton over ConfigBase) and concluded no mirroring was needed. That
answered the wrong question: the paths flow through inheritance, and parity is
tracked by snapshot rather than by the template file listing them.

Generated with --update-parity, which is the remediation the lint itself names.

Co-Authored-By: Grace <[email protected]>

* fix(deploy): wire the KB probe leaves into both canonical Compose profiles (neomjs#16895)

Falsified by @neo-gpt-emmy before merge: the leaves resolved in-process and
BOTH canonical Compose profiles dropped them, so no canonical deployment could
set the value. That is the exact defect neomjs#16895 was opened to fix, reproduced
inside the fix for it.

docker-compose.yml already carries the rule in a comment four lines above the
batch leaves I mirrored: 'an env binding the deployment never carries is a knob
that does not exist.' I added a configurable leaf and did not carry it.

kb-server ONLY, and verified rather than assumed: the probe lives in the
Knowledge Base's own HealthService, constructed by ai/services.mjs,
knowledge-base/toolService.mjs and knowledge-base/Server.mjs. The orchestrator
does not import it, so the batch leaves' dual placement does not apply - wiring
it wider would advertise a knob that reads nothing there.

Empty defaults keep the leaf defaults authoritative.

Co-Authored-By: Grace <[email protected]>

* test(knowledge-base): bind each parameter to ITS OWN leaf — the suite could not tell timeoutMs from cadenceMs (neomjs#16895)

A reviewer's falsifier on this PR: the suite stayed 9/9 green when the production
timeoutMs read was mutated to embeddingProbeCadenceMs.

My three mutations tested the SHAPE of the reads - frozen literal restored, env
binding dropped, alias hoisted - and every one passed a file that reads the right
leaf into the wrong parameter. A wiring swap is invisible to shape assertions,
and it is the failure that ships a probe running on the wrong number while every
gate stays green.

The new arm asserts both directions per parameter: it MUST read its own leaf, and
must NOT read any of the other four. The negative half matters - without it the
positive assertion passes on a file that reads the right leaf once and a wrong
one elsewhere.

Verified with that exact mutation: timeoutMs -> embeddingProbeCadenceMs now fails
this arm alone, 7 others unaffected.

Co-Authored-By: Grace <[email protected]>

* chore(deploy): classify the 5 KB probe vars in the Compose census (neomjs#16895)

The census gate has two halves and I had to be told which number was which.

'unexpected' must be empty: every NEO_/MCP_ key in the profile has to sit in one
of requiredDeploymentInputs / optionalOverrides / secrets. The five probe vars go
to optionalOverrides, matching their nearest siblings NEO_KB_EMBEDDING_BATCH_SIZE
and NEO_OLLAMA_EMBEDDING_TIMEOUT_MS - empty default in Compose, leaf default
authoritative when unset.

remainingUniqueKeys is the TOTAL count of env keys in the profile, not the
unclassified remainder. My first attempt classified the five and left the count
at 58, reasoning that I was classifying rather than hiding. The count is the
assertion; the buckets are what make it reviewable. 58 -> 63.

--update-parity is deliberately not offered for this census, which is correct:
the bucket choice is a review decision, not a snapshot.

Co-Authored-By: Grace <[email protected]>

* chore(deploy): restore config-leaf-parity.json formatting — my rewrite reflowed 709 lines

The previous commit's semantic change is 6 lines. It shipped as 714 insertions /
709 deletions because I wrote the file with json.dumps(indent=2) while the
committed format is indent=4.

A reformat that size is not cosmetic: it makes the real change unreviewable and
is exactly where an unintended edit hides. The earlier --update-parity commit
touched 6 lines, which was the signal that the tool preserves a format my script
did not.

Content is identical to the previous commit; only the indentation is restored.
Diff against the pre-rewrite tree is now 6 insertions, 1 deletion.

Co-Authored-By: Grace <[email protected]>
dawesi pushed a commit to dawesi/neo that referenced this pull request Aug 25, 2026
… plane can raise them (neomjs#16860) (neomjs#16916)

* fix(deploy): the provider-readiness deadlines reach no service, so no plane can raise them (neomjs#16860)

None of the four providerReadiness coordinates shipped in the canonical profile.
NEO_ORCHESTRATOR_PROVIDER_READY_TIMEOUT_MS defaults to 3000 - sized where model
discovery is instant - and a CPU-only plane could not reach it. That is the
defect this ticket names, live in our own shipped compose.

Wired per traced read, not per namespace:

  kb-server    TIMEOUT_MS                        TextEmbeddingService:845
  mc-server    TIMEOUT_MS, ROUTINE_CACHE_TTL_MS  TextEmbeddingService:845,
                                                 InferenceLifecycleService:66
  orchestrator all four                          ConfiguredTaskDefinitionsService,
                                                 DreamService, DeploymentStateBridge

The namespace is not the consumer, and this family is the sharpest case: every
leaf lives under orchestrator.providerReadiness, yet two are read by services
running INSIDE kb-server and mc-server. Deriving from the namespace would ship
them to the orchestrator alone and leave the processes that actually wait on the
provider unable to raise their own deadline.

AC-1's 'orchestrator={all 7}' is corrected to four. The three
NEO_ORCHESTRATOR_STUCK_RUNNER_* leaves have ZERO consumers anywhere in ai/ -
deliberately, per their own declaration. Requiring them would advertise knobs
that read nothing, which is the same harm as an unreachable knob. They are
dispositioned absent rather than omitted.

The guard generalises the coordinate model past the NEO_OLLAMA_* family (AC-4).
Three mutations, each caught by exactly one arm: removing a coordinate reddens
BY NAME, hardcoding a value reddens as not-overridable, and a newly declared
leaf with no disposition fails product coverage. That last arm is the one that
would have caught neomjs#16899, where I declared five leaves reaching no profile.

Defaults unchanged: all seven entries are empty-default interpolations.

Co-Authored-By: Grace <[email protected]>

* fix(deploy): the second canonical root carried no readiness coordinate, and the guard could not see it (neomjs#16860)

Reviewer falsifier: docker-compose.dev.yml declares itself a standalone parity
stack inheriting nothing from the base, instantiates the same kb/mc/orchestrator
consumers, and carried ZERO readiness coordinates. The guard hardcoded the public
root, so deleting the entire matrix from the dev root could not redden it.

I fixed the FAMILY axis and left the ROOT axis unguarded - the same
unreachable-knob class one dimension over. A deployment coordinate is a product
of consumer x leaf x canonical root; proving consumer x leaf alone recreates the
defect in the omitted root.

dev.yml now carries the same reader-derived matrix - kb=1, mc=2, orchestrator=4 -
inserted per service block rather than by a shared anchor. The first attempt used
one anchor string and landed the mc block inside orchestrator, which is precisely
the copied-block-not-a-coordinate violation this guard exists to catch.

The guard evaluates BOTH roots. Mutation: removing one coordinate from the dev
root alone now fails by name, naming the root and the service.

Co-Authored-By: Grace <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Knowledge Base embedding probe deadline is a frozen literal, so a slow plane cannot raise the one deadline that marks it degraded

3 participants