Repository navigation
Finish euler_hive and viewer review follow-ups from #126 - #129
Conversation
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>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reached
This review includes 8 billable files and costs up to $2.00. Or wait 42 minutes for your next included review. View limit details
Comment |
There was a problem hiding this comment.
💡 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()?; |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
These review follow-ups to #126 were still unpushed when that PR merged:
euler_hiveopens no desk without its initial recording.open_federationchecks that the run's initial artifacts were written before it authorizes any seat work. Before this change, a failedpackage.jsonorstructure.jsonwrite still let the hive run with no recording.Budget::poll_usagewraps 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.run()now clearsrunAbortafterplayer.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) andexamples/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 testpasses all 80 tests, including the newsrc/hive/index.test.js.Tests
failed_initial_artifacts_prevent_opening_the_first_deskaccount_polling_never_starts_after_the_wall_deadlinesrc/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 onmain.Checklist
#[allow(...)]or#[ignore], and no relaxed lints.