Skip to content

Finish euler_hive and viewer review follow-ups from #126 - #129

Merged
senamakel merged 3 commits into
mainfrom
euler-hive-followups
Oct 11, 2026
Merged

senamakel merged 3 commits into
mainfrom
euler-hive-followups

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

These review follow-ups to #126 were still unpushed when that PR merged:

  • euler_hive opens no desk without its initial recording. open_federation checks that the run's initial artifacts were written before it authorizes any seat work. Before this change, a failed package.json or structure.json write still let the hive run with no recording.
  • Account usage polling respects the wall-clock budget. Budget::poll_usage wraps each OpenRouter account-usage request in the remaining turn timeout. An expired budget never starts the request, and a slow request is dropped at the deadline, so the end-of-run poll can no longer overrun --max-wall-seconds.
  • Viewer: a finished run releases its stream. run() now clears runAbort after player.finish(). Before, the next run treated the completed stream as live.

Related issue

Follow-up to #126.

API or behavior changes

None outside the examples. Behavior changes are confined to examples/openhuman (euler_hive) and examples/lab/viewer.

Validation

  • cargo fmt --all -- --check: ok.
  • cargo clippy --manifest-path examples/openhuman/Cargo.toml --all-targets -- -D warnings: ok.
  • cargo test --manifest-path examples/openhuman/Cargo.toml --bin euler_hive: 46 pass.
  • examples/lab/viewer: npm test passes all 80 tests, including the new src/hive/index.test.js.

Tests

  • failed_initial_artifacts_prevent_opening_the_first_desk
  • account_polling_never_starts_after_the_wall_deadline
  • src/hive/index.test.js: runs the coordinator's actual run/finally and recording-ownership code, with the UI and stream boundaries stubbed. It covers cleanup after a completed run, and the race where an old stream completes after a new one starts.

The two Rust tests exercise functions this PR introduces, so they cannot run against the pre-fix code. The before and after behavior was not compared by running the old binary. The touched Rust files were also reformatted by rustfmt, because they were not rustfmt-clean on main.

Checklist

  • No new #[allow(...)] or #[ignore], and no relaxed lints.
  • No secrets or Project Euler data in the diff or the description.

senamakel and others added 3 commits October 11, 2026 20:30
Account usage lookups now run through a budget-aware poll that skips the
request once the wall-clock deadline has passed and drops a slow request at
its deadline, so a stalled usage call can no longer overrun the run. The
first desk is also opened only after the initial artifacts are written, and
the viewer clears its run abort handle in the finally block so a stale
stream cannot finish a newer run.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds two new example binaries under examples/openhuman that drive the
hive workflow end to end, covering budget tracking, packaging, reporting,
memory, sandboxing, and turn handling. A manifest test is included to
keep the new examples building alongside the rest of the crate.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted multi-line expressions and assertions across the openhuman
example binaries and tests into single lines, and collapsed several
multi-line match and closure bodies. No behaviour changes.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T15:18:45.027831Z 9a4891a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 8 billable files and costs up to $2.00.

Or wait 42 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: feba6967-a203-4892-aa0d-6c590b3ed955

📥 Commits

Reviewing files that changed from the base of the PR and between b822ac1 and 9a4891a.


📒 Files selected for processing (8)
  • examples/lab/viewer/package.json
  • examples/lab/viewer/src/hive/README.md
  • examples/lab/viewer/src/hive/index.js
  • examples/lab/viewer/src/hive/index.test.js
  • examples/openhuman/src/bin/euler_hive.rs
  • examples/openhuman/src/bin/euler_hive/budget.rs
  • examples/openhuman/src/bin/euler_hive/test/artifacts.rs
  • examples/openhuman/src/bin/euler_hive/test/sandbox.rs

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a4891a034

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

federation: &mut floors::Federation,
run: &artifacts::RunDir,
) -> anyhow::Result<()> {
run.check()?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Refuse to open when structure generation failed

When report::structure cannot find the workspace or its hive_view command fails, it only writes to stderr and never records a RunDir failure. Consequently this run.check() still succeeds and federation.open() authorizes paid seat work without the required structure.json, defeating the new initial-artifact guard and potentially leaving the run unusable in the viewer. Propagate or record structure-generation failures, or explicitly verify that the required artifact exists before opening.

Useful? React with 👍 / 👎.

@senamakel
senamakel merged commit 2878194 into main Oct 11, 2026
9 checks 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