Skip to content

fix(supervisor): harden live loops and tester auto planning#58

Merged
phroi merged 6 commits into
masterfrom
fix/supervisor-loop-auto-planning
May 29, 2026
Merged

fix(supervisor): harden live loops and tester auto planning#58
phroi merged 6 commits into
masterfrom
fix/supervisor-loop-auto-planning

Conversation

@phroi
Copy link
Copy Markdown
Member

@phroi phroi commented May 29, 2026

Why

Live supervisor loops should run against freshly built local runtime artifacts, reserve output/session directories without race-prone existence checks, and avoid leaking child process output when setup fails. Tester auto-planning should skip non-actionable balance states instead of selecting dust-sized raw orders.

Changes

  • Make tester auto scenario resolution return a nonterminal estimate skip when no actionable scenario is funded.
  • Sample random raw orders only from amounts that satisfy matcher output and maturity fee thresholds.
  • Prebuild CCC, bot, tester, and supervisor runtime before live supervisor loop runs, with a loop-owned --skip-build escape hatch.
  • Harden supervisor output and dynamic validation session directory creation against races and symlinked paths.
  • Clarify live loop docs and ignore local logs/scratch files.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a prebuild step for local runtimes (CCC, bot, tester, and supervisor) before running the supervisor loops, along with a --skip-build flag to bypass it. It also refactors the tester's transaction planning to handle cases with no actionable auto scenarios gracefully (returning undefined instead of throwing) and improves directory creation safety in the supervisor. Feedback on these changes suggests passing essential Windows environment variables during the prebuild step to prevent failures on Windows platforms, and removing a redundant check for selected === undefined in planTesterTransaction since the resolved scenario function already throws on failure.

Comment thread scripts/ickb-supervisor-loop.mjs
Comment thread apps/tester/src/index.ts Outdated
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 29, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several improvements to the supervisor and tester loops. Key changes include prebuilding the local runtime by default before running loops (with a new --skip-build option to bypass this), refactoring output directory and validation session root creation to recursively create parent directories first to prevent race conditions, and enhancing the tester's scenario resolution to return undefined and log a non-terminal skip when no actionable scenario is funded. Additionally, error reporting in the supervisor loop has been improved to capture and log child process spawn errors and signals when a run summary is missing. All review comments have been filtered out as they were redundant with the implemented changes, so we have no further feedback to provide.

@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 29, 2026

LGTM

Phroi %161

@phroi phroi merged commit 017eb56 into master May 29, 2026
1 check passed
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