Repository navigation
feat(bootstrap): a new repo enters the gate, or the gap is loud (#180) - #194
Merged
Merged
Conversation
A session-created repo did not inherit the org's settings, and every symptom of that was silent (#180): the default branch stayed the first-pushed `feat/...`, so the repo fell into `discover_excludes` with no required `validate / validate` check and no CalVer tag; the tag-on-merge caller arrived with the first PR and so could never fire for that first merge; and the run still reported `success`. - bootstrap-repo-main.sh installs the org's canonical PINNED tag-on-merge dispatcher on every `main` it creates, asserts the post-condition by reading the file back, and prints the three repository SETTINGS the App token cannot set, counting them as needs_operator_settings=<n>. The App holds no `administration` permission (verified against the live installation). - org-ruleset.sh verify gains a MEMBERSHIP-INTEGRITY arm: every active, non-fork repo must default to `main` or be declared with a reason in lib-org.sh's new declared_non_main_defaults() (the two by-design entries the repo-setup skill names). An undeclared non-main default fails, with a remedy matching the sub-case (a PATCH when a `main` ref exists; bootstrap-then-PATCH otherwise); an empty repo is named distinctly; and a failed membership read refuses to report a clean org. - Both offline mock-gh harnesses drive the new paths; against the pre-change scripts the new assertions fail. Measured live: `plugin-task-old-16365` and `plugin-task-zzbootstrap` default to `feat/plugin-task` with no `main` ref and 0 rules on `main` (charly: 5), so verify now fails on exactly those two until the operator archives or bootstraps them; three empty probe repos are named informationally. Filed: #192 (the per-repo tag-on-merge callers still on the mutable Node 20 actions/github-script@v7) and #193 (the two abandoned repos). Closes #180. Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)
Contributor
Review — PASSHead SHA: Security screen: PASS — no secrets/exfil/eval, no dependency or pin changes, no guardrail weakening. The change is a self-modifying-security surface ( Checklist: All applicable rules PASS or NA.
Comments: thread is empty (0 comments) — nothing to disposition. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
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.
Summary
A session-created repo did not inherit the org's settings, and every symptom of that was silent (
opencharly/.github#180). Three of them were measured on live instances:feat/...— so the repo fell intodiscover_excludes: no requiredvalidate / validatecheck, no CalVer tag, noCHANGELOG. Nothing transitions it back.charly/pr-validatorrun completed before the file existed onmain, and GitHub creates ZERO runs for an auto-merge squash. Two sessions hit this independently (plugin-generate-podcast,layer-podcast-audio) and repaired it by hand afterwards (both now carry the caller and have tags — verified).successwhile 1 and 2 were true.This change closes the loop that can be closed in-tree and makes the rest loud:
scripts/bootstrap-repo-main.shnow installs the org's canonical, pinnedtag-on-merge.ymldispatcher on everymainit creates, via the contents API — the capability the same App token already uses to writeCHANGELOG/<CalVer>.mdto protectedmain(20 of the last 40 commits in this repo are its CHANGELOG writes). The install is asserted by reading the file back, so a "reported success, nothing on main" path is impossible. The script then prints the three repository SETTINGS it cannot set and counts them:needs_operator_settings=<n>.charly-auto-mergeinstallation's live permissions areactions, contents, deployments, issues, merge_queues, metadata, packages, pages, pull_requests, repository_custom_properties, workflows— noadministration— soPATCH /repos/...is genuinely 403 for the App.scripts/org-ruleset.sh verifygains a MEMBERSHIP-INTEGRITY arm. The target set is defined bydefaultBranchRef == "main", so the existing per-repo loop could never notice a repo that fell out of it. The arm now fails on any active, non-fork repo whose default is notmain, unless it is declared with a reason inlib-org.sh's newdeclared_non_main_defaults()— the two by-design entries (omarchy-eval-artifacts/runs,pixelflux/av1) that/charly-internals:repo-setupnames. It prints a remedy that matches the sub-case (aPATCHwhen amainref exists; bootstrap-then-PATCH when none does), names an empty repo distinctly, and refuses to report a clean membership from a failed read.Consequence, stated before the push. On the live org the arm fails on exactly two repos —
plugin-task-old-16365andplugin-task-zzbootstrap(bothdefault: feat/plugin-task, nomainref, 0 rules onmainvscharly's 5) — until they are archived or bootstrapped. Both are abandoned bootstrap experiments; the disposition is operator-owned (archiving is effectively permanent) and is filed as#193. Three empty probe repos (zz-probe3-7319,zz-probe2-13988,zz-bootstrap-probe-xyz) are named informationally, never failed: an empty repo cannot merge anything, and the moment it has a branch the arm fails.Closes #180.
How tested
Committed head
37f9675(git rev-parse HEAD; nothing else pushed from it).Coverage fails without the change — the NEW tests, run against the OLD scripts (
git archive origin/maininto a scratch tree, then drop the new test files in):The new behaviour, on the committed tree:
The whole offline battery on this head (this repo's change class):
The arm run against the live org (its exact query + its exact branching, read-only — this is the class of verification the change is about):
Two supporting measurements the code depends on, both taken live rather than assumed:
Not claimed: that the App's contents-
PUTsucceeds on a repo whosemainwas created seconds earlier. The mechanism is the one the reusable already exercises org-wide (its CHANGELOG commits), and the script asserts the read-back rather than trusting the response — so if that step ever fails it fails loudly and names the repo.Rulebook compliance
git-workflow,repo-setup,root-cause-analyzer,strict-policy,agentsloaded before this lane's first tool call, plus this repo'sAGENTS.md(injected by the worktree):.githubis PR-only and its gate/ruleset/template are self-modifying-security surfaces.mainref needs a different remedy). The two findings this change surfaces but does not own are filed:#192(per-repo callers still on Node 20) and#193(the two abandoned repos). Nothing is parked; nothing is described as "pre-existing".maindefaults (declared_non_main_defaults()), one membership rule, one remedy map; the caller template is the repo's single canonical file, not a second copy.git statusclean before and after the commit; worktree.worktrees/dsh-opencharly/dotgithub, branchfeat/bootstrap-repo-into-the-gateoff freshorigin/main(d328bdb); no force-push, no directmain, no hook bypass.ghpolicy tests, which are not offered as proof of live behaviour.charlyruntime source changes. Change class: workflow/shell tooling, gated by this repo's CI (workflow-checks.yml) — the offline battery is pasted above from the committed tree.Change classification
Hook/workflow infrastructure (org tooling: the bootstrap flow and the ruleset verifier); no
charlyruntime, deploy target or candy change. Gate:workflow-checks.ymlplus the branch's live org reads. Attribution:analysed on a live system— the changed paths ran against real org state and their fixtures drive every new branch, without claiming the CI job of the pushed head has completed.Filed issues
opencharly/.github#192— the ~438 per-repotag-on-merge.ymlcallers still run the mutable Node 20actions/github-script@v7;#188's removal stopped at this repo (10/10 sampled, code-search floor 106). Needs a sweep + an arm, not this PR.opencharly/.github#193— the two abandoned repos this arm now fails on (plugin-task-old-16365,plugin-task-zzbootstrap): archive or bootstrap, operator-owned.Agent:
dsh-opencharlyAssisted-by: dsh deepseek-v4.1-flash (analysed on a live system)