Skip to content

configure.sh: registry-missing default makes the no-arg form fail on operational carries #332

Closed

Description

@ptr727

Raised by Copilot review on the Vantage-Config carry (Vantage-Config #10); the file is carried verbatim, so flagging here per "fix systemic drift in the hub, not per repo".

In a downstream carry the registry is absent, so repo-config/configure.sh defaults the model to release and then aborts because develop.json is not carried on an operational repo. The abort is the intended fail-safe, but it means the documented no-arg form never works on an operational carry - arg 2 is effectively mandatory there.

Copilot's suggestion is reasonable: when the registry is missing, infer the model from the payloads present (operational/develop.json present + develop.json absent -> operational, and vice versa), keeping the abort for the ambiguous/neither case. Every operational carry would benefit.

Activity

  1. ptr727 commented on Jul 16, 2026

    @ptr727
    OwnerAuthor

    Bundling six more reference-hardening nits raised by Copilot on the #330 sweep PRs (declined locally per the carry-verbatim principle - the carried files stay letter-exact with the hub reference; the hub decides whether to adopt). Same theme as this issue: downstream-carry ergonomics of configure.sh and the blessed self-audit/regen snippets.

    configure.sh (alongside this issue's registry-missing model inference):

    1. Model-only invocation gap: configure.sh operational is parsed as a repo name; arg 1 must be given to set arg 2. A release|operational first-arg sniff (or flag args) would fix it. (Utilities Gate the Docker push on all builds; require validate-release (#414 Q4) #417)
    2. gh api --method PATCH ... --input - stdin form: fine on current gh, but older gh releases mis-handle --input -; trivially avoidable with a temp file if we care about old gh. (MediaTools Mediatools #19)

    repo-config/README.md:

    1. "model defaults to the registry lookup" wording should mention the registry-absent fallback behavior in a downstream carry (release default + warning today; payload inference if this issue lands). (Utilities Gate the Docker push on all builds; require validate-release (#414 Q4) #417)

    Blessed self-audit AUDIT.md + README regen snippet (fix at the hub and in the Vantage-Config reference, then let carries pick it up):

    1. Ruleset-id lookup id=$(gh api ... --jq '.[]|select(.name==...).id') breaks on duplicate ruleset names (multiline id silently corrupts the later API path). configure.sh already warns-and-picks-first; the snippets should select the first match and/or fail loudly. Duplicates are already a declared drift finding, so failing loudly fits. (Utilities Gate the Docker push on all builds; require validate-release (#414 Q4) #417, LanguageTags docs: restructure codecov snippet comments to the summarized style #278)
    2. Secrets check hard-codes the name lists; deriving them from spec/secrets.json via jq keeps AUDIT.md and the spec from drifting apart. (MediaTools Mediatools #19, LanguageTags docs: restructure codecov snippet comments to the summarized style #278)
    3. Secrets listing is unpaginated (gh api repos/.../secrets without --paginate); harmless at current fleet secret counts, cheap hardening. (PlexCleaner Promote Copilot Skill Link Fix #854)

    Any fix here re-drifts the four just-swept carries plus Vantage-Config until the next conformance touch propagates it - the usual #305 propagation caveat; worth batching these together for that reason.

  2. added a commit that references this issue on Jul 17, 2026
    ed44cee
  3. ptr727 commented on Jul 17, 2026

    @ptr727
    OwnerAuthor

    Fixed via #334 (develop ed44cee) plus the reference propagation:

    Hub (#334, six Copilot review rounds driven to a clean pass):

    • configure.sh infers the model from the carried develop payload when the registry is absent - the documented no-arg form now works on operational carries; ambiguous layouts (both/neither payload) abort rather than guess. The model may also be passed as the sole argument (repo-config/configure.sh operational). Matrix-tested (infer both models, ambiguous aborts exit 1, explicit override, unknown-model abort); shellcheck clean.
    • README regen snippet + fleet AUDIT.md section 6 snippet hardened: paginated single fetch, exactly-one-ruleset-per-name enforcement (duplicate names previously yielded a multiline id that silently corrupted the follow-up API path), and the fleet snippet is now model-aware (operational develop payload swap, same selection audit.py makes; live-tested against Vantage-Config).

    Blessed reference propagation (Vantage-Config develop 6b64709):

    • configure.sh + repo-config/README.md carried verbatim from the updated hub.
    • The reference AUDIT.md now derives its secret name lists from spec/secrets.json per store claim (check and spec cannot drift apart), paginates the secrets and rulesets fetches, and enforces exactly-one-per-name. Verified live: no-arg configure.sh resolves 'operational' on the carry; self-audit dry run fully in sync.
    • AGENTS.md no-arg-aborts note superseded (the no-arg form now infers).

    Declined from the bundle: gh api --input - portability (fleet standard is current gh; no temp-file churn).

    Propagation debt: the four #330 sweep carries (PlexCleaner, LanguageTags, Utilities, MediaTools) now lag the updated configure.sh/README + the jq-derived secrets check; they pick it up at each repo's next conformance touch. The queued operational standups (HomeAssistant-Config #16, ESPHome-Config #46, HomeAutomation-Config #21) adapt from the now-current Vantage-Config reference and are unaffected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions