Skip to content

docs: sync Golden File Management to real Makefile targets (gh#382)#421

Merged
vsbuffalo merged 3 commits into
mainfrom
fix/gh382-golden-doc
Jul 17, 2026
Merged

docs: sync Golden File Management to real Makefile targets (gh#382)#421
vsbuffalo merged 3 commits into
mainfrom
fix/gh382-golden-doc

Conversation

@vsbuffalo

Copy link
Copy Markdown
Owner

CLAUDE.md's Golden File Management section documented commands and a path that don't exist:

$ grep -nE '^update-expected' Makefile   → (no match)
$ ls -d ir/expected                       → No such file or directory
  • make update-expected / ir/expected/ do not exist.
  • make update-golden does not write ir/golden/; it fans out to update-ocaml-golden (→ ocaml/golden/*.ir.json) plus the six tests/fixtures/*/ir/ sets (Makefile:251).
  • Forward-trajectory baselines are captured via CAMDL_CAPTURE_BASELINE=1 into the gate tests, not a separate expected-TSV pipeline.

This rewrites the section to current reality and notes that ir/golden/ is a separate frozen committed set whose consolidation into ocaml/golden is tracked in gh#384. Doc-only; mdfmt-clean.

Closes #382.

CLAUDE.md's Golden File Management section documented two commands and a
path that do not exist:

  $ grep -nE '^update-expected' Makefile   -> (no match)
  $ ls -d ir/expected                       -> No such file or directory

`make update-golden` does not write `ir/golden/`; it fans out to
`update-ocaml-golden` (-> ocaml/golden/*.ir.json) plus the six
tests/fixtures/*/ir/ sets (Makefile:251). Forward-trajectory baselines are
captured via CAMDL_CAPTURE_BASELINE=1 into the gate tests, not a
`make update-expected` -> ir/expected/ pipeline (neither exists).

Rewrites the section to the current reality and notes that `ir/golden/` is
a separate frozen committed set whose consolidation is tracked in gh#384.
Doc-only.

Closes #382.
vsbuffalo added a commit that referenced this pull request Jul 17, 2026
## Problem

Branch protection requires the `test` check, but `ci.yml`'s
`paths-ignore` (`docs/**`, `**/*.md`, …) means the workflow never
triggers on doc-only changes — so `test` never reports and doc-only PRs
are BLOCKED forever (unmergeable except by admin override). This is
currently blocking #421, #427, #431.

## Fix

Restructure into `changes` → `test` → `ci` (the original gate design,
re-applied to the current single-job workflow):

- **`changes`** — detects whether any non-doc path changed (plain `git
diff` + grep, no third-party action).
- **`test`** — the full suite, steps unchanged; runs only when code
changed.
- **`ci`** — a tiny always-runs gate; fails only if `test`
failed/cancelled (or the detector failed). A *skipped* `test` (the
legitimate doc-only case) passes.

`paths-ignore` is removed so the workflow always fires; the expensive
`test` job is skipped instead, preserving the cost saving. Every PR now
reports a verdict via `ci`.

## Required follow-up (maintainer, one-time)

After merge, repoint branch protection: **require `ci`, not `test`.**

\`\`\`
gh api -X PATCH
repos/:owner/:repo/branches/main/protection/required_status_checks \
  -f 'checks[][context]=ci'
\`\`\`

Until that switch, doc-only PRs remain blocked (they skip `test`); code
PRs are unaffected (both `test` and `ci` run green).
@vsbuffalo
vsbuffalo merged commit c6c370d into main Jul 17, 2026
3 checks passed
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.

CLAUDE.md Golden File Management section is stale (update-expected target + ir/golden regen path)

1 participant