frontera-runner 0.2.0__tar.gz → 0.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. frontera_runner-0.2.8/PKG-INFO +939 -0
  2. frontera_runner-0.2.8/README.md +922 -0
  3. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/__init__.py +1 -1
  4. frontera_runner-0.2.8/frontera_runner/ampliacion.py +241 -0
  5. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/ceros.py +72 -10
  6. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/cli.py +1 -1
  7. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/instrumentos.py +66 -4
  8. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/recibo.py +10 -2
  9. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/render.py +7 -0
  10. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/runner.py +27 -3
  11. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/triaje_frontera.py +15 -3
  12. frontera_runner-0.2.8/frontera_runner.egg-info/PKG-INFO +939 -0
  13. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner.egg-info/SOURCES.txt +5 -1
  14. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/pyproject.toml +1 -1
  15. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/tests/test_frontera.py +269 -2
  16. frontera_runner-0.2.8/tests/test_limite_del_censo.py +162 -0
  17. frontera_runner-0.2.8/tests/test_readme_comandos.py +686 -0
  18. frontera_runner-0.2.8/tests/test_remedio.py +179 -0
  19. frontera_runner-0.2.0/PKG-INFO +0 -487
  20. frontera_runner-0.2.0/README.md +0 -470
  21. frontera_runner-0.2.0/frontera_runner.egg-info/PKG-INFO +0 -487
  22. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner/__main__.py +0 -0
  23. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner.egg-info/dependency_links.txt +0 -0
  24. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner.egg-info/entry_points.txt +0 -0
  25. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/frontera_runner.egg-info/top_level.txt +0 -0
  26. {frontera_runner-0.2.0 → frontera_runner-0.2.8}/setup.cfg +0 -0
