Skip to content

Add live supervisor evidence loops#50

Merged
phroi merged 7 commits into
masterfrom
review/supervisor-live-evidence
May 28, 2026
Merged

Add live supervisor evidence loops#50
phroi merged 7 commits into
masterfrom
review/supervisor-live-evidence

Conversation

@phroi
Copy link
Copy Markdown
Member

@phroi phroi commented May 28, 2026

Why

Live testnet supervision needs bounded evidence artifacts that external loops can inspect without re-entering funded actor state or inheriting operator secrets.

Changes

  • Expand the supervisor summary with tx-creating counters, tester order evidence, preflight state, scenario attempts, and validation-session output path support.
  • Tighten supervisor-loop decisions around summary-owned tx counters, validation chunk roots, child timeouts, symlink checks, and minimal child environments.
  • Add a dynamic supervisor loop that chooses fundable tester stimuli from preflight balances and delegates bounded chunks to the supervisor loop.
  • Document live supervisor, loop, and dynamic-loop usage.

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 dynamic supervisor loop (ickb-supervisor-dynamic-loop.mjs) that automatically selects fundable tester scenarios based on preflight balances, along with associated tests, documentation, and script helpers. It also refactors the supervisor's output directory handling to support validation sessions and adds robust timeout and retry mechanisms. The reviewer feedback focuses on code quality improvements, including grouping duplicate post-broadcast transaction failure checks, consistently using established helper functions instead of optional chaining for transaction hash extraction, and utilizing a custom JSON replacer to safely serialize bigint values in NDJSON logging streams.

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

phroi commented May 28, 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 a dynamic external loop (ickb-supervisor-dynamic-loop.mjs) that reads tester preflight balance summaries, selects fundable tester scenarios, and runs bounded supervisor-loop chunks. It also adds validation session roots, outer process timeout guards, preflight state summaries, and updates the supervisor loop script to support validation session directories. The feedback suggests a minor refactoring in the new dynamic loop script to remove the redundant childPath helper and use displayPath instead, improving code maintainability.

Comment thread scripts/ickb-supervisor-dynamic-loop.mjs Outdated
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 28, 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 a dynamic supervisor loop (scripts/ickb-supervisor-dynamic-loop.mjs) that reads tester preflight balance summaries, selects a fundable tester scenario, and executes bounded supervisor-loop chunks. It also adds helper scripts, updates documentation, and introduces comprehensive tests for the new loop, preflight balance checks, and error classifications. The code review feedback suggests enhancing error handling when spawning external commands via spawnSync in the dynamic loop script. Specifically, the reviewer recommends checking for and logging result.error messages during preflight and supervisor chunk execution to prevent swallowing spawn errors or timeouts.

Comment thread scripts/ickb-supervisor-dynamic-loop.mjs Outdated
Comment thread scripts/ickb-supervisor-dynamic-loop.mjs
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 28, 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 a dynamic supervisor loop (ickb-supervisor-dynamic-loop.mjs) to continuously match tester and bot scenarios based on preflight balance summaries. It updates the supervisor and supervisor-loop scripts to support validation session output directories, handle child timeouts, and manage preflight retries. Additionally, new classification outcomes like bot_retryable_error and preflight_retryable_error are introduced, and extensive tests are added. The feedback suggests improvements to the serialization helpers, such as handling Date objects and bigint values safely in jsonReplacer within the dynamic loop scripts. It also recommends adding NODE_OPTIONS: "--disable-warning=DEP0040" to minimalProcessEnv in both loop scripts to suppress deprecation warnings, and validating that calculated timeouts do not exceed Number.MAX_SAFE_INTEGER before conversion.

Comment thread scripts/ickb-supervisor-dynamic-loop.mjs
Comment thread scripts/ickb-supervisor-dynamic-loop.mjs
Comment thread scripts/ickb-supervisor-loop.mjs
Comment thread scripts/ickb-supervisor-dynamic-loop.mjs
Comment thread scripts/ickb-supervisor-dynamic-loop.mjs
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 28, 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 a dynamic external loop (ickb-supervisor-dynamic-loop.mjs) to continuously match tester and bot scenarios based on preflight balance summaries. It updates the supervisor and supervisor-loop scripts to support dynamic validation sessions, child timeouts, preflight retries, and detailed preflight state summaries. Additionally, new test suites, helper scripts, and documentation have been added to support these features. I have no feedback to provide as there are no review comments.

@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 28, 2026

LGTM

Phroi %200

@phroi phroi merged commit f708466 into master May 28, 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