Skip to content

Initial Build - #1

Merged
coolamit merged 21 commits into
masterfrom
feature/initial-build
Aug 2, 2026
Merged

Initial Build#1
coolamit merged 21 commits into
masterfrom
feature/initial-build

Conversation

@coolamit

@coolamit coolamit commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Themis: a composite GitHub Action that runs Open Code Review (OCR) CLI on pull requests and publishes findings as inline review comments via a static, dependency-free Go binary.

What's included

  • themis-publish Go binary (stdlib only, zero external dependencies):
    • Strict decoder for OCR's JSON output, with a schema-drift safety net that suggests pinning ocr-version
    • Content fingerprinting so findings survive line drift, LLM rewording, and whitespace churn — no duplicate comments across pushes
    • Comment rendering with severity icons and one-click GitHub suggestion blocks, guarded so a stale suggestion can never apply a wrong patch
    • Severity-based comment budgeting (critical findings exempt up to their own cap) plus an overflow summary comment so nothing is ever dropped
    • GitHub REST publisher: reviews batched at 50 comments, individual retry on 422, posts nothing when there is nothing new
    • Optional merge gate via fail-on-severity (exit code 2, distinct from operational failures)
  • Composite action (action.yml): 21 inputs, performs its own checkout of the trusted base, credential preflight that distinguishes fork PRs from misconfiguration, LLM connectivity gate, and a label-triggered manual mode that verifies the labeler has write access
  • Helper scripts: OCR install with sha256 verification for pinned versions, ref resolution that fetches the PR head as git objects only (never checked out), label guard, and always-run label cleanup — all shellcheck-clean
  • Workflows: CI (gofmt, vet, tests, shellcheck, bats, actionlint, input-consistency check) and release (master-ancestry guard, static linux/amd64 build, SHA-256 checksums, moving latest tag)
  • Docs: README with provider recipes, the trigger-mode matrix, security notes, and versioning guidance, plus a copy-paste example workflow

Testing

  • Go unit tests across all four packages, including real OCR v1.8.4 output fixtures and an httptest-backed publisher suite
  • 20 bats tests for the scripts, including a real git-origin fixture for merge-base resolution
  • actionlint on the workflows and example; a consistency script cross-checks every declared action input

coolamit added 21 commits August 2, 2026 04:41
…n dedupe, strict 422-only retries, HTTP timeout, response size guard, and a remove-label cleanup that really always exits 0
…elease checksums, fail closed on unverified pinned OCR versions, pin actionlint in CI, bound all downloads, and tighten input validation across the Go packages
…write-scoped publish job, serialize releases, cancel superseded CI runs, add job timeouts, and sweep all shell scripts with shellcheck
… consistency script, a maintain-permission test for the label guard, clearer base-fetch diagnostics, and error propagation in the checksum test helper
…fingerprints, a strict trailing-data check that catches what More() missed, the two curl calls the timeout sweep skipped, case-insensitive label matching, tolerant trailing-newline suggestions, GHES-safe OCR lookup, bounded git subprocess, and idempotent releases
…orrect the checksum file header to match fail-closed behavior, and fix a stale comment about the suggestion guard's comparison
…generate line info via overflow, chunk large overflow summaries, and bring release validation to CI parity
…ort window with a warn-and-proceed checksum policy, and add the pin hint to the status error
… by git itself, with whole-repo guardrails and a clean skip when every changed file is ignored
…listing commands for Bedrock and document OCR's default review concurrency.
@coolamit
coolamit merged commit fc79577 into master Aug 2, 2026
1 check passed
@coolamit
coolamit deleted the feature/initial-build branch August 2, 2026 21:07
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