feat: walking skeleton — GitHub repo → metrics → report → HTML (#2) - #13
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n block Build/Validate/Parse round-trip; validation rejects missing coverage, missing verification, bad versions, and unbound subjects. Optional collaboration/cadence sub-structs establish parallel-work seams. ActivitySet carries its full v1 shape in the provider package. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One file per concern registering into the registry; Compute runs all registered concerns deterministically. Table-driven tests cover empty, unmerged-only, mixed, and closed-without-merge activity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…only
Identity is bound to the immutable GitHub account ID resolved through
/users/{login}; PRs by other accounts are excluded even with identical
login text. Paginates via Link headers, filters to the report window,
captures X-OAuth-Scopes for the coverage stamp. httptest fixture tests
assert no content/clone endpoints are ever requested.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sections under templates/sections/ execute in filename order; new report sections are added as new template files. Inline CSS only, no external resources. Absent optional sections render nothing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
coderepute runs against a GitHub repo with a token (flag or GITHUB_TOKEN), writes validated report.json plus self-contained report.html. Integration test runs the pipeline against recorded fixtures and asserts seeded PR titles, branch names, and other accounts' IDs never reach any output. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review round 1 — approvedIndependently verified every acceptance criterion: |
Closes #2
Summary
The tracer bullet for CodeRepute: a Go CLI that produces a real schema-v0 report end-to-end against one GitHub repository, exercising every module seam thinly.
provider—Providerport interface plus the full v1ActivitySettype shape (pull requests, reviews given, review comments written/received; fields may be unpopulated until later slices).provider/github— REST adapter. Identity is bound to the immutable GitHub account ID resolved via/users/{login}— PRs whoseuser.iddiffers are excluded even when the login text matches; git author emails are never consulted. Paginates viaLinkheaders, filters to the report window, capturesX-OAuth-Scopesfor the coverage stamp. No code path clones the repo or reads file contents — tests assert only/users/*and*/pullsendpoints are ever requested.metrics— pure registry; one file per concern registering viainit(pullrequests.gocomputes PRs authored/merged). Follow-ups add files, not edits.report— versioned schema-v0 with mandatorycoveragestamp andverificationblock, optionalcollaboration/cadencesub-structs.Validate/Parsereject documents missing coverage or verification, with bad schema versions, or unbound subjects. Local builds always emit an explicit"status": "unverified"block.render— report JSON → self-contained HTML (inline CSS, zero external resources), composed from per-section templates undertemplates/sections/executed in filename order — new sections are new files.cmd/coderepute— thin wiring: fetch → compute → build → validate → writereport.json+report.html.go vet ./...+go test ./...on every PR.Demo evidence
Built the CLI and ran it against the real repo with
gh auth token:report.json(zero counts are expected — the repo has no PRs yet; account ID 134092781 confirmed against the live API):{ "schema_version": "v0", "generated_at": "2026-06-12T00:27:18.723831Z", "subject": { "platform": "github", "username": "grkanitz", "account_id": "134092781" }, "coverage": { "repos": ["grkanitz/CodeRepute"], "window": { "since": "2025-06-12T00:27:18.151631Z", "until": "2026-06-12T00:27:18.151631Z" }, "token_scope": "admin:public_key, gist, read:org, repo" }, "verification": { "status": "unverified", "reason": "local run; no CI attestation" }, "collaboration": { "pull_requests": { "authored": 0, "merged": 0 } } }report.htmlexcerpt:Tests
TDD red-green throughout: report round-trip + table-driven validation rejections; table-driven metrics; GitHub adapter against recorded
httptestfixtures (including an impostor PR with identical login text but a different account ID, and a privacy assertion that no content/clone endpoint is ever requested); render self-containment and absent-section behavior; CLI end-to-end against fixtures with negative assertions that seeded PR titles, branch names, and other accounts' IDs never appear in either output.🤖 Generated with Claude Code