Commit 17c9397
committed
docs: record where ty enforcement runs and what it reads
Enforcement is decided as CI in two layers: layer 1 reads the exit status of a
bare `ty check` over the whole tree and holds error severity at zero; layer 2
reads diagnostics on the lines a change adds and reaches the rules held at
`warn`. Neither substitutes for the other, and the scoping question is what
decides whether enforcement catches anything: measured at a157c14 the tree
reports 3,287 diagnostics — 0 error, 3,287 warning — and exits 0, while the same
run with --error-on-warning exits 1. All five defects on record as caught by ty
in this repository were reported by rules held at `warn`, so none of them would
have moved the exit status of a whole-tree run.
The new `## Enforcement` section also records how a path-scoped invocation
re-establishes the checked surface (`--force-exclude`, which honours both halves
of `[tool.ty.src]`), how severity is raised per invocation without moving
`[tool.ty.rules]`, the bound the per-file overrides place on any gate's reach,
how the pinned typecheck group is installed in CI, and every placement rejected
with the measurement that rejects it.
Corrects the claims the measurement contradicts: the Makefile comment and the
policy doc's opening paragraph both said type checking was local-only and that
`make typecheck` exits non-zero, and the baseline paragraph explained the exit
codes as though any diagnostic moved the status. The recorded baseline is
re-measured to 3,287 at a157c14, and CONTRIBUTING.md now points at the
decision.
No gate is wired here; SEP-1680 ships it.
Claude-Session: https://claude.ai/code/session_01SMptAVu2dPHY9BYYUCHmnF1 parent a157c14 commit 17c9397
3 files changed
Lines changed: 274 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments