Skip to content

fix(agent-manager): share async process snapshots - #159

Merged
codeaholicguy merged 2 commits into
mainfrom
feature-console-main-thread-responsiveness
Aug 14, 2026
Merged

fix(agent-manager): share async process snapshots#159
codeaholicguy merged 2 commits into
mainfrom
feature-console-main-thread-responsiveness

Conversation

@codeaholicguy

@codeaholicguy codeaholicguy commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • capture and enrich relevant process data once per AgentManager refresh using asynchronous child-process execution
  • slice the union snapshot by each adapter's declared processNames before dispatch, preserving the historical candidate pools for Pi and Gemini broad token matchers
  • defensively scope hand-built adapter contexts and normalize Windows separators/.exe suffixes through one shared executable filter
  • keep Ink incremental rendering enabled and retain the existing 3000 ms polling cadence
  • preserve adapter matching, registry behavior, sorting, enrichment, platform fallbacks, and partial failure handling
  • replace the unsupported async execFile stdio option with an explicit 10 MiB maxBuffer

Validation

  • TDD red: six deterministic failures proved the full-union leak, missing shared filter, missing async buffer, and Windows-path rejection
  • focused manager/process/Pi/Gemini: 4 files, 131 tests passing
  • all seven adapter suites: 7 files, 296 tests passing
  • regression gate: foreign-argument test fails when manager slicing is removed and passes after restoration
  • agent-manager full: 24 files, 510 tests passing; lint, typecheck, and build passing
  • CLI agent/console focused: 23 files, 207 tests passing
  • CLI full: 81 files, 967 tests passing; lint and build passing
  • repository full serial tests across all 6 projects passing
  • repository lint passing with 0 errors (6 existing warnings); repository build passing

Compatibility and risk

  • snapshot capture still performs exactly one base ps -axo scan per refresh; per-adapter slicing is in-memory only
  • snapshot and enrichment failures remain best-effort, and adapter failures still yield partial manager results
  • legacy third-party adapters without processNames continue through the unchanged no-context path
  • standalone built-in adapter calls retain asynchronous local capture

@codeaholicguy
codeaholicguy merged commit 051b941 into main Aug 14, 2026
7 checks passed
@codeaholicguy
codeaholicguy deleted the feature-console-main-thread-responsiveness branch August 14, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant