Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f1e5221
docs: add OpenCode ACP support design
dpolishuk Jan 2, 2026
f928c5b
chore: add .worktrees/ to gitignore
dpolishuk Jan 2, 2026
f0088a0
docs: add OpenCode ACP implementation plan
dpolishuk Jan 2, 2026
723500f
feat(opencode): add OpenCode ACP support
dpolishuk Jan 3, 2026
c180ab8
fix(opencode): handle model via config.json instead of --model flag
dpolishuk Jan 3, 2026
0956b31
feat: complete OpenCode ACP integration with full lifecycle management
dpolishuk Jan 3, 2026
7fdff87
test: add unit and integration tests for OpenCode
dpolishuk Jan 3, 2026
6feb322
feat(opencode): add options/suggestion buttons support
dpolishuk Jan 3, 2026
ba01180
feat(opencode): add git hooks and session tracking
dpolishuk Jan 3, 2026
224ae23
Merge branch 'feature/opencode-hooks'
dpolishuk Jan 3, 2026
2ecbd43
test(opencode): add comprehensive test infrastructure
dpolishuk Jan 3, 2026
07efabb
Merge branch 'feature/opencode-comprehensive-tests'
dpolishuk Jan 3, 2026
8915196
feat: implement Phase 2 integration tests for OpenCode
dpolishuk Jan 3, 2026
d819473
Merge Phase 2: OpenCode Integration Tests
dpolishuk Jan 3, 2026
1e3a778
feat: implement Phase 3 E2E tests for OpenCode
dpolishuk Jan 3, 2026
cc82971
Merge Phase 3: OpenCode E2E Tests
dpolishuk Jan 3, 2026
7017033
feat: implement Phase 4 performance tests for OpenCode
dpolishuk Jan 3, 2026
7d7565a
Merge Phase 4: OpenCode Performance Tests
dpolishuk Jan 3, 2026
a5eb3f3
feat: implement Phase 5 resilience tests for OpenCode
dpolishuk Jan 3, 2026
c754321
Merge Phase 5: OpenCode Resilience Tests
dpolishuk Jan 3, 2026
b4cb993
feat(cli): implement setModel RPC handler
dpolishuk Jan 3, 2026
1053513
added docs
dpolishuk Jan 3, 2026
6897715
docs: add OpenCode session resumption design
dpolishuk Jan 4, 2026
41f0b8e
feat(opencode): add ReasoningProcessor and startCaffeinate
dpolishuk Jan 4, 2026
a2ab262
docs: add OpenCode session resumption implementation plan
dpolishuk Jan 4, 2026
3384e94
feat(acp): add loadSession support for session resumption
dpolishuk Jan 4, 2026
0c6ba15
test(acp): add unit tests for session resumption option
dpolishuk Jan 4, 2026
a58044d
feat(opencode): add session persistence for auto-resume
dpolishuk Jan 4, 2026
c28994c
feat(opencode): wire session resumption in runOpenCode
dpolishuk Jan 4, 2026
c388b18
feat(cli): add --resume-session and --force-new-session flags for ope…
dpolishuk Jan 4, 2026
ec0441a
docs: update feature parity with session resumption status
dpolishuk Jan 4, 2026
d5aafba
docs: add ACP architecture analysis
dpolishuk Jan 4, 2026
886b1ae
docs: add full ACP implementation design
dpolishuk Jan 4, 2026
a4db7f0
feat(acp): add sessionMode option to AcpSdkBackendOptions
dpolishuk Jan 4, 2026
9d29fb1
feat(opencode): add sessionMode option to runOpenCode
dpolishuk Jan 4, 2026
5fe19ed
feat(acp): add sessionMode state tracking to AcpSdkBackend
dpolishuk Jan 4, 2026
c1846db
feat(acp): implement permission mode state management
dpolishuk Jan 4, 2026
cc1f05e
feat(acp): add permission option storage for OpenCode permission modes
dpolishuk Jan 4, 2026
d05bb47
feat(acp): add command parser for terminal commands
dpolishuk Jan 4, 2026
02501c5
feat(acp): add edit/diff extraction for file edits
dpolishuk Jan 4, 2026
25ec4f8
feat(acp): add active edits tracking for cleanup
dpolishuk Jan 4, 2026
65df91d
feat(acp): parse todowrite output and emit plan events
dpolishuk Jan 5, 2026
c014b55
fix(acp): preserve update handling and decouple tests
dpolishuk Jan 5, 2026
b96c91e
fix(acp): validate modes and surface command errors
dpolishuk Jan 5, 2026
054ed45
test(acp): add integration harness for ACP backend
dpolishuk Jan 5, 2026
89badb0
test(acp): cover session commands integration
dpolishuk Jan 5, 2026
4c8b433
test(acp): tighten session command coverage
dpolishuk Jan 5, 2026
432e0be
test(acp): cover todowrite and edit updates
dpolishuk Jan 5, 2026
757bff6
test(acp): cover session mode decisions
dpolishuk Jan 5, 2026
f69520a
docs(acp): add integration tests plan
dpolishuk Jan 5, 2026
a8ab2d7
test(perf): stabilize string memory growth check
dpolishuk Jan 5, 2026
37585af
docs(opencode): add tool result summary design
dpolishuk Jan 5, 2026
480a48b
docs(opencode): add message format migration design
dpolishuk Jan 6, 2026
d93d085
fix: use type 'output' for agent messages to match schema
dpolishuk Jan 19, 2026
70496f5
debug(opencode): add logging to model-output handler
dpolishuk Jan 19, 2026
68650e0
fix(api): revert agent message type changes and restore codex/agentType
dpolishuk Jan 23, 2026
89a7fe7
feat(opencode): implement pretty tool output formatter
dpolishuk Jan 23, 2026
f4ed435
fix(opencode): improve tool result formatting for complex objects
dpolishuk Jan 23, 2026
340d7de
fix(opencode): improve tool formatting with auto-detection
dpolishuk Jan 23, 2026
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
353 changes: 353 additions & 0 deletions .github/workflows/opencode-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,353 @@
name: OpenCode Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
# Fast unit tests - run on every commit
unit-tests:
name: Unit Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20, 24]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Run unit tests
run: yarn test --run src/opencode/__tests__/unit

