mirror of
https://github.com/larksuite/cli.git
synced 2026-08-03 08:32:46 +08:00
internal/outputdir had one importer: a shortcuts/common function that forwarded to it and did nothing else. shortcuts/common is the runtime gate that shortcuts-runtime-gate exempts, so it already holds vfs and validate, and the package below it held nothing the gate does not. EnsureOutputDir is the whole implementation again, and gains the first tests it has had — four callers, no coverage until now: a relative path resolved inside the working directory, one that climbs out and must be rejected before anything is created, and the absolute path its doc comment promises to accept. convert_lib kept four forwarders into internal/imcontent. ResolveMentionKeys, formatTimestamp and extractPostBlocksText had no caller but a test, and forwarding ParseJSONObject only gave one function two entry points; its two real callers in resource_extract.go now say imcontent.ParseJSONObject. BuildMentionKeyMap stays, because shortcuts/event builds a ConvertContext through this package and should not have to reach past it. The five helper tests move to internal/imcontent, where the code they cover lives, so removing a forwarder no longer removes coverage. Two files that arrived without tests of their own get them: the imcontent dispatch — including the invariant a converter table cannot state, that a registered type must never be answered by the "[type]" placeholder — and sparkstore's AppStorage adapter, where ListAppIDs decodes escaped directory names and must report an absent root as zero apps rather than an error. Own-package coverage: imcontent 82.0% -> 89.1%, sparkstore 72.6% -> 94.5%.