Skip to content

Harden scoped SDK auth and KV reliability - #42

Merged
Harsh-2002 merged 2 commits into
mainfrom
codex/kv-sdk-reliability
Aug 11, 2026
Merged

Harden scoped SDK auth and KV reliability#42
Harsh-2002 merged 2 commits into
mainfrom
codex/kv-sdk-reliability

Conversation

@Harsh-2002

Copy link
Copy Markdown
Owner

Summary

  • replace the process-wide SDK bearer secret with process-signed, function-scoped credentials and bind internal SDK attribution to active executions
  • enforce the KV contract, atomic batches, optional TTL semantics, cancellation, bounded writer queues, and health/Prometheus metrics
  • update Node/Python SDKs, operator/CLI/MCP paths, canonical docs, embedded copies, examples, and CI sandbox parity coverage

Validation

  • make test
  • make lint
  • cd frontend && npm test && npm run lint && npm run build
  • make build-all
  • operator KV E2E: 31/31 checks
  • docs and adapter copies byte-identical
  • git diff --check

The provisioned Linux CI jobs now run test/sdk-test.sh for Node/Python sandbox parity. The local dev host cannot remount a copied rootfs read-only inside nested nsjail, so that boundary is left to the mandatory CI runner.

Entire-Checkpoint: 01KZR8N3JZ3BZ2SKD3RHNF3JSS
Entire-Checkpoint: 01KZR8YYCNK9XMV2RQS7SKRN04

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ddcbf21b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +60 to 64
traceID, parentSpanID, executionStart, owned := h.SDKAuth.TraceContext(execID, callerFnID)
if !owned {
respond.Error(w, http.StatusForbidden, "SDK_SCOPE_VIOLATION",
"span execution is not active for the calling function", reqID)
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Node span ingestion inside the active window

When a Node handler uses await trace.span(...), the SDK deliberately starts the span POST without awaiting it (backend/runtimes/node/orva.js:451-463). The handler can therefore return and let Proxy.Forward remove the BindExecution entry before that POST reaches this ownership check; the request then receives 403, and the SDK's .catch(() => {}) silently discards the span. Await span ingestion or retain a verifiable execution context long enough for these documented fire-and-forget requests to finish.

Useful? React with 👍 / 👎.

@Harsh-2002
Harsh-2002 merged commit a1c7ac7 into main Aug 11, 2026
31 checks passed
@Harsh-2002
Harsh-2002 deleted the codex/kv-sdk-reliability branch August 11, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant