Skip to content

docs(skill): rule 9 gives the true reason, and §6 reads the Debug form too - #559

Merged
vyncint merged 1 commit into
mainfrom
docs/skill-limitations-link-and-rule-9
Oct 6, 2026
Merged

vyncint merged 1 commit into
mainfrom
docs/skill-limitations-link-and-rule-9

Conversation

@vyncint

@vyncint vyncint commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Rule 9 said that returning termlens::Result<()> and using ? makes a
failing wait print the grid "instead of called unwrap() on Err". It does
not: a test that returns Err is reported through the harness's
Termination impl, which prints the error's Debug form, and unwrap()
prints the same Debug form. Measured on a timeout carrying a query note:

Timeout { waiting_for: "the screen predicate to hold — note: …",
          timeout: 200ms, screen: Screen(size: 40x4  cursor: 0,5
READY …) }

Both show the description, the note and the grid. The rule keeps its advice
and now gives the reasons that hold: steps and helpers chain without an
.unwrap() each, nothing is lost on failure, and err.to_string() is the
readable Display form for a test asserting on an error it expects (#547).

The same mismatch was in §6, whose table is keyed on the Display form's
first line ("timed out after 5s while waiting for …"), which a failing
? test never prints. §6 now says how that line reads in the Debug form
(Timeout { waiting_for: "…", timeout: …, … }, Eof { waiting_for: … })
so the table matches what an agent actually sees.

The unanswered-probe row pointed at the README's "Known limitations",
which does not exist; it links to the list in docs/LIMITATIONS.md, with an
absolute URL because SKILL.md is copied out of the repository (#539).

Closes #539
Closes #547

…m too

Rule 9 said that returning `termlens::Result<()>` and using `?` makes a
failing wait print the grid "instead of `called unwrap() on Err`". It does
not: a test that returns `Err` is reported through the harness's
`Termination` impl, which prints the error's `Debug` form, and `unwrap()`
prints the same `Debug` form. Measured on a timeout carrying a query note:

    Timeout { waiting_for: "the screen predicate to hold — note: …",
              timeout: 200ms, screen: Screen(size: 40x4  cursor: 0,5
    READY …) }

Both show the description, the note and the grid. The rule keeps its advice
and now gives the reasons that hold: steps and helpers chain without an
`.unwrap()` each, nothing is lost on failure, and `err.to_string()` is the
readable `Display` form for a test asserting on an error it expects (#547).

The same mismatch was in §6, whose table is keyed on the `Display` form's
first line ("timed out after 5s while waiting for …"), which a failing
`?` test never prints. §6 now says how that line reads in the `Debug` form
(`Timeout { waiting_for: "…", timeout: …, … }`, `Eof { waiting_for: … }`)
so the table matches what an agent actually sees.

The unanswered-probe row pointed at the README's "Known limitations",
which does not exist; it links to the list in docs/LIMITATIONS.md, with an
absolute URL because SKILL.md is copied out of the repository (#539).

Closes #539
Closes #547

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
@vyncint
vyncint merged commit 3181981 into main Oct 6, 2026
16 checks passed
@vyncint
vyncint deleted the docs/skill-limitations-link-and-rule-9 branch October 6, 2026 23:40
vyncint added a commit that referenced this pull request Oct 7, 2026
Each was checked against the code or by running it before it changed;
one more item is a style tidy, marked as such.

README:
- `Screen::parse` reads the snapshot format, not an insta `.snap`: it
  rejects the `---` header on line 1. The body below it parses, and the
  `termlens` command reads a whole `.snap` because it strips the header.
- The skill has five recipes, not four.

SKILL.md:
- §7's mask row said `mask_matching` "spans a wrap the way `find_all`
  does". A value split by a soft wrap is two rows and stays unmasked
  (measured: 10 columns, `SECRET-VALUE-42`); a needle with `\n` is what
  spans rows. Rule 12 already says so for `contains`.
- Rule 10 said `format!("{:?}")` is the same as `Display`. It wraps the
  text in `Screen(…)`, which `Screen::parse`, `diff` and `render` refuse.
- §6 said every error's `Display` ends with the screen. Only the wait
  errors (timeout, EOF, emulator) and a failed write carry one.

SECURITY.md: "bot-authored commits are rejected by CI" is true except for
Dependabot, which CONTRIBUTING's AI tooling policy exempts from the
identity rule only; the provenance line now says so.

DESIGN.md:
- The writer queue is unbounded (`mpsc::channel`), capped on reply bytes;
  one paragraph said bounded, the next unbounded.
- The user-facing Windows list is in docs/LIMITATIONS.md, not the README.
- `CSI 18 t` is answered, and `14 t`/`16 t` once a cell size is declared,
  so "the non-pixel `CSI t` reports" were never all unanswered; the same
  correction in LIMITATIONS.md names `11 t` and `19 t` instead.
- The compatibility corpus starts at 0.10.1, not "each published release".

emit's steps: an argument beginning with `--` must be a step, so `emit
--foo` exits 2 rather than printing `--foo`; TEXT and `--text` say so.

Rustdoc:
- `Unsupported`'s summary was `Clipboard`'s first sentence, so docs.rs
  described the type as clipboard data; the sentence is back on
  `Clipboard`, which had no summary.
- `assert_screen_snapshot!` repeated the Display-versus-Debug reason that
  #559 corrected in the skill.
- `wait_frame` pointed at a README Windows note that is not in the README.
- `Screen`'s Debug impl said "exactly like Display"; it adds `Screen(…)`.
- Style, not a contradiction: `mask_matching` carried the crate's only
  `# Examples` heading; the rest of the crate's doctests have none.

Found by a documentation sweep; the same sweep found the relative
`current_dir` bug and the inspect help errors fixed in #561.

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
vyncint added a commit that referenced this pull request Oct 7, 2026
Each was checked against the code or by running it before it changed;
one more item is a style tidy, marked as such.

README:
- `Screen::parse` reads the snapshot format, not an insta `.snap`: it
  rejects the `---` header on line 1. The body below it parses, and the
  `termlens` command reads a whole `.snap` because it strips the header.
- The skill has five recipes, not four.

SKILL.md:
- §7's mask row said `mask_matching` "spans a wrap the way `find_all`
  does". A value split by a soft wrap is two rows and stays unmasked
  (measured: 10 columns, `SECRET-VALUE-42`); a needle with `\n` is what
  spans rows. Rule 12 already says so for `contains`.
- Rule 10 said `format!("{:?}")` is the same as `Display`. It wraps the
  text in `Screen(…)`, which `Screen::parse`, `diff` and `render` refuse.
- §6 said every error's `Display` ends with the screen. Only the wait
  errors (timeout, EOF, emulator) and a failed write carry one.

SECURITY.md: "bot-authored commits are rejected by CI" is true except for
Dependabot, which CONTRIBUTING's AI tooling policy exempts from the
identity rule only; the provenance line now says so.

DESIGN.md:
- The writer queue is unbounded (`mpsc::channel`), capped on reply bytes;
  one paragraph said bounded, the next unbounded.
- The user-facing Windows list is in docs/LIMITATIONS.md, not the README.
- `CSI 18 t` is answered, and `14 t`/`16 t` once a cell size is declared,
  so "the non-pixel `CSI t` reports" were never all unanswered; the same
  correction in LIMITATIONS.md names `11 t` and `19 t` instead.
- The compatibility corpus starts at 0.10.1, not "each published release".

emit's steps: an argument beginning with `--` must be a step, so `emit
--foo` exits 2 rather than printing `--foo`; TEXT and `--text` say so.

Rustdoc:
- `Unsupported`'s summary was `Clipboard`'s first sentence, so docs.rs
  described the type as clipboard data; the sentence is back on
  `Clipboard`, which had no summary.
- `assert_screen_snapshot!` repeated the Display-versus-Debug reason that
  #559 corrected in the skill.
- `wait_frame` pointed at a README Windows note that is not in the README.
- `Screen`'s Debug impl said "exactly like Display"; it adds `Screen(…)`.
- Style, not a contradiction: `mask_matching` carried the crate's only
  `# Examples` heading; the rest of the crate's doctests have none.

Found by a documentation sweep; the same sweep found the relative
`current_dir` bug and the inspect help errors fixed in #561.

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
@vyncint vyncint mentioned this pull request Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant