|
| 1 | +# Historical Finding Classes |
| 2 | + |
| 3 | +This reference distills prior Restish release findings into reusable QA |
| 4 | +heuristics. Use it to choose targeted probes without depending on local |
| 5 | +planning files. |
| 6 | + |
| 7 | +## Triage Rules |
| 8 | + |
| 9 | +- Credential leakage, data loss, corrupted config/cache state, or common |
| 10 | + generated-command breakage is release-blocking until verified fixed or |
| 11 | + explicitly deferred by the user. |
| 12 | +- Medium issues are blockers when they affect common workflows, credentials, |
| 13 | + generated commands, config/cache integrity, release packaging, or code changed |
| 14 | + since the last release. |
| 15 | +- Low issues become targeted smoke checks when a nearby subsystem changed. |
| 16 | +- Help/example bugs are release risks when they teach users to send the wrong |
| 17 | + value, leak secret-looking values, or make common copy/paste examples fail. |
| 18 | +- Rejected historical findings are still useful for documentation and |
| 19 | + "working as intended" checks. |
| 20 | + |
| 21 | +## Historical Blocker And Near-Blocker Classes |
| 22 | + |
| 23 | +### Auth And Redaction |
| 24 | + |
| 25 | +- Optional anonymous OpenAPI security alternatives (`{}` plus a credential) |
| 26 | + must remain callable when optional env-backed credentials are unresolved. |
| 27 | + Ready credentials should still be preferred; required-auth operations should |
| 28 | + still fail on missing env. |
| 29 | +- OpenAPI `mutualTLS` should be satisfied by resolved TLS client cert/key or TLS |
| 30 | + signer transport settings, then fail later with normal TLS diagnostics if the |
| 31 | + files/plugins are bad. |
| 32 | +- Noninteractive `api connect` auth setup should reject unknown credential IDs, |
| 33 | + wrong-case credential IDs, unknown fields, and unused credential-scoped |
| 34 | + prompts. |
| 35 | +- Verbose body redaction must catch `password`, `password2`, |
| 36 | + `confirm_password`, `client_secret`, `secret`, `token`, and similar fields, |
| 37 | + while preserving ordinary numeric fields such as `max_tokens` and |
| 38 | + `token_budget`. |
| 39 | +- Network-error diagnostics must redact URL userinfo, credential-looking query |
| 40 | + params from the original URL, secrets added by `--rsh-query`/env/defaults, |
| 41 | + and generated query apiKey credentials in both the top-level error prefix and |
| 42 | + nested transport URL. |
| 43 | +- Verbose request traces should redact configured credentials in headers, |
| 44 | + query, cookies, JSON bodies, form bodies, response headers, plugin stderr, and |
| 45 | + redirect diagnostics. |
| 46 | + |
| 47 | +### Generated OpenAPI Commands |
| 48 | + |
| 49 | +- Duplicate path/operation header parameters with the same HTTP header name, |
| 50 | + including case variants, should merge before generated flag creation and |
| 51 | + should not skip the whole operation. |
| 52 | +- Generated fallback command names should remain short, stable, and traceable |
| 53 | + when `operationId` is absent or when `operation_base` is configured. |
| 54 | +- Specs with `description` fields that look like `$ref` objects must not be |
| 55 | + treated as schema refs. |
| 56 | +- OpenAPI extension effects (`x-cli-*`) should be visible and should not report |
| 57 | + nested effects for ignored entries. |
| 58 | +- Stale local spec files should refresh raw spec and generated operation caches |
| 59 | + before generated command registration or execution. |
| 60 | +- Concurrent `api connect` runs should preserve config entries and generated |
| 61 | + spec/operation caches for every successful connect. |
| 62 | + |
| 63 | +### Schema Help And Examples |
| 64 | + |
| 65 | +- OpenAPI 3.1 conditionals inside `allOf` should not hide direct object |
| 66 | + properties in generated help. Conditional required branches should render as |
| 67 | + useful constraints. |
| 68 | +- Schema help should keep effective flag types consistent after invalid |
| 69 | + enum/type fallback, such as string enum values declared under an integer |
| 70 | + schema. |
| 71 | +- Generated body examples should normalize string-valued boolean/integer/number |
| 72 | + defaults/examples to real JSON scalar values when unambiguous. |
| 73 | +- JSON nulls in `enum`, `default`, `example`, and `const` should render as |
| 74 | + `null`, not Go-ish `<nil>`, and generated examples should avoid contradicting |
| 75 | + null-only constraints. |
| 76 | +- Mixed-type root `enum`/`const` values should not make generated body examples |
| 77 | + contradict an object schema. |
| 78 | +- Generated examples should redact real secret-like explicit examples but avoid |
| 79 | + over-redacting ordinary non-secret token counters or logprob fields. |
| 80 | +- Generated shorthand examples should not turn URI/URL/URN strings into `@file` |
| 81 | + control syntax. |
| 82 | +- Generated shorthand examples for arrays of objects should be shell-safe and |
| 83 | + structurally copyable; otherwise prefer JSON file input. |
| 84 | +- Generated root help should handle absent, short, multiline Markdown, and |
| 85 | + README-length `info.description` values without overwhelming command help. |
| 86 | + |
| 87 | +### Query, Path, And Pagination |
| 88 | + |
| 89 | +- `deepObject` and `form` object query help should show syntax Restish accepts, |
| 90 | + and runtime serialization should match each OpenAPI style. |
| 91 | +- JSON-content query parameters should encode one JSON query value matching the |
| 92 | + schema. Whole-array parent values should work; repeated array-of-object flags |
| 93 | + must not silently become arrays of JSON strings. |
| 94 | +- String-or-array query flags should support multiple values or clearly point |
| 95 | + users to an accepted `--rsh-query` workaround. |
| 96 | +- Placeholder/free-form query parameter names should either be modeled |
| 97 | + deliberately or documented as requiring `--rsh-query`. |
| 98 | +- Path parameters with slashes, commas, percent signs, spaces, question marks, |
| 99 | + and already-escaped input should encode consistently. Pathful |
| 100 | + `--rsh-server` overrides are a known place to check for double encoding. |
| 101 | +- Page-param pagination should honor the effective query parameter, preserve |
| 102 | + strict `items_path` behavior, respect max-page/max-item limits, and handle |
| 103 | + metadata filters. |
| 104 | +- Link-header pagination should handle relative next URLs, quoted parameters |
| 105 | + with commas, malformed targets, unsupported schemes, and standalone `links` |
| 106 | + output. |
| 107 | + |
| 108 | +### Media Types And Bodies |
| 109 | + |
| 110 | +- Generated XML request-body `@file` input should send raw XML bytes with the |
| 111 | + declared XML media type. |
| 112 | +- Generated NDJSON request-body `@file` input should send raw newline-delimited |
| 113 | + bytes with the declared NDJSON media type, not a JSON-encoded string. |
| 114 | +- Wildcard or protocol-specific raw binary media types such as `*/*`, |
| 115 | + `application/*`, and `application/offset+octet-stream` should send raw bytes |
| 116 | + for `string format: binary` bodies while preserving the declared |
| 117 | + `Content-Type`. |
| 118 | +- Multipart examples should be usable or should explain `@file` syntax clearly. |
| 119 | + Check missing files, unreadable files, literal `@`, repeated file parts, |
| 120 | + binary parts, and per-part encoding metadata. |
| 121 | +- Operations advertising multiple request or response `content` entries should |
| 122 | + choose sensible defaults and respect `--rsh-content-type`, explicit `Accept`, |
| 123 | + vendor `+json`, XML/text alternatives, and strict provider expectations. |
| 124 | + |
| 125 | +### Built-Ins, Plugins, And Docs |
| 126 | + |
| 127 | +- Built-in commands should reject unsupported output formats clearly and should |
| 128 | + avoid advertising inherited output/filter flags they do not support. |
| 129 | +- Unknown subcommands under command groups such as `cache` and `plugin` should |
| 130 | + fail, not silently exit 0. |
| 131 | +- Explicit `--rsh-header` and `--rsh-query` should have documented precedence |
| 132 | + against env/default values and should not unexpectedly drop unrelated entries |
| 133 | + unless that is intentional. |
| 134 | +- First-party command plugins should expose long help consistently for root |
| 135 | + `--help`, `-h`, `help`, and subcommand `--help` forms. |
| 136 | +- Plugin protocol changes should remain additive or bump/check compatibility. |
| 137 | + Subprocesses that start must be waited on; timeout/error paths must close |
| 138 | + pipes and avoid goroutine/process leaks. |
| 139 | +- Generated docs regions, README install guidance, plugin docs, release |
| 140 | + packaging docs, and Hugo site build should stay in sync with command behavior. |
| 141 | + |
| 142 | +## Safe Repro Patterns |
| 143 | + |
| 144 | +Use these shapes when turning a historical class into a release probe. |
| 145 | + |
| 146 | +- Local fixture: write a small OpenAPI file under `t.TempDir()` in tests or |
| 147 | + under `${TMPDIR:-/tmp}` for manual QA; connect it with isolated config/cache. |
| 148 | +- Public spec: connect into isolated config/cache with fake credentials, then |
| 149 | + inspect help, `doctor api`, `api auth inspect`, `--rsh-generate-body`, or |
| 150 | + request construction only. |
| 151 | +- Request construction: use `--rsh-print H`, `--rsh-print B`, verbose output, |
| 152 | + `--rsh-server https://httpbin.org/anything`, or a localhost failure target. |
| 153 | +- Redaction: intentionally use fake secrets with unique strings and grep the |
| 154 | + resulting stderr/stdout for leaks. |
| 155 | +- Network diagnostics: use `127.0.0.1:9`, `--rsh-timeout 200ms`, and |
| 156 | + `--rsh-retry 0` so failures are quick and local. |
| 157 | +- Provider drift: compare generated command output against generic requests or |
| 158 | + curl only with safe read-only endpoints. |
| 159 | + |
| 160 | +## Issue Report Shape |
| 161 | + |
| 162 | +For every new problem, capture: |
| 163 | + |
| 164 | +- Candidate commit and platform. |
| 165 | +- Exact commands and environment variables, with fake secrets only. |
| 166 | +- Expected behavior. |
| 167 | +- Actual behavior, including relevant stderr/stdout excerpts. |
| 168 | +- Whether the issue is a release blocker. |
| 169 | +- Severity and impact. |
| 170 | +- Related historical class from this reference. |
| 171 | +- Suggested fix direction, without patching code during QA. |
| 172 | + |
| 173 | +## Residual Risk Notes |
| 174 | + |
| 175 | +Call out: |
| 176 | + |
| 177 | +- Checks skipped because a tool was unavailable, such as local GoReleaser. |
| 178 | +- Network-dependent probes that were not run or were inconclusive. |
| 179 | +- Public APIs that failed for provider/network reasons rather than Restish |
| 180 | + behavior. |
| 181 | +- Dirty worktrees, non-candidate branches, or tests run against a commit that |
| 182 | + differs from the requested release candidate. |
0 commit comments