Repository navigation
Commit 8fe0300
committed
Unit-test the conversion toolchain, and fix the four defects that found (MTE-5766, MTE-5827)
The toolchain had no tests. Its verdicts are what we decide "done" on, and the way we checked them
was to run a tool, read its output, and judge whether it looked right — which is how two confidently
wrong diagnoses survived review. Both were in the gates written to prevent exactly that.
44 tests, stdlib unittest, no device or Firefox checkout needed: ps/lsof/adb/git are stubbed and the
edge cases build synthetic batch dirs. The efftriage rule tests instead run against REAL labelled
conversion runs, now checked in under tests/fixtures/corpus with a labels.json manifest. That
distinction is the point: hand-written traces only exercise the shapes their author imagined, so they
go green while the tool mismatches real output — a false green in the suite meant to prevent false
greens. The corpus also existed only as batch dirs in one person's conversion-runs/, unversioned and
impossible to run in CI, which is a poor home for the campaign's main diagnostic asset.
Four defects, three of them in code already reviewed by eye and pronounced fine:
- efftriage diagnosed GREEN runs. Traces normally carry non-fatal [ERR] lines (nav-graph polling,
tolerated absence checks) and the rules scanned them whatever the outcome, so a passing run was
reported as an absence-assertion failure. Two labelled runs in our own corpus were affected. Still
triaged on purpose: a retry-pass, where attempt 1 did fail and clean=false means flaky-not-done,
and a crash, since crash mode is where `outcome: pass` is itself the lie (MTE-5822).
- efftriage blamed the harness for a typo: a nonexistent batch dir came back as gotcha A24, sending
the reader to check effpretty resolution and pull dumps off a device. It also tracebacked.
- effdoctor named the wrong queue — the failure it exists to prevent. effwatch is launched by a
relative path, resolved with abspath against effdoctor's cwd instead of the watcher's, so from a
Firefox checkout it reported a queue under firefox/tae-conversion/ that has never existed and told
us to use it. Requests there are never consumed and never error. Now reads the watcher's own cwd
(/proc, then lsof); a computed queue that is not on disk is a FAIL and an unreadable cwd is
"undetermined", because declining to answer beats answering wrongly.
- effdoctor's self-exclusion skipped any ps line containing the substring "effdoctor", so a watcher
under a directory with that name was invisible. Unnoticed watchers are the whole point of the tool.
Recorded as known gaps rather than papered over: rules T3/T4/T5 have no labelled example in the
53-run corpus, so they are unvalidated rather than known-good, and 3 of 28 failures still get no
diagnosis. Both are asserted, so the lists cannot go stale in either direction.1 parent 716f701 commit 8fe0300
35 files changed
Lines changed: 7302 additions & 6 deletions
File tree
- .github/workflows
- tae-conversion
- tests
- fixtures/corpus
- T0-absence-assert
- T1-arrival-timeout
- T10-crash
- T2-selector-surface
- T6-count-mismatch
- T7-multi
- T8-ad-surface
- T9-permission
- gap-qrdialog-b17d
- gap-sponsored-b13d
- gap-sponsored-b14e
- pass-clean
- pass-with-nonfatal-errs
- unknown-empty-report
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
34 | 63 | | |
35 | 64 | | |
36 | 65 | | |
| |||
47 | 76 | | |
48 | 77 | | |
49 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
50 | 85 | | |
51 | 86 | | |
52 | 87 | | |
0 commit comments