Skip to content

Vale rule: flag mid-sentence "Infrastructure as Code" overcapitalization (IaC sweep) #20958

Description

@workprentice

Follow-up to #20653 / PR #20952.

PR #20952 adds Pulumi.Overcapitalization, a Vale rule flagging generic concepts capitalized as if they were proper nouns. Its first draft also matched capitalized mid-sentence "Infrastructure as Code" ("the Infrastructure as Code" -> "the infrastructure as code"), but that token had a boundary bug (a bare [a-z] anchor doesn't reliably sit at Vale's auto-wrapped \b, so it silently matched only the rare case where the phrase follows a word ending right at punctuation). Fixing the bug surfaces the real violation surface: 161 hits across 78 files, almost entirely blog posts written over several years.

That's a real, separate editorial sweep and shouldn't be rushed into #20952, which is scoped to the already-validated "Stack" token. This issue tracks doing it properly:

  1. Add the fixed token back to styles/Pulumi/Overcapitalization.yml: [a-z]+ Infrastructure as Code\b(?! [A-Z]).
  2. Run vale content/ tree-wide and hand-audit the ~161 hits across ~78 files (mostly blog) for genuine proper-noun exceptions (workshop/talk titles, Pulumi's own "Universal Infrastructure as Code" branded phrase, external product names) before assuming they're all true positives.
  3. Fix the true positives, add narrow .vale.ini opt-outs or TokenIgnores entries for the rest, following the precedent in Add Vale rule for overcapitalized "Stack" (issue #20653) #20952.
  4. Ship at zero tree-wide findings, same bar as the Stack token.

Also in scope: widen scope: paragraph to cover headings and list items

Pulumi.Overcapitalization currently uses scope: paragraph, which Vale excludes headings and list items from. That was a deliberate, not-yet-resolved narrowing at merge time for #20952 -- not an oversight -- and it means the rule's most common real-world triggers (an H2 like "Managing your Stack", a list item like "- Create a new Stack") go unscanned today.

Widening it needs a re-tune, since the "zero false positives against 2,241 files" result for the Stack token was measured under paragraph scope. The correct shape is not a bare scope: text or scope: heading: either would false-flag Title-Case H1s, which are correct per AGENTS.md (H1 = Title Case, H2+ = sentence case) -- this repo already hit and solved that exact problem for Google.Headings, which is disabled in .vale.ini for the same reason. Mirror the enumerated scope list styles/Pulumi/HeadingSentenceCase.yml and styles/Pulumi/CrossReferenceHeadings.yml already use: heading.h2 through heading.h6, plus list for list items.

Widening the scope also resolves whether the content/docs/iac/operations/continuous-delivery/argocd.md opt-out in .vale.ini is covering anything real: at PR #20952's head, the Stack token's only match on that page is ## Define a Stack custom resource, an H2 -- so if scope: paragraph excludes it today, the opt-out currently covers nothing. Resolve the opt-out and the scope question together rather than independently.


🧠 This issue was created by workprentice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/automationIssues relating to automation (mostly GHA workflows) and automatically generated contentarea/blog-contentIssues relating to content for pulumi.com/blogarea/docs-contentIssues relating to content under pulumi.com/docskind/task

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions