Skip to content

feat: add audited privileged trace payloads - #31

Draft
Super-Sky wants to merge 5 commits into
codex/agent-run-contract-issue-22from
codex/privileged-trace-payload-issue-30
Draft

Super-Sky wants to merge 5 commits into
codex/agent-run-contract-issue-22from
codex/privileged-trace-payload-issue-30

Conversation

@Super-Sky

Copy link
Copy Markdown
Owner

Summary

  • add an opt-in privileged trace payload plane for model, tool, and context assembly details
  • redact forbidden fields/content before AES-256-GCM encryption, authenticate retention metadata, and enforce sampling, per-record/per-run budgets, workspace switches, and short retention
  • expose run/ref-bound, no-store Control Plane reads with fail-closed durable access audit while keeping app-facing timelines reference-free
  • add the on-demand Control Plane inspector and integrate the existing Taste observability UI refinements

Security boundary

  • disabled by default and requires a dedicated random secret of at least 32 bytes plus a key ID
  • structured attachment bodies, credentials, authorization, brokerage accounts, hidden reasoning, and configured denylist fields are excluded or redacted before persistence
  • Control Plane is currently a platform-admin trust boundary; every read attempt records session hash, remote IP, outcome, and returned byte count

Verification

  • env -u APP_ENV go test -timeout 300s ./...
  • go test -race -timeout 300s -run 'Privileged|TimelinePayloadReference' ./internal/runtime ./internal/server
  • go vet ./internal/runtime ./internal/app ./internal/server
  • PostgreSQL integration with concurrent per-run budget contention
  • bundled Node npm ci and npm run build
  • absolute-path gate and its unit tests
  • PostgreSQL + OpenAI-compatible provider API/browser smoke: on-demand detail, no app payload_ref, no plaintext ciphertext, durable success audit, no test-secret leak
  • benchmark: 18.3-40.6 ms/op, about 15.3 KiB/op, 54 allocs/op on the throttled local Intel baseline

Review notes

An independent adversarial review identified metadata-tampering, weak-key, sensitive free-text, UI stale-response, and lock-copy risks. This branch addresses them with authenticated AAD metadata, a 32-byte deployment-key gate, defense-in-depth content patterns, request generation checks, pointer graph receivers, and regression coverage.

Refs #30
Refs #11

# Conflicts:
#	develop.log
#	docs/features/feature-agent-trace-timeline.md
#	docs/implementation.md
#	docs/v2.1.0/plan/master-plan.md
#	internal/server/trace_timeline.go
#	internal/server/trace_timeline_test.go
#	web/src/App.tsx
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