Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b68cba0
Use token type
mdehoog Dec 23, 2021
a826bb2
Pass upstream URL to token generation
mdehoog Dec 24, 2021
ce8ea69
Adapt .gitignore for Jetbrains IDE use
Nov 28, 2023
ebbf5d7
Also compute Authorization headers for get fetch similar to ls-ref
Nov 28, 2023
83ae312
Remove Google specific implementations
Nov 29, 2023
5a5a0b0
Add comprehensive integration tests and production readiness improvem…
jrepp Nov 6, 2025
bc716eb
Add GitHub Actions CI/CD pipeline with local execution support
jrepp Nov 6, 2025
b9e5836
Fix code formatting and go.mod tidiness
jrepp Nov 6, 2025
cb9ec32
Fix critical bugs and linting issues in new code
jrepp Nov 6, 2025
5daf89a
Re-apply test helper fixes (errcheck and unused parameter)
jrepp Nov 6, 2025
f46767b
Fix all linting issues in pre-existing code
jrepp Nov 6, 2025
66533c6
Simplify slice expression in google/backup.go
jrepp Nov 6, 2025
969c91a
Fix remaining linting issues and configure linter exclusions
jrepp Nov 6, 2025
90fd9d0
Add OIDC authentication infrastructure
jrepp Nov 6, 2025
6a3d1c6
Add development token generator tool
jrepp Nov 6, 2025
30a3553
Add Dex OIDC provider configuration
jrepp Nov 6, 2025
7dc9233
Add OIDC support to main server
jrepp Nov 6, 2025
98e6e5b
Fix upstream authentication for anonymous access
jrepp Nov 6, 2025
8238d20
Add storage metrics and health check support
jrepp Nov 6, 2025
cb5cc51
Add Docker Compose configurations for OIDC development
jrepp Nov 6, 2025
b2d609e
Add OIDC testing and token management scripts
jrepp Nov 6, 2025
51cfaae
Update dependencies for OIDC and metrics
jrepp Nov 6, 2025
b12e118
Reorganize test infrastructure with unit/integration separation
jrepp Nov 6, 2025
68b7dbc
Parallelize GitHub Actions CI workflow
jrepp Nov 6, 2025
b477722
Add comprehensive testing and workflow documentation
jrepp Nov 6, 2025
f17ee06
Consolidate documentation and Docker Compose configurations
jrepp Nov 6, 2025
57ee769
Add copyright headers to new modules
jrepp Nov 6, 2025
49c3d12
Merge pull request #1 from jrepp/oidc-auth-and-parallel-ci
jrepp Nov 6, 2025
ebd88b8
feat: add offline ls-refs support with local cache fallback
jrepp Nov 6, 2025
4f4a741
test: add comprehensive unit tests for offline ls-refs functionality
jrepp Nov 7, 2025
518a892
fix: address linting issues and reduce code complexity
jrepp Nov 7, 2025
26b65bb
fix: resolve data race in UpstreamEnabled configuration
jrepp Nov 7, 2025
0744312
Merge pull request #2 from jrepp/feature/offline-ls-refs-support
jrepp Nov 7, 2025
287ba7b
docs: enhance README with comprehensive offline mode documentation
jrepp Nov 7, 2025
7eea116
Merge pull request #3 from jrepp/feature/enhance-offline-docs
jrepp Nov 7, 2025
a94915d
feat: add automated release pipeline with GoReleaser
jrepp Nov 7, 2025
81c114a
Merge pull request #4 from jrepp/feature/github-release-pipeline
jrepp Nov 7, 2025
be730a0
feat: add token-efficient AI agent workflows
jrepp Nov 7, 2025
6f09578
Merge pull request #5 from jrepp/feature/agent-workflows
jrepp Nov 7, 2025
8dbd2a9
merge: integrate PR #11 - pass upstream URL to token generation
jrepp Nov 7, 2025
8435933
merge: integrate PR #10 - use token type for authentication
jrepp Nov 7, 2025
2b7e66b
docs: add RFC-002 on GitHub OAuth and multi-tenancy architecture
jrepp Nov 7, 2025
3039400
docs: update repository references to goblet
jrepp Nov 7, 2025
f1c6b09
merge: integrate roehrijn/goblet infrastructure and tooling
jrepp Nov 7, 2025
4b29a46
fix: format code and remove unused grpc-gateway dependency
jrepp Nov 7, 2025
9608e20
fix: update test code for new TokenSource signature and address linting
jrepp Nov 7, 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
75 changes: 75 additions & 0 deletions .claude/agents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Agent Workflows

Token-efficient AI agent workflows for Goblet development tasks.

## Available Agents

| Agent | Purpose | Key Tasks |
|-------|---------|-----------|
| **release.md** | Manage releases | Version determination, GoReleaser workflow, artifact verification |
| **testing.md** | Run test suites | CI pipeline, offline mode tests, race detection |
| **offline-mode.md** | Verify offline features | Fallback testing, thread safety, monitoring |
| **documentation.md** | Maintain docs | Standards, structure, conventional commits |

