Skip to content

validate-file-refs.js runs warning-only β€” broken refs never fail CIΒ #1626

@alexeyv

Description

@alexeyv

Problem

tools/validate-file-refs.js correctly identifies broken file references (e.g., the missing validate-workflow.xml reported in #1625), but runs in warning-only mode by default (exit 0). Broken references are logged but never cause a failure.

From the tool header:

Default mode is warning-only (exit 0) so adoption is non-disruptive.
Use --strict when you want CI or pre-commit to enforce valid references.

Current output for the known broken reference:

src/bmm/workflows/4-implementation/create-story/checklist.md
  [BROKEN] core/tasks/validate-workflow.xml (line 36)
     Target not found: src/core/tasks/validate-workflow.xml
  [BROKEN] core/tasks/validate-workflow.xml (line 66)
     Target not found: src/core/tasks/validate-workflow.xml

This means broken references can be introduced and persist indefinitely without anyone noticing. The validator exists, does its job, finds real problems β€” then exits 0 and lets them through.

Suggestion

Enable --strict mode in CI so broken file references actually block merges. The tool already supports it β€” it just needs to be turned on.

Found during review of PR #1608. Related: #1625

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