Repository navigation
feat(#569): /qa relaxes md-only diffs from pending CI build matrix - #588
Merged
Merged
Conversation
When `git diff origin/main...HEAD --name-only` shows only `.md` files,
pending CI checks matching `qa.markdownOnlySafeCiPatterns` (default
`["build (*)", "Plugin Structure Validation"]`) are reclassified as
informational and no longer force `NEEDS_VERIFICATION`. Failed checks
always gate; pending checks outside the allowlist (e.g.
`validate-skills`, `Hooks Validation`) still gate.
- New `qa.markdownOnlyCiRelaxed: boolean` (default `true`) and
`qa.markdownOnlySafeCiPatterns: string[]` settings, wired through
the `QASettings` interface, Zod schema, defaults, and allowed-keys
Set in `src/lib/settings.ts`. Settings reference doc updated.
- New `src/lib/qa/markdown-only-ci.ts` exporting
`detectMarkdownOnlyDiff()` (path predicate, denylists `package.json`,
`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `tsconfig*.json`,
`*.config.{js,ts,mjs,cjs}`, `.github/workflows/**`) and
`filterRelaxablePending()` (anchored single-`*` glob matcher with
regex-escaped patterns).
- `qa-settings.test.ts` extended for the two new fields; new
`markdown-only-ci.test.ts` covers AC-1 (detection), AC-2 (filter),
and AC-5 (end-to-end synthetic-diff fixture, both flag-on and
flag-off paths).
- `qa/SKILL.md` `### CI Status` section gains a "Markdown-Only Diff
Relaxation" subsection with an inline `npx tsx` invocation of the
helpers, the configurable settings table, the build-file denylist,
and a literal transparency-note template. Mirrored across
`.claude/skills/qa/`, `skills/qa/`, `templates/skills/qa/` (verified
byte-identical with `diff -q`).
Closes #569
6 tasks
- detectMarkdownOnlyDiff(): drop unreachable denylist branches (NON_MARKDOWN_BUILD_FILES set, tsconfig regex, *.config.* regex) that the .md-only first loop already eliminates. Inline the .github/workflows/ check (the one branch that IS reachable for .md files) into the single remaining loop. Per CLAUDE.md "no defensive code for scenarios that can't happen". - Add edge-case test: .github/workflows/<name>.md must disqualify even though it ends in .md (workflow READMEs affect CI). - Add verbatim /fullsolve 562 reproduction as a permanent test fixture in markdown-only-ci.test.ts (4-file md-only diff + 8 CI checks: 5 success / 3 pending matching safe-pattern allowlist). Per feedback_motivating_example_regression.md. - Update qa/SKILL.md "CI Status Mapping" table: PENDING/QUEUED/ IN_PROGRESS rows now footnote that the relaxation block below may reclassify them as informational on md-only diffs. Mirrored byte-identically across all three qa/SKILL.md files. - Add __tests__/integration/qa-markdown-only-ci-snippet.integration .test.ts: executes the documented `npx tsx -e` invocation from SKILL.md literally via execSync with synthetic env vars, asserts JSON output shape and values for positive/negative/empty cases, plus a drift guard that the SKILL.md prose still references the documented env-var names. Catches future shell-quoting / env-var rename / schema drift at test-time, not post-merge. - Verified: full vitest suite (2857/2857 pass across 119 files); npm run build clean; npm run lint clean. Refs #569
Contributor
Author
Gap-fix addendum (commit d0fd687)Addresses 5 gaps surfaced during the orchestrator's post-QA self-critique:
Net delta: +201 / -39 across 6 files (5 modified + 1 new integration test).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
qa.markdownOnlyCiRelaxed: boolean(defaulttrue) andqa.markdownOnlySafeCiPatterns: string[](default["build (*)", "Plugin Structure Validation"]) settings. When the diff touches only.mdfiles (with denylist forpackage.json/-lock.json,yarn.lock,pnpm-lock.yaml,tsconfig*.json,*.config.{js,ts,mjs,cjs},.github/workflows/**), pending CI checks matching the safe-pattern allowlist are reclassified as informational and no longer forceNEEDS_VERIFICATION. Failed checks always gate; pending checks outside the allowlist (validate-skills,Hooks Validation, etc.) still gate.src/lib/qa/markdown-only-ci.tswithdetectMarkdownOnlyDiff()andfilterRelaxablePending()(anchored single-*glob matcher with regex-escaped patterns). 28 unit tests cover detection edges, glob anchoring, metachar escaping, the empty-allowlist case, and the AC-5 end-to-end fixture (md-only diff + mocked CI mixed pass/pending → gating-pending=0 ⇒ READY_FOR_MERGE path; flag-off → strict gating preserved).qa/SKILL.md### CI Statussection adds a "Markdown-Only Diff Relaxation" subsection with the inlinenpx tsx -einvocation, configurable settings table, build-file denylist, and a literal transparency-note template ("Markdown-only diff detected — pending build-matrix checks treated as informational. Relaxed: <names>."). Mirrored byte-identically across.claude/skills/,skills/,templates/skills/.AC coverage
qa.markdownOnlyCiRelaxedflag (defaulttrue);falserestores strict behavior. Strengthened withmarkdownOnlySafeCiPatternsarray (resolves AC-2's "etc." open-endedness AND/assess's portability concern about hardcoded CI step names)diff -qTest plan
npm run buildclean (verified locally)npm run lintclean (verified locally)npx vitest run src/lib/qa/markdown-only-ci.test.ts src/lib/qa-settings.test.ts→ 38/38 pass (verified locally)gating: []and proceed to READY_FOR_MERGE without waiting onbuild (20.x)/build (22.x)/Plugin Structure Validation/fullsolve 562fixture (4-file md-only diff + 5 success / 3 pending CI checks) was dogfood-tested inline during /qa — pipeline outputsgating: []⇒ READY_FOR_MERGE pathNotes for reviewers
detectMarkdownOnlyDiff()(NON_MARKDOWN_BUILD_FILESset +tsconfig*regex +*.config.*regex) is currently redundant under the.md-only first loop — only the.github/workflows/startsWith check is reachable for.mdfiles. Behavior is correct; the redundancy mirrors the AC's exclusion list defensively. Optional follow-up cleanup, not a blocker.Closes #569