Fase 2.1 capability advertisements for BuiltinCoderPlugin, kept in a separate file from builtin_coder.go to keep the cyclo-new scan clean. IsReadOnly reports whether the @coder subcommand is read-only for the given args. Only `read`, `search`, `tree`, `list`, `stat` are pure reads — every other subc
(args []string)
| 21 | // pure reads — every other subcommand (`exec`, `write`, `patch`, |
| 22 | // `test`) mutates state. |
| 23 | func (p *BuiltinCoderPlugin) IsReadOnly(args []string) bool { |
| 24 | sub := coderSubcommand(args) |
| 25 | switch sub { |
| 26 | case "read", "search", "tree", "list", "stat": |
| 27 | return true |
| 28 | } |
| 29 | return false |
| 30 | } |
| 31 | |
| 32 | // IsConcurrencySafe mirrors IsReadOnly: read/search/tree on |
| 33 | // independent paths can run in parallel; mutating subcommands stay |
no test coverage detected