Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f44cfd2
mod: initialize Go module for darepo-client
Roasbeef Nov 12, 2025
aae1f75
db: add initial schema migration and sqlc configuration
Roasbeef Nov 12, 2025
6087a59
db: add migration infrastructure with replacerFS support
Roasbeef Nov 12, 2025
30af2db
db: implement core database abstractions and utilities
Roasbeef Nov 12, 2025
112e35f
db: implement SQLite backend with WAL mode and backup support
Roasbeef Nov 12, 2025
e7ca891
db: implement PostgreSQL backend with connection pooling
Roasbeef Nov 12, 2025
9bc7b46
db: add test infrastructure with build tag backend selection
Roasbeef Nov 12, 2025
46e6de3
db: add comprehensive migration tests
Roasbeef Nov 12, 2025
f156454
db/sqlc: add generated database code and custom extensions
Roasbeef Nov 12, 2025
849bf57
build: add sqlc code generation and schema merge tooling
Roasbeef Nov 12, 2025
976c0ae
build: add Makefile with database and code generation targets
Roasbeef Nov 12, 2025
b4deaf7
tools: initialize build tools module
Roasbeef Nov 12, 2025
dd7d600
tools/linters: add custom line length linter with log exclusions
Roasbeef Nov 12, 2025
e387f1b
tools: add optimized Docker image for linting
Roasbeef Nov 12, 2025
3118129
ci: add golangci-lint configuration
Roasbeef Nov 12, 2025
604c37c
ci: add reusable GitHub Actions composite actions
Roasbeef Nov 12, 2025
97309eb
ci: add main GitHub Actions workflow
Roasbeef Nov 12, 2025
efe0a0c
ci: add Go version consistency checker script
Roasbeef Nov 12, 2025
3f1e4ca
build: add CI and development workflow targets to Makefile
Roasbeef Nov 12, 2025
3f869f7
ci: fix typo in cleanup-space action
Roasbeef Nov 13, 2025
d365dba
ci: refactor check-go-version.sh to avoid eval
Roasbeef Nov 13, 2025
c273777
tools: remove duplicate .golangci.yml configuration
Roasbeef Nov 13, 2025
1ae2662
multi: fix linter issues
Roasbeef Nov 13, 2025
801174f
db: fix linter issues and test failure
Roasbeef Nov 13, 2025
008aa60
"Claude PR Assistant workflow"
Roasbeef Nov 13, 2025
c8c523d
"Claude Code Review workflow"
Roasbeef Nov 13, 2025
fa3999f
agents: first draft of agent related files
Roasbeef Nov 13, 2025
d90c222
ci: add workflow to ensure agent files kept in sync
Roasbeef Nov 13, 2025
9eec310
scripts: improve script error handling
Roasbeef Nov 13, 2025
e0d1a15
multi: add server, cli, rpc, logging and config scaffolding
Nov 13, 2025
84b3959
scripts: dockerized proto gen + falafel
bhandras Nov 13, 2025
b56f809
client: add client as submodule
bhandras Nov 13, 2025
06275cb
build: self documenting help
bhandras Nov 13, 2025
cac110f
build: remove unused tags
bhandras Nov 13, 2025
2bc4ddb
build: fix linter issues
bhandras Nov 13, 2025
6bf647f
build: add version and deployment info package
Roasbeef Nov 13, 2025
8b75d21
build: add deterministic build targets and improve release process
Roasbeef Nov 13, 2025
f39ac00
build: ignore locally built binaries
Roasbeef Nov 13, 2025
9995992
multi: update module and package names to darepo-client
Roasbeef Nov 14, 2025
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
38 changes: 38 additions & 0 deletions .github/actions/cleanup-space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Clean up runner disk space"
description: "Removes large, non-essential toolsets to free up disk space on the runner."

runs:
using: "composite"
steps:
- name: Free up disk space
shell: bash
run: |
echo "Removing large toolsets to free up disk space..."
echo "Disk space before cleanup:"
df -h

# Remove dotnet to save disk space.
sudo rm -rf /usr/share/dotnet
# Remove android to save disk space.
sudo rm -rf /usr/local/lib/android
# Remove ghc to save disk space.
sudo rm -rf /opt/ghc
# Remove large packages.
sudo rm -rf /usr/share/swift
sudo rm -rf /usr/local/julia*
sudo rm -rf /opt/hostedtoolcache

# Remove docker images to save space.
docker image prune -a -f || true

# Remove large apt packages.
sudo apt-get remove -y '^aspnetcore-.*' '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*' '^mysql-.*' azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri 2>/dev/null || true
sudo apt-get autoremove -y
sudo apt-get clean

# Remove caches.
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

echo "Disk space after cleanup:"
df -h
15 changes: 15 additions & 0 deletions .github/actions/rebase/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Rebase on to the PR target base branch"
description: "A reusable workflow that's used to rebase the PR code on to the target base branch."

runs:
using: "composite"

