mirror of
https://github.com/larksuite/cli.git
synced 2026-08-03 08:32:46 +08:00
Address the owner review's blocking finding on PR #1998: the 128 KiB windowed pretty scan could be bypassed — a match straddling a window boundary (via the default instruction_override rule's unbounded \s+) matched the full text but neither window, so block mode still wrote it to stdout. - Scan the complete rendered text as one string (no windows): correct regex semantics, and the []any window round-trip through normalize disappears. - Add a no-truncate full-text scan path (extcs.ScanRequest.FullText, additive) so content past the scanner's 128 KiB per-string cap is still scanned; latency stays bounded by the existing 100 ms scan timeout. The structured API-response scan path keeps its cap. - Block mode now FAILS CLOSED when a scan cannot complete (timeout/error/panic): nothing is written and a typed ContentSafetyError is returned. warn/off keep failing open. This intentionally changes the §0.3 content-safety red line for block mode; the legacy oracle golden is updated accordingly. - Report an unknown --format before the --jq conflict (with the --format param), and validate the framework --format on the --print-schema path too. Regression tests: cross-window instruction_override payload is now blocked; full-text scan catches matches beyond the per-string cap; regex boundary semantics preserved; block-mode fail-closed on scan timeout/error.