mirror of
https://github.com/larksuite/cli.git
synced 2026-08-03 08:32:46 +08:00
Second-round owner review follow-ups on PR #1998. - P1: --format pretty on a command that has no pretty renderer no longer errors after the work already ran. For a write that path mutated remote state, then exited non-zero, so automation treated it as a failure and retried, creating duplicate resources. The emitter now writes a stderr warning and falls back to the JSON envelope (exit 0); StreamPage falls back to NDJSON with a single warning. Reads and writes behave identically. - P1: make full-text content-safety scanning a DETECTABLE capability. Add extension/contentsafety.FullTextProvider; block mode requires it and returns scan-incomplete (blocked, empty stdout) for any provider that cannot guarantee a complete scan. A legacy provider that silently truncates can no longer let a match past the truncation point reach stdout. - P1: structured output (json/table/csv/ndjson) is scanned in full under block mode. Per-string 128 KiB truncation and depth-cap stops now surface as scan-incomplete and block, instead of emitting data that was only partially scanned. - P2: invalid Format enum values error instead of silently degrading. Format.Valid(), String() renders unknown(N) for out-of-range values, and Success / StreamPage / WriteFormatted / PaginatedFormatter.WritePage return a typed internal error rather than defaulting to JSON or writing nothing. - P3: the content-safety scan-context factory is an injected dependency rather than a mutable package global, so parallel tests cannot interfere.