Repository navigation
Description
What I noticed
Resyncing ptr727/HomeAutomation-Config, I looked at why its spec/secrets.json (the repo-scoped adaptation, intentRef: docs/repo-config.md) exists at all:
{
"note": "...This repo is source-only with a github-release publish target (mechanism none), so only the fleet baseline applies...",
"baseline": {
"requires": ["CODEGEN_APP_CLIENT_ID", "CODEGEN_APP_PRIVATE_KEY"],
"forbids": ["CODEGEN_APP_ID"],
"workflowNeeds": ["actions/create-github-app-token"],
"stores": ["actions", "dependabot"],
"note": "...which every fleet repo runs..."
}
}baseline never varies -- it's identical, byte-for-byte, in every fleet repo's own copy, by definition ("every fleet repo runs" it). A repo carrying its own copy of something that's a fleet-wide constant isn't declaring anything about itself; it's re-typing hub law into a file that can drift from the hub's own copy between resyncs (same intent-fidelity staleness class spec/audit.py already flags on this file today).
mechanisms/targetMechanisms/typeMechanisms are more interesting: spec/audit.py's own secrets check (--- Secrets (names only) ---) doesn't read a downstream repo's local copy of these at all -- it computes claimed mechanisms centrally, from the hub's own spec/secrets.json plus registry/repos.json's publish/types fields for that repo:
mechanisms = [secrets["targetMechanisms"].get(p.get("target")) for p in entry.get("publish", [])]
mechanisms += [secrets.get("typeMechanisms", {}).get(t) for t in types if repo_profiles.get(t) != "lint-only"]
claimed = [secrets["mechanisms"][m] for m in mechanisms if m and m in secrets["mechanisms"]]So the fleet-wide hub audit already has zero use for a repo's own carried spec/secrets.json -- it re-derives the same answer from data it already hosts. The per-repo file exists only so that repo's own standalone AUDIT.md self-check (no hub checkout, just gh api against that one repo) has something local to read. What it carries is a hand-transcribed snapshot of a computation the hub performs centrally, and it can go stale the same way any hand-copied snapshot can -- update registry/repos.json's publish target or the hub's targetMechanisms map, and every downstream repo's own copy is now describing a mechanism selection that no longer matches what the hub's own audit would compute for it.
Same shape as #861/#827
This is functionally the same problem repo-config/ had before #861 ("Host Repository Configuration Only in the Hub"): a downstream repo carrying its own copy of something the hub computes/hosts centrally, checked by re-deriving the same answer via a hub checkout instead (repo-config/configure.sh check <owner>/<repo> <model>) rather than diffing a stale local snapshot. registry/repos.json is already hub-hosted, exactly like repo-config/*.json was already hub-hosted before repos stopped carrying local copies of it.
The discovery alternative, and why I'm not just proposing it outright
A colleague (well -- the maintainer, in conversation) floated a stronger version: instead of the hub re-deriving mechanisms from registry/repos.json, derive them from the calling repo's own workflow YAML -- "this repo's uses: a hub reusable workflow with with: enable_docker: true, therefore it needs DOCKER_HUB_*" -- fully mechanical, can't drift from what's actually wired, since a wrong uses:/with: breaks the pipeline itself.
We talked through why that's genuinely harder than it sounds, not just a strictly-better idea:
- It's not "does this repo call
X-task.yml," it's "which secrets does the enabled path throughX-task.ymltouch" -- a small dataflow analysis (with:input -> gates asecrets.FOOreference in the callee), not a grep. The existingtargetMechanisms/typeMechanismsmaps are exactly that analysis, pre-computed once as data instead of computed live per repo. - Resolving it against the caller's pinned SHA rather than hub
mainis required to avoid the same pin-lag failure mode as A downstream repo's pinned validate-task.yml/prose-gate SHA can predate a retire disposition's HUB_HOSTED exemption #987 (a repo's pin predating a hub change the discovery logic assumes is current). workflowNeedsalready exists inspec/secrets.schema.jsonfor exactly this idea ("what a mechanism needs to appear in a workflow for a human or agent reading the audit, rather than being a detector") -- i.e. this was already considered and deliberately left as documentation, not a check. Worth knowing that history before re-proposing it as one.- A static-analysis bug fails silently and is harder to debug than a stale flat file, which at least fails as "read this JSON, it's wrong."
What I'm actually asking
Not "please build discovery" -- genuinely on the fence on whether that's worth its own complexity budget. But the baseline-and-mechanisms carry as it stands today has the same smell #861 already named and fixed for repo-config/, and the fix there (host once, check via a hub checkout, retire the per-repo copy) is a precedented, lower-risk option than workflow-YAML discovery: point a downstream repo's AUDIT.md "Secrets" section at something like python3 spec/audit.py <Repo> (or a narrower equivalent) run from a hub checkout, the same way its "General Settings and Rulesets" section already routes through repo-config/configure.sh check post-#861, instead of carrying spec/secrets.json at all.
Worth a decision either way (keep the carry deliberately, or retire it like repo-config/ was), rather than it sitting as an artifact of the pattern that predates #861 and just not being revisited.
audit run 2026-08-25T13:46:24Z | hub fa63163
Activity
ptr727 commentedon Aug 25, 2026
Triaged along with the rest of today's HomeAutomation-Config resync batch (#870/#987/#988/#989/#990). Maintainer's call: this is right, but it's its own tracked follow-up (same shape and scale as #861's repo-config/ retirement) rather than something to fold into that batch. Leaving open, unscoped for now -- pick it up as its own project when it's next in line.
Retire the Downstream `spec/secrets.json` Carry, Per #993 (#1030)
Rewrite TODO.md's New Settled Entry in Present Tense, Per Review (#1032)
Promote Develop to Main (#1031)