Four-state labels, and the negatives that used to look alike

Every claim carried one of three labels, and the third was doing two jobs. `unverified` meant
both "someone asserted it and nobody here paid for the counters" and "no evidence was gathered
at all" -- different statements with different next actions. This adds `unknown` for the second.

The distinction that pays for itself lives inside a *negative* result, because an empty probe has
three causes and only one of them is a finding:

  absent                  -- coverage reached the question, nothing is there
  present but unreadable  -- the thing is there and this route cannot read it
  unknown                 -- nothing covered the question

The middle one is the dangerous one: it produces byte-identical output to the first, and it is the
normal case on the input this skill is aimed at. A packed APK returning four classes is not an APK
with four classes, and "the string was not in the dex" is a statement about a probe. The rule now
says to name the probe's coverage and run a control that must hit before writing "not present", and
to record `unknown` about the probe rather than `absent` about the target.

Also in this pass:

  * P47 -- two tools disagree about the same artifact, and the disagreement is your parser. One
    extraction rule reused across outputs that do not share a format: an unescaped `$` dropped every
    descriptor containing one, and dotted names were compared against DEX descriptors so one side
    parsed to nothing. The comfortable failure is the one that confirms what you already expected,
    which is why it survived the sanity check it should not have.
  * dexsql: a cache is second-hand evidence and it ages silently. A stale cache answers for the old
    artifact with no error, and `--trusted-input` skips revalidating the recorded source inputs --
    so a cached run supports "true of the artifact the cache was built from", not "true of the
    artifact in front of me".
  * ete-diff-tracing: a divergence is a location, not a cause. The differential method produces a
    positional claim, and three readings it does not authorise are written down beside the step that
    produces it.
  * CONTRIBUTING.md -- the gates, what a green run does and does not establish, the sync rules a
    change has to keep (a new reference must be named in the inventory; renaming a heading breaks
    every section reference that pointed at it), and the two failure modes to watch when editing the
    gates: a limit that cannot fail, and a gate whose answer varies with the runner. README links it
    from both language editions.
This commit is contained in:
inliver233
2026-10-16 19:17:31 +08:00
parent b8aa0a529b
commit 6ab905b2c8
12 changed files with 274 additions and 6 deletions
+40
View File
@@ -598,6 +598,11 @@ Four qualifications that the Coverage section states in full and that belong her
## Repository maintenance
**Changing something here? Start with [CONTRIBUTING.md](CONTRIBUTING.md).** It lists the gates, what a
green run does and does not establish, the sync rules a change has to keep (a new reference must be
named in the inventory, renaming a heading breaks every section reference that pointed at it), and the
two failure modes to watch for when editing the gates themselves.
Four tools live at the root and are not part of the installed skill:
```
@@ -626,6 +631,41 @@ Consistency has a natural counter-pressure -- a broken path fails loudly, and so
Bloat has none, which is why the third tool exists: every pass adds a reference, an index row and
a coverage claim, and without a measurement nothing in the repository notices.
### What a green gate establishes, and what it does not
The checks above prove **consistency**, not truth. `check_repo.py`, `check_refs.py`,
`check_routing.py`, `check_commands.py` and `check_budget.py` passing means paths resolve, the
inventory is complete, documented flags exist, the entry point has not crept, and no target
identity reached the tracked surface. They say nothing about whether a *claim* is right: a
reference can cite a heading that exists and still describe a mechanism nobody ran, and a budget
gate cannot tell a load-bearing file from an adjacent one. Those are the two questions a reader
actually has, and the only things that answer them are the strength labels and the evidence record.
### Integrating an outside contribution
**Fail closed.** If the contribution's fit with what this repository claims to cover, its
side effects, or the verification needed to establish either one is **materially unresolved**, do
not merge it and do not ship it: leave it pending, narrow it, or decline it. Recording the open
question is a valid outcome; converting it into "none" or "probably fine" is not.
Four things that are not approval, however good they look: **a green CI run, a finished
implementation, upstream popularity, and the absence of an objection.** They establish that code
runs and that nobody has complained, which is a different statement from *this belongs here and its
limits are known*.
Two consequences that decide most of these cases:
- **Labels over volume.** A large contribution whose every claim carries a correct `observed` /
`inferred` / `unverified` / `unknown` label is easier to accept than a small one that presents
assumptions as findings, because the first one can be checked. Ask what was actually run, and
treat "no claim was upgraded to `observed` by reading about it" as a good sign rather than a
weakness.
- **Unresolved is `unknown`, never absent.** A capability that has not been exercised here is
`unknown` -- not excluded, not disqualified, and also not merged on the assumption that it
probably works. Where a contribution ships a device-bound or toolchain-bound half, the mergeable
part is the half that was measured plus an explicitly labelled template for the rest, with the
gate that says what would have to exist for the other half to become `observed`.
`tests/benchmark.md` holds the **regression matrix**: dimension -> public target -> the scripts the
row exercises -> measured result -> strength label. It is the checklist to re-run before trusting
any claim under `docs/tool-verification/`. Samples are downloaded into `tools/_work/` and are never