## Usage

Each agent provides:
- **Core Workflow**: Step-by-step process for the task
- **Quick Commands**: Copy-paste command reference
- **Key Files**: Related source files and documentation
- **Verification Steps**: How to validate success

## Design Principles

1. **Token Efficient**: Concise, actionable content
2. **Self-Contained**: Each agent is independently usable
3. **Standards-Based**: Uses project conventions (GoReleaser, conventional commits)
4. **Practical**: Real commands, not abstract concepts

## When to Use

**Release Agent**: Before creating a version tag
**Testing Agent**: Before committing code changes
**Offline Mode Agent**: When modifying cache/offline features
**Documentation Agent**: When updating project docs

## Integration with Development

These agents complement:
- `Taskfile.yml` - Development task automation
- `.github/workflows/` - CI/CD pipelines
- `RELEASING.md` - Full release documentation
- `testing/TEST_COVERAGE.md` - Test details

## Contributing Agent Workflows

When adding new agents:
1. Keep under 2 pages (200-300 lines)
2. Lead with core workflow
3. Include quick command reference
4. Link to detailed documentation
5. Focus on actionable steps
6. Use existing agents as templates

## Example Usage

```bash
# Before creating a release
cat .claude/agents/release.md
# Follow the workflow: verify CI, check commits, create tag

# When writing offline mode tests
cat .claude/agents/offline-mode.md
# Use the test commands and verification steps

# For test-driven development
cat .claude/agents/testing.md
# Run baseline tests, implement, verify with CI
```

## Project Context

**Repository**: github-cache-daemon (Goblet)
**Purpose**: Git caching proxy server
**Key Technologies**: Go, GoReleaser, GitHub Actions
**Main Features**: Offline mode, multi-platform releases, comprehensive testing
142 changes: 142 additions & 0 deletions .claude/agents/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Documentation Agent

Maintain comprehensive documentation following project standards.

## Documentation Structure

```
├── README.md # Main project overview, usage
├── RELEASING.md # Release process (GoReleaser)
├── CHANGELOG.md # Keep a Changelog format
├── CONTRIBUTING.md # Contribution guidelines
├── TESTING.md # Test infrastructure overview
├── testing/TEST_COVERAGE.md # Detailed test coverage
├── testing/README.md # Test details
└── .claude/agents/*.md # Agent workflows
```

## Documentation Standards

**Format**: GitHub-flavored Markdown
**Style**:
- Clear, concise, actionable
- Code blocks with language hints
- Examples before explanations
- Commands before concepts

**Structure**:
1. Quick start / TL;DR section
2. Detailed explanations
3. Examples and code snippets
4. Troubleshooting (if applicable)
5. Related resources

## Conventional Commits for Docs

```bash
# Documentation changes
git commit -m "docs: update offline mode configuration examples"
git commit -m "docs: add troubleshooting section to RELEASING.md"
git commit -m "docs: clarify semantic versioning guidelines"

# Documentation fixes
git commit -m "fix(docs): correct Docker image registry URL"
```

## Key Documentation Areas

### 1. README.md
- Project overview and purpose
- Quick start usage
- Offline mode features
- Testing instructions
- Basic configuration

### 2. RELEASING.md
- Complete release process
- Conventional commit guidelines
- GoReleaser workflow
- Troubleshooting releases
- Release checklist

