Skip to content

.markdownlint-cli2.jsonc is verbatim, but a repo with a committed data root needs its own globs/ignores #1118

Closed

Description

@ptr727

Summary

spec/files.json declares .markdownlint-cli2.jsonc at verbatim fidelity, so the audit expects a downstream copy byte-identical to the hub canonical. But the file is the single source of truth for what markdownlint lints in that repo, and a repo whose tree holds content that is data rather than authored prose needs its own globs/ignores. There is no per-repo mechanism, so such a repo must either fail the verbatim check permanently or lose real lint scoping on the next re-vendor.

Found while running RESYNC.md against ptr727/Financial-Modeling.

The finding

DRIFT  verbatim: .markdownlint-cli2.jsonc differs from the canonical and matches no past hub revision - the repo modified fixed content, review it

Classified modified rather than stale, which RESYNC.md section 3 item 3 says to read before overwriting, since it may be an improvement the hub should adopt. That is the case here.

What the downstream copy adds

// Declared here, not only as the CI action's `globs:` input, so a bare `markdownlint-cli2` locally lints the same set CI does.
// An `ignores` entry with no positive glob to subtract from matches nothing at all, which reports "0 issues" and reads exactly like success.
"globs": ["**/*.md"],
// The data root is committed now, so `gitignore: true` no longer keeps the linter out of it.
// A markdown file landing in the document archive is data, not authored prose, and a failure here prints the offending line.
"ignores": ["data/**", "notes/forms-decisions.md"]

Both entries are load-bearing:

  • data/** is this repo's committed document archive. .gitattributes already declares it -text as a deliberate passive exception, and .editorconfig-checker.json already carries an ^data/ exclude, so the fleet already accepts per-repo excludes for this tree in a sibling config. markdownlint is the one that has no such affordance.
  • The globs entry exists because an ignores with no positive glob to subtract from matches nothing and reports 0 issues, which is indistinguishable from success. Dropping it would silently stop linting Markdown entirely.
  • A markdown file in the archive would otherwise print its offending line in CI output, which for this repo means printing personal financial data into a log.

The conflict

  • Overwriting to satisfy verbatim erases the scoping and silently changes what CI lints.
  • Keeping the local copy leaves a permanent verbatim DRIFT finding that never converges, so it becomes noise every future audit has to re-triage.

Neither is right, and a downstream repo cannot resolve it on its own. Left as-is in ptr727/Financial-Modeling#204 and raised here instead.

Possible directions

  1. Reclassify to intent with an intentRef, the way .editorconfig, .editorconfig-checker.json, and .gitattributes are already handled. Those three carry the same shape of problem (a fleet-governed rule plus repo-specific values) and are already intent. This looks like the consistent answer.
  2. Keep verbatim and add a per-repo exclude affordance, the way the prose gate has .github/prose-gate-excludes and validate-task.yml has its markdown-exclude-globs input. Note the CI input alone does not solve it, since the point of declaring globs/ignores in the file is that a bare local markdownlint-cli2 lints the same set CI does, which CODESTYLE.md "Markdown and Spelling" requires.
  3. Record a divergences.json disposition for the path, if the fleet would rather close it as accepted than change the fidelity.

Context

  • Hub: f3b4cc9 (2.0.526), read at main.
  • Downstream: ptr727/Financial-Modeling, audit run 2026-08-30T14:37:34Z | hub f3b4cc9, measured at main@bd520bf.
  • Related: the .editorconfig-checker.json ^data/ exclude and the /data/** -text .gitattributes entry in that repo, both already-accepted per-repo scoping for the same tree.

Activity

  1. added
    decision
    on Sep 5, 2026
  2. ptr727 commented on Sep 11, 2026

    @ptr727
    OwnerAuthor

    Maintainer answer, 2026-09-11: reclassify .markdownlint-cli2.jsonc to intent with an intentRef, the way .editorconfig, .editorconfig-checker.json, and .gitattributes already are. Removing decision; the issue stays open for the change.

  3. removed
    decision
    on Sep 11, 2026
  4. ptr727 commented on Sep 20, 2026

    @ptr727
    OwnerAuthor

    Closing: the fleet settled this after the issue was filed, and by a fourth option none of the three above proposed.

    What was adopted

    The root .markdownlint-cli2.jsonc stays verbatim, and a repository excluding a subtree of its own puts a nested .markdownlint-cli2.jsonc inside the directory it excludes. markdownlint-cli2 applies a nested config to its own directory and everything below it, so the exclusion holds for a bare local run and for CI alike, which is what CODESTYLE.md "Markdown and Spelling" requires and what the markdown-exclude-globs CI input on its own could not deliver.

    That resolves both horns stated here. The root config is re-vendored byte-for-byte, so the verbatim check converges, and the scoping is not erased, because it never lived in the root config.

    Where it is stated

    • CODESTYLE.md "Markdown and Spelling": a repository excluding a subtree "puts a .markdownlint-cli2.jsonc carrying its own ignores beside that content rather than editing the shared root config, whose contents are fleet-fixed".
    • spec/fidelity-model.md, the verbatim entry: "a repository's own exclusions go in a nested config beside the content they exclude rather than in this file, so there is no governed divergence".
    • spec/project-types.json, parity.markdownlint: "This check counts that root config only, so a nested .markdownlint-cli2.jsonc is not a second one."
    • docs/reusable-workflows.md carries the migration, naming Financial-Modeling and Blog as the two repositories owed it.
    • The root config's own comment carries the rule, and adds that a nested file's ignores resolve against the directory holding it rather than against the repository root.

    The downstream half is done

    Financial-Modeling has adopted it. Its root config now carries the fleet ignores of **/node_modules/** alone, and the two exclusions this issue was about live in data/.markdownlint-cli2.jsonc and notes/.markdownlint-cli2.jsonc. A hub audit run today reports that root config as stale rather than modified, which is the difference: it is a past hub revision to re-vendor rather than hand-modified fixed content, and re-vendoring it now erases nothing.

    The disposition is recorded in spec/divergences.json against that path and that repository, tracked as #1487, which is closed. The remaining re-vendor is carried on #1579 as an ordinary verbatim finding.

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