feat(lint): add warning-only doc-policy lint#76
Conversation
Add a reusable doc-policy-lint workflow, caller example, helper script, and tests for document-policy warning signals. Findings emit annotations and summaries without failing the job, and required-check promotion remains deferred. Closes #70
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47df5b5f53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else if (normalized.startsWith('docs/') || normalized.startsWith('.')) { | ||
| candidates.push(path.join(repoRoot, normalized)); |
There was a problem hiding this comment.
Treat dot-relative supersession links as document-relative
When a docs header uses a normal Markdown supersession target like ./replacement.md or ../new/policy.md, this branch resolves it from the repository root because the normalized target starts with ., instead of resolving it relative to the document containing the header. I checked the new doc-policy-lint helper directly with docs/old/a.md pointing to ../new/b.md; even though docs/new/b.md exists, it emits dangling_superseded_by, so consumers will get false warning annotations for valid relative supersession links.
Useful? React with 👍 / 👎.
Summary
Adds the warning-only
doc-policy-lintreusable workflow for document-policy rollout lane 4. The workflow emits annotations and a step summary for status-header drift, OD4 charter budgets, dangling supersession links, active-doc placeholders, index coherence, and stale active-doc terms near changed current-truth registers.The caller example pins the workflow and helper script ref to
v1; promotion into required docs checks remains deferred.Verification
npm testC:\Users\josep\go\bin\actionlint.exe .github\workflows\doc-policy-lint.yml examples\doc-policy-lint.ymlVerification Notes
The Vitest suite includes the integration warn-path test that spawns
scripts/doc-policy-lint.mjs, asserts process exit 0, checks::warningoutput, and confirms the generated summary sayswarning-only. Workflow structure tests assert the explicit permissions block,workflow-library-reftag-ref alignment, caller example pinning, and absence ofcore.setFailed/exit 1in the reusable workflow job.Docs / Changelog
Added
.changelog/unreleased/70-doc-policy-lint.md, updatedREADME.mdworkflow inventory/consumer guidance, and recorded the operational change indocs/repo-update-log.md.Plan/status artifacts: not applicable because this lane did not create or use a repo-facing plan, status tracker, findings file, handoff, audit, roadmap/status artifact, or coordination note.
Linked Issue
Closes #70
Risks
.agent/check-map.ymlas a required docs check.v1tag after merge; required-check promotion remains deferred until the warn-first period is clean.