Skip to content

feat(lint): add warning-only doc-policy lint#76

Merged
ArchonVII merged 2 commits into
mainfrom
agent/codex/70-doc-policy-lint
Jun 15, 2026
Merged

feat(lint): add warning-only doc-policy lint#76
ArchonVII merged 2 commits into
mainfrom
agent/codex/70-doc-policy-lint

Conversation

@ArchonVII

Copy link
Copy Markdown
Owner

Summary

Adds the warning-only doc-policy-lint reusable 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 test

    command: npm test
    location: local
    result: passed 7 test files, 129 tests
    timestamp: 2026-06-15T14:42:14-05:00
    
  • C:\Users\josep\go\bin\actionlint.exe .github\workflows\doc-policy-lint.yml examples\doc-policy-lint.yml

    command: C:\Users\josep\go\bin\actionlint.exe .github\workflows\doc-policy-lint.yml examples\doc-policy-lint.yml
    location: local
    result: exited 0 with no findings
    timestamp: 2026-06-15T14:42:14-05:00
    

Verification Notes

The Vitest suite includes the integration warn-path test that spawns scripts/doc-policy-lint.mjs, asserts process exit 0, checks ::warning output, and confirms the generated summary says warning-only. Workflow structure tests assert the explicit permissions block, workflow-library-ref tag-ref alignment, caller example pinning, and absence of core.setFailed / exit 1 in the reusable workflow job.

Docs / Changelog

Added .changelog/unreleased/70-doc-policy-lint.md, updated README.md workflow inventory/consumer guidance, and recorded the operational change in docs/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

  • Risk level: low; the workflow is warning-only and not wired into .agent/check-map.yml as a required docs check.
  • Rollback: revert this PR or remove the consumer caller workflow.
  • Follow-ups: move the public v1 tag after merge; required-check promotion remains deferred until the warn-first period is clean.

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
@ArchonVII
ArchonVII marked this pull request as ready for review June 15, 2026 20:24

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment on lines +177 to +178
} else if (normalized.startsWith('docs/') || normalized.startsWith('.')) {
candidates.push(path.join(repoRoot, normalized));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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.

feat(lint): doc-policy-lint reusable workflow, warning-only (lane 4)

1 participant