Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/harness/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM public.ecr.aws/docker/library/python:3.12-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
jq \
&& rm -rf /var/lib/apt/lists/*

# The clone token is baked into the image. This image must be treated as a secret
# and stored only in a registry with equivalent access controls.
ARG CLONE_TOKEN

# Configure git to use clone token for HTTPS clones
RUN git config --global url."https://${CLONE_TOKEN}@github.com/".insteadOf "https://github.com/"

WORKDIR /opt/workspace
41 changes: 41 additions & 0 deletions .github/harness/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Harness Resources

Container and scripts for AI-powered automation via
[AgentCore Harness](https://docs.aws.amazon.com/bedrock/latest/userguide/agentcore.html).

## Structure

```
harness/
|-- Dockerfile # Container image for the harness runtime
|-- harness_review.py # Invokes the harness to review PRs (SigV4 + event stream)
`-- prompts/
|-- system.md # System prompt (workspace context)
`-- review.md # PR review task prompt
```

## Current: PR Reviewer

Reviews pull requests on open/reopen via `.github/workflows/pr-ai-review.yml`.

### Authentication

The Dockerfile takes one build arg:

- **`CLONE_TOKEN`** - baked into git config for cloning private repos

The workflow-side review script uses its short-lived **`GITHUB_TOKEN`** to read
existing PR discussion and submit the Harness result. The token is never sent
to the Harness runtime or persisted in the Harness image.

### Building the container

```bash
finch build \
--build-arg CLONE_TOKEN=<pat-for-cloning> \
-t pr-reviewer .github/harness/
```

## Future: Tester

This directory will also house a harness-based test runner.
Loading
Loading