Resolves #13899
Routes detached Neural Link Bridge child-process stdout/stderr into the configured data-log directory instead of a cwd-relative ./bridge.log. ConnectionService.spawnBridge() now resolves .neo-ai-data/logs/neural-link-bridge-stdio.log, creates the directory before opening the fd, and keeps overridable open/spawn seams so the unit test can verify wiring without launching a real bridge. Current Neural Link docs now point operators at the data-log path, while wake-daemon comments explicitly name their separate .neo-ai-data/wake-daemon/bridge.log substrate.
Evidence: L2 (unit-level spawn/open wiring plus static checks in the sandbox; no live Bridge launch) -> L2 required (the close-target ACs require log-path wiring and unit coverage, not an operator-gated runtime handoff). No residuals.
Deltas from ticket
- Added an explicit
spawnBridge({logPath, neoRootDir}) override for tests so coverage does not mutate shared AiConfig state.
- Kept the existing shared MCP logger unchanged; this only redirects the spawned child-process stdout/stderr sink.
- Ran the repository block-alignment fixer on touched
.mjs files; it also normalized pre-existing alignment in the two touched maintenance-script files.
Test Evidence
node buildScripts/util/check-block-alignment.mjs --fix ai/services/neural-link/ConnectionService.mjs test/playwright/unit/ai/services/neural-link/ConnectionService.spec.mjs test/playwright/unit/ai/services/neural-link/ComponentService.spec.mjs ai/scripts/maintenance/restore.mjs ai/scripts/migrations/bootstrapWorktree.mjs
node buildScripts/util/check-aiconfig-test-mutation.mjs test/playwright/unit/ai/services/neural-link/ConnectionService.spec.mjs
node buildScripts/util/check-jsdoc-types.mjs ai/services/neural-link/ConnectionService.mjs
node ./ai/scripts/setup/initServerConfigs.mjs --migrate-config
node ./ai/scripts/setup/initServerConfigs.mjs
npm run test-unit -- test/playwright/unit/ai/services/neural-link/ConnectionService.spec.mjs test/playwright/unit/ai/services/neural-link/ComponentService.spec.mjs -> 18 passed
npm run agent-preflight -- ai/services/neural-link/ConnectionService.mjs test/playwright/unit/ai/services/neural-link/ConnectionService.spec.mjs test/playwright/unit/ai/services/neural-link/ComponentService.spec.mjs learn/agentos/NeuralLink.md ai/scripts/maintenance/restore.mjs ai/scripts/migrations/bootstrapWorktree.mjs
- Pre-commit hook passed on the final staged diff.
Attempted but not accepted as PR evidence: full npm run test-unit before local ignored-config refresh. It was interrupted after 3504 passed, 59 failed, 6 interrupted, and 1210 did not run; the first failure class was stale local materialized config overlays missing new Memory Core leaves. The ignored configs were refreshed with initServerConfigs.mjs --migrate-config, and the PR-scoped tests passed afterward.
Slot Rationale
Modified learn/agentos/NeuralLink.md: disposition keep. This is an existing operational reference doc, not new turn-loaded substrate; the edit updates stale troubleshooting text so future Neural Link users inspect the configured data-log path rather than reintroducing repo-root bridge.log assumptions.
Post-Merge Validation
Commits
ac44bfc80c — fix(neural-link): route bridge logs to data dir (#13899)
Authored by Euclid (GPT-5, Codex Desktop). Session 019ef100-77a2-7781-a83f-4f064a3c1aca.
Resolves #13899
Routes detached Neural Link Bridge child-process stdout/stderr into the configured data-log directory instead of a cwd-relative
./bridge.log.ConnectionService.spawnBridge()now resolves.neo-ai-data/logs/neural-link-bridge-stdio.log, creates the directory before opening the fd, and keeps overridable open/spawn seams so the unit test can verify wiring without launching a real bridge. Current Neural Link docs now point operators at the data-log path, while wake-daemon comments explicitly name their separate.neo-ai-data/wake-daemon/bridge.logsubstrate.Evidence: L2 (unit-level spawn/open wiring plus static checks in the sandbox; no live Bridge launch) -> L2 required (the close-target ACs require log-path wiring and unit coverage, not an operator-gated runtime handoff). No residuals.
Deltas from ticket
spawnBridge({logPath, neoRootDir})override for tests so coverage does not mutate shared AiConfig state..mjsfiles; it also normalized pre-existing alignment in the two touched maintenance-script files.Test Evidence
node buildScripts/util/check-block-alignment.mjs --fix ai/services/neural-link/ConnectionService.mjs test/playwright/unit/ai/services/neural-link/ConnectionService.spec.mjs test/playwright/unit/ai/services/neural-link/ComponentService.spec.mjs ai/scripts/maintenance/restore.mjs ai/scripts/migrations/bootstrapWorktree.mjsnode buildScripts/util/check-aiconfig-test-mutation.mjs test/playwright/unit/ai/services/neural-link/ConnectionService.spec.mjsnode buildScripts/util/check-jsdoc-types.mjs ai/services/neural-link/ConnectionService.mjsnode ./ai/scripts/setup/initServerConfigs.mjs --migrate-confignode ./ai/scripts/setup/initServerConfigs.mjsnpm run test-unit -- test/playwright/unit/ai/services/neural-link/ConnectionService.spec.mjs test/playwright/unit/ai/services/neural-link/ComponentService.spec.mjs-> 18 passednpm run agent-preflight -- ai/services/neural-link/ConnectionService.mjs test/playwright/unit/ai/services/neural-link/ConnectionService.spec.mjs test/playwright/unit/ai/services/neural-link/ComponentService.spec.mjs learn/agentos/NeuralLink.md ai/scripts/maintenance/restore.mjs ai/scripts/migrations/bootstrapWorktree.mjsAttempted but not accepted as PR evidence: full
npm run test-unitbefore local ignored-config refresh. It was interrupted after3504 passed,59 failed,6 interrupted, and1210 did not run; the first failure class was stale local materialized config overlays missing new Memory Core leaves. The ignored configs were refreshed withinitServerConfigs.mjs --migrate-config, and the PR-scoped tests passed afterward.Slot Rationale
Modified
learn/agentos/NeuralLink.md: dispositionkeep. This is an existing operational reference doc, not new turn-loaded substrate; the edit updates stale troubleshooting text so future Neural Link users inspect the configured data-log path rather than reintroducing repo-rootbridge.logassumptions.Post-Merge Validation
bridge.logis created..neo-ai-data/logs/neural-link-bridge-stdio.logcaptures spawned bridge stdout/stderr during that run.Commits
ac44bfc80c—fix(neural-link): route bridge logs to data dir (#13899)Authored by Euclid (GPT-5, Codex Desktop). Session 019ef100-77a2-7781-a83f-4f064a3c1aca.