Repository navigation
Consumer entry: its protected_paths in the hooks' syntax, held by consumer/1 and read by the one matcher (#141) #738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
855930e
Consumer entry: its protected_paths in the hooks' syntax, held by con…
don-petry 9804b52
The Claude review's findings: an entry's setup and test scripts are a…
don-petry 4cc4801
Carbon's finding: every field of consumer/1 is held by a case and a m…
don-petry 6844128
Astra's findings: a workflow named by nothing, and a test script name…
don-petry 1491421
Astra's re-read: a field of the wrong type, and a setup script alone …
don-petry 97da046
The bots' findings on #738: one script left unprotected is said so, t…
don-petry d6f3bdf
Merge main
don-petry b0ea9b4
Merge main
don-petry 8407bbb
Merge main
don-petry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "schema": "consumer/1", | ||
| "repo": "combsmith/markets", | ||
| "ring": "next", | ||
| "owner_role": "devops-lead", | ||
| "ci_workflows": [ | ||
| "CI" | ||
| ], | ||
| "verify": { | ||
| "setup": "scripts/factory-setup.sh", | ||
| "test": "scripts/factory-test.sh", | ||
| "protected_paths": [ | ||
| "scripts/factory-setup.sh", | ||
| "scripts/factory-test.sh", | ||
| ".github/", | ||
| "CODEOWNERS", | ||
| "docs/CODEOWNERS", | ||
| "tests/**/conftest.py", | ||
| "**/*.lock" | ||
| ] | ||
| }, | ||
| "reviewers": [ | ||
| "coderabbit", | ||
| "cubic", | ||
| "gemini-code-assist", | ||
| "sonarqube-cloud" | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "schema": "consumer/1", | ||
| "repo": "combsmith/markets", | ||
| "ring": "next", | ||
| "owner_role": "devops-lead", | ||
| "ci_workflows": [ | ||
| "CI" | ||
| ], | ||
| "verify": { | ||
| "setup": "scripts/factory-setup.sh", | ||
| "test": "scripts/factory-test.sh", | ||
| "protected_paths": [ | ||
| "scripts/factory-setup.sh", | ||
| "scripts/factory-test.sh", | ||
| "scripts/factory-?.sh" | ||
| ] | ||
| }, | ||
| "reviewers": [ | ||
| "coderabbit", | ||
| "cubic", | ||
| "gemini-code-assist", | ||
| "sonarqube-cloud" | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "schema": "consumer/1", | ||
| "repo": "combsmith/markets", | ||
| "ring": "next", | ||
| "owner_role": "devops-lead", | ||
| "ci_workflows": [ | ||
| "CI" | ||
| ], | ||
| "verify": { | ||
| "setup": "scripts/factory-setup.sh", | ||
| "test": "scripts/factory-test.sh", | ||
| "protected_paths": [ | ||
| "scripts/factory-setup.sh", | ||
| "scripts/factory-test.sh", | ||
| "/CODEOWNERS" | ||
| ] | ||
| }, | ||
| "reviewers": [ | ||
| "coderabbit", | ||
| "cubic", | ||
| "gemini-code-assist", | ||
| "sonarqube-cloud" | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "schema": "consumer/1", | ||
| "repo": "combsmith/markets", | ||
| "ring": "next", | ||
| "owner_role": "devops-lead", | ||
| "ci_workflows": [ | ||
| "CI" | ||
| ], | ||
| "verify": { | ||
| "setup": "scripts/factory-setup.sh", | ||
| "test": "scripts/factory-test.sh", | ||
| "protected_paths": [ | ||
| "scripts/factory-setup.sh", | ||
| "scripts/factory-test.sh", | ||
| "../CODEOWNERS" | ||
| ] | ||
| }, | ||
| "reviewers": [ | ||
| "coderabbit", | ||
| "cubic", | ||
| "gemini-code-assist", | ||
| "sonarqube-cloud" | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "schema": "consumer/1", | ||
| "repo": "combsmith/markets", | ||
| "ring": "next", | ||
| "owner_role": "devops-lead", | ||
| "ci_workflows": [ | ||
| "CI" | ||
| ], | ||
| "verify": { | ||
| "setup": "scripts/factory-setup.sh", | ||
| "test": "scripts/factory-test.sh", | ||
| "protected_paths": [ | ||
| "scripts/factory-setup.sh", | ||
| ".github/", | ||
| "CODEOWNERS" | ||
| ] | ||
| }, | ||
| "reviewers": [ | ||
| "coderabbit", | ||
| "cubic", | ||
| "gemini-code-assist", | ||
| "sonarqube-cloud" | ||
| ] | ||
| } |
29 changes: 29 additions & 0 deletions
29
examples/invalid/consumer.a-script-named-by-a-pattern.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "schema": "consumer/1", | ||
| "repo": "combsmith/markets", | ||
| "ring": "next", | ||
| "owner_role": "devops-lead", | ||
| "ci_workflows": [ | ||
| "CI" | ||
| ], | ||
| "verify": { | ||
| "setup": "scripts/*-setup.sh", | ||
| "test": "scripts/factory-test.sh", | ||
| "protected_paths": [ | ||
| "scripts/factory-setup.sh", | ||
| "scripts/factory-test.sh", | ||
| ".github/", | ||
| "CODEOWNERS", | ||
| "docs/CODEOWNERS", | ||
| "tests/**/conftest.py", | ||
| "**/*.lock", | ||
| "scripts/" | ||
| ] | ||
| }, | ||
| "reviewers": [ | ||
| "coderabbit", | ||
| "cubic", | ||
| "gemini-code-assist", | ||
| "sonarqube-cloud" | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "title": "consumer/1: how one Consumer repo is served (design section 3.12). A data file: its path is its identity and the commit its Release. Its protected paths are in the one syntax of config/hooks.json, read alike by the Kernel's matcher (kernel/derive.py, matches) and the session hooks' (tools/hooks/protected.py, entries); and they name its setup and test scripts, which tools/check_examples.py holds. What reads an entry, the readiness check and apply's refusal for a Consumer repo, is slice 3's.", | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": [ | ||
| "schema", | ||
| "repo", | ||
| "ring", | ||
| "owner_role", | ||
| "ci_workflows", | ||
| "verify", | ||
| "reviewers" | ||
| ], | ||
| "properties": { | ||
| "schema": { | ||
| "const": "consumer/1" | ||
| }, | ||
| "repo": { | ||
| "type": "string", | ||
| "pattern": "^[A-Za-z0-9-]+/[A-Za-z0-9._-]+$" | ||
| }, | ||
| "ring": { | ||
| "description": "The Channel that serves the repo, as release/rings.json names it.", | ||
| "enum": [ | ||
| "next", | ||
| "stable" | ||
| ] | ||
| }, | ||
| "owner_role": { | ||
| "type": "string", | ||
| "pattern": "^[a-z][a-z-]*[a-z]$" | ||
| }, | ||
| "ci_workflows": { | ||
| "description": "The name of each of the repo's own workflows whose checks the Factory reads, as GitHub shows it.", | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "uniqueItems": true, | ||
| "items": { | ||
| "type": "string", | ||
| "minLength": 1 | ||
| } | ||
| }, | ||
| "verify": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": [ | ||
| "setup", | ||
| "test", | ||
| "protected_paths" | ||
| ], | ||
| "properties": { | ||
| "setup": { | ||
| "description": "The repo's setup script, by its path from the top of the repo.", | ||
| "$ref": "#/$defs/file" | ||
| }, | ||
| "test": { | ||
| "description": "The repo's test script, by its path from the top of the repo.", | ||
| "$ref": "#/$defs/file" | ||
| }, | ||
| "protected_paths": { | ||
| "description": "What apply refuses a Role's push to without a person (slice 3's): relative to the top of the repo; a path ending in / is a directory and all below it; * stands for any part of one name; ** as a whole name for any run of names, which both matchers read, as a rubric's paths use it (decision 0029), though config/hooks.json itself names none; case is ignored (issue 141, decision 0020). Its setup and test scripts are among them.", | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "uniqueItems": true, | ||
| "items": { | ||
| "$ref": "hooks.schema.json#/$defs/path" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "reviewers": { | ||
| "description": "The repo's Advisory reviewers, by the name the Factory gives each, one at least: adopting the Factory needs them configured (design section 3.12).", | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "uniqueItems": true, | ||
| "items": { | ||
| "type": "string", | ||
| "pattern": "^[a-z][a-z0-9-]*$" | ||
| } | ||
| } | ||
| }, | ||
| "$defs": { | ||
| "file": { | ||
| "type": "string", | ||
| "pattern": "^(?!.*(^|/)\\.{1,2}(/|$))[A-Za-z0-9_.-]+(/[A-Za-z0-9_.-]+)*$" | ||
| } | ||
| } | ||
| } | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.