LearnNewsExamplesServices
Frontmatter
title>-
authorneo-opus-ada
stateMerged
createdAtMay 23, 2026, 3:16 PM
updatedAtMay 23, 2026, 3:28 PM
closedAtMay 23, 2026, 3:28 PM
mergedAtMay 23, 2026, 3:28 PM
branchesdevtobiu/11835-delete-parser-surfaces
urlhttps://github.com/neomjs/neo/pull/11843
Merged
neo-opus-ada
neo-opus-ada commented on May 23, 2026, 3:16 PM

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

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

Resolves #11835

Summary

Sub 3 of Epic #11831. Deletes two parser surfaces whose sole runtime consumer (Orchestrator) was rewired in Sub 1 (#11833) to use Neo.util.Env from Sub 6 (#11832). Both functions had zero remaining non-test consumers per grep — pure dead code removal.

Surfaces removed

Surface Before After (Orchestrator) Justification
CadenceEngine.parseInterval(value, fallback) parseInt + clamp + fallback Env.parseNumber(process.env.X, 'X') ?? AiConfig.X lazy getter Substrate-utility-tier Neo.util.Env covers env-var parsing; AiConfig holds the canonical default
PrimaryRepoSyncService.parseEnabledFlag(value, fallback) hardcoded ['0','false','no','off'] blocklist Env.parseBool(process.env.X, 'X') ?? resolveDeploymentEnabled('X') lazy getter Env.parseBool preserves all 4 legacy false tokens per Sub 6 (#11832) AC9 boolean compatibility

No behavior change

Env.parseBool token semantics (Sub 6 AC9):

  • true: 'true', 'yes', 'on', '1' (case-insensitive after trim)
  • false: 'false', 'no', 'off', '0'
  • other: warn + undefined

Strictly a superset of parseEnabledFlag's ['0','false','no','off'] false-token set. Any caller that previously got false from parseEnabledFlag continues to get false from Env.parseBool.

Env.parseNumber semantics: returns undefined for absent input (vs parseInterval's fallback). The consumer pattern Env.parseNumber(...) ?? AiConfig.X recovers the fallback at the call-site (the operator-mandated 2-value chain). Math.max(0, n) clamp deferred to caller — Orchestrator does not need it (intervals already validated by AiConfig schema).

Deltas from ticket

  • Sub 3 AC4 (SwarmHeartbeatService:37 LOCAL drift) + AC5 (KbAlertRuleEngine:56 DEFAULT_COOLDOWN_MS) deferred to Sub 4 #11836 (sibling-daemon propagation) because their full removal requires consumer rewires that are Sub-1-style daemon refactors, not pure deletions. This PR scopes to the dead-code surfaces.
  • #11827 closure deferred to post-merge gh issue close #11827 --reason 'superseded by Epic #11831 Sub 3 #11835' — the ticket was an audit-record absorbed by this Epic.

Evidence: L1 (49/49 unit tests pass post-deletion) → L1 required (pure dead-code removal; behavioral parity proven by Sub 6 AC9 + Sub 1 #11833's already-merged consumer rewire).

Test Evidence

  • npm run test-unit -- test/playwright/unit/ai/daemons/services/CadenceEngine.spec.mjs test/playwright/unit/ai/daemons/services/PrimaryRepoSyncService.spec.mjs test/playwright/unit/ai/daemons/Orchestrator.spec.mjs49/49 pass (1.3s)

Test surface migration:

  • CadenceEngine.spec.mjs — 3 parseInterval tests removed (covered by test/playwright/unit/util/Env.spec.mjs parseNumber test suite)
  • PrimaryRepoSyncService.spec.mjsparseEnabledFlag import + 4 inline assertions removed (covered by test/playwright/unit/util/Env.spec.mjs "preserves PrimaryRepoSyncService.parseEnabledFlag legacy false tokens" test)
  • Orchestrator.spec.mjs — already migrated by Sub 1 (#11833) merged

File-size delta: -42 lines net across 4 files (-59 deletions / +17 insertions).

Post-Merge Validation

  • Operator verifies orchestrator daemon continues to run cleanly post-merge (no behavior change expected — pure dead-code removal)
  • Close #11827 with gh issue close 11827 --reason 'superseded by Epic #11831 Sub 3 #11835'
  • Sub 4 #11836 next: sibling daemon propagation (SwarmHeartbeatService + KbAlertingService + KbReconciliationService + KbGarbageCollectionService + GapInferenceEngine) — naturally absorbs the deferred AC4/AC5 deletions
tobiu
tobiu APPROVED reviewed on May 23, 2026, 3:28 PM

No review body provided.