SYSTEM ARCHITECTURE
From GitHub URL to cited findings.
Two investigators, one Go backend. Issue Lens gathers repository evidence, uses a bounded AI tool loop, and returns a report for human review.
TypeScript / Go / SQLite / Clerk / OpenAI / AWS EC2
REQUEST FLOW
How an investigation runs
Authenticate and submit
The TypeScript client uses Clerk for Google or email sign-in. It submits a public GitHub issue or failed Actions run URL with a session token. Cloudflare and Caddy route the request to Go; the backend validates the token, URL, and run ownership.
Select keys and queue the run
A personal OpenAI key bypasses the shared key's one-AI-run-per-hour allowance, not provider or worker limits. Personal connection keys stay in account-scoped browser-tab storage and are sent with the run, never stored in the report database. An in-memory queue limits concurrent work.
Collect evidence
The issue investigator reads the report, discussion, related issues, and commit-pinned code. The CI investigator collects failed jobs and steps, bounded log excerpts, workflow configuration at the run's head commit, and changed files. Some CI logs require a GitHub token with read access.
Run the bounded tool loop
OpenAI requests read-only tools:
search_issues,search_paths,search_code, andread_file. Go executes those retrieval operations and returns evidence to the model. Each run is capped at 10 model turns, 18 tool operations, 36 GitHub requests, and six minutes.Validate and persist
Findings must reference retrieved evidence IDs. SQLite stores owner-scoped runs, evidence, events, reports, review state, and shared-key usage in a persistent Docker volume. Interrupted runs retain collected evidence; report generation can be retried from saved evidence.
Review and export
The client polls for progress and displays source-linked findings, confidence, open questions, and limitations. The user edits and approves the response draft, then copies it manually or exports the report as Markdown. Approval does not post anything to GitHub.
DEPLOYMENT
One application server
GitHub Actions builds the TypeScript frontend and runs Go tests before deployment over SSH and rsync. Docker Compose runs Caddy and the Go service on EC2. Go serves both the static frontend and REST API; only Caddy exposes public HTTP and HTTPS ports.
BOUNDARIES
Evidence, not an automatic fix
Repository code is never executed, patches are not applied, and responses are not posted automatically. AI mode sends collected evidence to OpenAI. CI credential redaction is best-effort; findings are hypotheses grounded in sources, not proof of a reproduced root cause.