LearnNewsExamplesServices
Frontmatter
title>-
authorneo-opus-ada
stateMerged
createdAtMay 23, 2026, 5:18 PM
updatedAtMay 23, 2026, 5:26 PM
closedAtMay 23, 2026, 5:26 PM
mergedAtMay 23, 2026, 5:26 PM
branchesdevtobiu/11845-subdaemon-cluster-cleanup
urlhttps://github.com/neomjs/neo/pull/11850
Merged
neo-opus-ada
neo-opus-ada commented on May 23, 2026, 5:18 PM

Authored by Claude Opus 4.7 (Claude Code). Session 5572d9a5-558d-4bea-b416-e31496c289c4.

FAIR-band: in-band [verify @ merge-gate]

Resolves #11845

Summary

Sub 9 of Epic #11831 — co-locates the four sub-daemon clusters into per-folder mirrors of Sub 8's orchestrator pattern. Each cluster gets its own folder under ai/daemons/ with the daemon-class file alongside a daemon.mjs entry script (folder context provides identity).

Evidence: L1 (76/76 moved-spec + 200/200 consumer-spec; 2011 pass / 19 pre-existing flakes on full unit) → L1 required for substrate refactor (pure structural moves + mechanical import rewires; no behavioral change).

Source moves (8)

From To
ai/scripts/bridge-daemon.mjs ai/daemons/bridge/daemon.mjs
ai/scripts/bridge-daemon-queries.mjs ai/daemons/bridge/queries.mjs (renamed)
ai/daemons/KbAlertingService.mjs ai/daemons/kb-alerting/KbAlertingService.mjs
ai/scripts/kb-alerting-daemon.mjs ai/daemons/kb-alerting/daemon.mjs
ai/daemons/KbGarbageCollectionService.mjs ai/daemons/kb-gc/KbGarbageCollectionService.mjs
ai/scripts/kb-gc-daemon.mjs ai/daemons/kb-gc/daemon.mjs
ai/daemons/KbReconciliationService.mjs ai/daemons/kb-reconciliation/KbReconciliationService.mjs
ai/scripts/kb-reconciliation-daemon.mjs ai/daemons/kb-reconciliation/daemon.mjs

Test moves (5)

  • bridge-daemon.spec.mjsai/daemons/bridge/daemon.spec.mjs
  • bridge-daemon-queries.spec.mjsai/daemons/bridge/queries.spec.mjs
  • KbAlertingService.spec.mjsai/daemons/kb-alerting/
  • KbGarbageCollectionService.spec.mjsai/daemons/kb-gc/
  • KbReconciliationService.spec.mjsai/daemons/kb-reconciliation/

Deltas from ticket: Ticket stated "(No bridge unit spec exists currently.)" but bridge-daemon.spec.mjs (49KB, 12 spawn-tests) and bridge-daemon-queries.spec.mjs (3.7KB) both exist. Moved them to mirror source structure rather than leave behind in ai/scripts/.

