Repository navigation
Conversation
Adds gate-lint/, a composite action that runs bawbel-gate lint on capability manifests: the schema check, then the prod egress rule from gate DESIGN.md 11.3 (a prod manifest with external_comms set may not grant the allow effect). bawbel-gate lint exits 0 on a directory with no *.yaml files and never reads *.yml, so the action refuses both before linting. It fails closed on a missing directory as well. Also adds examples/gitlab-ci-gate-lint.yml with the same checks, a README section that covers making the job a required check, fixtures under tests/gate-lint/, and a workflow that runs the action from the working tree. Each failing fixture has a passing control. Closes #58 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015T9K217kxBqsUZ3omKYv9P Signed-off-by: chaksaray <chaksaray@gmail.com>
4 tasks done
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 #58
What and why
Adds the gate half of the pipelines this repo is meant to wire (INT-5): a
bawbel-gate linttemplate for repos that keep capability manifests in git.gate-lint/action.yml: composite action, used asbawbel/integrations/gate-lint@v1. It runs the two commands from gate DESIGN.md 11.3 (schema check overmanifests/, then the egress rule overmanifests/prod).examples/gitlab-ci-gate-lint.yml: the same checks for GitLab, settings asGATE_*variables.tests/gate-lint/fixtures/and.github/workflows/gate-lint-local.yml, which runs the action from the working tree (same idea asaction-local.yml).The action fails closed where
bawbel-gate lintdoes not. On the publishedbawbel-gate==0.1.0I ran:So a mistyped path or a manifest saved as
.ymlreads as a pass. The action refuses a missing directory, a directory with no*.yaml, and any*.ymlfile. These are gate behaviours; this PR works around them in this repo only and does not touch gate.Action inputs and outputs
The root
action.ymlis unchanged. New actiongate-lintinputs:manifests,schema,prod-manifests,forbid-effect,tools-with,version. No outputs.Inputs renamed or removed: none
Outputs added: none
Verify (run this session, bawbel-gate 0.1.0 from PyPI in a throwaway venv)
I ran the exact
run:text of the action's lint step, and the exact script of the GitLab job, against the fixtures. Both give the same result:Mutation check on a copy of the action: removing the empty-directory guard, the
*.ymlguard, the prod lint call, the--forbid-effectflag, or the schema lint each turns its fixture into a pass. The missing-directory guards are redundant withfindand click, which also fail, only with a different message.Checks
examples/use thebawbel/integrations/gate-lint@v1referenceexamples/match the action inputsDifferences from the runbook
trifecta.external_commsand has anallowgrant. A manifest that leaves the flag unset passes. The README states that and does not claim the stronger thing.examples/, so it is self-contained.CI results on this PR
gh pr checks 59: 12 pass, 0 fail. That includespasses(valid tree, and the egress fixture with the egress rule off), the sixfails closedcases for the new action, and the existingfindings,smokeand three scannerfails closedjobs. Thepassesjob running green on the runner is what shows the failing cases fail for the intended reason and not because the install broke.Not verified
bawbel/integrations/gate-lint@v1resolves only after the maintainers move thev1tag to a commit that containsgate-lint/. Until then, reference a commit SHA. Moving the tag is a release step and is not done here.