Skip to content

Commit e289165

Browse files
committed
chore: add vmk-bench CI workflow, formalize Cycle 8 completions
- .github/workflows/vmk-bench.yml: Windows CI benchmark workflow (build + cold boot timing + binary size + artifact upload) - BACKLOG.md: mark anomalyco#17, anomalyco#19, anomalyco#22 as done - CYCLE.md: update Cycle 8 tasks and exit criteria // vMK: fork-specific benchmark workflow, triggers on vMK-dev branch
1 parent 24c3335 commit e289165

3 files changed

Lines changed: 89 additions & 3 deletions

File tree

‎.github/workflows/vmk-bench.yml‎

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# vMK CI Benchmark — Windows cold boot + binary size
2+
# Triggers: push/PR to vMK-dev, manual dispatch
3+
# Runs: Build binary → benchmark cold boot → upload results
4+
#
5+
# vMK: Fork-specific benchmark workflow for tracking vMK performance
6+
# over time. Not intended for upstream.
7+
8+
name: vmk-bench
9+
10+
on:
11+
push:
12+
branches: [vMK-dev]
13+
pull_request:
14+
branches: [vMK-dev]
15+
workflow_dispatch:
16+
inputs:
17+
runs:
18+
description: "Number of benchmark timing runs"
19+
required: true
20+
default: 5
21+
type: number
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
25+
cancel-in-progress: true
26+
27+
env:
28+
OPENCODE_DISABLE_EMBEDDED_WEB_UI: "1"
29+
30+
jobs:
31+
bench-windows:
32+
runs-on: windows-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
ref: ${{ github.ref }}
37+
38+
- uses: oven-sh/setup-bun@v2
39+
with:
40+
bun-version-file: package.json
41+
42+
- name: Install dependencies
43+
run: bun install --frozen-lockfile
44+
45+
- name: Build binary (--single --skip-embed-web-ui)
46+
run: |
47+
bun run packages/opencode/script/build.ts --single --skip-embed-web-ui
48+
timeout-minutes: 15
49+
50+
- name: Smoke test (--version)
51+
run: |
52+
$bin = "packages/opencode/dist/opencode-windows-x64/bin/opencode-vMK.exe"
53+
if (-not (Test-Path $bin)) { throw "Binary not found: $bin" }
54+
$ver = & $bin --version
55+
if ($LASTEXITCODE -ne 0) { throw "Smoke test failed (exit $LASTEXITCODE)" }
56+
Write-Host "Binary version: $ver"
57+
$size = (Get-Item $bin).Length
58+
Write-Host "Binary size: $([math]::Round($size / 1MB, 2)) MB"
59+
shell: pwsh
60+
61+
- name: Run benchmark
62+
id: bench
63+
run: |
64+
$runs = if ("${{ inputs.runs }}") { ${{ inputs.runs }} } else { 5 }
65+
$label = "ci-$(Get-Date -Format 'yyyyMMdd-HHmmss')"
66+
& "scripts/vmk-bench.ps1" -Runs $runs -WarmupRuns 2 -Label $label -Save
67+
if ($LASTEXITCODE -ne 0) { throw "Benchmark failed" }
68+
# Read saved result for summary
69+
$latest = Get-ChildItem "docs/metricas/bench-*.json" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
70+
$data = Get-Content $latest.FullName -Raw | ConvertFrom-Json
71+
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "## vMK Benchmark Results"
72+
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Metric | Value |"
73+
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "|---|---|"
74+
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Binary Size | $($data.binary.size_mb) MB |"
75+
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Cold boot --help (avg) | $($data.performance.cold_boot_help_ms.avg) ms |"
76+
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Cold boot --help (p95) | $($data.performance.cold_boot_help_ms.p95) ms |"
77+
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Smoke test (--version) | $(if ($data.smoke.version) { 'PASS' } else { 'FAIL' }) |"
78+
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Runs | $($data.performance.cold_boot_help_ms.n) |"
79+
shell: pwsh
80+
81+
- name: Upload benchmark artifact
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: vmk-bench-results
85+
path: docs/metricas/bench-*.json
86+
retention-days: 90

‎BACKLOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
| 16 | LSP clients Array — memory leak histórico | ✅ Hecho | Cycle7 | Media | ✅ | M | 2026-07-02: idle TTL + LRU files. Ver #12 y #13 |
3737
| 17 | Backlog DoR formalization + grooming script | ✅ Hecho | Cycle8 | Alta | ✅ | S | Script funcional, columnas DoR/Ciclo/Estimación existentes. 2026-07-02: verificada cobertura 77.3% (5 items sin DoR: #9 upstream-blocked, #19/#20/#21/#22 pendientes) |
3838
| 18 | vmk-bench.ps1 estabilización (warmup/median/GC) | ✅ Hecho | Cycle8 | Media | ✅ | S | 3 warmup runs, median, p95, GC.Collect() entre runs. Median: 1302ms, p95: 1465ms |
39-
| 19 | CI benchmarks en GitHub Actions (Windows runner) | 🟡 Pendiente | Cycle8 | Media | ❌ | M | Job dedicado para baseline estable cross-run |
39+
| 19 | CI benchmarks en GitHub Actions (Windows runner) | ✅ Hecho | Cycle8 | Media | ✅ | M | 2026-07-02: `.github/workflows/vmk-bench.yml` creado. Trigger en push/PR a vMK-dev + manual. Build → benchmark → upload artifact. Primer run en próximo push. |
4040
| 20 | Docs arquitectura: Effect patterns + InstanceState | 🟡 Pendiente | Cycle8 | Alta | ❌ | L | `docs/architecture/effect-patterns.md` + `instance-state.md` |
4141
| 21 | Test patches: @npmcli/agent v5, virtua 0.49.2, pacote 22 | 🟡 Pendiente | Cycle8 | Media | ❌ | M | Verificar aplicabilidad patches en versiones actuales |
4242
| 22 | Fix `any` types restantes: aisdk.ts | ✅ Hecho | Cycle8 | Alta | ✅ | S | 2026-07-02: `type SDK = any` → `interface SDK { languageModel(...) }`, `Record<string, any>` → `Record<string, unknown>` + cast en timeout. versioning.ts no existe en el repo. typecheck pasa. |

‎CYCLE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
| 4 | Quality gate + TUI tests 7/7 | Media | ✅ Done | Binary smoke, CLI tests, providers, models, serve 5s. All green |
2222
| 5 | Backlog grooming (#17) | Fácil | ✅ Done | vmk-backlog-groom.ps1 validado. DoR 77.3% (5/22 sin DoR). Script funcional |
2323
| 6 | Fix any types — aisdk.ts (#22) | Fácil | ✅ Done | `SDK = any` → interface tipada. `Record<string, any>` → `Record<string, unknown>`. typecheck OK |
24-
| 7 | CI benchmarks GitHub Actions (#19) | Media | 🟡 Pendiente | — |
24+
| 7 | CI benchmarks GitHub Actions (#19) | Media | ✅ Done | `.github/workflows/vmk-bench.yml` creado. Push/PR vMK-dev + manual. |
2525

2626
## Exit Criteria
2727

@@ -30,7 +30,7 @@
3030
- [x] Subagentes confirman 0 errores nuevos
3131
- [x] Backlog grooming script funcional + DoR reporte
3232
- [x] aisdk.ts sin `any` types
33-
- [ ] CI benchmarks workflow en GitHub Actions
33+
- [x] CI benchmarks workflow creado (.github/workflows/vmk-bench.yml)
3434

3535
---
3636

0 commit comments

Comments
 (0)