# Integration tests - run on every commit
integration-tests:
name: Integration Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20, 24]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Run integration tests
run: yarn test --run src/opencode/__tests__/integration

# E2E tests - run on every commit
e2e-tests:
name: E2E Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20, 24]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Run E2E tests
run: yarn test --run src/opencode/__tests__/e2e

# Performance tests - run on every commit but with timeout
performance-tests:
name: Performance Tests
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Run performance tests
run: yarn test --run src/opencode/__tests__/performance

- name: Upload performance metrics
if: always()
uses: actions/upload-artifact@v4
with:
name: performance-metrics
path: |
.performance-output.json
test-results/

# Resilience tests - run on every commit
resilience-tests:
name: Resilience Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20, 24]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Run resilience tests
run: yarn test --run src/opencode/__tests__/resilience

# Full test suite - runs on schedule and manual trigger
full-test-suite:
name: Full Test Suite
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [20, 22, 24]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Build package
run: yarn build

- name: Run all OpenCode tests
run: yarn test --run src/opencode/__tests__

- name: Generate test coverage report
run: yarn test --coverage src/opencode/__tests__ --reporter=json
continue-on-error: true

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-node${{ matrix.node-version }}
path: |
test-results/
coverage/

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 20
uses: codecov/codecov-action@v4
with:
files: ./coverage/coverage-final.json
flags: opencode
name: codecov-opencode
continue-on-error: true

# Test performance regression detection
performance-regression:
name: Performance Regression
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for comparison

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Checkout main branch for baseline
run: |
git checkout main
git pull

- name: Run baseline performance tests
run: |
yarn test --run src/opencode/__tests__/performance > baseline-performance.txt
cat baseline-performance.txt

- name: Checkout PR branch
if: github.event_name == 'pull_request'
run: |
git checkout ${{ github.head_ref }}

- name: Run PR performance tests
run: |
yarn test --run src/opencode/__tests__/performance > pr-performance.txt
cat pr-performance.txt

- name: Compare performance
run: |
echo "Baseline performance:"
cat baseline-performance.txt | grep -E "(Duration|passed|failed)" || true
echo ""
echo "PR performance:"
cat pr-performance.txt | grep -E "(Duration|passed|failed)" || true

- name: Check for significant slowdown
run: |
BASELINE=$(cat baseline-performance.txt | grep -oP '\d+(?=ms)' | head -1 || echo "0")
PR=$(cat pr-performance.txt | grep -oP '\d+(?=ms)' | head -1 || echo "0")

echo "Baseline duration: ${BASELINE}ms"
echo "PR duration: ${PR}ms"

if [ "$PR" -gt "$((BASELINE + 10000))" ]; then
echo "⚠️ Warning: PR is 10+ seconds slower than baseline"
exit 1
fi

- name: Upload performance comparison
if: always()
uses: actions/upload-artifact@v4
with:
name: performance-comparison
path: |
baseline-performance.txt
pr-performance.txt

# Nightly comprehensive test run
nightly-tests:
name: Nightly Comprehensive Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [20, 24]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Run full test suite with coverage
run: |
yarn test --run --coverage src/opencode/__tests__

- name: Generate coverage report
run: yarn test --coverage src/opencode/__tests__ --reporter=json

- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}-node${{ matrix.node-version }}
path: coverage/

- name: Comment coverage on PR
if: github.event_name == 'schedule' && github.ref == 'refs/heads/main'
uses: actions/github-script@v7
with:
script: |
// Post coverage summary as comment
console.log('Coverage report uploaded as artifact')

# Test results summary
test-summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [unit-tests, integration-tests, e2e-tests, performance-tests, resilience-tests]
if: always()

steps:
- name: Download all test results
uses: actions/download-artifact@v4

- name: Generate test summary
run: |
echo "# OpenCode Test Summary" > test-summary.md
echo "" >> test-summary.md
echo "| Job | Status |" >> test-summary.md
echo "|-----|--------|" >> test-summary.md
echo "| Unit Tests | ${{ needs.unit-tests.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> test-summary.md
echo "| Integration Tests | ${{ needs.integration-tests.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> test-summary.md
echo "| E2E Tests | ${{ needs.e2e-tests.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> test-summary.md
echo "| Performance Tests | ${{ needs.performance-tests.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> test-summary.md
echo "| Resilience Tests | ${{ needs.resilience-tests.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> test-summary.md
echo "" >> test-summary.md
cat test-summary.md

- name: Upload test summary
uses: actions/upload-artifact@v4
with:
name: test-summary
path: test-summary.md

- name: Check overall status
run: |
if [[ "${{ needs.unit-tests.result }}" == "failure" ]] ||
[[ "${{ needs.integration-tests.result }}" == "failure" ]] ||
[[ "${{ needs.e2e-tests.result }}" == "failure" ]] ||
[[ "${{ needs.performance-tests.result }}" == "failure" ]] ||
[[ "${{ needs.resilience-tests.result }}" == "failure" ]]; then
echo "❌ Some test suites failed"
exit 1
fi
echo "✅ All test suites passed!"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ pnpm-lock.yaml
.release-notes-temp.md

# npm auth token (never commit)
.npmrc
.npmrc

# Git worktrees
.worktrees/
Loading