### 3. CHANGELOG.md
- Follow [Keep a Changelog](https://keepachangelog.com/)
- Semantic versioning links
- Group by: Added, Changed, Fixed, Deprecated, Removed, Security
- Update on each release (automated by GoReleaser)

### 4. Testing Documentation
- Test coverage details (`testing/TEST_COVERAGE.md`)
- Test infrastructure (`testing/README.md`)
- Quick test commands in README

## Documentation Workflow

1. **When adding features**
- Update README.md with usage
- Add examples and configuration
- Update test documentation if applicable
- Consider agent workflow updates

2. **When fixing bugs**
- Add troubleshooting section if useful
- Update examples if bug was in docs

3. **When releasing**
- Verify CHANGELOG.md updated (automatic)
- Check version references
- Verify all new features documented

4. **For breaking changes**
- Add migration guide
- Update UPGRADING.md
- Clear examples of before/after
- Use `BREAKING CHANGE:` in commit

## Documentation Verification

```bash
# Check markdown formatting
markdownlint **/*.md

# Verify links
markdown-link-check README.md

# Test code examples
# Extract and run code blocks to verify accuracy
```

## Writing Guidelines

**Code Examples**:
- Include full commands, not fragments
- Show expected output
- Use realistic paths and values
- Test before documenting

**Structure**:
- Use headers (##, ###) for organization
- Bullet points for lists
- Numbered lists for sequences
- Code fences with language hints

**Cross-references**:
- Link to related docs
- Reference specific files with full paths
- Use anchor links for long documents

## Agent Workflow Documentation

Agent files (`.claude/agents/*.md`) should:
- Be concise (1-2 pages max)
- Lead with core workflow
- Include quick command reference
- Link to detailed docs
- Focus on actionable steps

## Related Resources

- [Conventional Commits](https://www.conventionalcommits.org/)
- [Keep a Changelog](https://keepachangelog.com/)
- [Semantic Versioning](https://semver.org/)
- [GitHub Flavored Markdown](https://github.github.com/gfm/)
94 changes: 94 additions & 0 deletions .claude/agents/offline-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Offline Mode Verification Agent

Verify offline mode functionality and resilience features.

## Core Capabilities

Goblet automatically falls back to local cache when upstream is unavailable:
- ls-refs requests served from local git repository
- Graceful degradation during outages
- Thread-safe configuration with atomic operations
- Staleness warnings (>5 minutes old refs)

## Verification Workflow

1. **Test automatic fallback**
```bash
# Integration test with warm cache
go test ./testing -v -run TestOfflineModeWithWarmCache

# Upstream failure scenarios
go test ./testing -v -run TestUpstreamFailureFallback
```

2. **Test thread safety**
```bash
# Race detection for concurrent access
go test -race ./testing -run TestConcurrentOfflineRequests
go test -race ./testing -run "Offline"
```

3. **Verify configuration**
- Default: `UpstreamEnabled` = true with auto-fallback
- Testing: Use `SetUpstreamEnabled(&false)` to disable upstream entirely
- Thread-safe: Uses atomic operations for concurrent access

## Expected Behaviors

**Normal operation** (upstream available):
- Forwards ls-refs to upstream
- Caches response locally
- Serves fetches from cache when possible

**Upstream failure** (network down):
- Detects failure on ls-refs
- Reads refs from local git repo
- Logs fallback event
- Serves cached refs to client

**Staleness warnings**:
- Logs warning if refs >5 minutes old
- Format: "Warning: serving stale ls-refs for /path (last update: Xm ago)"

## Monitoring Log Patterns

```bash
# Fallback events
"Upstream ls-refs failed (connection refused), attempting local fallback"

# Stale cache warnings
"Warning: serving stale ls-refs for /cache/path (last update: 10m ago)"
```

## Limitations

- Fetch operations for uncached objects still fail (expected)
- Cold cache (no prior fetches) will error when upstream down (expected)
- Only ls-refs can be served offline, not fetch with new objects

## Key Configuration

```go
// Production (default) - auto-fallback enabled
config := &goblet.ServerConfig{
LocalDiskCacheRoot: "/path/to/cache",
// UpstreamEnabled defaults to true
}

// Testing - disable upstream entirely
falseValue := false
config.SetUpstreamEnabled(&falseValue)
```

## Test Coverage

- 4 integration tests: End-to-end offline scenarios
- 8 unit tests: Edge cases, concurrency, filtering
- Thread safety verified with race detector
- See `testing/TEST_COVERAGE.md` for details

## Related Documentation

- `README.md` - Offline mode features and configuration
- `testing/TEST_COVERAGE.md` - Test details
- `testing/README.md` - Test infrastructure
58 changes: 58 additions & 0 deletions .claude/agents/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Release Agent

Guide releases using GoReleaser with semantic versioning and conventional commits.

## Core Workflow

1. **Verify readiness**
- Check `gh run list --branch main --limit 1` for CI status
- Run `git log --oneline -10` to verify conventional commits
- Run `task ci` locally to ensure all checks pass

2. **Version determination**
- MAJOR (v2.0.0): Breaking changes, incompatible API
- MINOR (v1.1.0): New features, backwards compatible
- PATCH (v1.0.1): Bug fixes only

3. **Create release**
```bash
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin vX.Y.Z
gh run watch
```

4. **Verify artifacts**
- Check `gh release view vX.Y.Z` for all 5 platform archives
- Verify checksums.txt exists
- Test Docker image: `docker pull ghcr.io/jrepp/goblet-server:X.Y.Z`

## Conventional Commit Types

- `feat:` → Features (MINOR bump)
- `fix:` → Bug fixes (PATCH bump)
- `feat!:` or `BREAKING CHANGE:` → Major version bump
- `perf:`, `docs:`, `test:` → Included in changelog
- `chore:`, `ci:` → Excluded from changelog

## Quick Commands

```bash
# Test locally before release
goreleaser build --snapshot --clean
goreleaser check

# Create pre-release
git tag -a v1.0.0-rc.1 -m "Release candidate"
git push origin v1.0.0-rc.1

# Delete failed release
gh release delete vX.Y.Z
git push origin :refs/tags/vX.Y.Z
git tag -d vX.Y.Z
```

## Key Files

- `.goreleaser.yml` - Build configuration
- `.github/workflows/release.yml` - CI pipeline
- `RELEASING.md` - Full documentation
Loading