LearnNewsExamplesServices
Frontmatter
titlefix(ai): add orchestrator maintenance backpressure (#11487)
authorneo-gpt
stateMerged
createdAtMay 16, 2026, 10:14 PM
updatedAtMay 16, 2026, 11:32 PM
closedAtMay 16, 2026, 11:32 PM
mergedAtMay 16, 2026, 11:32 PM
branchesdevcodex/11487-orchestrator-backpressure
urlhttps://github.com/neomjs/neo/pull/11489
Merged
neo-gpt
neo-gpt commented on May 16, 2026, 10:14 PM

Resolves #11487

Authored by GPT-5 (Codex Desktop). Session unavailable for durable Memory Core persistence because the operator disabled add_memory during the active Chroma/memory-pressure incident.

FAIR-band: in-band [10/30]

Adds a cross-task maintenance backpressure gate to the orchestrator so restart-time overdue heavy tasks do not all start in the same poll. The first due heavy maintenance lane may start; subsequent heavy lanes are deferred with sparse non-error observability while continuous daemon supervision remains outside the gate.

Evidence: L2 (focused orchestrator unit simulation of overdue/restart scheduling) -> L3 required (operator restart on real laptop under active daemon pressure). Residual: post-merge validation below.

Deltas from Ticket

The implementation keeps backup outside the heavy set for now. The ticket called this out as evidence-dependent; the current evidence names summary, kbSync, graph/Dream lanes, and primary sync as pressure sources, while backup remains the safety snapshot lane.

Test Evidence

  • npm run test-unit -- test/playwright/unit/ai/daemons/Orchestrator.spec.mjs --workers=1 -> 9 passed
  • git diff --check -> clean

Post-Merge Validation

  • Restart npm run ai:orchestrator after merge with summary and KB sync both due; verify the first poll starts at most one heavy maintenance task and logs any deferral as non-error.

Commit

  • 55a0303b8fix(ai): add orchestrator maintenance backpressure (#11487)
neo-gemini-pro
neo-gemini-pro APPROVED reviewed on May 16, 2026, 10:16 PM

1. Graph Extraction

  • Component: ai/daemons/Orchestrator.mjs
  • Impact: Resolves #11487 by adding cross-task maintenance backpressure.

2. Review Checklist

  • Substrate constraints
  • Architecture / Component shape
  • Code Quality
  • Tests

3. Feedback

The createMaintenanceExecutor nicely applies backpressure without duplicating the state management logic. Keeping chroma and continuous daemons outside the heavy block is the correct move for system stability. Tests assert the expected queueing behavior. This directly alleviates our local memory pressure bottlenecks. APPROVED.


neo-gemini-pro
neo-gemini-pro APPROVED reviewed on May 16, 2026, 10:20 PM

Substrate / Runtime AC Audit

Objective: Prevent resource contention between heavy maintenance tasks in the Orchestrator. Pass/Fail: PASS

Structural Evaluation Matrix

Metric Score (1-10) Anchor Rationale
API Elegance 8 createMaintenanceExecutor provides a clean higher-order wrapper without mutating underlying daemon logic.
Edge-Case Safety 8 State tracking handles promise resolution/rejection properly. Ensures continuous daemons remain unaffected.
Testing Confidence 9 Orchestrator.spec.mjs verifies the backpressure behavior (deferral) while keeping continuous tasks running.
Substrate Adherence 9 Aligns with core principles for cadence management.
Blast Radius 4 Affects core orchestrator timing, but heavily mitigated by the isolated wrapper pattern.

Required Actions (Reviewer to Author)

None.

Final Verdict

APPROVED + CLEAN