steps:
- name: fetch and rebase on ${{ github.base_ref }}
shell: bash
run: |
git remote add upstream https://github.com/${{ github.repository }}
git fetch upstream ${{ github.base_ref }}:refs/remotes/upstream/${{ github.base_ref }}
export GIT_COMMITTER_EMAIL="darepo-ci@example.com"
export GIT_COMMITTER_NAME="Darepo CI"
git rebase upstream/${{ github.base_ref }}
90 changes: 90 additions & 0 deletions .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: "Setup Golang environment"
description: "A reusable workflow that's used to set up the Go environment and cache."
inputs:
go-version:
description: "The version of Golang to set up"
required: true
key-prefix:
description: "A prefix to use for the cache key, to separate cache entries from other workflows"
required: false
use-build-cache:
description: "Whether to use the build cache"
required: false
# Boolean values aren't supported in the workflow syntax, so we use a
# string. To not confuse the value with true/false, we use 'yes' and 'no'.
default: 'yes'

runs:
using: "composite"

steps:
- name: setup go ${{ inputs.go-version }}
uses: actions/setup-go@v5
with:
go-version: '${{ inputs.go-version }}'
cache: 'false'

# When we run go build or go test, the Go compiler calculates a signature
# for each package based on the content of its `.go` source files, its
# dependencies, and the compiler flags. It then checks the restored build
# cache for an entry matching that exact signature to speed up the jobs.
# - Cache Hit: If an entry exists (meaning the source files and
# dependencies haven't changed), it reuses the compiled artifact directly
# from the cache.
# - Cache Miss: If no entry exists (because we changed a line of code), it
# recompiles that specific package and stores the new result in the cache
# for the next time.
- name: go cache
if: ${{ inputs.use-build-cache == 'yes' }}
uses: actions/cache@v4
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build

# The key is used to create and later look up the cache. It's made of
# four parts:
# - The base part is made from the OS name, Go version and a
# job-specified key prefix. Example: `linux-go-1.25.3-unit-test-`.
# It ensures that a job running on Linux with Go 1.25 only looks for
# caches from the same environment.
# - The unique part is the `hashFiles('**/go.sum')`, which calculates a
# hash (a fingerprint) of the go.sum file.
key: ${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-${{ hashFiles('**/go.sum') }}

# The restore-keys provides a list of fallback keys. If no cache
# matches the key exactly, the action will look for a cache where the
# key starts with one of the restore-keys. The action searches the
# restore-keys list in order and restores the most recently created
# cache that matches the prefix. Once the job is done, a new cache is
# created and saved using the new key.
restore-keys: |
${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-

# The complete, downloaded source code of all our dependencies (the
# libraries darepo project imports). This prevents the go command from having
# to re-download every dependency from the internet on every single job
# run. It's like having a local library of all the third-party code darepo
# needs.
- name: go module cache
if: ${{ inputs.use-build-cache == 'no' }}
uses: actions/cache@v4
with:
# Just the module download cache.
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-no-build-cache-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ inputs.go-version }}-${{ inputs.key-prefix }}-no-build-cache-

- name: set GOPATH
shell: bash
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
49 changes: 49 additions & 0 deletions .github/scripts/check-agent-docs-sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env bash

# check-agent-docs-sync.sh verifies that CLAUDE.md and AGENTS.md are
# identical. These files must be kept in sync as they serve as aliases for
# different AI agent naming conventions.

set -e

# Color codes for output.
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color

CLAUDE_FILE="CLAUDE.md"
AGENTS_FILE="AGENTS.md"

# Check if both files exist.
if [[ ! -f "$CLAUDE_FILE" ]]; then
echo -e "${RED}ERROR: $CLAUDE_FILE not found${NC}"
exit 1
fi

if [[ ! -f "$AGENTS_FILE" ]]; then
echo -e "${RED}ERROR: $AGENTS_FILE not found${NC}"
exit 1
fi

# Compare files byte-by-byte.
if cmp -s "$CLAUDE_FILE" "$AGENTS_FILE"; then
echo -e "${GREEN}✓ $CLAUDE_FILE and $AGENTS_FILE are identical${NC}"
exit 0
else
echo -e "${RED}ERROR: $CLAUDE_FILE and $AGENTS_FILE are not identical${NC}"
echo -e "${YELLOW}"
echo "These files must be kept in sync. They serve as aliases for"
echo "different AI agent naming conventions (some projects use"
echo "CLAUDE.md, others use AGENTS.md)."
echo ""
echo "To fix this, ensure both files have identical content:"
echo " cp $CLAUDE_FILE $AGENTS_FILE"
echo " # OR"
echo " cp $AGENTS_FILE $CLAUDE_FILE"
echo ""
echo "Differences:"
echo -e "${NC}"
diff -u "$CLAUDE_FILE" "$AGENTS_FILE" || true
exit 1
fi
35 changes: 35 additions & 0 deletions .github/workflows/agent-docs-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Agent Docs Sync Check

on:
push:
branches:
- "master"
pull_request:
branches:
- "*"
merge_group:
branches:
- "master"

permissions:
contents: read

concurrency:
# Cancel any previous workflows if they are from a PR or push.
group: agent-docs-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
check-agent-docs-sync:
name: Check CLAUDE.md and AGENTS.md are in sync
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v5

- name: Check agent docs sync
run: ./.github/scripts/check-agent-docs-sync.sh
57 changes: 57 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}

Please review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security concerns
- Test coverage

Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.

Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.

# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

50 changes: 50 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read

# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'

# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'

Loading
Loading