LearnNewsExamplesServices
Frontmatter
id13969
titleRemove AiConfig singleton mutation from Orchestrator message-harvest test helper
stateClosed
labels
bugaitestingarchitecture
assigneesneo-gpt
createdAtJun 24, 2026, 10:59 PM
updatedAtJun 24, 2026, 11:46 PM
githubUrlhttps://github.com/neomjs/neo/issues/13969
authorneo-gpt
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 24, 2026, 11:46 PM

Remove AiConfig singleton mutation from Orchestrator message-harvest test helper

Closed v13.1.0/archive-v13-1-0-chunk-6 bugaitestingarchitecture
neo-gpt
neo-gpt commented on Jun 24, 2026, 10:59 PM

Context

PR #13968 added messageConceptHarvestMs to createTestOrchestrator() in test/playwright/unit/ai/daemons/orchestrator/Orchestrator.spec.mjs using the existing helper mutation pattern:

AiConfig.orchestrator.intervals.messageConceptHarvestMs = config.messageConceptHarvestIntervalMs ?? Number.MAX_SAFE_INTEGER;

The operator flagged this after merge as an ADR 0019 violation. This is a narrow follow-up for the newly-added message-harvest lane, not a claim that the older helper cluster is fully solved.

Live latest-open sweep: checked the latest 20 open issues at 2026-06-24T20:58:35Z; no equivalent open issue found. A2A sweep: checked latest 30 all-state A2A messages at 2026-06-24T20:58:35Z; only the merged #13968 lifecycle note was present, no competing claim. Release classification: post-merge hardening follow-up; boardless.

The Problem

The helper mutates the shared AiConfig singleton and installs a hidden Number.MAX_SAFE_INTEGER default to silence a scheduler lane. ADR 0019 B4 treats test runtime writes to AiConfig as safety-critical: tests should isolate by construction, not by mutating the Provider SSOT.

Architectural Reality

  • learn/agentos/decisions/0019-aiconfig-reactive-provider-ssot.md defines AiConfig as the reactive Provider SSOT and forbids hidden defaults/type conversion at use sites.
  • ADR 0019 B4 specifically calls out shared AiConfig mutation from tests as a safety-critical violation.
  • Orchestrator.spec.mjs already contains older interval-helper mutations; this ticket targets the newly-added messageConceptHarvestMs path so #13968 does not expand that debt.

The Fix

Refactor the Orchestrator unit-test helper path for message-concept-harvest so tests do not write AiConfig.orchestrator.intervals.messageConceptHarvestMs and do not hide a fallback value in the helper. Use test-local scheduler/task-state isolation instead of mutating the shared config singleton.

Acceptance Criteria

  • Remove the direct assignment to AiConfig.orchestrator.intervals.messageConceptHarvestMs from Orchestrator.spec.mjs.
  • Preserve the scheduler behavior and tests added or affected by #13968.
  • The helper keeps unrelated tests from accidentally running message-concept-harvest without shared AiConfig mutation.
  • Focused orchestrator scheduling tests pass.

Out of Scope

  • Solving every pre-existing AiConfig B4 mutation in Orchestrator.spec.mjs.
  • Changing ADR 0019 or production config leaves.
  • Changing the #13968 runtime scheduler behavior.

Related

Origin Session ID: 30ba1931-9d59-48bb-afdf-af8904070af9 Retrieval Hint: query_raw_memories("ADR 19 messageConceptHarvestMs Orchestrator.spec AiConfig mutation #13968")

tobiu referenced in commit ea68ed3 - "fix(ai): avoid message-harvest test AiConfig mutation (#13969) (#13970)" on Jun 24, 2026, 11:46 PM
tobiu closed this issue on Jun 24, 2026, 11:46 PM