Skip to content

Add Yardstick workflow for continuous quality metrics#1275

Open
LeexLee94 wants to merge 2 commits intoruvnet:mainfrom
LeexLee94:claude/vibecode-single-action-Jtpqy
Open

Add Yardstick workflow for continuous quality metrics#1275
LeexLee94 wants to merge 2 commits intoruvnet:mainfrom
LeexLee94:claude/vibecode-single-action-Jtpqy

Conversation

@LeexLee94
Copy link

Summary

Introduces a comprehensive GitHub Actions workflow that automatically measures and reports code quality metrics on every PR and push to main.

Key Changes

  • New workflow file: .github/workflows/yardstick.yml that runs on pull requests, pushes to main, and manual dispatch
  • Metrics collected:
    • Source code statistics (lines of code, file count, test coverage)
    • TypeScript type safety (error count)
    • Test results (pass/fail counts, line coverage percentage)
    • Security audit (vulnerability counts by severity)
    • Dependency inventory (production and dev dependencies)
    • Build status and duration
  • Reporting:
    • Generates a summary table in GitHub Actions step summary
    • Posts/updates a comment on pull requests with quality snapshot
    • Intelligently manages PR comments (updates existing Yardstick comment instead of creating duplicates)

Implementation Details

  • Uses Node.js 20 with npm for dependency management
  • Extracts metrics from Jest test results, TypeScript compiler output, and npm audit
  • Gracefully handles missing data with fallback values
  • All steps continue on error to ensure the workflow completes even if individual checks fail
  • PR comments are only posted on pull request events, not on push to main

https://claude.ai/code/session_01BVecxWKHe7dRZ9GEPHDnJz

claude added 2 commits March 2, 2026 21:16
Single-action workflow that measures what matters on every PR and push:
source lines, TypeScript errors, test pass/fail, line coverage,
vulnerability counts, dependency totals, and build time.

Results post as a GitHub Step Summary and an auto-updating PR comment
so the state of the codebase is visible without digging.

https://claude.ai/code/session_01BVecxWKHe7dRZ9GEPHDnJz
…onfig

The HNSW index already supported quantization via its internal `Quantizer`
class and the `HNSWConfig.quantization` field, but the public
`AgentDBAdapterConfig` had no way to enable it — users could not activate
the 4x-32x memory reduction or the corresponding search speedup without
patching internal code.

Changes:
- Add `hnswEfSearch: number` (default 100) to `AgentDBAdapterConfig`
  so the search-time beam width is independently tunable from the
  construction-time `hnswEfConstruction`
- Add `quantization?: QuantizationConfig` to `AgentDBAdapterConfig`
  with inline docs explaining scalar/binary/product trade-offs
- Wire both fields through the `HNSWIndex` constructor
- Default `search()` to `config.hnswEfSearch` when callers do not
  supply a per-query `ef`, removing the current fallback to the
  (much higher) `efConstruction` value
- Add `optimization-presets.ts` with four ready-to-use configs:
    - `speedPreset`    — binary quant, M=8, ef=50  (10x faster, 32x smaller)
    - `balancedPreset` — scalar quant, M=16, ef=100 (3x faster, 4x smaller)
    - `accuracyPreset` — no quant,    M=32, ef=200  (100% recall)
    - `edgePreset`     — binary quant, M=8, ef=50, cache=100 (mobile/WASM)
  plus `withPreset(name, overrides)` helper for one-line setup
- Re-export presets from the package index

https://claude.ai/code/session_01BVecxWKHe7dRZ9GEPHDnJz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants