Skip to content

feat: transparency manifest — attested 'what this tool read' section (#55) - #67

Merged
gkanitz merged 1 commit into
mainfrom
agent/issue-55
Jul 6, 2026
Merged

feat: transparency manifest — attested 'what this tool read' section (#55)#67
gkanitz merged 1 commit into
mainfrom
agent/issue-55

Conversation

@gkanitz

@gkanitz gkanitz commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Closes #55

Implemented by the autonomous loop: DA (deepseek/deepseek-v4-flash) → deterministic gate (test, vet, fmt) → QAA (anthropic/claude-haiku-4.5) approved.

…ion (#55)

Adds counting middleware at the HTTP RoundTripper level that classifies
every outgoing request by registered route class (REST or GraphQL). The
manifest is extracted after each fetch and stamped into the report
schema as 'access_manifest', rendered as a plain-language 'What this
tool read' section.

Files changed:
- provider/manifest.go (new): CountingTransport, RouteTable, Manifest
  types; GitHub/GitLab route tables and static never-requested lists
- provider/provider.go: added AccessManifest field to ActivitySet
- provider/github/github.go: adapter uses CountingTransport, populates
  manifest after FetchActivity
- provider/gitlab/gitlab.go: same as GitHub, with /api/v4 strip prefix
- report/report.go: AccessManifest/EndpointCount types; WithAccessManifest
  BuildOption; buildAccessManifest helper; Build() stamps the manifest
- render/render.go: classLabel template function for plain-language names
- render/templates/sections/60-transparency.tmpl (new): renders the
  transparency section with endpoint table and never-requested list
- render/testdata/sample-report.json: added access_manifest block to fixture
- provider/parity_test.go: zero out platform-specific AccessManifest
- docs/employer-onepager.md: added 'What data did the tool access?' section
- provider/manifest_test.go (new): AC-1 through AC-8 acceptance tests
- report/manifest_test.go (new): round-trip, backward compat, local run tests
- render/transparency_test.go (new): rendering tests, prohibited-strings,
  golden file compatibility

Key decisions:
- CountingTransport wraps http.RoundTripper, not http.Client, so it
  intercepts all requests transparently through the default transport
- Route patterns use {*}-style wildcards to handle URL-encoded repo
  paths (GitLab %2F decoded by Go's HTTP client)
- Manifest() locks the transport after read to prevent post-fetch requests
  from skewing counts
- never_requested is a static slice per adapter, not generated dynamically
- Patterns like /projects/{*}/merge_requests handle variable-depth project
  paths correctly

Co-Authored-By: Claude <noreply@anthropic.com>
@gkanitz
gkanitz merged commit cdb8d66 into main Jul 6, 2026
1 check passed
@gkanitz
gkanitz deleted the agent/issue-55 branch July 6, 2026 02:22
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.

feat: transparency manifest — attested 'what this tool read' section

1 participant