Skip to content

feat(fetchdoc): named document services and precise denial reporting - #115

Merged
pavelanni merged 4 commits into
mainfrom
feature/document-services
Nov 6, 2026
Merged

pavelanni merged 4 commits into
mainfrom
feature/document-services

Conversation

@pavelanni

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a document_services map to agent-config.yaml with key (^[a-z0-9][a-z0-9-]*$) and absolute http/https URL validation.
  • fetch_document now takes service and document_id; an unknown service fails before any network I/O, and the tool is registered only when services are configured.
  • internal/egress gains DescribeResponse, DescribeError, and LogCall: sandbox policy codes report as blocked by sandbox network policy, application errors such as 403 invalid_audience are preserved verbatim, and the HTTPS plaintext-denial string is mapped while generic connection-refused is not.
  • Removes --document-service-url / document_service_url and updates the demo ConfigMaps, deployments, dashboard, and testdata. The dashboard now injects document_services into the scenario ConfigMap instead of passing the flag.

Stacked on #112 (WP04). This branch is based on refactor/egress-clients and includes its commits; rebase onto main after #112 merges.

Tests

  • go test ./... green. New table tests cover denial shapes (JSON, HTML, oversized body, sandbox policy, token grant), error shapes (proxyconnect, HTTPS plaintext, DNS, deadline, connection refused), path escaping (../x?y), trailing-slash bases, header-free logging, unknown-service/no-request, and config validation.
  • make lint reports 0 issues; both the main module and the dashboard module build.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@pavelanni
pavelanni force-pushed the feature/document-services branch from 82bb26e to 748c4e8 Compare November 6, 2026 23:53
@pavelanni
pavelanni marked this pull request as ready for review November 6, 2026 23:58
@pavelanni
pavelanni merged commit 2f40df5 into main Nov 6, 2026
5 checks passed
@pavelanni
pavelanni deleted the feature/document-services branch November 6, 2026 23:58
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