Re-vendor the carried hub files to the current canonical - #111
Conversation
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>
There was a problem hiding this comment.
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.jsoncto re-enableMD033while allowing<details>/<summary>for GitHub collapsibles. - Replace
repo-config/configure.shwith 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
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>
There was a problem hiding this comment.
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(noconfigure.shdiff in the PR file list). Either include the intendedrepo-config/configure.shupdate 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"] },
|
Answering the suppressed finding on
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.
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 |
.markdownlint-cli2.jsoncis carriedverbatimfrom 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
MD033withdetailsandsummaryallowed, 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-cli2over**/*.mdreports 0 issues here under the restored config.Line endings preserved.
repo-config/configure.shwas withdrawn from this pull requestAn 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.jsonandmain.json, and this repo carriesruleset-develop.jsonandruleset-main.json. Copying the script in leavesapplyandcheckaborting 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.