Wiring updates

  • package.json: 3 npm script paths (ai:kb-alerting/kb-gc/kb-reconciliation)
  • Orchestrator.mjs:14-16: from '../bridge/queries.mjs'
  • TaskDefinitions.mjs:70: bridgeDaemon.args resolves to new path
  • TaskDefinitions.mjs:72: expectedCommand: 'daemons/bridge/daemon.mjs' — disambiguates among the 5 daemon.mjs files post-Sub-8/9 (else any daemon's process command line would falsely match)
  • bridge/daemon.mjs:179: enforceSingleton() substring check updated for the same reason
  • SummarizationCoordinatorService.mjs:8: bridge-queries import path
  • multi-tenant.spec.mjs:114: dynamic-import path
  • 3 KbEngine helpers + CoalescingEngineService: JSDoc + code references

V-B-A discipline (#11844 anchor)

Sub 8's missed dynamic-import (MailboxService.spec.mjs await import(...ai/daemons/SwarmHeartbeatService.mjs)) prompted me to sweep BOTH static from '...' AND dynamic await import('...') call-sites this time. Caught the SummarizationCoordinatorService import via the dual sweep.

Test Evidence

Local full unit run on dev (no NEO_TEST_SKIP_CI filter — Sub 8's lesson):

  • 2011 passed, 19 failed, 2 skipped, 10 did not run
  • Of 19 failures: 0 reference moved files (verified via grep on each spec). All pre-existing flakes in Authorization, checkAllAgentIdle, checkSunsetted, QueryReRanker, TextEmbeddingService.retry, WriteSideInvariant, Grid (Pooling/Teleportation/LockedColumns) — all acknowledged per operator's NEO_TEST_SKIP_CI guidance and earlier-session baseline.
  • Moved-spec subsuite: 76/76 passed.
  • Consumer-spec subsuite (orchestrator + KbReconciliationEngine + CoalescingEngineService + WakeSubscriptionService): 200/200 passed.

Post-Merge Validation

  • npm run ai:kb-alerting / npm run ai:kb-gc / npm run ai:kb-reconciliation smoke (each daemon boots, registers via NL, accepts SIGTERM).
  • Orchestrator restart picks up bridgeDaemon via new path; ps -p ${pid} -o command= substring check passes the disambiguated expectedCommand.

Depends on

Sub 8 #11844 — merged to dev ✓ (commit 6cc917980).

Unblocks

  • Sub 10 #11846 (cross-daemon services bucket)
  • Sub 11 #11847 (ai/scripts/ thematic split)

Deltas from ticket

  • Test moves: ticket listed 3, actual is 5 (added 2 bridge specs that ticket missed).
  • Bridge wire-up: ticket did not mention expectedCommand or enforceSingleton() substring updates; both are required because all daemon entry scripts now share daemon.mjs filename, so substring matching must include the folder.

Authored by: [Claude Opus 4.7] (Claude Code)

github-actions commented on May 23, 2026, 5:18 PM

🚨 Agent PR Body Lint Violation

@neo-opus-ada — your PR body on PR #11850 does not match the pull-request template structure.

Required action: read .agents/skills/pull-request/SKILL.md BEFORE editing the PR body. The skill points at:

  • Minimum-viable PR body structure: .agents/skills/pull-request/references/pull-request-workflow.md §9
  • Self-Identification mandate: .agents/skills/pull-request/references/pull-request-workflow.md §5

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 workflow file and following its structure.

Diagnostic hint: at least one recognized anchor like FAIR-band: is missing.

Visible anchors missing (full list)
  • FAIR-band:
  • Evidence:
  • Ticket reference (e.g., Resolves #N, Related: #N)

This is the CI tool-boundary lint companion to PR #11494's MCP manage_pr_review validator and PR #11502's agent-pr-review-body-lint.yml reviewer-side lint. Resolves #11501.


github-actions commented on May 23, 2026, 5:22 PM

🚨 Agent PR Body Lint Violation

@neo-opus-ada — your PR body on PR #11850 does not match the pull-request template structure.

Required action: read .agents/skills/pull-request/SKILL.md BEFORE editing the PR body. The skill points at:

  • Minimum-viable PR body structure: .agents/skills/pull-request/references/pull-request-workflow.md §9
  • Self-Identification mandate: .agents/skills/pull-request/references/pull-request-workflow.md §5

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 workflow file and following its structure.

Diagnostic hint: at least one recognized anchor like FAIR-band: is missing.

Visible anchors missing (full list)
  • FAIR-band:
  • Evidence:
  • Ticket reference (e.g., Resolves #N, Related: #N)

This is the CI tool-boundary lint companion to PR #11494's MCP manage_pr_review validator and PR #11502's agent-pr-review-body-lint.yml reviewer-side lint. Resolves #11501.


tobiu
tobiu APPROVED reviewed on May 23, 2026, 5:26 PM

No review body provided.