The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(coverage-runner-status): add tests for required-features skip logic\n\nAdd two tests that pin the behaviour of the required-features skip in run_integration_target, which previously had no test coverage and drifted out of sync with the implementation. One test verifies that a target is skipped when its required feature is absent from the product set, and the other confirms that the target runs when the feature is present, using a product set that includes a prefix-adjacent neighbour to guard against substring matching.\n\nAuto-committed-on: dragonfly\n
Steven Enamakel4457dffce5fb
diff --git a/scripts/__tests__/coverage-runner-status.test.mjs b/scripts/__tests__/coverage-runner-status.test.mjsindex ecb80be872..58af70d44c 100644--- a/scripts/__tests__/coverage-runner-status.test.mjs+++ b/scripts/__tests__/coverage-runner-status.test.mjs@@ -161,3 +161,53 @@ test("run_counted counts zero for a run that executed no tests", () => {assert.equal(res.status, 0, res.output);assert.match(res.output, /ZERO/);});++// The `required-features` skip that `run_integration_target` performs on entry+// had no test of its own, which is how the extraction above drifted out of sync+// with it unnoticed. These pin both directions.++test("an integration target whose required-features are not in the product set is skipped", () => {+ const res = withRunnerFunctions(+ ["run_counted", "target_features_satisfied", "run_integration_target"],+ [+ // `memory_artifacts_e2e` needs `memory-git`, which the product set below+ // does not enable — the exact shape that took this lane down when a gate+ // was dropped from the product set.+ 'TEST_TARGET_REQS="$(printf \'memory_artifacts_e2e\\tmemory-git\')"',+ 'PRODUCT_FEATURES="channels,flows"',+ "log() { printf '%s\\n' \"$*\"; }",+ // Fails loudly if the skip does not happen, so a regression cannot pass+ // by quietly doing the work.+ "llvm_cov() { echo 'RAN-THE-TARGET'; return 0; }",+ ].join("\n"),+ [+ "run_integration_target memory_artifacts_e2e",+ 'echo "rc=$?"',+ ].join("\n"),+ );++ assert.match(res.output, /skipping memory_artifacts_e2e/, res.output);+ assert.doesNotMatch(res.output, /RAN-THE-TARGET/, res.output);+ // Skipping is success: one unsatisfiable target must not fail the lane.+ assert.match(res.output, /rc=0/, res.output);+});++test("an integration target whose required-features are all present still runs", () => {+ const res = withRunnerFunctions(+ ["run_counted", "target_features_satisfied", "run_integration_target"],+ [+ 'TEST_TARGET_REQS="$(printf \'memory_artifacts_e2e\\tmemory-git\')"',+ // Same target, now satisfied. Substring matching would be a real hazard+ // here, so the product set deliberately contains a feature that has+ // `memory-git` as a prefix-adjacent neighbour.+ 'PRODUCT_FEATURES="memory-github,memory-git,flows"',+ "log() { printf '%s\\n' \"$*\"; }",+ "llvm_cov() { echo 'RAN-THE-TARGET'; return 0; }",+ ].join("\n"),+ ["run_integration_target memory_artifacts_e2e", 'echo "rc=$?"'].join("\n"),+ );++ assert.match(res.output, /RAN-THE-TARGET/, res.output);+ assert.doesNotMatch(res.output, /skipping/, res.output);+ assert.match(res.output, /rc=0/, res.output);+});