Skip to content

Commit 486f205

Browse files
dvdksnclaude
andcommitted
docs(sandboxes): correct file.parser fallback semantics
The previous wording claimed the proxy falls back when a JSON field is absent. Verified against sandboxd/pkg/secrets/store.go that parser errors propagate; fallback only happens at discovery time based on file presence and env var being set. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 547ed38 commit 486f205

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

  • content/manuals/ai/sandboxes/customize

content/manuals/ai/sandboxes/customize/kits.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,11 @@ Only object keys can be navigated — arrays are not supported and there is no `
527527
Keys that contain a literal `.` cannot be referenced. The resolved value must be a string, number,
528528
or boolean; numbers and booleans are converted to strings. Objects, arrays, and null are rejected.
529529

530-
When a source has both `env` and `file` defined, `priority` controls which is tried first. If the
531-
preferred source is unavailable — file missing, field absent, or environment variable unset — the
532-
proxy falls back to the other source automatically.
530+
When a source has both `env` and `file` defined, `priority` controls which is tried first. The
531+
preferred source is used when it exists — the environment variable is set, or the file is
532+
present on disk. If it doesn't, the other source is used instead. The choice is made once at
533+
discovery time, so parser errors (missing JSON field, wrong value type, invalid JSON) surface
534+
as errors rather than triggering a fallback.
533535

534536
Plain-text token file:
535537

@@ -566,7 +568,8 @@ Given `~/.config/myapp/creds.json`:
566568
```
567569

568570
The proxy resolves the credential to `ghp_xyz`, falling back to `GH_TOKEN` if the file is
569-
missing or the path doesn't resolve.
571+
missing. If the file exists but the JSON path doesn't resolve, the request fails with the
572+
parser error below instead of falling back.
570573

571574
Common errors when using `json:` parsers:
572575

0 commit comments

Comments
 (0)