Repository navigation
feat(runner): add the test runner, plans and tmachine Session API - #4775
Draft
matthewgrossman wants to merge 2 commits into
Draft
matthewgrossman wants to merge 2 commits into
matthewgrossman wants to merge 2 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
matthewgrossman
added this pull request to stack #4776
October 20, 2026 23:38
|
🌿 Preview your docs: https://nvidia-preview-pr-4775.docs.buildwithfern.com/openshell |
matthewgrossman
force-pushed
the
test/3954-test-runner-and-plans/matthewgrossman
branch
from
October 21, 2026 20:38
2b28380 to
34caea4
Compare
matthewgrossman
force-pushed
the
test/3954-test-runner-and-plans/matthewgrossman
branch
from
October 21, 2026 20:40
34caea4 to
03153d1
Compare
matthewgrossman
force-pushed
the
test/3954-test-runner-and-plans/matthewgrossman
branch
from
October 21, 2026 20:49
03153d1 to
fc07e55
Compare
Add the test runner (openshell-test), plans, environments and waivers, the tmachine Session API, optional test IDs and `requires` on testkit with a shared testkit-spec crate, and fmt, clippy and nextest for the new crates. Most of the code comes from #4629 by Evan Lezar, adapted to testkit finding the gateway the way the CLI does: the runner sets OPENSHELL_GATEWAY and OPENSHELL_BIN instead of writing a target file. testkit rejects `#[should_panic]` and moves other attributes such as `#[ignore]` to the generated test. The runner's catalog leaves an ignored test out of what a lane expects, and the JUnit check accepts nextest's skipped case for it. Co-authored-by: Evan Lezar <elezar@nvidia.com> Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
The drift check now also covers Branch E2E, and compares each testsuite's `suite_expected_tests` in tests/tmachine/config.nix with the number of tests the plan expects, using tests/expected-matrix.json. Raising a count in one place without the other fails the check. Document why persistent_workspace_survives_stop_start doesn't declare `requires`: the tmachine playbooks don't pass capabilities yet. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
matthewgrossman
force-pushed
the
test/3954-test-runner-and-plans/matthewgrossman
branch
from
October 21, 2026 23:45
fc07e55 to
8e6ac37
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the test runner, plans, and tmachine
SessionAPI on top of testkit. This is step 5 of the test harness plan, stacked on the suite migration.Most of the code comes from @elezar's draft #4629: the
SessionAPI,testkit-spec, and the runner, plans, environments, and waivers. It is adapted to testkit finding the gateway the way the CLI does, so the runner setsOPENSHELL_GATEWAYandOPENSHELL_BINinstead of writing a target file.Stack
Part of a stack of four; each PR targets the one below it. The tmachine move (#4726) has merged, so the stack uses its
tests/tmachine/paths.SessionAPI.Related Issue
Part of #3954
Changes
#[testkit::test(id = "t-…", requires = [...])], atestkit-speccrate that the macro and the runner share, and capabilities that reach a test throughOPENSHELL_TEST_CAPABILITIES. Existing tests don't change. The macro rejects#[should_panic]and moves other attributes such as#[ignore]to the generated test, as test(testkit): add the testkit library for end-to-end suites #4724 now does; the requirement tests calltestkit::rundirectly instead of usingshould_panic.tests/runner(openshell-test): plan resolution, environments intests/environments, waivers, JUnit result checking (a missing, skipped, or unselected test fails the lane), a strict CI mode, and--emit-github-matrix. The catalog leaves#[ignore]tests out of what a lane expects, and the JUnit check accepts nextest's skipped case for a test it never expected.tests/plans/testkit.yamlplans the suites in the environments the conformance and feature lanes run today.tests/expected-matrix.jsonis checked in, so a change to what runs where shows up as a diff.tasks/scripts/check_plan_workflow_matrix.pyfails when the release and Branch E2E workflow matrices drift from the plan, or when a testsuite'ssuite_expected_testsintests/tmachine/config.nixdiffers from the number of tests the plan expects.SessionAPI; SSH, scp, and exec timeouts;down()never panics; QEMU is cleaned up on SIGTERM; the SSH port isTMACHINE_SSH_PORT.tests/runnerandtests/tmachinein Branch Checks and the mise tasks.persistent_workspace_survives_stop_startdoesn't declarerequiresyet: the tmachine playbooks andmise run e2e:testkitdon't passOPENSHELL_TEST_CAPABILITIES, so a test withrequireswould fail there. Add it when the runner drives those lanes.Not in this PR: generating the release workflow matrices from
--emit-github-matrix, which needs a reusable workflow like the one in #4629. The drift check covers it meanwhile.Testing
Checklist
🤖 Generated with Claude Code