-
Notifications
You must be signed in to change notification settings - Fork 0
chore(governance): sync bootstrap registry #6
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,34 @@ | ||||||||||
| # Authoritative protected paths (regex-style) for governance enforcement. | ||||||||||
| # These are checked to prevent AI/bot bypasses on sensitive governance/config files. | ||||||||||
| # ChittyCanon Protected Paths | ||||||||||
| # These patterns are fetched by hooks at runtime from GitHub | ||||||||||
| # AI agents CANNOT modify this file (requires PR + human approval) | ||||||||||
| # | ||||||||||
| # Format: regex patterns, one per line | ||||||||||
| # Lines starting with # are comments | ||||||||||
|
|
||||||||||
| ^\.github/workflows/ | ||||||||||
| ^\.github/CODEOWNERS$ | ||||||||||
| ^CODEOWNERS$ | ||||||||||
| ^governance/ | ||||||||||
| # Governance core files | ||||||||||
| governance/sign-rules\.sh$ | ||||||||||
| governance/deploy-governance\.sh$ | ||||||||||
| governance/rules\.json$ | ||||||||||
| governance/rules\.json\.sig$ | ||||||||||
| governance/schema\.json$ | ||||||||||
| governance/CANON_PUBLIC_KEY$ | ||||||||||
| governance/caller-workflow\.yml$ | ||||||||||
| governance/KEY_ISOLATION\.md$ | ||||||||||
| governance/README\.md$ | ||||||||||
| governance/protected-paths\.txt$ | ||||||||||
|
|
||||||||||
| # Any file in governance directory | ||||||||||
| /governance/[^/]+$ | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The regex Useful? React with 👍 / 👎.
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Confirm how protected-paths.txt is consumed and what string the regex is matched against
# (path is typically a relative repo path with no leading slash).
rg -nP -C3 'protected[-_]paths' --type=py --type=ts --type=js --type=sh
rg -nP -C3 -g 'block-governance-edits.*' '.'Repository: chittyfoundation/.github Length of output: 365 🏁 Script executed: #!/bin/bash
# First, let's see the actual file and its structure
echo "=== Content of protected-paths.txt ==="
find . -name "protected-paths.txt" -type fRepository: chittyfoundation/.github Length of output: 139 🏁 Script executed: #!/bin/bash
# Search for all references to 'protected-paths' or 'block-governance' without file type restrictions
echo "=== Searching for protected-paths references ==="
rg -i 'protected.?paths' -l
echo ""
echo "=== Searching for block-governance references ==="
rg -i 'block.?governance' -lRepository: chittyfoundation/.github Length of output: 229 🏁 Script executed: #!/bin/bash
# Look for any files in governance directory and GitHub workflows that might reference protected paths
echo "=== Files in governance and .github directories ==="
find . -path "./governance/*" -type f | head -20
find . -path "./.github/*" -type f | head -20Repository: chittyfoundation/.github Length of output: 511 🏁 Script executed: #!/bin/bash
# Read the protected-paths.txt file with line numbers to see lines 20-21
echo "=== governance/protected-paths.txt ==="
cat -n ./governance/protected-paths.txtRepository: chittyfoundation/.github Length of output: 1239 🏁 Script executed: #!/bin/bash
# Read the pr-governance.yml workflow which likely uses this file
echo "=== .github/workflows/pr-governance.yml ==="
cat ./.github/workflows/pr-governance.ymlRepository: chittyfoundation/.github Length of output: 5759 Leading slash makes the "any file in governance directory" pattern unmatchable. Every other entry in this file is written relative to the repository root without a leading slash (e.g., The workflow uses 🛡️ Proposed fix-# Any file in governance directory
-/governance/[^/]+$
+# Any file in governance directory
+governance/[^/]+$📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| # Hook self-protection | ||||||||||
| \.claude/hooks/block-governance-edits\.py$ | ||||||||||
| \.claude/hooks/ | ||||||||||
|
|
||||||||||
| # GitHub workflow protection | ||||||||||
| \.github/workflows/pr-governance\.yml$ | ||||||||||
| \.github/workflows/governance | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The protected-path list now only targets Useful? React with 👍 / 👎. |
||||||||||
| \.github/CODEOWNERS$ | ||||||||||
| CODEOWNERS$ | ||||||||||
|
|
||||||||||
| # Settings protection (prevents disabling hooks) | ||||||||||
| \.claude/settings.*\.json$ | ||||||||||
|
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unescaped
♻️ Proposed fix-\.claude/settings.*\.json$
+\.claude/settings(\.[^/]+)?\.json$📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,40 @@ | |
| "notes": "Repo-level ownership gating. A CODEOWNERS principal is eligible only if its TY/VY/RY satisfies the repo requirement. Use globs for org/repo.", | ||
| "repos": [ | ||
| { | ||
| "repo": "*/*", | ||
| "repo": "CHITTYFOUNDATION/chittycanon", | ||
| "tier": 0, | ||
| "requires": { | ||
| "ty": ["canon", "ontology", "governance"], | ||
| "vy": ["cloudflare-workers", "github-actions"], | ||
| "ry": ["trust-anchor", "portfolio-policy"] | ||
| } | ||
| }, | ||
| { | ||
| "repo": "CHITTYFOUNDATION/chittyid", | ||
| "tier": 0, | ||
| "requires": { | ||
| "ty": ["identity", "crypto", "governance"], | ||
| "vy": ["cloudflare-workers"], | ||
| "ry": ["mint", "sign", "audit"] | ||
| } | ||
| }, | ||
| { | ||
| "repo": "CHITTYOS/*", | ||
| "tier": 2, | ||
| "requires": { | ||
| "ty": ["chittyos-runtime"], | ||
| "vy": ["cloudflare-workers"], | ||
| "ry": ["service-ops"] | ||
|
Comment on lines
+28
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||
| } | ||
| }, | ||
| { | ||
| "repo": "CHITTYAPPS/*", | ||
| "tier": 3, | ||
| "requires": { "ty": [], "vy": ["cloudflare-workers"], "ry": [] } | ||
| "requires": { | ||
| "ty": ["app"], | ||
| "vy": ["cloudflare-workers"], | ||
| "ry": ["product-delivery"] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
|
Comment on lines
5
to
43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Inspect the consumer that resolves repo -> requires to learn its non-match behavior
# and precedence handling.
rg -nP -C3 'repo_requirements|requires\.(ty|vy|ry)' --type=py --type=ts --type=js --type=shRepository: chittyfoundation/.github Length of output: 216 🏁 Script executed: # Search for files mentioning repo_requirements without restrictive type filters
rg -l 'repo_requirements' --max-count=20Repository: chittyfoundation/.github Length of output: 50 🏁 Script executed: # Explore governance directory structure
ls -la governance/ 2>/dev/null || echo "governance dir not found"Repository: chittyfoundation/.github Length of output: 502 🏁 Script executed: # Find all code files that might consume config files
fd -e ts -e js -e py -e sh . --max-depth=3 | head -20Repository: chittyfoundation/.github Length of output: 50 🏁 Script executed: # Check rules.json to validate organization scope mentioned in review
cat governance/rules.json 2>/dev/null | head -100Repository: chittyfoundation/.github Length of output: 2986 🏁 Script executed: # Read the complete repo_requirements.json file
cat governance/repo_requirements.jsonRepository: chittyfoundation/.github Length of output: 1164 🏁 Script executed: # Read the schema.json to understand tier definitions and resolver semantics
cat governance/schema.jsonRepository: chittyfoundation/.github Length of output: 2961 🏁 Script executed: # Search for any code that might parse/consume repo_requirements (broader search)
rg 'repo_requirements|tier.*requires|requires.*tier' -i --max-count=30Repository: chittyfoundation/.github Length of output: 50 Unmatched repos and tier 1 have no defined behavior; precedence for glob patterns is undocumented. Three issues to address before merging:
🤖 Prompt for AI Agents |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: chittyfoundation/.github
Length of output: 1617
🏁 Script executed:
Repository: chittyfoundation/.github
Length of output: 439
🏁 Script executed:
cat -n governance/rules.json | head -50Repository: chittyfoundation/.github
Length of output: 1891
🏁 Script executed:
Repository: chittyfoundation/.github
Length of output: 216
🏁 Script executed:
Repository: chittyfoundation/.github
Length of output: 457
🏁 Script executed:
Repository: chittyfoundation/.github
Length of output: 2310
🏁 Script executed:
Repository: chittyfoundation/.github
Length of output: 420
🏁 Script executed:
Repository: chittyfoundation/.github
Length of output: 238
🏁 Script executed:
rg 'populate|grant|eligible|bootstrap' --type json governance/ -A2 -B2Repository: chittyfoundation/.github
Length of output: 7599
🏁 Script executed:
Repository: chittyfoundation/.github
Length of output: 5598
Eligibility gaps deadlock PRs in CHITTYOS/ and CHITTYAPPS/ repos; SPOF risk on
@nickbianchifor chittyid.**Cross-checking against
governance/repo_requirements.json:CHITTYFOUNDATION/chittycanoncanon, ontology, governance/cloudflare-workers, github-actions/trust-anchor, portfolio-policy@chitcommit,@nickbianchiCHITTYFOUNDATION/chittyididentity, crypto, governance/cloudflare-workers/mint, sign, audit@nickbianchi(SPOF)CHITTYOS/*chittyos-runtime/cloudflare-workers/service-opsty/vy/ryCHITTYAPPS/*app/cloudflare-workers/product-deliveryWith
governance/rules.jsonset tocodeowners_required.enforcement: "block"andrequire_code_owner_reviews: trueacross all scoped organizations (including CHITTYOS and CHITTYAPPS), no PR can merge in CHITTYOS/CHITTYAPPS repos: no CODEOWNER principal satisfies the eligibility requirements, so the block cannot be cleared.Option 1 (immediate fix): Populate
@CHITTYOS/cicd-adminsand@CHITTYOS/developersgrants with the requiredchittyos-runtime/cloudflare-workers/service-opsterms.Option 2 (intentional bootstrap scope): Narrow
governance/rules.jsonscope.organizationsand/orgovernance/repo_requirements.jsonto CHITTYFOUNDATION only for now, with documented rollout sequence for tier 2/3 repos.Also address the
chittyidSPOF:@nickbianchiis the sole eligible approver. Grant@chitcommit(or another principal) theidentity,crypto,mint,sign,auditterms to avoid approval bottleneck.🤖 Prompt for AI Agents