Repository navigation
Wave 1 — API auth, structured outputs, sandbox env scrub - #2
Merged
Merged
Conversation
…04, ENG-009, ENG-005) ENG-004: bearer-token auth middleware on /api/* (apps/server/src/auth.ts) — mutating requests require Authorization: Bearer $API_AUTH_TOKEN (timing-safe), GET read views open; principal from X-Actor; approval endpoints append an approval_decided audit event stamped with the principal; open dev-mode + startup warning when unset. ENG-009: WorkerInput.outputSchema; API backend emits output_config.format (json_schema); hand-written schemas for proposal/tickets/verdict; CLI keeps prose fallback; ProposedChanges.parsed distinguishes parse failure from empty change set. ENG-005: sandboxEnv() forwards only an allow-list to the claude -p child, withholding host secrets. typecheck + lint + 73 tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave 1 — safety + enablers
Implements Wave 1 of the roadmap (
project/ROADMAP.md). Stacked on #1 — base iswave-0-foundationsso this diff shows only the Wave 1 changes; retarget tomainonce #1 merges.ENG-004 — API auth + approval identity
apps/server/src/auth.ts: bearer-token middleware on/api/*(timing-safe compare) — mutating(non-GET) requests require
Authorization: Bearer $API_AUTH_TOKEN; GET read views stay open.X-Actor(defaultoperator); approval endpoints append anapproval_decidedaudit event stamped with the principal (payload.by), so the append-only logrecords who released each gate.
API_AUTH_TOKENis unset (keepsdocker compose upworking). 9 auth tests (pure
checkAuth+ middleware viaapp.request).ENG-009 — Structured outputs for agent parsing
WorkerInput.outputSchema; the API backend emitsoutput_config: { format: { type: "json_schema", schema } }so responses are schema-constrained JSON. Hand-written schemas (schemas.ts) for theproposal / tickets / verdict; the CLI backend keeps the prose-parse fallback.
ProposedChanges.parsedletsimplementTicketaudit "agent output could not be parsed" distinctlyfrom "no file changes proposed".
ENG-005 — Scrub the CLI sandbox env
sandboxEnv()forwards only a benign allow-list (PATH/HOME/XDG/locale) to theclaude -pchild;ANTHROPIC_API_KEY/GITHUB_TOKEN/DATABASE_URLand everything else are withheld. Opt-inwidening via
AGENT_SANDBOX_ENV_PASSTHROUGH.Verification
pnpm typecheck·pnpm lint·pnpm test(73 tests) all green.Follow-ups (noted in the tickets)
API_AUTH_TOKENis set; require-by-default and protecting read views are anoperator hardening decision. First-class persisted approvals (with
decidedByon the entity) areENG-006.
🤖 Generated with Claude Code