Skip to content

🐛 Map pane write check: multi-line quoted text counts, and a parity test hides load errors #370

Open

Description

@ToRvaLDz

Parent: trailhead mod: Claude Code function hooks for on-screen state, context and in-process guards

Surfaced from: Map pane write matcher counts a heredoc body line as a tracker write

Question

Two small leftovers of that fix. How do we close them without growing the mod's heredoc stripper into a shell emulation?

Repro

  1. Multi-line quoted text counts as a tracker write. isTrackerWrite strips heredoc bodies only, and GH_ISSUE_WRITE bounds a segment at line ends. On this command, which writes nothing:
    echo "x / gh issue close 5"
    Expected: no match. Observed: match (checked on the regex, and the stripper leaves a quoted string as it is), so the pane does one extra read.
  2. A parity test can read a load error as a skip. plugins/trailhead/hooks/lib/git-env-mod.test.js:15 has try { mod = require(...) } catch { /* no type stripping */ }, so a syntax error in hooks/mod/git-env.ts turns the test into a skip. hooks/lib/heredoc-mod.test.js already narrows this, and can serve as the model.

Impact is low: an extra gh read for the first, a lost safety net for the second. The first may well close as accepted under the shell-parsing stop criterion in the conventions (#226).

Blocked by

nothing (on the frontier)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions