Repository navigation
ci(guardrails): a switch to skip the tables check's cargo step locally - #1260
Merged
Merged
Conversation
tables-check's step 4 runs cargo run -p opencode-plugin-spec -- --check: the one guardrail step that starts cargo, and a compiler whenever that crate or its contract changed since the last run. OPENCODE_GUARDRAILS_NO_CARGO=1 skips it, prints that it did, and the script's last line then says 3 of 4 steps ran. CI does not set the variable, so a pull request's guardrails check runs the step as before.
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.
scripts/guardrails.shis described as cheap, but one of its steps starts cargo.tables-check.mjsstep 4 runscargo run -q -p opencode-plugin-spec -- --check, which compiles the spec crate whenever it or its contract changed since the last run. On a machine that must not compile, that step needs an off switch.What changes
scripts/guardrails/tables-check.mjs: withOPENCODE_GUARDRAILS_NO_CARGO=1, step 4 is skipped.SKIP step 4 skipped locally (plugin-spec check runs in CI).tables check: ok for 3 of 4 steps (step 4 not run), so a skipped run never reads as a full pass.guardrailscheck runs step 4 as before.ARCHITECTURE.md: one sentence on the switch beside the step it skips.What a skipped run does not prove
contract.jsonwhose generated files were not written again, a skipped local run passes and only CI fails. The author still needs--write, or CI's red, to find out.Not changed
arch-check.mjsstill runscargo metadata. It reads the crate graph and compiles nothing; whether the switch should cover it too is left open.Runs
SKIP step 4 skipped locally (plugin-spec check runs in CI)tables check: ok for 3 of 4 steps (step 4 not run)guardrailscheck (variable not set)INFO plugin spec: 15 generated files match contract.json 1.10tables check: ok