Title: fix: preserve Vale severity in CI annotations and add three-severity demo by nickvigilante · Pull Request #26587 · coder/coder · GitHub
Open Graph Title: fix: preserve Vale severity in CI annotations and add three-severity demo by nickvigilante · Pull Request #26587 · coder/coder
X Title: fix: preserve Vale severity in CI annotations and add three-severity demo by nickvigilante · Pull Request #26587 · coder/coder
Description: Closes DOCS-426. Follow-up to #26586 (DOCS-425, strip), which merged first. Problem The Vale problem matcher at .github/vale-problem-matcher.json hard-codes "severity": "warning". Every Vale finding renders as a GitHub warning annotation, regardless of Vale's actual severity. Nick observed this on PR #25501: error-level findings from Coder.BrandNames appear as warnings. This collapsed the doctrine's three-severity ladder (error / warning / suggestion) into a single advisory channel for the reader of a PR diff. This PR restores the ladder visually so contributors and reviewers see each rule's intended severity. Root cause GitHub Actions problem matchers expect either a regex capture group for severity or a hard-coded severity. Vale's --output=line format produces path:line:col:rule:message with severity stripped, so the matcher had no severity to capture and fell back on the hard-coded value. Fix Commit 1: severity rendering Switch the Vale prose lint step to vale --output=JSON and pipe through jq to emit GitHub workflow commands directly. Drop the problem matcher file. Vale severity GitHub workflow command suggestion ::notice:: warning ::warning:: error ::error:: Message bodies are URL-encoded for %, \r, and \n per the GitHub Actions workflow command spec. The Vale step stays advisory (continue-on-error: true, vale --no-exit); rendering becomes correct but the step never fails the job. Commit 2: three-severity demo Three throwaway Coder.Demo* rules at level: suggestion, level: warning, and level: error, plus a docs/.style/_vale-annotation-demo.md file that triggers each rule exactly once. Together with the rendering fix above, this PR's CI surfaces three GitHub annotations in three distinct severities (notice, warning, error). Use the Files Changed view to inspect rendering. The demo files live permanently in docs/.style/, which is excluded from coder.com. They re-trigger annotations only on PRs that touch the demo file itself, so they don't pollute CI on day-to-day PRs. Sample output Out of scope Blocking merge on error-level findings is the natural next step but is sequenced as the final step of the prose-style rollout. It was prototyped in this PR (commit 3, since backed out) and verified end-to-end against the demo doc. The work moved to DOCS-433 so the corpus of enabled rules is broad enough by the time the gate lands that it catches real violations rather than novelty failures from a single rule. Expected CI state on this PR lint-docs passes. The three demo annotations render at lines 17 / 19 / 21 of docs/.style/_vale-annotation-demo.md as ::notice::, ::warning::, and ::error:: respectively. The ::error:: annotation does not fail the job because the Vale step is still advisory under this PR. Local verification of the rendering pipeline: $ printf '%s\n' 'docs/.style/_vale-annotation-demo.md' \ | xargs -d '\n' vale --no-exit --output=JSON \ | jq -r '...' ::notice file=docs/.style/_vale-annotation-demo.md,line=17,col=3,title=Coder.DemoSuggestion::[Demo] Suggestion-level Vale annotation. ::warning file=docs/.style/_vale-annotation-demo.md,line=19,col=3,title=Coder.DemoWarning::[Demo] Warning-level Vale annotation. ::error file=docs/.style/_vale-annotation-demo.md,line=21,col=3,title=Coder.DemoError::[Demo] Error-level Vale annotation. Decision log Workflow commands vs custom Vale template + updated matcher: chose workflow commands because the transform is a 10-line jq pipeline with no extra files to maintain, and it bypasses GitHub Actions problem-matcher limitations entirely. The custom-template option would have kept the matcher infrastructure but required an additional Go template file under .github/. Throwaway demo rules vs reusing existing rules: chose throwaway because we wanted each severity to fire deterministically from a single unambiguous marker. Reusing existing rules would couple the demo to corpus content and obscure the signal. Demo persists vs drops before merge: persists. The merge-gate constraint that originally forced the demo to drop is gone (deferred to DOCS-433). The four demo files live in docs/.style/, excluded from coder.com, and only annotate PRs that touch them. They double as a permanent canary so a future regression in severity rendering surfaces immediately on whichever PR introduces it, and as the verification artifact DOCS-433 uses when re-installing the merge gate. docs/.style/_vale-annotation-demo.md filename: underscore prefix follows Coder convention for files that exist outside the normal docs taxonomy. Not surfaced on coder.com/docs because docs/.style/ is excluded from the manifest, deploy workflow, and docs preview. Merge-block deferred to DOCS-433: the rendering fix and the merge gate are independent changes. Shipping the rendering first lets contributors see the three-severity ladder while the rule catalogue is still small and the false-positive policy hasn't been stress-tested yet. The gate lands as the final step of the rollout, after the catalogue is broad enough that the gate covers real prose-style policy rather than one rule's enforcement. Filed via Coder Agents on Nick's behalf.
Open Graph Description: Closes DOCS-426. Follow-up to #26586 (DOCS-425, strip), which merged first. Problem The Vale problem matcher at .github/vale-problem-matcher.json hard-codes "severity": "warning"...
X Description: Closes DOCS-426. Follow-up to #26586 (DOCS-425, strip), which merged first. Problem The Vale problem matcher at .github/vale-problem-matcher.json hard-codes "severity": "...
Opengraph URL: https://github.com/coder/coder/pull/26587
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2e3ce1d8-4c2a-ddd1-f9cc-a28cbbc2e0fa |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9D1E:4BB79:2214FF5:2B7F01B:6B018249 |
| html-safe-nonce | 7ca354090f947950545f46f4ac526de5b57315e12a78a11d0ebe2eb8dcefd77e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDFFOjRCQjc5OjIyMTRGRjU6MkI3RjAxQjo2QjAxODI0OSIsInZpc2l0b3JfaWQiOiI4NTMwMzUzMjIyNjIyMjE2Nzc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ba76e28f9a7695a58af276474191045af108c5d5734cf80a7b976bd9817729f4 |
| hovercard-subject-tag | pull_request:3915410325 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/coder/coder/pull/26587/files |
| twitter:image | https://avatars.githubusercontent.com/u/13631471?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/13631471?s=400&v=4 |
| og:image:alt | Closes DOCS-426. Follow-up to #26586 (DOCS-425, strip), which merged first. Problem The Vale problem matcher at .github/vale-problem-matcher.json hard-codes "severity": "warning"... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width