Replies: 1 comment 4 replies
|
Org-scope didn't really work for us since we quickly had to restrict the agent to just a few "core" repos. Question, how is that implemented today? The solution could be as simple |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
TL;DR — decisions I need from the team
ORGasOWNER, add a lightACCOUNT_TYPE, or make the ambiguous defaults fail-loud? (details below)Everything below is the reasoning; skip to Options and Questions if you just want to weigh in.
Context
The automation suite is designed to be pointed at any GitHub target by swapping a
profile file (
config/org.env/config/org.<name>.env). Today the whole identitymodel hangs off a single variable,
ORG, resolved inscripts/org.sh(
load_org_profile). Every downstream reference is built by interpolating it:get_core_reposemits"$ORG/$name"for each bare name inconfig/core-repos.txtMAIN_REPO($ORG/$ORG) — the hub repo referenced in report bodies and escalation hintsREPOS_DIR($HOME/$ORG) — local dir the fixers iterate for cloned reposSOURCE_REPO($ORG/automation) — attribution links in scanner/fixer/dashboard reportsreport.py) rebuilds everyghcall as-R "$ORG/$name"The observation
ORGis functionally just the owner namespace in anOWNER/REPOslug — and GitHubtreats a user login identically to an org login in that position (
gh -R alice/toolworks whether
aliceis a user or an org). So the mechanism is already owner-agnostic:someone maintaining their own repos can set
PROFILE_ORG=<their-username>and the coreloop works.
Where it gets leaky is three org-shaped defaults (
scripts/org.sh). A user-accountadopter who copies
config/org.envand changes onlyPROFILE_ORGinherits:MAIN_REPO = $OWNER/$OWNER→alice/alice. For a user, a repo whose name matches thelogin is GitHub's special profile-README repo — its README renders on the profile
page (
github.com/alice). So the suite's "hub" silently points at a cosmetic bio repo.(For an org,
alice/aliceis just an unusual repo; the org equivalent of that specialrepo is
.github, notowner/owner.)SOURCE_REPO = $OWNER/automation→alice/automation, assuming they forked the wholesuite into a repo literally named
automation. This one is the most invisible: our ownconfig/org.envnever sets it, so it is always derived.REPOS_DIR = $HOME/$OWNER→$HOME/alice(least harmful;validate_repos_dirat leastfails loud if the dir is missing).
None of the first two error out — they resolve to plausible-but-wrong values silently, the
same failure class we just tightened on the
--reposflow in rossoctl/agent-skills#32.Why raise it now
This is broader than any single PR, and it changes how we onboard someone who just wants
to maintain one repo (their own, or one they contribute to). It also has a concrete
precedent: rossoctl/agent-skills#32 just settled the
--reposflow on within-a-single-ownervalidation — which means a contributor maintaining one repo they do not own is already
out of scope there. Worth deciding whether the rest of the suite should match that boundary
or deliberately widen it.
Options I can see (not decisions — looking for input)
Re-document / rename
ORGasOWNER. Keep the mechanism, make the naming honest,and document that a user login is a valid owner. Cheapest; leaves the org-shaped
defaults as the remaining footgun.
Add a light
ACCOUNT_TYPE(org | user). Changes only how defaults are derived(e.g. a user account does not default
MAIN_REPOto$OWNER/$OWNER), not the coremechanism. More explicit onboarding for single-repo users.
Make defaults fail-loud instead of guessing. Drop the
$ORG/$ORG-style deriveddefaults for the ambiguous fields and require the profile to set them explicitly, so a
misconfigured single-repo profile errors rather than silently mis-targets.
(The three decisions are in the TL;DR. One extra: is there appetite to rename
ORG→OWNERsuite-wide, or is the churn not worth it?)Assisted-By: Claude Code
All reactions