Repository navigation
Conversation
CI Results
All checks passed. |
…d both vendored files to it The vendored id-masking gate and mask core are tested by their own self-tests, run in this process. Here those reached 98% of the gate's lines and 97% of its branches, and 99% and 98% of the core's. Three things were left unreached: rules this repository's policy planted no case for; the core's main() entry, which CI's `mask-aws-ids.sh --self-test` goes through; and the gate's refusal to run without tomllib or PyYAML, which its self-test proves only in a child process the coverage run does not see. - scripts/workflow-id-masking.toml plants six more cases the gate must reject: every variable through an object filter, a variable read in a job granted write-all, a role ARN assembled around an account id secret, an id-named key in the workflow-level env, an environment id whose needs share a job, and a guard written with a double-quoted string. It also lists the first [[accepted]] edits, four changes the gate must pass: a comment above the mask command, AWS's documentation account id in a message, a secret named outside the id rule read in a job that can hold AWS credentials, and an id-named key fed from an output of the mask step. - test_workflow_id_masking.py runs the core's self-test through main(["--self-test"]), and loads the gate with tomllib, then PyYAML, unavailable, requiring exit 2 and the refusal each time. - run.py holds mask-aws-ids.py at 100/100 among the security-critical files. It holds the gate to the tenth just under what it reaches, (99.9, 99.6), so any further line or branch left unreached fails. Its one line and two branches left are reached only by a tree with no scripts/vendored.json, which is landing-zone's own and never a copy's. The floors accept tenths, and the per-file loop names its floor apart from the totals' so mypy reads both as float. Co-authored-by: stxkxsbot <275011021+stxkxsbot@users.noreply.github.com>
stxkxs
force-pushed
the
claude/gates-vendored-coverage
branch
from
November 29, 2026 07:59
bb16c19 to
41f6a1f
Compare
CI Results
All checks passed. |
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.
The vendored id-masking gate and mask core are tested by their own self-tests, which
test_workflow_id_masking.pyruns in the suite's own process. There they reached 98% of the gate's lines and 97% of its branches, and 99% and 98% of the core's. Three things were left unreached:main()entry, which CI'smask-aws-ids.sh --self-testgoes through;This change plants the missing cases and runs both entries in the suite's process. It then holds each file to what that reaches: the core at 100/100, and the gate at (99.9, 99.6).
What changed
scripts/workflow-id-masking.tomlplants six more cases the gate must reject. Each is rejected at its mutated line, by its rule:join(vars.*, ',')varscontext is refusedwrite-allenvIt also adds this repository's first
[[accepted]]edits. Each is a change the gate must pass with no finding anywhere:123456789012, in a message;scripts/tests/test_workflow_id_masking.py:main(["--self-test"]), the way CI reaches it;scripts/tests/run.py:mask-aws-ids.pyat 100/100, among the security-critical files;PER_GATE_FLOORSaccepts tenths. The per-file loop names its floor separately from the totals' loop, so mypy reads both as float.What the gate still leaves unreached: line 1018, and the branches 1014→1018 and 1588→1587. Only a tree with no
scripts/vendored.json, whose policy vendors nothing, takes them. That is landing-zone's own tree, and never a copy's. The self-test vendored here, from517a99d, plants no such tree. landing-zone's own self-test has planted one since564461b(#319). The re-vendor after this PR brings that case here, and the gate is then held at 100.Checks run on this branch
All local, at this head (
41f6a1f, on27f1230), under Python 3.15.2 with the lock installed--require-hashes:scripts/check-workflow-id-masking.py --self-testpasses. It rejects 59 mutations (the policy's 58 and the gate's own quoting case) and accepts the 4 permitted edits. Each new case is decided by the rule it names.scripts/check-workflow-id-masking.pypasses the tree, andscripts/mask-aws-ids.sh --self-testpasses its 31 cases.COVERAGE_REQUIRED=1 coverage run --rcfile=.coveragerc scripts/tests/run.py: 1593 tests across 44 modules pass, and all 25 per-file floors hold. The gate reaches 1228 of 1229 lines and 514 of 516 branches; the core reaches 184 of 184 and 74 of 74.scripts/tests/controls.py: 25 controls each complete a proof, the id-masking gate's among them.scripts/tests/empty-corpus.py: all 36 probed gates refuse an empty corpus.scripts/tests/reverify-tests.sh:pass=300 fail=0, main's 300. This change adds no probe and changes none: the vendored files carry none, since an edit to either fails its record first.scripts/, and shellcheck all pass.The rebase onto
27f1230met two conflicts inrun.py. In the first, the float type now sits beside the fork-safety gate's floor, which main had added. In the second, this change's two vendored files come right afterverdicts.py, ahead of #299'scatalog.pyfloor and #302's raised control-exempt floors. Both sides are kept in each.