Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .agents/skills/change-opensecret-api/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ module as the authority for inner session/decryption middleware. Use
`src/web/responses/` for Responses, conversations, tools, persistence, and
events.

For Transport V2, also trace `src/transport_v2/gateway.rs` and
`src/transport_v2/session.rs` from the mounted routes in `src/main.rs`.
V1 and V2 transport coexist; establish which path the actual SDK invokes.
Transport V2 is the only client transport. Trace
`src/transport_v2/gateway.rs` and `src/transport_v2/session.rs` from
`public_routes` in `src/main.rs`: application routes are mounted only inside
the gateway (`transport_v2_application`), never on the listener.
Transport V2 and Router V2 are separate mechanisms, so a transport version
does not establish the selected inference router.

Expand All @@ -49,18 +50,17 @@ does not establish the selected inference router.
route-appropriate auth context.
- A session protects transport; it does not establish user identity, project
membership, or storage-key ownership. Bodyless protected routes still
validate and touch the session.
require a live session.
- JWT and API-key contexts are distinct. Preserve the auth method through
authorization, persistence eligibility, quota, and usage attribution.
- Hold the session lease for the complete response body or stream. Successful
protected responses and ordinary stream events remain encrypted according to
the established client protocol.
- The gateway encrypts the complete logical response, including every stream
record and its terminal record. A handler returns ordinary JSON or SSE, and a
stream must end with an explicit terminal event.
- Validate provider-free input before writes. Pinned clients may recover from
selected session or auth failures by retrying, so a side-effecting change
needs explicit idempotency or proof that validation precedes the effect.

Inspect `src/web/attestation_routes.rs`,
`src/web/encryption_middleware.rs`, session state in `src/main.rs`,
Inspect `src/web/encryption_middleware.rs`, `src/transport_v2/session.rs`,
`src/web/openai_auth.rs`, and `src/jwt.rs` when the change reaches those
boundaries. Do not duplicate their policy inside a handler.

Expand Down
4 changes: 2 additions & 2 deletions .agents/skills/change-opensecret-provider/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ call site's unavailable, timeout, denial, fallback, and success semantics.
Completion requests use Router V2. Keep image and title helpers on the request's
authenticated account and plan routing context. A helper candidate identifies
a public model; resolve its provider through shared routing rather than pinning
an independently guessed provider. Router retirement does not remove Transport
V1 or change the public API versions.
an independently guessed provider. Router retirement does not change the
public API versions.

Trace alias resolution separately from model selection and provider selection.
Router V2 resolves an Auto alias to its tier's preferred model, then
Expand Down
15 changes: 8 additions & 7 deletions .agents/skills/validate-opensecret/references/checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ OPENSECRET_DEV_POSTGRES=0 OPENSECRET_DEV_ENV=0 OPENSECRET_DEV_CONTAINERS=0 \

The helper proves an empty-database migration and the selected local synthetic
database suites, including OAuth settings preservation, callback selection,
and Google/GitHub callback completion through the real V1 encryption
middleware and V2 gateway. Completion tests exchange synthetic credentials
only with local mock token/user-info endpoints, verify the originally selected
callback after settings change, and reject replay without another exchange.
The recovery subset covers recovery-wrap lifecycle, management and V2
password-reset routes, and a recovery flow through the real V1 middleware and
V2 gateway; its reset rows use a known code MAC instead of email delivery.
and Google/GitHub callback completion through the real Transport V2 gateway.
Completion tests exchange synthetic credentials only with local mock
token/user-info endpoints, verify the originally selected callback after
settings change, refuse a callback from another session, and reject replay
without another exchange. The recovery subset covers recovery-wrap lifecycle,
management and V2 password-reset routes, and a recovery flow through the real
gateway that also proves the listener serves no recovery route in plaintext;
its reset rows use a known code MAC instead of email delivery.
The `os-sdk-e2e` lane in `ci.yml` runs this helper too. These fixtures do not
prove a live OAuth provider flow, a released SDK or application, or a data
conversion from representative old rows.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ grep -Eq "test result: ok\\. ${compaction_count} passed; 0 failed; 0 ignored;" \
callback_count=0
for callback_filter in \
db::tests::db_oauth_settings_ \
transport_v2::gateway::tests::db_oauth_callback_selection_v1_v2 \
transport_v2::gateway::tests::db_oauth_callback_selection \
transport_v2::gateway::tests::db_oauth_callback_completion_; do
cargo test --locked --all-features "$callback_filter" \
-- --ignored --list >"$workdir/callback-tests.list"
Expand All @@ -247,8 +247,8 @@ for callback_filter in \
END { print count + 0 }' "$workdir/callback-tests.list")"
test "$selected_count" -gt 0
if [ "$callback_filter" = "transport_v2::gateway::tests::db_oauth_callback_completion_" ]; then
# Both Google and GitHub must complete through both encrypted transports.
test "$selected_count" -eq 4
# Both Google and GitHub must complete through the gateway.
test "$selected_count" -eq 2
fi

