LearnNewsExamplesServices
Frontmatter
id17602
titlePerspective E2Es import the Brain barrel for one NL service
stateClosed
labels
bugdeveloper-experienceaitestingagent-os
assigneesneo-gpt
createdAtAug 23, 2026, 5:48 AM
updatedAtAug 23, 2026, 1:23 PM
githubUrlhttps://github.com/neomjs/neo/issues/17602
authorneo-gpt
commentsCount0
parentIssue17564
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtAug 23, 2026, 1:23 PM

Perspective E2Es import the Brain barrel for one NL service

Closed Backlog/active-chunk-18 bugdeveloper-experienceaitestingagent-os
neo-gpt
neo-gpt commented on Aug 23, 2026, 5:48 AM

Context

Carved from parent #17564 finding 6. WorkstationPerspectivesNL.spec.mjs cannot even load on a Body-tier checkout because it imports NeuralLink_DockService from the cloud-plane ai/services.mjs barrel. The same import exists in DemoBPerspectiveToolsNL.spec.mjs, so repairing only the measured Workstation row would leave the identical boundary defect alive in its sibling witness.

A base npm install deliberately excludes the Brain-tier set declared in package.brain.json (chromadb, better-sqlite3, @chroma-core/default-embed). These two specs are Body/runtime evidence and neither consumes a Brain capability; the shared E2E config has no Brain-project admission gate.

The Problem

Both perspective specs need one host-side Neural Link service but import the entire cloud barrel:

Consumer Current import Unused transitive cost
test/playwright/e2e/workstation/WorkstationPerspectivesNL.spec.mjs {NeuralLink_DockService} from '../../../../ai/services.mjs' cloud-plane graph reaches chromadb before test discovery
test/playwright/e2e/agentos/DemoBPerspectiveToolsNL.spec.mjs same same

The failure happens at module resolution, before Playwright can select a test or establish a browser. On a Brain-complete seat it stays invisible because chromadb happens to be installed.

The repository's denial loader provides a discriminating control. With chromadb,@google/generative-ai,better-sqlite3,@chroma-core/default-embed denied under the same Node runtime:

  • direct ai/services/neural-link/DockService.mjs import: survives;
  • ai/services.mjs import: fails specifically with DENIED_CLOUD_PLANE_PACKAGE: chromadb.

The Architectural Reality

  • ai/services/neural-link/DockService.mjs is the 48-LOC host-side service these specs actually call.
  • test/playwright/fixtures.mjs already imports Neural Link services directly from ai/services/neural-link/*; this is the sibling precedent and keeps 100+ E2E consumers Body-tier loadable.
  • test/playwright/unit/ai/services/hostBarrelImportReach.spec.mjs owns the deterministic static graph walker plus a positive control proving ai/services.mjs reaches chromadb.
  • test/playwright/unit/ai/services/hostBarrelRuntimeReach.spec.mjs owns the runtime denial control proving the host side survives while the cloud barrel dies.
  • Structure-map gate: ai/services/neural-link/ contains 11 focused host services; no new module or directory choice is introduced.

Contract Ledger: N/A — this changes private test imports and a test-only reachability guard; no public/agent/system-consumed API or wire surface changes.

The Fix

  1. Default-import NeuralLink_DockService directly from ai/services/neural-link/DockService.mjs in both perspective E2E specs.
  2. Extend the existing static reachability unit suite with a named two-entry target set for these perspective specs. Each target's static graph must exclude ai/services.mjs. Reuse the current parser/walker and a known-positive cloud-barrel adopter control; do not generalize this leaf into a whole-E2E invariant—the live census found ten other adopters with mixed, uninvestigated ownership.
  3. Run the existing static/runtime reach suites and both perspective E2Es on a Brain-complete browser-capable seat.

Decision Record impact

none.

Acceptance Criteria

  • Both perspective specs import the host-side Neural Link DockService directly; neither target spec's static graph reaches ai/services.mjs.
  • The static reachability guard names both target specs, carries a known-positive cloud-barrel adopter control, and fails if either offender is restored.
  • The runtime denial control still proves direct host-side loading survives while the cloud barrel dies specifically on a denied Brain package.
  • WorkstationPerspectivesNL and DemoBPerspectiveToolsNL both execute green on a Brain-complete browser-capable seat.
  • No E2E skip, Brain-package installation, service adapter, or product-runtime change is introduced.

Out of Scope

  • #17564 findings 1–5.
  • Changing the Neural Link DockService API or implementation.
  • Removing Brain dependencies from ai/services.mjs; that barrel is the cloud-plane authority and is supposed to reach them.
  • Adding a Brain-tier E2E project or skipping perspective evidence on Body-tier seats.
  • Any Workstation, DockWorkspace, perspective-store, or AgentOS runtime behavior change.
  • The ten other E2E specs whose static graphs currently reach the cloud barrel. Their consumers and package requirements need independent V-B-A; this leaf neither blesses nor migrates them.

Avoided Traps

  • Add a Brain-install gate / skip. The spec does not consume a Brain capability; skipping hides valid Body evidence because of an accidental import.
  • Import src/ai/client/DockService.mjs. That is the App-Worker/client class, not the host-side Neural Link service the tests invoke.
  • Fix only Workstation. The exact same import in Demo B is the same defect and would survive the leaf.
  • Delete or lazy-load chromadb from the cloud barrel. Wrong owner; the barrel legitimately owns cloud services.
  • Add a new grep guard. The repository already has an Acorn-based import-graph instrument with a known-positive control.
  • Promote two measured offenders into a universal E2E law. The first guard run found ten other cloud-barrel-reaching specs with mixed, uninvestigated ownership. This leaf pins only the two perspective consumers it has falsified.

Related

Parent #17564 · Related: #16710, #17369, PR #17565

Live latest-open sweep: checked the latest 20 open issues at 2026-08-23T03:48Z; no equivalent found. Exact GitHub search for the two spec/import shapes returned none. A2A all-state herd window: no competing claim; only Euclid's bounded [lane-intent] on this row.

Origin Session ID: a1cc9e59-61ad-4158-a0b8-29867c4737c3

Retrieval Hint: WorkstationPerspectives DemoBPerspectiveTools ai/services.mjs chromadb Brain tier direct NeuralLink DockService import reach denial loader

tobiu referenced in commit bfc5e85 - "fix(test): keep perspective E2Es Body-tier loadable (#17602) (#17603)" on Aug 23, 2026, 1:23 PM
tobiu closed this issue on Aug 23, 2026, 1:23 PM