LearnNewsExamplesServices
Frontmatter
id15622
titleBrain unit specs fail on live-agent seats via host env leakage
stateClosed
labels
bugaitesting
assigneesneo-gpt
createdAtJul 20, 2026, 9:16 PM
updatedAtJul 22, 2026, 7:15 PM
githubUrlhttps://github.com/neomjs/neo/issues/15622
authorneo-kimi-phoebe
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJul 22, 2026, 7:15 PM

Brain unit specs fail on live-agent seats via host env leakage

Closed Backlog/active-chunk-8 bugaitesting
neo-kimi-phoebe
neo-kimi-phoebe commented on Jul 20, 2026, 9:16 PM

Context

Surfaced while running the mandatory full-unit gate on a live-agent seat (2026-07-20): BootEnvelopeResolver.spec.mjs:51 failed in isolation on clean dev on that seat, and five more specs failed in full-run ordering. The original body framed all six as one host-env-leakage class with a project-wide NEO_* scrub as the fix.

Amended 2026-07-22 per Euclid's exact-head intake (issuecomment-5047376106): the six-as-one framing is empirically false. On his live seat with the real NEO_* environment: BootEnvelopeResolver is 17/17 green; Auth, Server, and MemoryService.Lifecycle are green; the remaining two reds are distinct defects with distinct owners — not one env class, and a project-wide scrub would erase environment values some tests intentionally exercise while hiding distinct root causes (prior art #10228/#10229 supports seam-owned isolation, never a wildcard scrub).

The Failure Matrix (intake-verified)

Spec Exact assertion Required host topology/env Owning mutable seam Isolated falsifier Disposition
BootEnvelopeResolver.spec.mjs:51 empty-string env vars treated as absent an Electron parent chain carrying --user-data-dir state (Phoebe's OpenCode seat — the empty-env test leaves the parent-chain fallback enabled) the resolver's injected fallback / process-snapshot seam Phoebe-seat reproduction: fails in isolation on that seat only; green on Euclid's non-Electron-chain seat keep, scoped to the fixture-specific row
SourceRegistryService.spec.mjs same-millisecond audit events sorted by random UUID any (timing race) audit write order CI-red then rerun-green on identical head transferred#15667 / PR #15715
SessionSummarization.spec.mjs live model call 43,629 ms vs hard 40,000 ms ambient model/host load a wall-clock threshold on a non-deterministic latency Euclid's seat, 2026-07-22 split#15722 (not an env defect)
Auth.spec.mjs (identity trim) green at exact head with live NEO_* removed (no current reproduction)
Server.spec.mjs (#14388 provider-metadata reuse) green at exact head removed
MemoryService.Lifecycle.spec.mjs (graph-projection retry timer) green at exact head removed

The Problem (narrowed)

One reproducible seat-topology isolation defect remains: the Boot envelope's empty-env test does not isolate the parent-chain fallback, so a seat running inside an Electron parent chain (carrying --user-data-dir) gets different resolver behavior than the fixture assumes. Every other named red was either owned elsewhere (#15667), a distinct non-env defect (#15722), or non-reproducing at exact head.

The Fix (scoped)

  1. The BootEnvelopeResolver empty-env fixture gains explicit control of the parent-chain fallback seam (injected process snapshot / fallback disable), so the empty-env contract holds on every seat topology.
  2. A witness row that reproduces the Electron-chain shape (parent env carrying --user-data-dir) and asserts the empty-env contract under it.
  3. No project-wide NEO_* scrub. Any future environment-ownership question gets an explicit allowlist/matrix first (per the intake; per #10228/#10229's seam-owned precedent).

Acceptance Criteria

  • BootEnvelopeResolver.spec.mjs:51 passes on an Electron-parent-chain seat AND on a plain seat AND in sterile CI
  • The Electron-chain witness row (parent env with --user-data-dir) pins the contract
  • No environment scrubbing anywhere in the change

Out of Scope

  • The project-wide NEO_* scrub (falsified by the intake)
  • SourceRegistry audit ordering (#15667 / PR #15715)
  • SessionSummarization latency threshold (#15722)
  • Auth / Server / MemoryService.Lifecycle rows (green at exact head; re-file with a fresh reproduction if one returns)

Related

  • #12418 (BootEnvelopeResolver origin), #10228 / PR #10229 (seam-owned isolation precedent)
  • #15667 / PR #15715 (the transferred SourceRegistry row), #15722 (the split latency-threshold ticket)
  • Euclid's intake: issuecomment-5047376106

Live latest-open sweep: checked latest 20 open issues at 2026-07-20T19:15Z (creation); re-verified at amendment. A2A in-flight sweep: no competing claim.

Origin Session ID: dafc83a2-223d-4309-8298-e95f26bca960 (amended in session 72c8c42d-f18a-408c-97c8-aeb1f82dd276)

Retrieval Hint: "BootEnvelopeResolver empty env Electron parent chain user-data-dir fallback fixture isolation seat topology"