Spaces:
Sleeping
Sleeping
File size: 2,984 Bytes
6a1cba7 d647970 6a1cba7 d647970 6a1cba7 d647970 6a1cba7 d647970 6a1cba7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | # Advisory Runtime Boundary
Version: 1.8.0
Status: Public operational note for `stem advisory call`
---
## Purpose
`stem advisory packet` and `stem advisory validate` are deterministic local contract operations.
`stem advisory call` is different. It is the explicit runtime boundary where a downstream provider adapter may be invoked. In v1.8.0, this mode exists to make the boundary visible and enforce its security contract before real provider execution is attached.
---
## What `stem advisory call` Does In v1.8.0
- builds the same provider-budgeted advisory input packet
- exports provider request metadata
- exports logging and redaction policy metadata
- exports child-env allowlist summary
- marks network intent explicitly
- keeps `network_called = false` unless a future adapter actually performs the call
If no adapter is implemented for the selected provider, the runtime returns:
- `status = error`
- `errors = ["adapter_not_implemented"]`
This is intentional. The mode exists to separate the trust boundary before a live adapter is turned on.
---
## Security Controls In This Mode
### 1. Explicit opt-in
Provider-call intent is never implicit. Users must choose:
```bash
stem advisory call /path/to/repo
```
### 2. Centralized redaction
Known secret patterns are scrubbed from:
- exception text
- advisory payload objects
- JSON artifacts
- Markdown artifacts
- explain artifacts
### 3. Logging policy
The runtime exports a machine-readable logging policy. It allows metadata such as:
- provider
- model
- base_url
- network_mode
- api_key_present
- api_key_env_var
It forbids:
- raw API key values
- authorization headers
- raw request bodies
- raw response bodies
- full environment dumps
### 4. Child environment allowlist
Future adapters must not inherit the full parent environment. The runtime prepares an allowlist summary containing only:
- base OS/runtime variables needed for child execution
- shared advisory config variables
- the selected provider key variable only
### 5. Artifact pre-write sanitization
Artifacts are sanitized before write. This is the last boundary if upstream redaction misses something.
---
## What This Mode Does Not Yet Do
v1.8.0 does **not** ship a live provider adapter.
That means:
- no OpenAI API call
- no Anthropic API call
- no Gemini API call
- no Ollama request
- no local-runtime inference call
The current release hardens the boundary first. Real adapter execution belongs to the next runtime step.
---
## Recommended Operator Use
1. Run the deterministic scan.
2. Export `stem advisory packet`.
3. Review `provider_request`, `packet_contract`, and `contract_schemas`.
4. Use `stem advisory call` only when you need the explicit runtime boundary metadata.
5. Validate any downstream provider output with `stem advisory check-response <repo> --response FILE`.
This keeps deterministic scoring, provider invocation intent, and response validation as separate operational lanes.
|