Repository navigation
test(cross-major): extract the shared manager harness into gvm_extra - #49
Merged
kp2pml30 merged 1 commit intoOct 6, 2026
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (3)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
GenVM PR actionsTick a box to run it (the box unticks itself when handled). Actions only run while the PR has the
Commands
|
`cross-major-observability` drove the manager by loading `cross-major/test.py` through `importlib.util.spec_from_file_location` and then reaching across that module boundary for ten names, eight of them private. The path coupling breaks silently if the sibling directory is renamed, and the duplication was already real: the observability case carried its own `_execute` and `_lvs_extended` because the originals could not be parameterized. `tests/runner/gvm_extra/` is already on the test path, so the shared mechanism moves there as `gvm_extra/cross_major.py`: the case and step bases, the call encoding helpers, and the host plumbing. Each case keeps its own fixtures, addresses and assertions. Three deliberate changes let one definition serve both cases: - `_execute` grows a `permissions` argument, so the observability override disappears. It is only sent when a case asks for it, which keeps cross-major's request payload unchanged. - `_execute`'s `host_data` tx_id becomes `host_data_tx_id`, set by the new `_setup` helper, so each case labels its own runs. - `_lvs` takes `**kwargs` instead of naming four parameters, which is what `_lvs_extended` was for. Every other moved body is byte-identical apart from the `_TestContext` to `TestContext` rename. Verified by collecting both cases before and after and diffing name, method, fixtures, arguments and tags: 20 cross-major and 23 observability cases, identical in both runs. `ruff check` is at parity with the pre-change baseline (the one remaining BLE001 predates this change). The runner-artifact tier is unrun: runner artifacts build on Linux only and this was not built locally. (cherry picked from commit 309d45c)
HusseinAdeiza
force-pushed
the
extract-cross-major-harness
branch
from
September 30, 2026 05:36
309d45c to
cdcc297
Compare
kp2pml30
merged commit Oct 6, 2026
1dff5e2
into
genlayerlabs:feat/manager-socket-train
6 checks passed
Member
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.
Closes #16.
cross-major-observabilitydrove the manager by loadingcross-major/test.pythrough
importlib.util.spec_from_file_locationand then reaching across thatmodule boundary for ten names, eight of them private:
The path coupling breaks silently if the sibling directory is renamed, and the
duplication was already real: the observability case carried its own
_executeand
_lvs_extendedbecause the originals could not be parameterized.tests/runner/gvm_extra/is already on the test path, so the shared mechanismmoves there as
gvm_extra/cross_major.py. Each case keeps its own fixtures,addresses and assertions.
What changed
Three deliberate changes let one definition serve both cases:
_executegrows apermissionsargument, so the observability overridedisappears. It is only sent when a case asks for it, which leaves
cross-major's request payload unchanged.
host_data's tx_id becomeshost_data_tx_id, set by a new_setuphelper,so each case labels its own runs.
_lvstakes**kwargsinstead of naming four parameters, which is what_lvs_extendedexisted for.Every other moved body is byte-identical apart from the
_TestContexttoTestContextrename.contract_sourcenow requiresassets_dirrather thandefaulting it, because the two cases keep assets in different directories.
Net: 429 insertions, 465 deletions, one definition of each helper, no
importliband nobase._reach-through.Verification
Collected both cases before and after, then diffed name, method, fixtures,
arguments and tags:
cross-majorcross-major-observabilityruff checkon the three files is at parity with the pre-change baseline. Theone remaining
BLE001predates this change and is left alone.Unrun: the runner-artifact tier. Runner artifacts build on Linux only and
were not built here, so per the review-ready bar that tier is reported as
unrun, not passed. The full integration matrix needs the
ci-safelabel.Note on scope
The issue listed
ManagerProcandPY_GENLAYER_V03among the names to extract.Neither exists in the tree any more, so the live surface was ten names, not
eight-plus-constants. Left the remaining case-specific assertions alone.