Skip to content

Re-vendor the carried hub files to the current canonical - #111

Merged
ptr727 merged 2 commits into
developfrom
revendor/hub-canonical
Aug 3, 2026
Merged

Re-vendor the carried hub files to the current canonical#111
ptr727 merged 2 commits into
developfrom
revendor/hub-canonical

Conversation

@ptr727

@ptr727 ptr727 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

.markdownlint-cli2.jsonc is carried verbatim from ptr727/ProjectTemplate, so a copy that differs is drift rather than a choice. The hub's regenerated fleet divergence report lists this repo for it.

The canonical enables MD033 with details and summary allowed, which is a behavior change rather than a comment sweep. Verified rather than assumed, since that is the kind of change that fails CI after the fact: markdownlint-cli2 over **/*.md reports 0 issues here under the restored config.

Line endings preserved.

repo-config/configure.sh was withdrawn from this pull request

An earlier revision of this branch also re-vendored repo-config/configure.sh, and this description still described it after the file was removed. That was a stale description rather than a missing commit, and it is corrected here.

The reason it was withdrawn is worth stating, because it is the blocker for this repo: the canonical script resolves its ruleset payloads as develop.json and main.json, and this repo carries ruleset-develop.json and ruleset-main.json. Copying the script in leaves apply and check aborting on payloads that do not exist, which is worse than the older script it replaced. The hub's divergence ledger recorded the filename fork, so the information was available and the re-vendor ran without acting on it.

Converging this repo needs the payload migration with its content reconciled against the canonical, which is judgment rather than a file copy, so it gets its own pull request. Known defects in the canonical script are tracked at ptr727/ProjectTemplate#538 and fixed in ptr727/ProjectTemplate#540, which should land before that migration so this repo takes a corrected script rather than the current one twice.

Part of the fleet re-vendor sweep tracked in the hub's TODO.md.

These files are carried verbatim from ptr727/ProjectTemplate, so a local
copy that differs is drift rather than a choice. The hub's regenerated
fleet divergence report lists this repo for them.

Changed: .markdownlint-cli2.jsonc repo-config/configure.sh

Line endings preserved as each file held them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 3, 2026 16:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-vendors two carried “hub” files from ptr727/ProjectTemplate to reduce drift: the Markdown lint configuration and the repo-config/configure.sh repository-configuration script used to apply/check GitHub repo settings and rulesets.

Changes:

  • Update .markdownlint-cli2.jsonc to re-enable MD033 while allowing <details>/<summary> for GitHub collapsibles.
  • Replace repo-config/configure.sh with the newer apply/check design and payload-driven ruleset/settings validation logic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
repo-config/configure.sh Updates the repo configuration “apply/check” script to the newer template design (but currently references payload filenames that don’t exist in this repo and misses some ruleset parameter checks).
.markdownlint-cli2.jsonc Aligns markdownlint config to the canonical template behavior, allowing details/summary while keeping MD033 enabled.
Suppressed comments (2)

repo-config/configure.sh:58

  • The fallback model inference and payload paths refer to develop.json/main.json, but this repo carries ruleset-develop.json and ruleset-main.json (and no registry/operational payload). With the current logic, running configure.sh will fail when the registry is absent and will later preflight-abort because develop.json/main.json do not exist.
        if [ -f "$script_dir/develop.json" ] && [ ! -f "$script_dir/operational/develop.json" ]; then
            model="release"
        elif [ -f "$script_dir/operational/develop.json" ] && [ ! -f "$script_dir/develop.json" ]; then
            model="operational"
        else

repo-config/configure.sh:213

  • check_ruleset compares required status check contexts, but it does not verify key required_status_checks parameters from the payload (notably strict_required_status_checks_policy, which is explicitly set to false in the carried ruleset JSON). This can let ruleset drift pass the check even when an important policy bit flips.
    if jq_has '.rules[] | select(.type=="required_status_checks")' "$file"; then
        wantc="$(jq -c '[.rules[]|select(.type=="required_status_checks").parameters.required_status_checks[].context]|sort' "$file")"
        gotc="$(jq -c '[.rules[]|select(.type=="required_status_checks").parameters.required_status_checks[].context]|sort' <<<"$live")"
        assert "'$rname' required checks = $wantc" test "$gotc" = "$wantc"
    fi

Comment thread repo-config/configure.sh Outdated
The canonical script resolves its ruleset payloads as develop.json and
main.json, and this repo carries ruleset-develop.json and ruleset-main.json.
Copying the script in therefore leaves apply and check aborting on payloads
that do not exist, which is worse than the older script it replaced.

The hub's divergence ledger records exactly this ("an older check-mode fork
with ruleset-*.json filenames"), so the information was available and the
re-vendor was run without acting on it. Converging this repo needs the
payload migration and its content reconciled against the canonical, which is
a change with judgment in it rather than a file copy, so it gets its own
pull request.

The markdownlint config re-vendor in this branch is unaffected and stays.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 3, 2026 17:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

.markdownlint-cli2.jsonc:10

  • PR description says this change also updates repo-config/configure.sh, but the PR only includes modifications to .markdownlint-cli2.jsonc (no configure.sh diff in the PR file list). Either include the intended repo-config/configure.sh update in this PR or adjust the PR description/title to match the actual change set.
        // Prose paragraphs and data-heavy tables or URLs are intentionally long.
        // Reflowing at 80 columns hurts readability and churns diffs.
        "MD013": false,
        // MD033 (inline HTML) stays enabled so native markdown wins.
        // HTML comments, used as reference-link dividers, pass it.
        // The details and summary elements are allowed for GitHub collapsibles, which have no markdown equivalent.
        // Every other element still flags.
        "MD033": { "allowed_elements": ["details", "summary"] },

@ptr727

ptr727 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

Answering the suppressed finding on .markdownlint-cli2.jsonc:10, which carried no review thread. Quoting it, since there is nowhere to reply in-line:

PR description says this change also updates repo-config/configure.sh, but the PR only includes modifications to .markdownlint-cli2.jsonc ... Either include the intended repo-config/configure.sh update in this PR or adjust the PR description/title to match the actual change set.

Correct. The description is now corrected rather than the file restored, because withdrawing the file was the deliberate act and the description simply was not updated with it.

repo-config/configure.sh was removed from this branch after review found that the canonical script resolves its ruleset payloads as develop.json and main.json while this repo carries ruleset-develop.json and ruleset-main.json. Copying it in leaves apply and check aborting on payloads that do not exist, which is worse than the older script it replaced. The commit did that; the description did not follow.

Three other pull requests in this sweep carried the identical stale claim, and all four are corrected together: this one, ptr727/aiopurpleair#62, ptr727/ESPHome-NonRoot#207 and ptr727/homeassistant-purpleair#255. Fixing only the one where a reviewer happened to notice would have left three descriptions asserting a file that is not in them.

Worth recording that this is the third time in one session that a pull request description has contradicted its own branch, which is exactly the check the hub's TODO.md already carries as an open item, and exactly the kind of claim no linter reads. Each time it was found by a reviewer comparing the prose against the diff.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit b07b5e5 into develop Aug 3, 2026
10 checks passed
@ptr727
ptr727 deleted the revendor/hub-canonical branch August 3, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants