Repository navigation
Skip the local test step in final runs for dev-bound PRs - #52
Merged
Merged
Conversation
Add a PreToolUse check that reads the PR base and requires --skip test on a dev base, and refuses it on any other base. An unreadable base keeps the full run.
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.
Problem
Fix
bin/fm-nm-base-skip-pretool-check.shruns before a worker starts a newno-mistakes axi run --intent ....--base-branch, else from the forge (gh pr view).dev(setFM_NM_TEST_SKIP_BASESto change): the run must carry--skip test, or the command is refused with the exact flag to add. Review, document and lint still run.test; the full run keeps its tests.bin/fm-op-guard-install.shregisters it beside the existing guards. It uses no-mistakes' own--skipflag; no-mistakes is not patched.Worked example (PR 750, base dev):
no-mistakes axi run --intent "...".dev, no--skip test.--skip test, and the run does review, document and lint only.Proof
tests/fm-nm-base-skip-pretool-check.test.sh(stub forge): dev without skip refused, dev with--skip testor a list holding it allowed,testingdoes not count, main without skip allowed, main with--skip testrefused, unknown base allowed,--base-branchoverrides, only new runs checked, hook payload, installer registers it. All pass.base=dev skip=[] -> rc=2,base=dev skip=[--skip test] -> rc=0,base=main skip=[] -> rc=0,base=main skip=[--skip test] -> rc=2.tests/fm-op-pretool-check.test.sh(hook count now 3) andtests/fm-nm-mirror-pretool-check.test.shpass;bin/fm-lint.shclean.Fork footprint vs upstream main