cargo test --locked --all-features "$callback_filter" \
Expand All @@ -267,7 +267,7 @@ done
recovery_count=0
for recovery_suite in \
recovery_db_tests::=12 \
recovery_route_tests::=31 \
recovery_route_tests::=30 \
transport_v2::gateway::tests::db_recovery_=1; do
recovery_filter="${recovery_suite%=*}"
expected_count="${recovery_suite##*=}"
Expand Down
5 changes: 2 additions & 3 deletions services/opensecret/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ protected environment variables. Billing and feature flags are optional
external HTTP APIs whose administrative credentials remain in the backend;
their server implementations are not part of this repository setup.

Protected routes require OpenSecret attestation/key exchange and encrypted
sessions. “OpenAI-shaped” describes decrypted payloads, not a plaintext
Protected routes require an attested Transport V2 session. “OpenAI-shaped” describes decrypted payloads, not a plaintext
OpenAI-compatible wire endpoint. Use an OpenSecret SDK or Maple for
protected-route integration tests; plain `curl` is suitable only for public
health probes.
Expand Down Expand Up @@ -88,7 +87,7 @@ OPENSECRET_DEV_POSTGRES=0 OPENSECRET_DEV_ENV=0 OPENSECRET_DEV_CONTAINERS=0 \

The Rust unit-test job does not run ignored tests. The SDK integration job
also runs the disposable-database helper, including OAuth settings and
encrypted V1/V2 callback-selection checks. Live-provider tests remain separate. Use the
encrypted callback-selection checks. Live-provider tests remain separate. Use the
[`validate-opensecret`](../../.agents/skills/validate-opensecret/SKILL.md) workflow
for disposable PostgreSQL tests, authorized provider checks, encrypted-client
smoke tests, Nix checks, and release-only EIF/PCR evidence. Report those layers
Expand Down
3 changes: 1 addition & 2 deletions services/opensecret/docs/local-macos-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ The Continuum proxy deliberately has no shared prompt-cache default.
OpenSecret injects user-bound `cache_salt` values into completion requests;
explicit salts enable reuse without `--sharedPromptCache`. Do not add a
proxy-wide salt to the launch command. See the
[provider cache contract](transport-v2-protocol.md#provider-cache-root) for
V1/V2 scope and restart behavior.
[provider cache contract](transport-v2-protocol.md#provider-cache-root).

## One-time setup

Expand Down
3 changes: 1 addition & 2 deletions services/opensecret/docs/oauth-callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ enabled flags and other provider settings retain their existing semantics.

The decrypted request body for `/auth/github`, `/auth/google`, and
`/auth/apple` accepts an optional `redirect_url` alongside the existing
`client_id`. The same contract applies through both
Transport V1 and Transport V2.
`client_id`.

When absent or `null`, the provider's default `redirect_url` is used. When
present, the value must exactly match the default or one of that provider's
Expand Down
3 changes: 1 addition & 2 deletions services/opensecret/docs/transcription.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ The app records 16 kHz mono PCM16 WAV. Ten minutes is about 19.2 MB of audio;
twenty minutes is about 38.4 MB. Both fit the SDK's 50 MiB Transport V2 JSON-body
limit after base64 encoding. Thirty minutes is about 57.6 MB of audio and 76.8 MB
of base64, so the existing SDK rejects it before upload. Enclave-side compression
or splitting cannot change that ingress limit. Transport V1's additional base64
envelope is more restrictive.
or splitting cannot change that ingress limit.

Provider duration agreement confirms reported audio processing, not transcript
accuracy or completeness of recognized speech. Use the real-audio validation
Expand Down
Loading