Skip to content

Commit a22ca66

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 0e229d9 commit a22ca66

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
@@ -452,9 +452,11 @@ Only object keys can be navigated — arrays are not supported and there is no `
452452
Keys that contain a literal `.` cannot be referenced. The resolved value must be a string, number,
453453
or boolean; numbers and booleans are converted to strings. Objects, arrays, and null are rejected.
454454

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

459461
Plain-text token file:
460462

@@ -491,7 +493,8 @@ Given `~/.config/myapp/creds.json`:
491493
```
492494

493495
The proxy resolves the credential to `ghp_xyz`, falling back to `GH_TOKEN` if the file is
494-
missing or the path doesn't resolve.
496+
missing. If the file exists but the JSON path doesn't resolve, the request fails with the
497+
parser error below instead of falling back.
495498

496499
Common errors when using `json:` parsers:
497500

0 commit comments

Comments
 (0)