Repository navigation
Consumer entry: its protected_paths in the hooks' syntax, held by consumer/1 and read by the one matcher (#141) - #738
Conversation
…sumer/1 and read by the one matcher (#141) schemas/consumer.schema.json gives the entry of design section 3.12 a schema, its protected paths each config/hooks.json's own path. An example, three counter-examples, a test that the Kernel's matcher and the session hooks' read each pattern alike, and five mutants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mong its protected paths, a script is a path not a pattern, and the words say two matchers read alike Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…utant, not its protected paths alone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d by a pattern, each refused, with a mutant Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…left unprotected, each refused, with a mutant Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
There was a problem hiding this comment.
Code Review
This pull request introduces the JSON schema for consumer configurations (consumer/1), along with valid and invalid examples to demonstrate and test the configuration rules. It also updates the software factory design documentation to detail the protected_paths syntax and adds validation logic in tools/check_examples.py to ensure setup and test scripts are properly protected. Feedback on the changes suggests improving the grammar of the error message in tools/check_examples.py when only one script is unprotected, and correcting an incomplete sentence in the design documentation.
There was a problem hiding this comment.
2 issues found across 11 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/architecture/software-factory-design.md">
<violation number="1" location="docs/architecture/software-factory-design.md:1071">
P3: This says `**` is part of the one syntax of `config/hooks.json`, but `tools/hooks/protected.py` `load()` rejects any `**` in that file. Either state that the hooks reader does not yet accept `**`, or drop the claim that the session hooks read it alike.</violation>
</file>
<file name="schemas/consumer.schema.json">
<violation number="1" location="schemas/consumer.schema.json:38">
P2: The schema accepts a Consumer with no Advisory reviewers. Require at least one reviewer so an entry cannot silently opt out of the review configuration described in §3.12.</violation>
</file>
…he example protects docs/CODEOWNERS and lock files at any depth, an entry names a reviewer, and ** is said to be read by both matchers though config/hooks.json names none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # tools/check_examples.py
|
|
Factory Builder: renewing this item's Run ceiling. Its ten Runs since a writer last acted all ended in the runner outage of 2026-11-11 (14:00Z to 22:24Z, before the v0.1.8 cut), as environment faults that reviewed nothing. #757 tracks counting such Runs out of the ceiling. A push is no writer's action, so the new head did not renew the count; this comment does. |



User description
Closes #141, "Consumer entry: its protected_paths in the hooks' syntax". It applies decision 0020; no new decision (the Factory Builder, 2026-11-11).
What changes
schemas/consumer.schema.jsonconsumer/1, the entry of design §3.12, as a data file. Eachverify.protected_pathsitem ishooks.schema.json#/$defs/path, the very pathconfig/hooks.jsonholds: a final/for a directory and all below it,*within one name,**as a whole name, case ignored.setupandtestare literal paths, never patterns. Every other field is held in its shape and typetools/check_examples.pyconsumeris a data file inENVELOPE._unprotected: an entry's setup and test scripts must each be named by one of its protected paths, by the Kernel's ownderive.matches, in an example as in a counter-example, so that an author cannot weaken the tests it is judged byexamples/consumer.json**and a*pattern beside the scriptsexamples/invalid/consumer.*.json?), a path that climbs out, a script left unprotected, and a script named by a pattern.github/**becomes.github/, a syntax correction kept as ruled. One paragraph on the syntax, with its two pitfalls (.github/*;CODEOWNERSwithout.github/CODEOWNERS). §5.3's line says a setup and a test script, which the protected paths nameThe test is
tests/test_tools.py::Apps::test_a_consumer_entrys_protected_paths_are_in_the_hooks_syntax_and_read_by_one_matcher. It asserts four things:?,..,//,./, braces, a backslash, or missing.readable_patternreads, and kernelderive.matchesand the session hooks'protected.entriesfind the same patterns for each path, in any case.21 mutants under "Issue 141", all killed. The matcher does not move; no model Lens input is touched (
schemas/,examples/,tools/andtests/are the verify Lens's inputs). Nothing reads an entry until slice 3's readiness check and apply.Verify
make checkspasses at 1491421, andtests.test_toolspasses. Full verify is CI's.Reviews
$defs/file, a claim no code held,owner_role's pattern, and the wording on two matchers are fixed in 9804b52. Left alone: theringenum's tie torelease/rings.json, which fixes the same two Channels; andschemas/acceptance.schema.json'sprotected_paths, still any string, which is outside this change🤖 Generated with Claude Code
CodeAnt-AI Description
Validate Consumer repository protection paths and verification scripts
What Changed
Impact
✅ Consumer setup and test scripts stay protected✅ Invalid protection paths rejected✅ Consistent path matching across checks and hooks💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.