Skip to content

refactor: remove v1 identity remnants (WP03) - #109

Merged
pavelanni merged 3 commits into
mainfrom
refactor/remove-v1-identity
Nov 6, 2026
Merged

pavelanni merged 3 commits into
mainfrom
refactor/remove-v1-identity

Conversation

@pavelanni

Copy link
Copy Markdown
Collaborator

Summary

Removes the v1 SPIFFE/OPA/delegation code paths and the A2A document mode that forwarded the caller's raw bearer token, per WP03 of the zero-trust v2 plan.

  • Bridge: DelegationContext/DelegationTransport, x-delegation-* handling, FetchDocument/ProcessLLM/ExtractDocumentID are deleted. Every A2A message goes through ProcessMessage; a nil processor yields agent not configured.
  • Serve: the document client is a plain proxy-aware http.Client; no bearer token is forwarded; phase 1 always has a single-shot ProcessMessage.
  • Config/metrics/logger: mock_spiffe, spiffe.*, opa.*, the --mock-spiffe/--opa-host/--opa-port flags, SVID/authorization/delegation metrics, ComponentOPA*, and Logger.SVID are gone.

Acceptance grep spiffe|\bopa\b|x-delegation|delegation over Go code returns no matches.

Deviations

  • message.go was deleted wholesale; besides ExtractDocumentID it only held the caller-less ExtractReviewType.
  • Phase-1 ProcessMessage uses selectPrompt(...) + skillsSummary instead of the bare systemPrompt, so prompt variants keep working and selectPrompt is not dead code.
  • TestSingleShotProcessMessage_UsesComplete is deferred to WP06 because the closure is still inline in runServe.

Test plan

  • go test ./internal/bridge/ -v — 3/3 pass (red first)
  • make fmt lint test — clean
  • go build ./... && go test ./... — green
  • Live docsclaw serve smoke test against a document service

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

@pavelanni
pavelanni marked this pull request as ready for review November 6, 2026 23:30
@pavelanni
pavelanni merged commit 6db85c2 into main Nov 6, 2026
5 checks passed
@pavelanni
pavelanni deleted the refactor/remove-v1-identity branch November 6, 2026 23:30
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