Skip to content

fix(lint): re-align markdownlint schema, bump Node LTS, drop inert PSUseCompatibleSyntax - #79

Merged
kyle-sexton merged 5 commits into
mainfrom
chore/dotfiles-audit-reconciliation
Jul 9, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
chore/dotfiles-audit-reconciliation

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Summary

Reconciliation from a full authority audit of the downstream kyle-sexton/dotfiles repo (2026-07-08): three catalog-owned configs drifted from their own invariants or current upstream.

  • .markdownlint-cli2.jsonc: $schema re-aligned to the pinned engine (0.23.0) per the file's own "bump together" rule
  • .node-version: 24.17.0 → 24.18.0 (current Node 24 LTS patch, verified via nodejs.org/dist/index.json)
  • PSScriptAnalyzerSettings.psd1: removed PSUseCompatibleSyntax — with TargetVersions @('7.4','7.6') and a PowerShell-7 floor everywhere, the rule is provably inert (it only fires when a target is older than the syntax used; verified empirically with a ?? probe). Investigation found the intermittent analyzer NRE is not this rule but the upstream CommandInfo cache race (PSScriptAnalyzer#1867), so the staged runner keeps a one-shot retry instead of a blanket -ErrorAction SilentlyContinue.

Test plan

  • Local lint/fixture suites pass
  • After merge: flow-back-down pass in kyle-sexton/dotfiles (.markdownlint-cli2.jsonc, .node-version, PSScriptAnalyzerSettings.psd1, modules/lefthook/psscriptanalyzer-staged.ps1, modules/chezmoi/render-and-lint.ps1)

Made with Cursor

kyle-sexton and others added 3 commits July 8, 2026 22:37
…ma pin

The engine pin and the config's $schema URL are documented to move together,
but the schema (and the module README) sat at v0.22.1. Bump the devDependency
to 0.23.0 (latest; bundles markdownlint 0.41.0 — every configured rule incl.
MD060 verified present) and re-align the $schema URL + comments (new URL
verified HTTP 200).

Drop the npm overrides added in e6b98c4: 0.23.0 pins js-yaml 5.2.0 and
markdown-it 14.2.0 directly, both clear of the OSV advisories the overrides
patched (verified via api.osv.dev), and the stale ^4.2.0 js-yaml floor would
now conflict with the parent's 5.x pin.

Verified: npm ci clean, lint:md 65 files / 0 errors, markdown fixtures test
passes.

Co-authored-by: Cursor <[email protected]>
Latest patch of the Node 24 "Krypton" LTS line (verified live against
https://nodejs.org/dist/index.json; 26.x remains Current, not LTS). No other
file repeats the patch version — package.json engines stays ">=24".

Co-authored-by: Cursor <[email protected]>
… analyzer NRE once

PSUseCompatibleSyntax only flags syntax NEWER than a targeted version (per its
rule doc, whose example fires ??/ternary only with 5.1-or-earlier targets).
With TargetVersions 7.4/7.6 and the platform's PowerShell 7.4+ floor it can
never produce a finding — verified empirically: a ??/ternary probe is flagged
with a 5.1 target and silent with 7.4/7.6. Remove it and record the rationale
(and the re-add trigger) where the rule sat.

Removing it does NOT cure the intermittent benign "Object reference not set"
analyzer error the staged runner worked around: measured over fresh -NoProfile
hosts, the NRE fires ~2-5/15 runs with the rule enabled, excluded via
-ExcludeRule, or removed alike. It is the analyzer's parallel rule execution
racing the non-thread-safe CommandInfo cache
(PowerShell/PSScriptAnalyzer#1867), and an immediate in-session retry is
reliably clean (15/15). Replace the runner's rule-specific -ExcludeRule
workaround with a one-shot per-file retry: benign first-run races self-heal,
persistent errors still fail the hook, and the previously-traded-away rules
now run in the fast lane too.

Verified: powershell fixtures test passes (good clean / bad flagged); the
reworked runner exits 0 across 12 fresh hosts and both edited files self-lint
clean under the shipped ruleset.

Co-authored-by: Cursor <[email protected]>
@claude

claude Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 51s —— View job


PR Review

  • Read project guidelines
  • Get PR diff
  • Review changed files
  • Post review findings

Overall this is a clean, well-reasoned maintenance PR. All three changes are internally consistent, the removal of the PSUseCompatibleSyntax rule is thoroughly justified, and the retry strategy is a genuine improvement over the previous blanket exclusion. No blocking issues found.


modules/lefthook/psscriptanalyzer-staged.ps1

Retry logic (lines 56–63): The one-shot retry is correct. PowerShell's -ErrorVariable varName creates a fresh collection on each cmdlet call, so $err on the retry represents only the retry's errors — the first-attempt errors are correctly discarded. Discarding the first attempt's (potentially incomplete) result and replacing with the retry's is also the right call; the comment accurately documents this.

One subtle behaviour worth noting: when the first call both produces findings and errors, those findings are silently dropped in favour of the retry's result. The comment pre-empts this ("an errored run's findings may be incomplete"), so a future reader will understand, but it is worth calling out explicitly since the net effect is that a pathological file that always errors-with-partial-findings will never surface those findings. That seems acceptable given the NRE is transient, but worth a conscious acknowledgement it's been considered.

Removal of $analyzerArgs['ExcludeRule'] = 'PSUseCompatibleSyntax': Correct consequence of removing the rule from PSScriptAnalyzerSettings.psd1. With the rule gone from the settings file it can never trigger, so excluding it from this lane was already a no-op.

modules/powershell/PSScriptAnalyzerSettings.psd1

Removal of PSUseCompatibleSyntax: The reasoning is sound. The rule's own semantics — flagging syntax newer than a target — means it can only fire when a target version predates the syntax in question. With a 7.4+ floor and no 5.1/6.x consumers, ?? and ternary are always within the oldest target, so the rule is provably inert. The in-file comment is excellent: it records the empirical probe and gives a precise re-add condition. The header update from "PowerShell 7.4+ (LTS) and 7.6+ (current)" to "PowerShell 7.4+ (the platform floor; no Windows PowerShell 5.1 consumers)" is more accurate — 7.6 is only relevant as a compatibility target, not a deployment requirement, so dropping it from the headline is correct.

Since this is a drop-in ruleset that consumers copy, it's worth confirming the PR description already covers the "future consumer with a 5.1 floor" case — the comment does: "Re-add with TargetVersions if a consumer ever needs a floor below the newest syntax-bearing PowerShell release." That's sufficient.

package.json / package-lock.json

overrides removal: Safe. Verifying the resolved transitive versions in the updated lock file:

Dep Old override Resolved now
js-yaml ^4.2.0 5.2.0 (upstream upgraded to v5)
markdown-it ^14.2.0 14.2.0 (same)

[email protected] has moved to js-yaml@^5.x itself, so the ^4.x override is not only unnecessary but was actually constraining to an older major. markdown-it resolves to exactly the pinned minimum (14.2.0), so that override was also redundant. Both removals are correct.

modules/markdown/.markdownlint-cli2.jsonc

Schema URL, version comment, package.json pin, and both READMEs all updated consistently to 0.23.0. ✓

.github/dependabot.yml

Comment trimmed to remove the "schema overrides" reference, which is accurate now that the overrides block is gone. ✓

.node-version

24.17.0 → 24.18.0: straightforward LTS patch bump. ✓


One minor nit (not blocking): The PSScriptAnalyzerSettings.psd1 comment block for the absent PSUseCompatibleSyntax rule sits between the formatting section and the # --- Best practices --- header. The removed rule was under a # --- Compatibility --- header that is also removed. Placing the absence-comment where the Compatibility section used to be is slightly ambiguous about what section it belongs to. A reader scanning the file top-to-bottom might wonder if it's a trailing formatting note. This is purely cosmetic — the comment is clear in isolation — but an explicit # --- Compatibility --- section header (even with only the absence-comment beneath it) would preserve the structural scan pattern established by the other section headers.

PSScriptAnalyzerSettings.psd1:96-103


Verdict: Approve. All changes are correct, internally consistent, and well-documented. The retry strategy is the right fix for the NRE — it's less aggressive than a blanket exclude and preserves full linting coverage on the retry pass.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 661570c. Configure here.

@cursor cursor Bot 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.

Stale comment

Risk: medium. Not approving: Cursor Bugbot completed as skipped and reported 1 unresolved finding in psscriptanalyzer-staged.ps1 on the latest commit. Human review is needed before merge; no reviewers assigned because the only repo contributor is the PR author.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

…yntax

comment-hygiene flags owner/repo#N in comments. Point at the GitHub
issues URL instead so the NRE rationale stays while the lane stays clean.

Co-Authored-By: Claude <[email protected]>
Co-authored-by: Cursor <[email protected]>
@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_c1f53e80-e92b-47de-af7a-af52ec5b5763)

@claude

claude Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 17s —— View job


PR Review (re-triggered on dd0c30a)

  • Read project guidelines (CLAUDE.md — not present; no repo-specific overrides)
  • Review latest commit and diff
  • Assess Cursor Bugbot finding
  • Post review findings

Latest commit: dd0c30a

Single-line change in psscriptanalyzer-staged.ps1: the shorthand PowerShell/PSScriptAnalyzer#1867 in a comment was converted to the full URL https://github.com/PowerShell/PSScriptAnalyzer/issues/1867. This was triggered by a comment-hygiene linter that flags owner/repo#N notation. The change is correct — the NRE rationale is preserved and the reference is now unambiguous. No functional impact.


Cursor Bugbot finding: false positive

Finding: "Project policy requires that rule to stay excluded in this fast lane via -ExcludeRule, independent of whether the catalog PSScriptAnalyzerSettings.psd1 still enables it."

Assessment: incorrect. The Bugbot's "learned rule" (lefthook PSScriptAnalyzer: no blanket error suppression, PSUseCompatibleSyntax excluded via -ExcludeRule) reflects the old state of the code. This PR intentionally supersedes that state for a sound technical reason:

  1. PSUseCompatibleSyntax is absent from PSScriptAnalyzerSettings.psd1 entirely — not disabled, not commented out, not in ExcludeRules. A rule absent from the settings file cannot fire.
  2. The ExcludeRule flag in psscriptanalyzer-staged.ps1 was therefore already a no-op against the runner's effective ruleset before it was removed. Both removals are correct.
  3. The in-file comment at PSScriptAnalyzerSettings.psd1:96-103 documents the invariant precisely and gives the re-add condition: "if a consumer ever needs a floor below the newest syntax-bearing PowerShell release."

The Bugbot finding should be dismissed.


Final verdict

This PR is correct on all counts. The Cursor Bugbot finding is stale — its learned rule was derived from the old code and does not reflect the new (intended) steady state. The retry strategy (psscriptanalyzer-staged.ps1:56-63) and the absence-comment in PSScriptAnalyzerSettings.psd1 together form a coherent, well-documented solution. Approve.

@cursor cursor Bot 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.

Stale comment

Risk: medium. Not approving: Cursor Bugbot completed as skipped on the latest commit and did not re-verify the new push. The prior Bugbot finding is resolved, but human review is still needed; no reviewers assigned because the only repo contributor is the PR author.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

The full issues URL fixed comment-hygiene but tripped PSAvoidLongLines
in CI. Wrap the comment so both gates stay green.

Co-Authored-By: Claude <[email protected]>
Co-authored-by: Cursor <[email protected]>
@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_8d45d8dd-ddf1-4ca4-921a-7d49f57ef177)

@claude

claude Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 18s —— View job


PR Review (re-triggered on 1dc0e34)

  • Read project guidelines (no CLAUDE.md / REVIEW.md present)
  • Review full PR diff
  • Assess latest commit
  • Post findings

Latest commit: 1dc0e34

Pure comment reflow in psscriptanalyzer-staged.ps1: the full https://github.com/PowerShell/PSScriptAnalyzer/issues/1867 URL (introduced in dd0c30a) was tripping PSAvoidLongLines in CI. The fix wraps the comment so the URL sits on its own continuation line and all surrounding lines stay under 120 characters. Content is identical — only line-break placement changes. Correct fix, no functional impact.


Full PR assessment

All five commits form a coherent, self-consistent set:

File Change Assessment
.node-version 24.17.0 → 24.18.0 Straightforward LTS patch bump ✓
modules/markdown/.markdownlint-cli2.jsonc Schema pin v0.22.1 → v0.23.0 Matches engine bump; "bump together" rule satisfied ✓
package.json cli2 0.22.1 → 0.23.0, overrides block removed [email protected] moved to js-yaml@^5.x itself so the ^4.x override was not only redundant but constraining; markdown-it override was redundant at the same version. Both removals correct ✓
modules/powershell/PSScriptAnalyzerSettings.psd1 PSUseCompatibleSyntax removed; absence-comment added Rule is provably inert at a 7.4+ floor; absence-comment is precise and gives the re-add condition ✓
modules/lefthook/psscriptanalyzer-staged.ps1 -ExcludeRule removed; per-file one-shot retry added Retry is the right fix: less aggressive than blanket exclusion, preserves full linting coverage on the retry pass. $err is fresh per call so the first attempt's errors are correctly discarded ✓
READMEs / dependabot comment Version references updated Consistent with the above changes ✓

On the Cursor Bugbot finding

The inline finding ("project policy requires -ExcludeRule PSUseCompatibleSyntax") is a stale learned rule derived from the prior code state and does not apply here. PSUseCompatibleSyntax is absent from PSScriptAnalyzerSettings.psd1 entirely — a rule absent from the settings file cannot fire, making the ExcludeRule flag a no-op that was already redundant before it was removed. Kyle's inline response correctly explains this. The finding should be dismissed.

Minor cosmetic note (non-blocking, same as prior review)

The absence-comment for PSUseCompatibleSyntax in PSScriptAnalyzerSettings.psd1:96–109 sits between the formatting section and # --- Best practices --- without a section header. Adding # --- Compatibility --- above the absence-comment would restore the structural scan pattern established by the other section headers. Purely cosmetic — the comment is unambiguous in isolation.


Verdict: Approve. All changes are correct, internally consistent, and well-documented. The retry strategy is the right replacement for the blanket exclusion, and the PSUseCompatibleSyntax removal is sound. The latest commit resolves the CI PSAvoidLongLines failure cleanly with no content change.

@cursor cursor Bot 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.

Risk: medium. Not approving: Cursor Bugbot completed as skipped on the latest commit and did not re-verify the new push. The prior Bugbot finding is resolved, but human review is still needed; no reviewers assigned because the only repo contributor is the PR author.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@kyle-sexton
kyle-sexton merged commit 99b2836 into main Jul 9, 2026
4 checks passed
@kyle-sexton
kyle-sexton deleted the chore/dotfiles-audit-reconciliation branch July 9, 2026 20:32
kyle-sexton added a commit that referenced this pull request Jul 13, 2026
…oftware (#100)

## Summary

Adds
`melodic-software/ci-workflows/.github/workflows/select-runner.yml@3415de3ff2fafee40e4d087eb6073d2f6952b595`
to `approvedSelectorReferencesByRepositoryOwner.melodic-software` in
`components/runner-policy/policy.json`.

This is the liveness-routing selector revision (ci-workflows#86): routes
to the managed fleet whenever a matching runner is `online` (busy
runners queue instead of falling back to hosted), removes the
rerun-to-hosted branch so re-runs keep their original route, and reports
`online-runner-count`.

The `de50a08` revision stays approved until all consumers migrate; it is
removed in a follow-up once the consumer pin bumps land.

Owner-scoped (not global) because the strict `self-hosted-only` path
schedules the selector control-plane job on the melodic-software runner
group, which other owners cannot target.

## Ordering

Must merge before any consumer selector pin bump (Dependabot
ci-workflows#88, standards#99, claude-code-plugins#167 and the #79
consumer PRs) — a pin bump without allowlist approval fails the
runner-policy lane.

Part of melodic-software/github-iac#79 (W1), epic
melodic-software/github-iac#78.

## Test plan

- `node --test runner-policy.test.mjs`: 95 pass, including new
owner-scoped audit coverage for both approved melodic-software
revisions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01EPDbXgonTuFwFwdTtHaCmw

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Data-only policy allowlist change for CI runner routing; wrong SHA or
merge ordering could break consumer pin bumps until aligned, but scope
is limited to melodic-software owner evidence.
> 
> **Overview**
> **Approves** the liveness-routing `select-runner.yml` pin `3415de3…`
for **`melodic-software` only** by adding it to
`approvedSelectorReferencesByRepositoryOwner` in `policy.json`
(alongside the existing `de50a08…` strict-scheduling revision).
> 
> **Documents** that revision in `README.md`: online-runner liveness
routing (queue on busy self-hosted instead of falling back to hosted),
no rerun-to-hosted branch, `online-runner-count` output, and five
approved selector revisions total with owner-scoped strict revisions.
> 
> **Tests** in `runner-policy.test.mjs` assert the expanded owner
allowlist and add audit coverage so both melodic-software–scoped SHAs
pass when `GITHUB_REPOSITORY` supplies owner evidence.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
bd3e6cb. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Fable 5 <[email protected]>
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.

1 participant