NEC-144: Lint parses workflow and action YAML before CI does #201

Merged
nectenda-agent merged 1 commit from worktree-nec-144-lint-parses-workflow-and-action-yaml-bef into main 2026-09-28 12:26:30 +01:00
Collaborator

Task: NEC-144 — https://projectron.nerchure.com/tasks/151

pnpm lint now parses every .yml/.yaml under .forgejo/ (scripts/lint-yaml.mjs, yaml 2.9.1 as a root devDependency, already in the lockfile via vite) and fails on any parse error with file:line:col, or when it finds no files. Nothing read these files before the runner did: NEC-69's plain scalar containing ': ' passed lint, unit suites and a full e2e run locally, then the runner rejected the whole action and PR #200's e2e job ran no scenarios.

Verified: restoring e910d87's action.yml makes pnpm lint fail with '.forgejo/actions/obsidian-e2e/action.yml:146:12 BLOCK_AS_IMPLICIT_KEY', the line the runner named; restoring the file makes it pass ('lint-yaml: 9 files under .forgejo parse'). Each rule was mutation-checked (no errors collected, no zero-files guard, first document only, .yml only), and each mutation fails a test. Local gate green at f5878ff.

Known limits, out of scope for a parse-only check: an undefined alias (*x with no anchor) is not an error in the yaml package's parse but go-yaml rejects it; symlinked files under .forgejo/ would be skipped (none exist).

Spec: docs/changes/NEC-144-lint-yaml/spec.md

Changelog

NONE

Task: NEC-144 — https://projectron.nerchure.com/tasks/151 pnpm lint now parses every .yml/.yaml under .forgejo/ (scripts/lint-yaml.mjs, yaml 2.9.1 as a root devDependency, already in the lockfile via vite) and fails on any parse error with file:line:col, or when it finds no files. Nothing read these files before the runner did: NEC-69's plain scalar containing ': ' passed lint, unit suites and a full e2e run locally, then the runner rejected the whole action and PR #200's e2e job ran no scenarios. Verified: restoring e910d87's action.yml makes pnpm lint fail with '.forgejo/actions/obsidian-e2e/action.yml:146:12 BLOCK_AS_IMPLICIT_KEY', the line the runner named; restoring the file makes it pass ('lint-yaml: 9 files under .forgejo parse'). Each rule was mutation-checked (no errors collected, no zero-files guard, first document only, .yml only), and each mutation fails a test. Local gate green at f5878ff. Known limits, out of scope for a parse-only check: an undefined alias (*x with no anchor) is not an error in the yaml package's parse but go-yaml rejects it; symlinked files under .forgejo/ would be skipped (none exist). Spec: `docs/changes/NEC-144-lint-yaml/spec.md` ## Changelog NONE
Parse workflow and action YAML in pnpm lint
All checks were successful
Release note / release-note (pull_request) Successful in 13s
CI / build (pull_request) Successful in 4m46s
CI / e2e (pull_request) Successful in 5m20s
CI / promote (pull_request) Has been skipped
CI / build (push) Successful in 5m0s
CI / e2e (push) Successful in 5m18s
CI / promote (push) Successful in 31s
f5878ffe0e
Nothing read .forgejo/ before the runner did, so NEC-69's plain scalar
containing ": " passed lint, the unit suites and a full e2e run locally,
and then cost a CI round trip when the runner rejected the whole action.
scripts/lint-yaml.mjs parses every .yml/.yaml under .forgejo/ with yaml
2.9.1 (now a root devDependency; already in the lockfile via vite) and
fails on any parse error, naming file, line and column. It also fails
when it finds no files, so a moved directory cannot silence it.

Task: NEC-144
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UfvzUGa8fQnpsFf8Y8XyUF
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!201
No description provided.