Skip to content

feat: improve run discovery and group pages#10

Merged
Frando merged 8 commits intomainfrom
fix/cli
Mar 30, 2026
Merged

feat: improve run discovery and group pages#10
Frando merged 8 commits intomainfrom
fix/cli

Conversation

@Frando
Copy link
Copy Markdown
Member

@Frando Frando commented Mar 27, 2026

Overhauls run discovery, test result handling, and the compare UI to support the full CI-to-UI workflow without requiring a patchbay binary in CI.

The server now uses events.jsonl as the sole leaf-run indicator and treats run.json without it as a group manifest. Test results are built from directory structure first (authoritative names like patchbay/holepunch_simple), then enriched with status and duration from nextest JSONL output. This replaces the old approach that started from nextest $-style names and tried to reverse-match directories. The server merges test-results.jsonl into manifests at discovery time and recomputes pass/fail counts, so CI only needs cargo nextest run > test-results.jsonl plus tar | curl to push results — no patchbay binary needed.

The group page now handles both sim and test groups. For test groups it shows manifest metadata (PR link, branch, commit, outcome) and a table of per-test results with clickable links to individual run views. The runs index links groups to their group page and displays PR numbers. The compare view cleanly separates group mode (diff table only) from run mode (side-by-side split view only), and group compare synthesizes manifests from child runs when no run.json exists. Test names in the diff table come from directory paths and link to the correct individual run comparisons.

Other fixes: the timeline tab now includes tracing_jsonl files (device tracing events were previously filtered out), the compare page no longer hangs on "Loading lab state..." for test runs without state.json, and the ctor bootstrap for user namespace init is restored for nextest-spawned test processes. Legacy batch/invocation aliases are removed.

Frando and others added 7 commits March 27, 2026 15:00
Move all Linux-only code (sim execution, inspect, run-in) to native.rs
and VM dispatch to vm.rs. Run/Prepare/Test commands auto-detect: native
on Linux, VM elsewhere. Shared RunArgs struct via clap flatten. VmCommand
Test reuses TestArgs. No more scattered #[cfg(target_os)] in main.rs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace cargo binstall with a direct curl+tar from the rolling release.
Faster, no extra tooling, and works reliably in CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add back #[ctor::ctor] init_userns_for_ctor() in native.rs so test
binaries spawned by nextest set up user namespaces before main().
Replace cargo binstall with direct curl+tar from rolling release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use nextest --message-format libtest-json for structured test results
instead of parsing human-readable output. Extract shared helpers
(run_piped, parse_nextest_json, has_nextest) from test.rs and reuse
in compare.rs. Falls back to cargo test with text parsing when nextest
is unavailable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Server auto-generates run.json from test-results.jsonl on push when no
run.json is present. Directories with run.json but no events.jsonl and
no children are now treated as leaf runs (not empty groups). Push
response includes view_url. Compare page no longer hangs on "Loading
lab state..." for test runs without state.json. parse_nextest_json
moved to patchbay-utils for reuse by server. CI template simplified to
nextest + curl (no patchbay binary needed). Stderr flows to console.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Run discovery uses events.jsonl as the sole leaf-run indicator. run.json
without events.jsonl is a group manifest, not a leaf. Server merges
test-results.jsonl into existing run.json on push instead of
auto-generating. CompareView detects group params (no matching run) and
builds synthetic manifests from child runs. Fix double-prefix bug in
test click navigation by tracking leftDir/rightDir separately. CI
template uses jq for run.json and gh CLI for PR comments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace resolve_test_dirs with build_test_list: scan dirs for
events.jsonl first (authoritative), create TestResults from directory
names, then enrich with nextest status/duration. Server prefixes dir
fields with group name for navigable full paths. GroupPage enhanced
for test groups (PR link, pass/fail, test table). CompareView cleanly
separates group mode (diff table only) vs run mode (split view only).
RunsIndex shows PR links and links groups to /group/. Remove batch/inv
legacy aliases. TimelineTab includes tracing_jsonl. Push view_url
points to /group/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Frando Frando changed the title refactor: extract native.rs and vm.rs from main.rs feat: improve run discovery and group pages Mar 30, 2026
@Frando Frando merged commit 4fb9f73 into main Mar 30, 2026
3 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