Skip to content

Spec validators accept unclosed frontmatter and reject supported paths #8

Open

Description

@vinsymoyya

The spec scripts disagree with the documented spec format in several reproducible cases on main:

  • validate-specs.sh accepts a frontmatter block that has no closing ---.
  • check-spec-links.sh rejects existing test links in CRLF files because the carriage return becomes part of the path.
  • Quoted YAML target paths are checked with their quote characters still attached.
  • The documented ../src/**/*.py target does not match a file directly inside src, or files more than one directory below it.
  • Target patterns containing ? or character classes are treated as literal paths.
  • A broken [@test] link on the final line is silently skipped when that line has no trailing newline.
  • Valid YAML target sequences using indentation other than two spaces are rejected as an empty target list.

For example, create src/app.py and a spec containing targets:, followed by - ../src/**/*.py. Running bash scripts/check-spec-links.sh specs reports no matches despite the existing file. Replacing the target with "../src/app.py" also reports a broken target. A final line of [@test] ../missing.py is accepted if the file ends immediately after the path.

Expected: accept the documented glob syntax, quoted paths, and CRLF input; reject unclosed frontmatter and broken test links regardless of a trailing newline.

I checked all seven existing open/closed PRs, their changed files and available discussions. The scripts were introduced in #6; I found no subsequent fix for these cases.

Activity

  1. vinsymoyya commented on Nov 14, 2026

    @vinsymoyya
    Author

    Implemented in #9. The scripts now cover frontmatter closure, CRLF, quoted paths, recursive and other glob patterns, final lines without a newline, and valid YAML target-sequence indentation. All nine regression tests pass with Git Bash; whitespace checks pass. Upstream CI currently awaits maintainer approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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