@@ -0,0 +1,939 @@
1
+ Metadata-Version: 2.4
2
+ Name: frontera-runner
3
+ Version: 0.2.8
4
+ Summary: One composite run of four frontier instruments, one deterministic receipt, one Markdown check per pull request
5
+ Author: Platino Labs
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/alexisromtz-lab/frontera-runner
8
+ Project-URL: Source, https://github.com/alexisromtz-lab/frontera-runner
9
+ Project-URL: Reusable workflow, https://github.com/alexisromtz-lab/frontera-runner/blob/main/.github/workflows/reusable-ceros.yml
10
+ Keywords: ci,pull-request,receipt,audit,determinism
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Topic :: Software Development :: Quality Assurance
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+
18
+ # frontera-runner
19
+
20
+ One subject in. One sealed receipt out. Four instruments that live in four other repositories,
21
+ called as subprocesses, never imported.
22
+
23
+ The point is not to run four linters. The point is to publish **one** verdict a pull request can
24
+ read, in which an instrument that had nothing to measure says so by name instead of returning a
25
+ green zero.
26
+
27
+ ```
28
+ frontera-runner <sujeto> # Markdown for a PR check
29
+ frontera-runner <sujeto> --json # the canonical receipt
30
+ frontera-runner diff --base b.json --head h.json # the gate: what the PR changed
31
+ ceros-implicitos <árbol> # where a tree writes a zero it did not measure
32
+ ceros-implicitos --base <base> <head> # the gate for that census: what the change added
33
+ ```
34
+
35
+ ## Why this exists
36
+
37
+ Three of the four instruments return `2` when they find no universe: `fiber-ast-lint` with no
38
+ Python analysed, `test-ordinal-ratchet` with no test file parsed, `ts-py-anchor-guard` with
39
+ nothing evaluable. A composite runner that folds `2` into "0 findings" turns *we did not look* into
40
+ *we looked and it is clean* — the exact defect the four instruments were built to refuse, reintroduced
41
+ at the layer that aggregates them.
42
+
43
+ So the runner maps every exit code each instrument can emit, and the two states that mean "no
44
+ measurement" carry a machine-readable reason:
45
+
46
+ | state | meaning | carries `hallazgos`? |
47
+ |---|---|---|
48
+ | `APLICABLE` | the instrument ran over a universe it saw | yes, an integer |
49
+ | `NO_APLICABLE` | there was nothing to measure, and the reason is on the row | no, `null` |
50
+ | `NO_MEDIDO` | there was something to measure and it was not measured | no, `null` |
51
+ | `NO_EJECUTADO` | the instrument's repository is not where `--raiz` says | no, `null` |
52
+
53
+ ## The four instruments
54
+
55
+ Called as `python -m <module> <args>` with the subject as the working directory, and with
56
+ `PYTHONPATH` pointing at the instrument's own repository — a `src/` layout is not optional.
57
+
58
+ | instrument | invocation | exit codes |
59
+ |---|---|---|
60
+ | `git-complement-audit` | `-m git_complement_audit . --json` | `0` nothing outside `HEAD` · `1` orphan code or secret risk · `2` invalid repository |
61
+ | `fiber-ast-lint` | `-m fiber_ast_lint.cli . --json` | `0` no candidates · `1` candidates · `2` empty universe · `4` does not reconcile |
62
+ | `test-ordinal-ratchet` | `-m ordinal_ratchet.cli . --json` | `0` nothing grew · `1` new collision or counter · `2` no universe / not comparable |
63
+ | `ts-py-anchor-guard` | `-m ts_py_anchor_guard.anchor_oracle --manifest <m> --json` | `0` conforming · `1` diverging · `2` not measured · `20` bad invocation |
64
+
65
+ `2` is mapped per instrument, not by convention: for `fiber-ast-lint` and `test-ordinal-ratchet`
66
+ it means *no subject* and becomes `NO_APLICABLE`; for the audit and the guard it means *could not
67
+ measure* and becomes `NO_MEDIDO`. An exit code no contract declares is `RC_NO_DECLARADO`, never a
68
+ guess.
69
+
70
+ A run whose instrument exits on a "measured" code without publishing its counters is
71
+ `SALIDA_SIN_HALLAZGOS_DECLARADOS` — not a zero. The reader that turned a missing list into an
72
+ empty one was the first bug this repository found in itself, and the `medido_es_numero` law below
73
+ is what caught it.
74
+
75
+ ## Findings are counted from their names, not from a counter
76
+
77
+ Every accepted payload is read twice: once for the number the instrument declares, and once for a
78
+ census of the findings themselves. The census is built from the payload's own detail lists and each
79
+ row that cannot be named is `SALIDA_SIN_IDENTIDADES`; a census whose size disagrees with the
80
+ declared counter is `IDENTIDADES_NO_RECONCILIAN`. Both are `NO_MEDIDO` with a reason, never a
81
+ number somebody typed. `hallazgos` in the receipt is `len(census)` — the identity list is what the
82
+ `diff` subtracts, so it must be the thing that was counted.
83
+
84
+ | instrument | identity of one finding |
85
+ |---|---|
86
+ | `git-complement-audit` | `class|path|root` |
87
+ | `fiber-ast-lint` | `archivo|qualname-o-<modulo>|familia|forma|poblacion` |
88
+ | `test-ordinal-ratchet` | `kind|path|scope|name` |
89
+ | `ts-py-anchor-guard` | `DIVERGE|par|ancla` (its unit is the **pair**, see below) |
90
+
91
+ Two deliberate omissions: the audit's identity carries no `oid`/`size` (a finding that moved
92
+ object is the same finding at the same path) and the fibre's carries no line number (a finding that
93
+ shifted lines is not a new finding). Line numbers and object ids are precisely what a pull request
94
+ changes without changing the defect. The fibre's scope is read the way the instrument prints it:
95
+ a candidate at module level carries no `qualname` and is named `<modulo>`, because its own text
96
+ output says so (`fn=<modulo>`, `src/fiber_ast_lint/cli.py:34`) and treating that empty string as a
97
+ missing name threw away a nine-candidate census on `torproject/stem` before `0.2.4`.
98
+
99
+ The guard is the exception that shaped the design: it rolls `divergen` up **per pair**, not per
100
+ anchor, so a per-anchor census would fail to reconcile against a correct instrument. Its
101
+ reconciliation is therefore a partition — every pair is named exactly once, and a pair is in the
102
+ diverging set if and only if it is not clean. A pair that reports `rc: 0` while naming a broken
103
+ anchor is `IDENTIDADES_NO_RECONCILIAN`, which is how a self-contradictory payload is caught instead
104
+ of being read as a clean run.
105
+
106
+ ## Where the instruments are found: two routes, and a promise
107
+
108
+ | route | when | `procedencia` | `commit` |
109
+ |---|---|---|---|
110
+ | `CLON` | `--raiz` names a directory of sibling checkouts, or they sit next to this repository | `CLON` | measured with `git rev-parse` |
111
+ | `PAQUETE` | no `--raiz`, no sibling, but the module is importable by this interpreter | `PAQUETE` | `null`: an installation has no history to read |
112
+
113
+ `--raiz` is a promise. Passing it means *measure exactly these checkouts*, so a missing sibling is
114
+ `INSTRUMENTO_AUSENTE` and an installed copy is never substituted for the tree that was asked about.
115
+ Omitting it means *find them*, which is the only route a consumer repository has: it has no four
116
+ sibling clones, and it installs the instruments into the environment instead.
117
+
118
+ When both routes come up empty the row is `INSTRUMENTO_AUSENTE`, and it now carries a `remedio`:
119
+ one copyable line that adds the release asset the instrument's contract was measured against. It
120
+ is not advice — it is the command the run was trying to be, with the missing bytes named, so a
121
+ reader is never left holding a name with no public artefact behind it. None of the four instruments
122
+ is on the index — `pypi.org/pypi/<instrumento>/json` answered `404` for all four on 2026-11-28.
123
+ This runner is, but only at the versions published there — `0.2.0` while the receipt was signed
124
+ by `0.2.5` — so the remedy fetches the runner as its own release asset, from the tag that carries
125
+ it. That is not a preference: the index form was run verbatim on 2026-11-28 and `uvx` answered `No
126
+ solution found`. A remedy nobody can paste is a citation.
127
+
128
+ A pin (`--pines archivo.json`, `{"instrumento": {"commit": …, "version": …}}`) is a **declaration**
129
+ and never a measurement. In `CLON` it is checked against the commit that was read (`VERIFICADO` /
130
+ `DIVERGE`); in `PAQUETE` it cannot be, and the row says `NO_VERIFICABLE` rather than claiming a
131
+ agreement it did not observe.
132
+
133
+ What makes the two routes comparable is the digest: `huella` is taken over the package's `.py`
134
+ files by **relative** path and content, so the same bytes installed under `site-packages/` and
135
+ checked out under `src/` seal identically. Measured on 2026-11-28 over the four instruments at
136
+ `git-complement-audit@1c73546`, `fiber-ast-lint@753a951`, `test-ordinal-ratchet@36e8b27`,
137
+ `ts-py-anchor-guard@02e8fe3`: **four of four huellas equal** between the installed and the checked
138
+ out copy, and the generator's huella equal too. Only `procedencia` and `commit` differ.
139
+
140
+ A tree somebody is writing has no digest. The walk lists `.py` files and then reads them, so a file
141
+ that a build removes in between used to raise `FileNotFoundError` out of the whole receipt — it did,
142
+ once in about 140 full suites, and read as flake. A directory that vanished was worse: `os.walk`
143
+ skips it silently and the digest that follows is a valid `sha256:` of a tree nobody has. The walk is
144
+ retried, and a tree that keeps moving answers `null` — `NO_MEDIDO`, never a number that reads as
145
+ one.
146
+
147
+ ## The triage, and the reasons it publishes
148
+
149
+ Before any subprocess, the subject is read once — manifests, languages, test files, whether it is
150
+ a git tree — and each instrument is admitted or refused **by name**:
151
+
152
+ | reason | refused when |
153
+ |---|---|
154
+ | `SIN_ARBOL_GIT` | the subject is not a git work tree (`git-complement-audit`) |
155
+ | `SIN_SUPERFICIE_PYTHON` | no `.py` file, tests included (`fiber-ast-lint`) |
156
+ | `SIN_ARCHIVOS_DE_PRUEBA` | no test file matched (`test-ordinal-ratchet`) |
157
+ | `SIN_SUPERFICIE_TYPESCRIPT` | no `.ts`/`.tsx` (`ts-py-anchor-guard`) |
158
+ | `SIN_MANIFIESTO_DE_ANCLA` | TypeScript but no `ts-py-anchor.json` or equivalent |
159
+
160
+ `--forzar-todos` skips the gate and runs all four. It exists to measure what the gate saves; it is
161
+ not for publishing a check.
162
+
163
+ ## The receipt
164
+
165
+ `--json` writes the canonical form: sorted keys, `ensure_ascii=False`, two-space indent, one
166
+ trailing newline, and `sello` = `sha256` over that form without the seal. Every executor carries
167
+ its own identity — `version`, `commit` of its repository (`null` when installed), `huella`, a
168
+ `sha256` over its package's `.py` files by relative path and content, and `procedencia`. A row that
169
+ could not find its instrument also carries `remedio`, the line that installs the missing bytes; an
170
+ `APLICABLE` row has no such field, because it has nothing to remedy. Five laws
171
+ are checked over the body (`schema: 2`):
172
+
173
+ | law | what it refuses |
174
+ |---|---|
175
+ | `particion` | applicable + not applicable + not measured + not executed must equal the instrument count |
176
+ | `identidad_de_ejecutores` | an `APLICABLE` row without version and digest, or without a commit unless it is `PAQUETE` |
177
+ | `medido_es_numero` | an `APLICABLE` row whose findings are `null` |
178
+ | `hallazgos_nombrados` | an `APLICABLE` row whose findings are not the size of its own identity list |
179
+ | `estado_sin_medicion_nombra_su_razon` | any state other than `APLICABLE` with an empty reason |
180
+
181
+ A receipt that fails its own seal or its laws exits `3`, and nothing below it is worth reading.
182
+
183
+ ### Determinism
184
+
185
+ No timestamp anywhere; `PYTHONHASHSEED=0`; `PYTHONDONTWRITEBYTECODE=1` so the runner never leaves a
186
+ `__pycache__` inside an instrument's checkout; every environment variable not on the allowlist
187
+ dropped; every list sorted; no absolute path in the receipt (the subject's path and `--raiz` are
188
+ masked as `<sujeto>` and `<herramientas>`). Two runs over one tree must produce the same bytes:
189
+
190
+ ```
191
+ frontera-runner /ruta/sujeto --json --recibo uno.json >/dev/null
192
+ frontera-runner /ruta/sujeto --json --recibo dos.json >/dev/null
193
+ cmp uno.json dos.json && echo "byte-identical"
194
+ ```
195
+
196
+ Masking is what makes the seal portable, not just stable: the same tree copied to
197
+ `/tmp/clon-uno` and to `/tmp/clon-dos-con-nombre-mas-largo` (2 files, 1 test, no `.git`) produced
198
+ one seal, `sha256:d1c706c5e55b5…497`, from both paths.
199
+
200
+ Measured again on 2026-11-28 with the **real** instruments instead of fakes, and with live `.git`
201
+ history on both sides: one subject cloned to `/tmp/inv/a` and to
202
+ `/tmp/inv/una/ruta/bastante/mas/profunda/b`, run in `PAQUETE` mode, produced the byte-identical
203
+ receipt `8b009823e3654804…5e4b8` from both paths, and the same seal again on a second consecutive
204
+ run. Path invariance is a property of the digest, not of the length of the directory name.
205
+
206
+ ### Exit codes of the runner
207
+
208
+ | code | meaning |
209
+ |---|---|
210
+ | `0` | at least one instrument measured, all measured clean |
211
+ | `1` | measured, with findings: actionable |
212
+ | `2` | nothing measurable (`SIN_SUPERFICIE`) or a hole in the measurement (`HUECO_DE_MEDICION`) |
213
+ | `3` | the receipt failed its own seal or laws: not a verdict about the subject |
214
+ | `20` | bad invocation |
215
+
216
+ `2` outranks `1` in the sense that an unmeasured row is never read as a clean one; a finding still
217
+ exits `1`.
218
+
219
+ ## The differential gate: `diff`
220
+
221
+ A seal nobody reads is decoration. In a pull request the reader is the comparison between the
222
+ receipt of `base.sha` and the receipt of `head.sha`:
223
+
224
+ ```
225
+ frontera-runner diff --base recibo-base.json --head recibo-head.json --md comentario.md
226
+ ```
227
+
228
+ The order of the checks is the contract, because each one makes the next meaningless:
229
+
230
+ 1. **Both seals are recomputed before a single executor is read.** A body that no longer matches
231
+ its own digest is a document somebody edited; what it says about findings does not matter.
232
+ `SELLO_NO_RECOMPONE`. Both receipts must also close their laws (`LEYES_NO_CIERRAN`) and carry
233
+ the schema this reader knows: two different schemas are `ESQUEMAS_DISTINTOS`, and a pair that
234
+ agrees on an older schema is `RECIBO_NO_COMPARABLE` — a v1 receipt has no census to subtract.
235
+ 2. **A measurement that disappeared is a loss, and a loss is never a resolution.** If an instrument
236
+ was `APLICABLE` in base and is not in head — the pull request deleted the anchor manifest, say —
237
+ the row is `PERDIDA_DE_MEDICION` with the count of findings that went unmeasured, and the gate
238
+ exits `2`. Reading that as "0 findings, all fixed" is the false green this repository exists to
239
+ refuse.
240
+
241
+ The same holds when neither side finished: an instrument that answered `NO_MEDIDO` — a timeout,
242
+ a crash, a line nobody can parse — is a hole, not an absence. A row with a hole on either side
243
+ is `MEDICION_NO_HECHA` and the gate exits `2`, because two sides that never measured cannot
244
+ agree that nothing regressed. Both sides `NO_APLICABLE` is the other thing: a measurement of
245
+ absence, and still green.
246
+ 3. **An absence that the pull request fills is a surface the pull request creates.** When an
247
+ instrument was `NO_APLICABLE` in base — "nothing of mine to measure" — and is `APLICABLE` in
248
+ head, every finding on that new surface is the pull request's: the row is `SUPERFICIE_NUEVA`,
249
+ `atribuible: true`, and the gate exits `1`. A hole is not the same thing: a base that answered
250
+ `NO_MEDIDO` never measured, so its findings may predate the change and the row stays
251
+ `SIN_BASE_MEDIDA` with attribution withdrawn — green by default, because a pull request that
252
+ adds the first module of a new language should not be taxed for having no history. A gate over
253
+ a frozen route asks for `--estricto-base` and gets `2` on exactly that row instead of a guess.
254
+ The strict column can only add severity — `validar_notas` refuses a `rc_estricto` below the
255
+ note's `rc` or equal to `0`, so a flag that exists to withdraw greens cannot sign one.
256
+ Without the surface branch, adding the first TypeScript file next to a diverging Python port
257
+ would read as `SIN_REGRESION`. <!-- defecto: corrida 46076223056 ·
258
+ arreglo: corrida 46076838093, `REGRESION` RC 1 con `SUPERFICIE_NUEVA` publicado en el PR -->
259
+ 4. **A delta produced by different bytes is not about the pull request.** If an executor's
260
+ `version`, `huella` or `procedencia` moved between the two receipts, the row is
261
+ `DELTA_NO_ATRIBUIBLE` and contributes nothing either way. Bumping an instrument is therefore
262
+ never silently green: `2`. Divergence needs two identities to diverge: a side that never ran
263
+ publishes none, so the identity of a `NO_APLICABLE` side is not compared.
264
+ 5. **Only then** the multiset difference of the identity lists: `nuevos` (in head, not in base)
265
+ exits `1`; `resueltos` (in base, not in head) is reported and never fires the gate; nothing new
266
+ exits `0`.
267
+
268
+ | code | meaning |
269
+ |---|---|
270
+ | `0` | `SIN_REGRESION` — no finding in head that was not in base |
271
+ | `1` | `REGRESION` — at least one new finding, named, including findings on a surface this PR created |
272
+ | `2` | `PERDIDA_DE_MEDICION`, `MEDICION_NO_HECHA` or `DELTA_NO_ATRIBUIBLE` — the comparison stopped being about the PR; also `SIN_BASE_MEDIDA` under `--estricto-base` |
273
+ | `3` | the receipt could not be read as a receipt: seal, laws or schema |
274
+ | `20` | bad invocation (a receipt path that does not parse) |
275
+
276
+ A finding that was already in base is not a regression, and a finding that appears because an
277
+ instrument got *stricter* is `DELTA_NO_ATRIBUIBLE` rather than a regression — the gate refuses to
278
+ attribute it and says why.
279
+
280
+ ### A note is a promise that something reads it
281
+
282
+ The row notes and the exit codes used to be maintained in three places — the branch that wrote the
283
+ note, the loop that counted it, and the function that turned the count into a code — and one note
284
+ was in none of them. `SIN_MEDICION_EN_NINGUNA_DE_LAS_DOS` was written by the classifier, read by
285
+ nobody, and a delta whose only row carried it came out `0 SIN_REGRESION` while an instrument was
286
+ timing out; the summary built for an unreadable receipt was a hand-written list that had already
287
+ lagged the real one by a field.
288
+
289
+ `recibo.NOTAS` is now the only place those live. A note carries its counter, its exit code, its
290
+ precedence and the paragraph the pull-request comment shows; `comparar` builds the summary by
291
+ walking that table, and `salida_de_comparacion` reads the code off it. `_nota()` refuses to write a
292
+ note with no row, so a seventh note cannot be born without a reader, and `validar_notas()` refuses a
293
+ row that forgot a column or invented one — at import, not at read time. `render` no longer compares
294
+ a note against a literal: it asks the table for the paragraph, which is why an eighth note arrives
295
+ explained. The tests that walk the nine state pairs and the whole catalogue only witness what the
296
+ mechanism already enforces.
297
+
298
+ ## The portable reader: `ceros-implicitos`
299
+
300
+ The four instruments audit *this* corpus and need four sibling clones to do it. The census needs
301
+ nothing: one tree, one standard library, no configuration. It answers a single question that
302
+ outlives the corpus — **where does a tree write a zero it never measured?** — and it answers it the
303
+ same way on a checkout it has never seen:
304
+
305
+ ```
306
+ ceros-implicitos <árbol> [--json] # the census, with its denominator
307
+ ceros-implicitos --base <base> <head> [--json] # the delta: what the change added
308
+ ```
309
+
310
+ A finding is a `get(k, 0)` or an `k or 0`: a field that exists, counts zero, and is read
311
+ downstream as *clean*. A zero written by hand is not a measurement, it is an assertion, and the
312
+ consumer cannot tell the two apart. The census publishes `archivos`, `podados` and `ilegibles`
313
+ beside its findings because a `0` without a denominator does not say *none* — it says *not looked*.
314
+
315
+ Two copies of the same tree at different paths and depths census to the same bytes: where a tree
316
+ lives is the observer's property, what it writes is the tree's. Measured on two clones of one
317
+ Python service at depth one and three, and on the foreign trees this package was pointed at while
318
+ it was written — 36 files and 5 findings on one, 56 files and 10 on another, each difference in the
319
+ denominator explained by `podados` and none of it written.
320
+
321
+ ### The gate is the difference of two censuses
322
+
323
+ A count is a diagnosis; a pull request needs a verdict. `--base` subtracts the two censuses by
324
+ **class** — file, key, shape — and never by line, because a refactor that moves a line has added
325
+ nothing and must not fail a job:
326
+
327
+ | code | meaning |
328
+ |---|---|
329
+ | `0` | `SIN_CEROS_NUEVOS` — the change adds no zero of a class the base did not already carry |
330
+ | `1` | `CON_CEROS_NUEVOS` — it does, and every new class is named with its file and its lines |
331
+ | `2` | the difference has no minuend or no subtrahend: `SIN_SUPERFICIE_EN_LA_BASE`, `SIN_SUPERFICIE_EN_HEAD`, `HUECO_DE_MEDICION_EN_*` |
332
+ | `20` | bad invocation — a path that is not a directory |
333
+
334
+ The hole outranks the finding here, unlike the single-tree census: if a side could not be read the
335
+ difference is unknown, and an unknown published as `0` is the false green the census exists to
336
+ refuse. A zero that moves from one file to another is a closure *and* an opening, because the file
337
+ is part of what the zero asserts. `--permitidos` accepts the classes someone has declared — a key,
338
+ or a whole expression for the `or 0` form that has no key to name — and applies to both sides. A
339
+ declaration that carries a comma inside, like a tally dictionary's `a.llamadas.get(k, 0)`, travels
340
+ through `--permitir` instead: one literal per flag, because a comma-separated list would split the
341
+ declaration into fragments that match nothing and publish a count that reads like a declaration.
342
+
343
+ Either channel compares the declaration as an *expression*, not as text: `ast.unparse` renders a
344
+ node one way (`d.get('k', 0)`) and the file may hold another (`d.get("k", 0)`), and both are the
345
+ same node. Paste the line as your editor writes it.
346
+
347
+ ### Use it in your repository
348
+
349
+ It has no dependencies and no assumption about where it is imported from: installed into a clean
350
+ 3.11 environment it runs from `/` under `env -i`, and the census of a foreign tree reproduces byte
351
+ for byte the digest produced from inside this repository.
352
+
353
+ <!-- INDICE: frontera-runner · publicado 0.2.0 · medido 2026-11-28 · https://pypi.org/pypi/frontera-runner/json -->
354
+
355
+ The index carries `0.2.0`, the version whose upload succeeded. `0.2.5` is not there yet — the
356
+ publisher for this repository is still unregistered — so the shortest paths that work today need
357
+ neither a clone nor the index. The comment above is not decoration: it is the dated measurement a
358
+ test reads, and no command in this file may resolve through the index while the index serves
359
+ something older than the manifest.
360
+
361
+ ```bash
362
+ # the wheel attached to the release, built from a clean export of the tag
363
+ uvx --from https://github.com/alexisromtz-lab/frontera-runner/releases/download/v0.2.8/frontera_runner-0.2.8-py3-none-any.whl \
364
+ ceros-implicitos . # RC 1 · 3 zeros on ts-py-anchor-guard@b2897fe, cold, under `env -i`
365
+ # or the tag itself
366
+ uvx --from git+https://github.com/alexisromtz-lab/frontera-runner@v0.2.8 ceros-implicitos .
367
+ ```
368
+
369
+ Both lines need [`uv`](https://docs.astral.sh/uv/getting-started/installation/), and that is the
370
+ only prerequisite. Measured on 2026-11-28 on a stock macOS host with `env -i`, an empty `HOME` and a
371
+ cold cache: `uvx` resolves and runs the census in **7.2 s**, RC `1`. Without `uv` the same line
372
+ answers `uvx: No such file or directory`, RC `127`; the `python3` that ships with macOS is `3.9.6`
373
+ and cannot import the package at all (no `tomllib`), so `pip install` is not the fallback it looks
374
+ like. The wheel and the tag carry the same code: installed from either, the receipt declares the
375
+ same `huella`.
376
+
377
+ The release asset is not uploaded by hand: [`publicar.yml`](.github/workflows/publicar.yml) builds
378
+ it from the tag and attaches it to the tag's Release in the same act that cuts the tag, and can be
379
+ dispatched for a tag that was cut before this existed. That is why the first line above is the
380
+ first line: on 2026-11-28 `0.2.4` had a tag and no Release, the asset answered `404`, and the
381
+ command the README opens with did not run.
382
+
383
+ The pin is a version for the same reason the workflow pins a tag: a census is evidence about the
384
+ tree that was measured, and nothing else. A tag publishes itself to the index on push
385
+ ([`publicar.yml`](.github/workflows/publicar.yml), OIDC, no stored token) and refuses to publish
386
+ when the tag and the manifest disagree: the run is red and says what it is missing, and the index
387
+ never ends up carrying a version whose tree is not the one tagged. In this file `0.2.8` is the tree
388
+ that the tag `v0.2.8` and the workflow default below also name.
389
+
390
+ The whole act — checkout with full history, the interpreter, the install, the base tree as a
391
+ worktree, the invocation — is published as a reusable workflow. Adoption is one reference:
392
+
393
+ ```yaml
394
+ # .github/workflows/ceros.yml — pin the tag, not a branch
395
+ on: [pull_request]
396
+ jobs:
397
+ ceros:
398
+ uses: alexisromtz-lab/frontera-runner/.github/workflows/reusable-ceros.yml@v0.2.8
399
+ with:
400
+ excluir: "bench,tests" # optional: declared scope, not a waiver
401
+ ```
402
+
403
+ There is nothing to copy, so there is nothing that can silently diverge from the version that was
404
+ tested. If you would rather own every step, the same act spelled out is five lines of YAML:
405
+
406
+ ```yaml
407
+ on: [pull_request]
408
+ jobs:
409
+ ceros:
410
+ runs-on: ubuntu-latest
411
+ steps:
412
+ - uses: actions/checkout@v4
413
+ with: { fetch-depth: 0 }
414
+ - run: python -m pip install --quiet "git+https://github.com/alexisromtz-lab/frontera-runner@v0.2.8"
415
+ - run: git worktree add --detach /tmp/base "${{ github.event.pull_request.base.sha }}"
416
+ - run: ceros-implicitos --base /tmp/base .
417
+ ```
418
+
419
+ The zeros that predate the pull request are not a problem and not a waiver: the base tree is the
420
+ minuend, so they subtract themselves and the gate measures only what the pull request adds. Nothing
421
+ has to be declared on day one. What a tree sometimes does need is a declared *scope* — if it keeps
422
+ tally dictionaries over a benchmark population, `--excluir bench` measures the product surface and
423
+ says so out loud, which is not the same as excusing by name. The other form is a declared *class*: a
424
+ tally dictionary that legitimately starts at zero inside product code is excused by name —
425
+ `permitidos:` for a key, `permitir:` for a whole expression, one per line, written the way the file
426
+ writes it.
427
+
428
+ ### Measured on somebody else's repository
429
+
430
+ Four repositories that are not this one run the gate on every pull request, all through the
431
+ one-line reference and without touching their governed `ci.yml`:
432
+ [fiber-ast-lint](https://github.com/alexisromtz-lab/fiber-ast-lint) (declared scope `bench,tests`),
433
+ [protocol-core](https://github.com/alexisromtz-lab/protocol-core) (no scope at all — its five
434
+ pre-existing zeros subtract themselves),
435
+ [git-complement-audit](https://github.com/alexisromtz-lab/git-complement-audit) (two declared
436
+ tallies, `roots.get(oid, 0)` and `roots.get(peeled, 0)`, where zero is the identity of a `max`; the
437
+ `or 0` that could equally mean *not measured* is deliberately left undeclared and published as
438
+ `permanecen 1`) and
439
+ [ts-py-anchor-guard](https://github.com/alexisromtz-lab/ts-py-anchor-guard) (all three zeros named
440
+ one by one — a counter, a remainder inside a test, and a policy default where zero is the strictest
441
+ possible tolerance — so the delta publishes `permanecen 0`).
442
+
443
+ Green on a clean pull request — `SIN_CEROS_NUEVOS`, RC 0, `nuevos 0`, `permanecen 2` (two call
444
+ tallies that predate the branch and subtract themselves):
445
+ [runs/46106495910](https://github.com/alexisromtz-lab/fiber-ast-lint/actions/runs/46106495910).
446
+
447
+ Red on a probe added on purpose — a module with `d.get("saldo_pendiente", 0)` — while the rest of
448
+ that repository's checks stayed green:
449
+ `CON_CEROS_NUEVOS`, RC 1, `nuevos 1`, and the finding named by file, key, shape and line:
450
+ [runs/46106593465](https://github.com/alexisromtz-lab/fiber-ast-lint/actions/runs/46106593465).
451
+
452
+ Those two runs are the five-step form. The reusable workflow was falsified the same way rather than
453
+ assumed equivalent: the one-line PR went green reporting `permanecen 2` (it subtracted a real base,
454
+ it did not skip the delta), and a probe through the same one line went red with
455
+ `nuevos 1` and the offending row:
456
+ [runs/46120591144](https://github.com/alexisromtz-lab/fiber-ast-lint/actions/runs/46120591144).
457
+
458
+ A green that never turns red has not shown that it measures, so both directions are published — for
459
+ the copy and for the reference.
460
+
461
+ The third consumer is the one that found the last defect. In `git-complement-audit` a declaration
462
+ copied from the source file —`registro.get("saldo", 0)`— left the gate red, because the node was
463
+ compared as `ast.unparse` renders it, `registro.get('saldo', 0)`, and the delta table never prints
464
+ the expression to copy. `0.2.6` compares the declaration as an expression, so both spellings
465
+ excuse and a declaration that merely looks alike still does not: green through the reference at
466
+ [runs/46161720615](https://github.com/alexisromtz-lab/git-complement-audit/actions/runs/46161720615),
467
+ and the four-cell matrix — undeclared `1`, source spelling `0`, `ast.unparse` spelling `0`,
468
+ look-alike `1` — measured on that tree before the pull request.
469
+
470
+ Those four cells no longer live only in that log. They are a case in this project's own suite,
471
+ `test_las_cuatro_celdas_de_una_declaracion`, with the falsifier that would catch the regression:
472
+ compare declarations by raw text and the source-spelling cell falls back to red. The contract
473
+ survives a change to `_forma` without needing a fifth repository to re-measure it.
474
+
475
+ ## The age partition travels with the audit row
476
+
477
+ `git-complement-audit` dates every row it reports by the newest ref tip whose tree still holds that
478
+ path with that content, and partitions the refs into `<= 30 d`, `31–90 d`, `> 90 d`. A raw count of
479
+ "refs outside `HEAD`" invites the answer *those are old branches from years ago*, which is not an
480
+ answer to *what is still moving*. The composite receipt carries the partition:
481
+
482
+ ```
483
+ paths_fuera_de_head=1 · blobs_fuera_de_head=1 · refs=2 · refs_vivas_30d=2 · refs_recientes_90d=0
484
+ · refs_inactivas=0 · refs_sin_fecha=0 · filas_vivas_30d=1 · filas_recientes_90d=0
485
+ · filas_inactivas=0 · filas_solo_historia=0 · estratos_reconcilian=sí
486
+ ```
487
+
488
+ When the instrument does not publish the partition, those keys are `NO_MEDIDO` — never `0`.
489
+
490
+ ### Five trees nobody here owns: the count is not a constant
491
+
492
+ A census that returned the same number for every tree would be a constant, not a measurement. So the
493
+ first thing measured once the census ran cold was whether it discriminates. Five shallow clones,
494
+ none of them ours, `ceros-implicitos` from the `0.2.4` release asset, 2026-11-28:
495
+
496
+ | tree | `.py` files | findings | per 100 files |
497
+ |---|---|---|---|
498
+ | `pallets/click@08b803c` | 91 | 4 | 4.4 |
499
+ | `huggingface/smolagents@474bb33` | 72 | 3 | 4.2 |
500
+ | `psf/requests@3c7baaa` | 37 | 2 | 5.4 |
501
+ | `python-attrs/attrs@af29c2a` | 58 | **0** | 0.0 |
502
+ | `django/django@c896b3e` (`django/` + `tests/`) | 2921 | 21 | 0.72 |
503
+
504
+ The zero is the row that matters. It is not a miss: `attrs` has no `.get(…, 0)` and no `… or 0` in
505
+ its `src`. The three that fire do so on statements that do hide a zero, checked by reading them:
506
+ `widths.get(idx, 0)` seeds a running maximum in `click/formatting.py:19`, and
507
+ `o.seek(current_position or 0)` in `requests/utils.py:221` turns an unknown position into "start of
508
+ file" — a real ambiguity in the original, found by the census and not by its tests.
509
+
510
+ This is also the honest size of the claim. Three or four loci per hundred files is a reading of
511
+ where a tree writes a zero it did not measure, not a bug count: the census names the line and the
512
+ expression, and says `NO_MEDIDO` about the cardinality it cannot see.
513
+
514
+ Fifty times as many files do not carry fifty times the findings: the density falls by an order of
515
+ magnitude, to less than one locus per hundred files. File count and review intensity move together
516
+ in these five subjects and this measurement does not separate them, so the honest reading is that
517
+ the density is not a constant — not that django is cleaner *because* it is large.
518
+
519
+ ### What it costs, and what it does with a file it cannot read
520
+
521
+ Same artifact, `ceros-implicitos <tree> --json`, CPU read from `time -p`, 2026-11-28:
522
+
523
+ | tree | files | cpu | wall |
524
+ |---|---|---|---|
525
+ | `psf/requests` | 37 | 0.20 s | 0.87 s |
526
+ | `python-attrs/attrs` | 58 | 0.26 s | 1.30 s |
527
+ | `huggingface/smolagents` | 72 | 0.39 s | 0.51 s |
528
+ | `pallets/click` | 91 | 0.40 s | 0.80 s |
529
+ | `django/django` | 2921 | 5.55 s and 6.32 s | 9.61 s and 24.62 s |
530
+
531
+ Two runs on django cost the same CPU and wildly different wall time — 9.6 s against 24.6 s on a
532
+ machine that was running other work. Wall is what the host is doing; CPU is what the census costs.
533
+ Those two runs produced byte-identical JSON, and so did the `uvx` invocation, so the output is a
534
+ function of the tree and not of how it was started.
535
+
536
+ Cost is linear in files: `cpu ≈ 0.19 s + 2.0 ms × files` predicts django's 5.94 s and misses the
537
+ smallest subject by 60 ms. Ten thousand files is about 20 s of CPU.
538
+
539
+ `django` also answers the last obvious question. `archivos` counts the files that were parsed; the
540
+ files that could not be parsed are named, with their reason, instead of vanishing into the total:
541
+
542
+ ```
543
+ "archivos": 2921,
544
+ "ilegibles": [{"archivo": "tests/test_runner_apps/tagged/tests_syntax_error.py", "error": "SINTAXIS"}]
545
+ ```
546
+
547
+ That is django's own deliberately broken test fixture. A census that silently dropped it would be
548
+ publishing a denominator it did not measure.
549
+
550
+ One of those reasons was missing until `0.2.8`, and a tree nobody here owns found it. `pylint` ships
551
+ `tests/functional/i/implicit/implicit_str_concat_latin1.py`, whose first line declares
552
+ `# coding: latin_1`. The census opened every file as UTF-8, so that file raised `UnicodeDecodeError`
553
+ *inside* the walk and the whole run died with a traceback and the interpreter's exit code `1` — the
554
+ code this repository reserves for "found something", delivered by a crash on a file the census had
555
+ not even read. That is a failure of the calculation dressed as a result. From `0.2.8` the census
556
+ reads a source the way the importer reads it — `tokenize.open`, honour the cookie, then decode — so
557
+ the latin-1 file is censused rather than skipped, and a file that genuinely cannot be decoded is
558
+ named `CODIFICACION` in `ilegibles` and pins the run at `2` like every other hole. The two cases
559
+ stay apart on purpose: a bad cookie is `SINTAXIS`, an undecodable body is `CODIFICACION`.
560
+
561
+ A file that cannot be parsed pins the run at `2` until it leaves the declared scope, because a hole
562
+ is not a clean sheet. `--excluir` is how a tree declares that scope, and it names files as well as
563
+ directories: `--excluir tests_syntax_error.py` leaves out the one fixture and keeps the other 2921
564
+ parsable files, where excluding its directory leaves out three parsable files to remove one. What
565
+ was neither read nor parsed is published in `podados`, so a denominator that shrank says so.
566
+
567
+ How many files a tree yields is a property of the tree *and of the interpreter that walks it*.
568
+ django's 2922 `.py` files leave 1 unreadable under 3.14 and 6 under 3.11 — the extra five are
569
+ syntax the older runtime does not know. So the census names its observer: `interprete` travels in
570
+ the JSON and on the summary line, which is what keeps `SINTAXIS` from blaming the tree for a
571
+ decision the runtime made. Two censuses of one tree under different runtimes are different objects
572
+ and no longer compare equal.
573
+
574
+ ### The same doctrine, one instrument short
575
+
576
+ `frontera-runner` is the boundary between four instruments and a tree nobody here owns, so it has to
577
+ report an instrument that cannot read the tree instead of averaging it away. `streamlit/streamlit`
578
+ —10 364 files, `04884fb`, 2026-11-28, `env -i`, four instruments composed by `uvx --from … --with …`
579
+ and nothing else on the machine— made exactly that visible:
580
+
581
+ | instrument | state, 0.2.5 | reason |
582
+ |---|---|---|
583
+ | `git-complement-audit` | APLICABLE | ran, 0 findings |
584
+ | `test-ordinal-ratchet` | APLICABLE | ran, 0 findings |
585
+ | `ts-py-anchor-guard` | NO_APLICABLE | `SIN_MANIFIESTO_DE_ANCLA` — it measures declared anchors, and this tree declares none |
586
+ | `fiber-ast-lint` | `NO_MEDIDO` | `FALLA ANALISIS e2e_playwright/compilation_error_dialog.py: SyntaxError` |
587
+
588
+ Receipt seal `sha256:bee1106d…`. The last row is the boundary failing, and it took a second
589
+ measurement to see it. `fiber-ast-lint` answers `4` when it measured and will not certify, and its
590
+ payload says how much it did read. Run on its own, with the published wheel, on two trees nobody
591
+ here owns:
592
+
593
+ | tree | exit | files read | sites | findings | files it could not parse |
594
+ |---|---|---|---|---|---|
595
+ | `psf/black` `573c81e` | 4 | 449 | 474 | 3 | 6 |
596
+ | `PyCQA/pylint` `c85c638` | 4 | 2 495 | 1 829 | 3 | 44 |
597
+
598
+ `reconcilia` and `certifica` are both `true` in those payloads: the instrument's accounting closes,
599
+ and what it withholds is a signature over a census with a hole in it. So `4` is neither a zero nor an
600
+ absence — it is a measurement that names what it could not read. `0.2.5` mapped that one code to
601
+ `NO_MEDIDO` and returned before parsing stdout, which turned 2 495 files and 3 findings into a hole
602
+ whose only evidence was a truncated stack of `SyntaxError` lines. That loss was ours, and
603
+ [`fiber-ast-lint#7`](https://github.com/alexisromtz-lab/fiber-ast-lint/issues/7) — filed against the
604
+ instrument — now carries the correction rather than the accusation.
605
+
606
+ From `0.2.6` —and `0.2.8` keeps— the boundary reads the payload anyway: the row stays `APLICABLE`, `razon` starts with
607
+ `CENSO_PARCIAL`, the denominator gains `sin_certificar`, and the markdown names the files that could
608
+ not be parsed. A partial census never comes out green — `0` still means the census closed — but its
609
+ numbers survive their hole, which is what `ceros-implicitos` already did with django's broken
610
+ fixture. On this same `streamlit/streamlit` tree at `04884fb`, measured with this revision, the
611
+ answer stops being `NO_MEDIDO` and becomes 9 findings for `fiber-ast-lint` plus 1 declared unread file.
612
+
613
+ `ceros-implicitos`, above, is the same doctrine already implemented: django's unparsable fixture
614
+ becomes an `ilegibles` entry and the other 2 921 files are still counted. Two instruments, one
615
+ doctrine, and the difference between them is measurable — which is the only reason it can be fixed.
616
+
617
+ The other direction is also measured. `torproject/stem` —483 files, 219 of Python, `d5012a1`,
618
+ 2026-11-28, same four instruments, seal `sha256:f6a801f6…`— fills three of four: 3 applicable, 0
619
+ `NO_MEDIDO`, and `fiber-ast-lint` returns 9 candidates. Before 0.2.4 that same tree answered
620
+ `NO_MEDIDO` for the whole census because one module-scope candidate carried an empty `qualname`;
621
+ the instrument's own token for that scope is `<modulo>`, and that is what the boundary now accepts
622
+ instead of discarding nine rows over one unnamed field.
623
+ ### Ten repositories nobody here owns, one table
624
+
625
+ Counting is where a boundary lies without knowing it. This frontier decided whether a suite existed
626
+ by looking at the file's name, and `tests/tests_tqdm.py` is not `test_*.py`. So `tqdm/tqdm` —68
627
+ modules of Python, 21 files under `tests/`— was refused as `SIN_ARCHIVOS_DE_PRUEBA`: a zero of the
628
+ walk read as a zero of the subject. From `0.2.7` the walk counts a test file by naming **or** by
629
+ living under a directory called `test`, `tests` or `__tests__`, and it publishes the disagreement
630
+ when the instrument it admitted then answers "no subject". Ten trees, `env -i`, four instruments
631
+ composed by `uvx --from … --with …`, one wheel built from the tree this tag names, 2026-11-28:
632
+
633
+ | tree | `.py` | test files | `fiber-ast-lint` candidates | files it could not parse | `test-ordinal-ratchet` | RC | seal |
634
+ |---|---|---|---|---|---|---|---|
635
+ | `PyCQA/pylint` `c85c638` | 2 537 | 1 411 | 3 | 44 | APLICABLE | 1 | `sha256:9f7da014…` |
636
+ | `scrapy/scrapy` `d2052b8` | 557 | 337 | 5 | 0 | APLICABLE | 1 | `sha256:488ed09e…` |
637
+ | `celery/celery` `acb1428` | 459 | 196 | 1 | 0 | APLICABLE | 1 | `sha256:6f54d2ff…` |
638
+ | `psf/black` `573c81e` | 455 | 398 | 3 | 6 | APLICABLE | 1 | `sha256:2fea5832…` |
639
+ | `pallets/flask` `49943b5` | 83 | 48 | 1 | 0 | APLICABLE | 1 | `sha256:03b970c3…` |
640
+ | `paramiko/paramiko` `0e9ccb9` | 70 | 24 | 0 | 0 | APLICABLE | 0 | `sha256:0a56d5dc…` |
641
+ | `tqdm/tqdm` `9cf5a12` | 68 | 21 | 0 | 0 | `NO_MEDIDO` | 2 | `sha256:448a2dbe…` |
642
+ | `encode/httpx` `e347fb5` | 60 | 37 | 1 | 0 | APLICABLE | 1 | `sha256:ecdf379b…` |
643
+ | `python-attrs/attrs` `af29c2a` | 58 | 32 | 10 | 0 | APLICABLE | 1 | `sha256:d638a880…` |
644
+ | `psf/requests` `3c7baaa` | 37 | 15 | 4 | 0 | APLICABLE | 1 | `sha256:14f78bf5…` |
645
+
646
+ 4 384 modules, 2 519 test files, 28 candidates, 50 files no parser could read, and one row that says
647
+ `NO_MEDIDO` instead of a comfortable green. Two of those rows are the previous section arriving from
648
+ the other side: `pylint` and `black` keep their 44 and 6 unread files **and** their findings, which
649
+ `0.2.5` would have thrown away.
650
+
651
+ The `tqdm` row is the one worth reading twice. The hypothesis was that the frontier would now hand
652
+ the suite over and get a count; the measurement says the instrument reads `test_*.py` and answers
653
+ `RC 2: no file matches `test_*.py` under /tmp/rep/tqdm_tqdm (no subject, no zero)`. The instrument
654
+ declines honestly, and the frontier no longer translates that decline into "this repository has no
655
+ tests, all good": the row is `NO_MEDIDO` with `SUJETO_CONTRADICHO` — 21 test files counted, none
656
+ seen — and the receipt leaves at `2` (`HUECO_DE_MEDICION`) instead of `0`. One blind spot moved from
657
+ our counter to their selector, and this time the hole is named at the point where it happens.
658
+
659
+ The table above was measured with a wheel built from the tree, not with the published one, so it is
660
+ worth saying which half of it reproduces. The **file** does not: `uv build` on the same tree gives
661
+ `sha256:bf2c673f…` and the Release asset is `sha256:da2edec6…`, because a wheel carries the build's
662
+ timestamps. The **receipts** do: the ten trees above, censused again with
663
+ `--from …/releases/download/v0.2.8/frontera_runner-0.2.8-py3-none-any.whl` under `env -i`, produce
664
+ ten files that are `cmp`-identical to the ten the local wheel produced — seals included, so this is
665
+ not a table that only reproduces on the machine that wrote it.
666
+
667
+ ### Ten more, and the two zeros are measured ones
668
+
669
+ Same published wheel, same `env -i`, same four instruments, ten trees picked for shapes the first
670
+ ten did not have: a project that ships thousands of test modules (`pydantic`), a suite whose tests
671
+ are the product (`sqlalchemy`), a test framework auditing itself (`pytest`). CPython 3.14.0 here,
672
+ because `uvx` resolves it and nothing here pins otherwise:
673
+
674
+ | tree | `.py` | test files | `fiber-ast-lint` candidates | files it could not parse | `test-ordinal-ratchet` | RC | seal |
675
+ |---|---|---|---|---|---|---|---|
676
+ | `pydantic/pydantic` `6449f80` | 3 163 | 3 096 | 9 | 0 | APLICABLE | 1 | `sha256:021469d6…` |
677
+ | `fastapi/fastapi` `05e6df7` | 1 233 | 676 | 6 | 0 | APLICABLE | 1 | `sha256:df9b6489…` |
678
+ | `sqlalchemy/sqlalchemy` `9c88919` | 678 | 346 | 19 | 0 | APLICABLE | 1 | `sha256:39bce3df…` |
679
+ | `HypothesisWorks/hypothesis` `3beed83` | 464 | 338 | 8 | 0 | APLICABLE | 1 | `sha256:44315352…` |
680
+ | `python-poetry/poetry` `3cc663a` | 412 | 241 | 8 | 0 | APLICABLE | 1 | `sha256:b7b43c11…` |
681
+ | `tox-dev/tox` `6aa26c8` | 274 | 140 | 0 | 0 | APLICABLE | 0 | `sha256:aca42a05…` |
682
+ | `pytest-dev/pytest` `98b6887` | 274 | 125 | 2 | 0 | APLICABLE | 1 | `sha256:3463beea…` |
683
+ | `aio-libs/aiohttp` `34cd9be` | 173 | 84 | 7 | 0 | APLICABLE | 1 | `sha256:1499783b…` |
684
+ | `pallets/click` `08b803c` | 91 | 59 | 0 | 0 | APLICABLE | 0 | `sha256:3eefa6cc…` |
685
+ | `encode/starlette` `c150aac` | 84 | 35 | 1 | 0 | APLICABLE | 1 | `sha256:13b46846…` |
686
+
687
+ 6 846 modules, 5 140 test files, 60 candidates, and **zero** files no parser could read. Eight rows
688
+ leave at `1` and two at `0` — `tox-dev/tox` and `pallets/click` — and those two are the reason the
689
+ table is here. A frontier that only knows how to find something is a detector of activity, not of
690
+ absence: `click` has 91 modules and 59 test files, none of them in the four shapes, and the receipt
691
+ says exactly that, sealed. Twenty trees now, and the second ten are not more of the first: the first
692
+ ten had 50 unread files between them, these ten have none.
693
+
694
+ One row moved for a reason worth naming. `aiohttp` is the only tree where `test-ordinal-ratchet`
695
+ leaves at `1`, and its four findings are test **names**: `tests/test_web_functional.py` carries
696
+ `test_100_continue_custom` and three siblings. A name that opens with digits is an ordinal that
697
+ sorts before every other test in its module, which is the class that instrument exists to see. A
698
+ finding about a tree we do not own, published unedited, not a defect we are quietly fixing.
699
+
700
+ And the first table's `44` deserves the same reading, because a number without its meaning is
701
+ decoration. Measured with `ast.parse` under CPython 3.11, 60 files under `PyCQA/pylint` fail to
702
+ parse, and **every one of them lives under `tests/` or `doc/data`**: `tests/functional` 49,
703
+ `doc/data` 6, `tests/regrtest_data` 3, `tests/input` 1, `tests/reporters` 1. That is code whose job
704
+ is not to parse. The census is right to count them as unread and right not to call them a finding;
705
+ whether a tree's deliberately-broken fixtures are subject or matter is a scope decision this
706
+ frontier has not taken, and taking it silently would be the same defect as reading a zero as a
707
+ count.
708
+
709
+ ### The boundary: 4 of 11 shapes of an unmeasured zero
710
+
711
+ The two rules are narrow on purpose — a `get` whose second argument is a zero literal, and an `or`
712
+ with a zero among its values — and a narrow rule that is not published reads as a clean tree. Eleven
713
+ ways of writing the same zero, one per file, censused as a tree (`tests/test_limite_del_censo.py`
714
+ builds them and the suite fails if this table and the instrument diverge):
715
+
716
+ | shape | seen as |
717
+ |---|---|
718
+ | `d.get("k", 0)` | `GET` |
719
+ | `x or 0` | `OR` |
720
+ | `x or 0.0` | `OR` |
721
+ | `d.get("k") or 0` | `OR` |
722
+ | `d.setdefault("k", 0)` | — |
723
+ | `0 if k not in d else d[k]` | — |
724
+ | `if k not in d: d[k] = 0` | — |
725
+ | `collections.defaultdict(int)` | — |
726
+ | `collections.Counter()` | — |
727
+ | `d.get("k", CERO)` where `CERO = 0` | — |
728
+ | `d.get("k", False)` | — |
729
+
730
+ A tree written entirely with the six middle shapes censuses to `0` findings and exits `0`, and the
731
+ exit code cannot tell you why. So the count is only readable next to the list: **0** means one of
732
+ two things — nothing there, or nothing among these four shapes. `False` is the seventh silent one
733
+ for a different reason: it is not a number here, and `es_cero` says so.
734
+
735
+ Widening this is a decision with its own measurement — how many `setdefault` and `defaultdict` sites
736
+ exist in trees we do not own, and how much noise each one adds — not a free extension of scope. The
737
+ count above is what the instrument claims today.
738
+
739
+ ### How much is behind the wall
740
+
741
+ The question after "you do not look" is "how much is there". Counted with an independent `ast.walk`
742
+ over the same five trees — `django/` + `tests/` alone is 2921 parsed files — the census sees 30
743
+ loci, and the shapes it does not look at hold roughly this. The classifier is one `isinstance`
744
+ predicate per row, dated 2026-11-28 against the same five clones, so it is re-countable by reading
745
+ the rows:
746
+
747
+ | shape not looked at | candidates in the five trees |
748
+ |---|---|
749
+ | `get(k, <name>)` where the name is a zero | **0** |
750
+ | `setdefault(k, 0)` | 4, all in django |
751
+ | `Counter()` (a missing key already reads as a zero) | 4, all in django |
752
+ | `<expr> if <cond> else 0` with a zero on one side only | 14 — 9 in django, 5 in smolagents |
753
+
754
+ The zero in the first row is the one worth defending. Those five trees write 591 `get` defaults that
755
+ are not a literal zero — 178 `{}`, 81 `''`, 75 names, 42 `[]`, 31 `False`, 24 attributes, 21 `None`,
756
+ 33 calls (`set()`, `Q()`, a nested `.get(...)`) — and not one of them is a zero: there is no
757
+ `get(k, int())`, and every name is either a real value or a sentinel (`UNSET`, `NOT_PROVIDED`,
758
+ `model_name`). A rule that chased named defaults would add candidates to 591 sites and find nothing.
759
+
760
+ The twenty-two that remain sit against the 30 the instrument names, and the largest group is the
761
+ least convincing: `1.0 / rate_limit if rate_limit else 0.0` is a declared rate for a disabled
762
+ feature, not a zero standing in for a measurement. `1 if feature else 0` counted 47 more until they
763
+ were read — they are booleans written as integers, and they are not this pathology at all.
764
+
765
+ So the boundary stays where it is, and now it says why: the wall is low, and most of what is behind
766
+ it is not what the tool is for. This is the measurement that would have changed the decision, and it
767
+ says no.
768
+
769
+ ### The same wall, twenty trees, every count carrying a path
770
+
771
+ Five trees, and a per-row `isinstance` classifier written for the occasion. Same day, wider: twenty
772
+ trees a Python team actually installs (`pylint`, `black`, `tqdm`, `requests`, `scrapy`, `celery`,
773
+ `httpx`, `flask`, `attrs`, `paramiko`, `aiohttp`, `starlette`, `sqlalchemy`, `pydantic`,
774
+ `hypothesis`, `pytest`, `poetry`, `fastapi`, `tox`, `click`), counted by
775
+ `python -m frontera_runner.ampliacion <tree> --muestras 3` under CPython 3.14.0. None of the twenty
776
+ is ours. `ampliacion` walks the same domain as the census, with the same exclusions, and publishes
777
+ three `archivo:línea` samples per shape, because a count with no path is a number nobody can check:
778
+
779
+ | | twenty trees |
780
+ |---|---|
781
+ | files censused | **11 223** |
782
+ | files pruned by the contract | 30 |
783
+ | files that could not be read | 51, all `SINTAXIS` (deliberately broken fixtures) |
784
+ | findings the census does see | **186** — 79 `get(k, 0)`, 107 `x or 0` |
785
+
786
+ | shape the census does not look at | sites | trees |
787
+ |---|---|---|
788
+ | `0 if c else x`, `x if c else 0` | **276** | 17 of 20 |
789
+ | `Counter()` | 43 | 8 of 20 |
790
+ | `defaultdict(int)` | 19 | 8 of 20 |
791
+ | `if k not in d: d[k] = 0` | 13 | 9 of 20 |
792
+ | `d.setdefault(k, 0)` | 3 | 2 of 20 |
793
+ | `d.get(k, CERO)` with `CERO = 0` in the same file | **0** | 0 of 20 |
794
+ | | **354** | |
795
+
796
+ The census sees 186 of the 540 zero-sites these twenty trees contain — 34.4 %. The last row is the
797
+ one that pays for the others: across 11 223 files there is not one `get` whose default is a name
798
+ bound to a zero in the same file, which is the shape a text-level rule would chase and a naive
799
+ matcher would burn on. The five-tree count said `0` too; the zero now stands over 11 223 files and
800
+ twenty independent codebases instead of five.
801
+
802
+ ### 354 is an upper bound, and the reading says why
803
+
804
+ A ternary with a zero on one side is not automatically a zero standing in for a measurement. Reading
805
+ all 276 by what sits on the *other* side:
806
+
807
+ | other side | sites | share | one example |
808
+ |---|---|---|---|
809
+ | `None` | 88 | 31.9 % | `tox` `tests/test_provision.py:711` · `0 if 'install' in request.run_id else None` |
810
+ | `1` | 60 | 21.7 % | `pylint` `pylint/graph.py:330` · `1 if isinstance(node, str) else 0` |
811
+ | a call | 36 | 13.0 % | `pylint` `tests/functional/u/use/use_implicit_booleaness_not_len.py:89` · `len(l) if l else 0` |
812
+ | a name | 26 | 9.4 % | `pylint` `tests/functional/ext/consider_refactoring_into_while_condition/…py38.py:11` · `a if a == 10 else 0` |
813
+ | another number | 22 | 8.0 % | `celery` `t/integration/test_group_chains.py:76` · `2 if level == failed_level else 0` |
814
+ | an arithmetic expression | 18 | 6.5 % | `pylint` `pylint/lint/report_functions.py:61` · `0 if total == 0 else float(mod_total * 100) / total` |
815
+ | an attribute | 11 | 4.0 % | `celery` `celery/beat.py:934` · `conf.broker_connection_max_retries if conf[retry_setting] else 0` |
816
+ | a signed number | 6 | 2.2 % | `hypothesis` `tests/cover/test_datetimes.py:499` · `0 if value.fold else -1` |
817
+ | a subscript | 5 | 1.8 % | `hypothesis` `tests/conjecture/test_shrinker.py:637` · `node1.constraints['shrink_towards'] if node1.type == 'integer' else 0` |
818
+ | anything else | 4 | 1.4 % | `sqlalchemy` `test/orm/test_merge.py:1487` · `0 if load.noload else 1 if merge_persistent.merge_persistent else 2` |
819
+
820
+ Half the mass — 148 of 276, **53.6 %** — is not this pathology at all: `0 if c else None` is a
821
+ sentinel pair, and `1 if c else 0` is a boolean written as an integer. Of the remaining 128, the
822
+ largest group is a real value with a declared zero fallback (`len(l) if l else 0`), which a reader
823
+ would call correct code more often than not. So **354 is an upper bound on the wall, not a count of
824
+ defects**, and widening the census to the ternaries would add three or four sites per finding while
825
+ making every one of them arguable.
826
+
827
+ Two trees make the point better than the aggregate. `tox` looks clean by the census — 1 finding over
828
+ 274 files — and holds 97 sites in the shapes it cannot see: the tree that reads cleanest is the
829
+ densest behind the wall. `fastapi` is 1 233 files with 0 findings and 10 muted sites, `attrs` is
830
+ 0 and 0, `starlette` is 0 and 1: three of twenty trees have nothing for the census to say.
831
+
832
+ Line-grep would have gotten all of this wrong. `tox` counted 95 zero-ternaries and `grep 'else 0'`
833
+ found 4, because the ternaries span lines and half of them read `0 if … else …` with the zero in
834
+ front. Every number above comes from `ast`, and the samples are printed by the same walk that
835
+ counts them, so the count and its evidence cannot drift apart.
836
+
837
+ The decision is still **not taken**. What changed is what a decision would cost: to move the census
838
+ from 34 % to 100 % of the zero-sites in these twenty trees it would have to publish 354 candidates,
839
+ at least half of which are not this defect, and lose the property that a finding is a defect by
840
+ construction.
841
+
842
+ ## Measured, on four hand-built subjects
843
+
844
+ Every number below comes from running the four real instruments from their own checkouts
845
+ (`--raiz /Users/marlene`), twice per subject, on 2026-11-27. The subjects were deleted afterwards.
846
+
847
+ | subject | surface | rc | states | Markdown | two runs |
848
+ |---|---|---|---|---|---|
849
+ | `fs-a` — TS + Python + tests, and one branch left outside `HEAD` | 6 files · py 3 · tests 2 · ts 1 | `1` | 4 applicable, 1 with findings | 3 175 B | byte-identical |
850
+ | `fs-b` — the same tree, nothing outside `HEAD` | 6 files · py 3 · tests 2 · ts 1 | `0` | 4 applicable | 3 167 B | byte-identical |
851
+ | `fs-c` — Python only, not a git tree | 1 file · py 1 · tests 0 · ts 0 | `0` | 1 applicable · 3 `NO_APLICABLE` | 2 087 B | byte-identical |
852
+ | `fs-d` — a git tree with no files | 0 files | `0` | 1 applicable · 3 `NO_APLICABLE` | 2 755 B | byte-identical |
853
+
854
+ `fs-c` and `fs-d` are the case the whole repository is about: without the gate, both exit `2`
855
+ because an instrument that cannot run is a hole. With it, the two refusals are named and the verdict
856
+ is `0`.
857
+
858
+ ### What the triage actually saves
859
+
860
+ Median of five runs, same machine, `--json` only, two separate sessions. Wall clock on a shared
861
+ laptop: read the ratio, not the absolute seconds.
862
+
863
+ | subject | triaged | `--forzar-todos` | saved | instruments skipped |
864
+ |---|---|---|---|---|
865
+ | `fs-a` (all four applicable) | 1.488 s | 1.643 s | 9.4 % | 0 |
866
+ | `fs-c` (one applicable) | 0.875 s | 1.536 s | 43.1 % | 3 |
867
+ | `fs-d` (one applicable) | 1.155 s | 1.655 s | 30.2 % | 3 |
868
+
869
+ The same three subjects measured in an earlier session: `fs-a` 0.799 s vs 0.734 s (**−8.9 %**: the
870
+ gate cost 65 ms), `fs-c` 0.195 s vs 0.630 s (69.1 %), `fs-d` 0.466 s vs 0.788 s (40.8 %). `fs-a`
871
+ changes sign between the two sessions, and that is the honest reading: where the gate skips nothing,
872
+ its cost is noise around zero.
873
+
874
+ So the ≥ 40 % half of the hypothesis holds where the hypothesis was aimed — repositories without
875
+ surface, 30–69 % depending on load — and is falsified as a general claim: the saving equals the cost
876
+ of the instruments the gate skips. Three subjects measured before those (a Python tree with tests,
877
+ the audit's own checkout, the ratchet's own checkout) saved 0–8 %.
878
+
879
+ ## Tests
880
+
881
+ Standard library only, 130 tests, four fake instruments written to a temporary
882
+ `--raiz` so the subprocess boundary is exercised rather than mocked:
883
+
884
+ ```
885
+ /opt/homebrew/bin/python3.14 -m unittest discover -s tests
886
+ /opt/homebrew/bin/python3.14 -m frontera_runner --self-test
887
+ ```
888
+
889
+ The fakes answer through `<subject>/.fake/<instrument>.json`, because the environment is allowlisted
890
+ and the subject is the only channel the runner leaves open on purpose. The suite covers the triage
891
+ refusals, the entire exit-code mapping including the `2` trap, a crashing instrument, a timeout, a
892
+ missing instrument, seal recomputation and tamper detection, byte identity across two runs,
893
+ `NO_MEDIDO` where the instrument omitted its counters, and the 65 536-character cut. On top of
894
+ that, the `diff` contract (a receipt tampered with in one byte is `3`, a finding already in base is
895
+ not a regression, a deleted measurement is `2` and never "resolved", the guard's per-pair
896
+ partition), the two resolution routes, and path invariance: two clones of one subject at two depths,
897
+ two different `--raiz`, one seal — with the fixtures' commits pinned to a fixed date, because
898
+ otherwise the digest of a fake repository depends on the second it was created in. The package's
899
+ own AST is read too: no field may be given a hand-written zero default, and the same reader is a
900
+ tool —`python -m frontera_runner.ceros <árbol>`— that any repository can point at its own tree. It
901
+ publishes the surface it walked (`archivos`, `podados`, `ilegibles`) in the same object as its
902
+ findings, because a `0` without a denominator says *not looked*, not *none*; a file that does not
903
+ parse is `HUECO_DE_MEDICION` and a tree with no Python at all is `SIN_SUPERFICIE`, both `2`. The
904
+ census is falsified four ways: by a file that writes a zero in front of it, by a legitimate zero
905
+ named in the call, by a zero one directory down that a top-level walk would miss, and by two
906
+ copies of one tree at two depths having to publish one identical object.
907
+
908
+ This file has a reader too. `test_readme_comandos.py` cotes every tag, every wheel and every binary
909
+ the README cites against the manifest and against the repository's own tags; forbids any invocation
910
+ that resolves through the package index while the index serves something other than the version
911
+ whose dated measurement is declared in the README; and checks that the number of tests published in
912
+ this section is the number the loader discovers. Its falsifier mutates the text five ways — a bare
913
+ index install, an index install with no dated anchor, a stale tag, a wheel that is not the PEP 427
914
+ name, an inflated count — and requires five reds. The remote half is opt-in, `FRONTERA_VERIFICAR_EXTERNO=1`,
915
+ because a test that reaches the network in every run changes its verdict outside this tree. When it
916
+ is on, it does not stop at HTTP 200: it downloads the published wheel, matches its digest against
917
+ `SHA256SUMS.txt`, unpacks it into a temporary directory — no `pip`, no environment beyond the URL —
918
+ and runs the census from there over a subject with one known zero, requiring the same verdict and
919
+ the same bytes the tree's own instrument produces. Then it installs that wheel into an isolated
920
+ environment —no index, nothing in `$HOME`— and runs the console script `bin/ceros-implicitos` that
921
+ `[project.scripts]` promises under an empty one: what a third party types is the entry point, not a
922
+ module behind a `PYTHONPATH`. An artifact that answers 200 and does not run is one more document
923
+ that lies.
924
+
925
+ ## Boundaries
926
+
927
+ - **No imports of instrument internals.** Everything is a subprocess with a declared command. An
928
+ instrument that only works from its own working directory fails here instead of passing quietly.
929
+ - **No writes into an instrument's repository.** `PYTHONDONTWRITEBYTECODE=1`, no baseline rewriting,
930
+ nothing but reads.
931
+ - **Its own repository.** This runner is not vendored into any instrument. It finds them two ways
932
+ and never mixes them: `--raiz` names sibling checkouts (default: the parent of this repository),
933
+ and with no `--raiz` an absent sibling falls back to the package installed in this interpreter.
934
+ An explicit `--raiz` that is missing an instrument is a hole, not a fallback.
935
+ - **Zero third-party dependencies.** Standard library only, Python 3.11 or newer (`tomllib`).
936
+
937
+ ## License
938
+
939
+ MIT.