Expand description
Deterministic fingerprints: the same error seen by two drones (or two sessions weeks apart) must hash the same, regardless of line numbers, temp paths, ids or durations.
Functions§
- bash_
read_ paths - Files a shell command pulls into context (
cat a.rs,sed -n 1,80p src/x.rs | …). Agents read through Bash far more often than through the Read tool, so recall-on-touch must see these too. - command_
shape - Program plus subcommand (
cargo test,npm run,git status), the unit at which “how do I build/test this repo” knowledge transfers. - error_
fingerprint - Fingerprint of the most specific error line (see
error_line). - error_
line - The most specific error line of a failed command’s output: the last line naming the error (Python tracebacks end with it), else the first error-looking line that is not a generic header. None for harness messages (permission denials, rejections).
- invocation
- The invocation structure of a command: program, subcommand, env assignments and flags, without test selectors, paths or quoted values. Two commands that differ only in which tests/files they target have the same invocation.
- is_
test_ failure - Whether an error line is a failing test assertion rather than an environment/tooling error.
- is_
tool_ shape - Whether a command shape is a reusable tool invocation (build, test, package, env sourcing), as opposed to an ad-hoc script or a one-off inspection that teaches nothing to the next drone.
- looks_
failed - A command can fail behind a pipe (
pytest | tailexits 0), so judge by output too: tracebacks, test-runner failures, compiler errors. - normalize_
error_ line - Normalize one error line so incidental details don’t split fingerprints.
- only_
reads - True when every segment of the command just reads or lists files.