Commit Graph
3 Commits
Author SHA1 Message Date
ShuaixinHuang b4a29597b3 perf(ghidra): bound UTF-8 encoding for diagnostic tails (#12219) 2026-11-19 06:42:58 -05:00
morluto b6659b70a3 refactor(domain): type UTF-8 excerpts apart from identity strings (#11272)
utf8HeadExcerpt and utf8TailExcerpt now return ExcerptText, a branded string. compactStringIdentityKey takes NotExcerpt<T>, so passing a display excerpt where an identity key is expected is a compile error (covered by an @ts-expect-error test). Two consumers that re-derived truncation by comparing an excerpt with its source (environment replay metadata, rizin frame history) read the helper's truncated fact instead.
2026-11-15 23:52:08 +08:00
morluto 351c2f4a03 fix(ghidra): carry only the latest launcher output in error diagnostics (#10555)
* fix(ghidra): carry only the latest launcher output in error diagnostics

Ghidra retains up to 8 MiB of launcher output so it can scan for failures,
and every error projected all of it into details.diagnostics. A startup
timeout on a large binary produced an 11 MB error payload (#10365).

Project the last 64 KiB of each retained stream, the bound gdb, rizin and
native commands already use, and record text_bytes next to the existing
observed and retained byte counts. Redaction runs on the whole retained text
before the cut. Add utf8TailExcerpt as the shared helper that keeps the end
without splitting a character.

Refs #10365

* fix(ghidra): preserve actionable launcher diagnostics

* test(ghidra): keep launcher scenarios independently scoped

* refactor(ghidra): parse launcher failures once in the diagnostics owner

ghidraFailureOutput parses every retained line with the single launcher-failure parser and carries bounded, redacted facts with their source line. The error projection reads those facts instead of re-scanning stream text, and the superseded line filter and ghidraJavaHomeSaveDenial text scanner are removed.
2026-11-14 19:01:26 -05:00