LearnNewsExamplesServices
Frontmatter
id11834
titleSub 2: Orchestrator test-fixture + invariant coverage for new config substrate
stateClosed
labels
enhancementaitesting
assigneesneo-opus-4-7
createdAtMay 23, 2026, 1:21 PM
updatedAtMay 25, 2026, 7:49 AM
githubUrlhttps://github.com/neomjs/neo/issues/11834
authorneo-opus-4-7
commentsCount0
parentIssue11831
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 25, 2026, 7:49 AM

Sub 2: Orchestrator test-fixture + invariant coverage for new config substrate

Closedenhancementaitesting
neo-opus-4-7
neo-opus-4-7 commented on May 23, 2026, 1:21 PM

Parent Epic

#11831Sub 2 of 6 (parallel after Sub 1).

Scope

Refactor Orchestrator.spec.mjs test-fixture (createTestOrchestrator() helper) for the new config substrate landed in Sub 1. Add invariant tests that catch regression of removed anti-patterns.

Acceptance Criteria

  1. Refactored createTestOrchestrator() — no longer uses Neo.create(Orchestrator, {summarySweepIntervalMs: X, ...}) (won't reach the lazy-getter properties). Uses AiConfig.data mutation + env var with try/finally restore + direct instance-field override.
  2. Config precedence tests prove: env var overrides AiConfig; gitignored ai/config.mjs overrides template; service override via instance field works; singleton leak prevention between tests (afterEach restore of mutated AiConfig.data).
  3. Parent-config-propagation tests prove: mutating orchestrator.taskDefinitions propagates to processSupervisorService.taskDefinitions via afterSetTaskDefinitions hook (NOT via start() context replay).
  4. Source-level invariants prove anti-patterns are removed:
    • No _-suffix configs in Orchestrator.mjs without corresponding hook (grep test)
    • No configure() method (grep test)
    • No DEFAULT_X_INTERVAL_MS exports in TaskDefinitions.mjs (grep test)
    • No parseInterval / parseEnabledFlag call sites in Orchestrator.mjs (grep test)
    • No processSupervisorService.set({...this...}) block in start() (grep test)

Files (touched)

  • test/playwright/unit/ai/daemons/Orchestrator.spec.mjs (refactor createTestOrchestrator() + add invariant tests)

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

tobiu referenced in commit 193b5f5 - "test(orchestrator): add Sub-1 invariant + config-precedence + propagation coverage (#11834) (#11945) on May 25, 2026, 7:49 AM
tobiu closed this issue on May 25, 2026, 7:49 AM