Skip to content
EN · PT

Gate: header-valid

The @anchors header carries the artifact’s identity.

Property Value
Checker header-valid
Confronts spec feature code test guide doc plan product flag
Blocking by default — new project yes
Blocking by default — existing project no — informs

Some findings have a repair that is mechanical and safe: writing the right date into the updated_at field of a header needs no judgement, only git. anchors check --fix applies those repairs, and this unit is what it calls. It holds a registry of fixers, one per check; a check with no registered fixer is only reported, never repaired.

Today the registry holds one fixer, for the updated-at-atual check. It rewrites only the date inside an existing field: the right date is today when the file has an uncommitted edit, and the date of its last commit otherwise. When there is no way to know the right date (no git, no commit and no edit) the file is left alone, because a guessed date would be worse than a stale one.

The repair is driven by the gate’s scope, not by its verdict: every node the gate applies to is handed to the fixer, and a file whose date is already right comes back unchanged, so it is not reported. Each repair written, or attempted and failed, is returned for the caller to print.

gates:
- name: header-valid
on: [spec, feature, code, test, guide, doc, plan, product, flag]
check: header-valid

Source: checker · its spec