pi-smart-router 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -3
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -798,6 +798,9 @@ Contributors must run `npm run build` before publishing or consuming the library
|
|
|
798
798
|
| `npm run routing:eval-replay` | Counterfactual replay on eval trace fixtures |
|
|
799
799
|
| `npm run routing:eval-harness` | Three-track eval harness (capability, cost, continuity) on fixture traces |
|
|
800
800
|
| `npm run routing:eval-harness:smoke` | Harness summary JSON only (CI smoke; no network) |
|
|
801
|
+
| `npm run routing:eval-harness:corpus-smoke` | Harness summary on TwinRouterBench CI corpus subset (`tests/eval/corpus/twinrouterbench`) |
|
|
802
|
+
| `npm run routing:assert-release-gates:corpus-report` | Soft-feed: assert corpus vs absolute gates with `--report-only` (exit 0; does not gate releases) |
|
|
803
|
+
| `npm run routing:ingest-twinrouterbench` | Convert TwinRouterBench `question_bank.jsonl` → CI subset / full corpus JSON |
|
|
801
804
|
| `npm run benchmark:encoder` | Compare MiniLM vs Granite encoder latency on held-out agent turns |
|
|
802
805
|
|
|
803
806
|
### Offline eval harness (agent-native routing)
|
|
@@ -812,9 +815,12 @@ Run locally:
|
|
|
812
815
|
# Full metrics JSON (per-fixture + aggregate track summaries)
|
|
813
816
|
npm run routing:eval-harness
|
|
814
817
|
|
|
815
|
-
# CI-style summary only
|
|
818
|
+
# CI-style summary only (default fixtures under tests/eval/fixtures)
|
|
816
819
|
npm run routing:eval-harness:smoke
|
|
817
820
|
|
|
821
|
+
# TwinRouterBench CI corpus subset (≤50 code/tool records; offline)
|
|
822
|
+
npm run routing:eval-harness:corpus-smoke
|
|
823
|
+
|
|
818
824
|
# Custom fixture directory (includes TwinRouterBench static track subdirs)
|
|
819
825
|
npm run routing:eval-harness -- --fixtures tests/eval/fixtures
|
|
820
826
|
|
|
@@ -822,11 +828,26 @@ npm run routing:eval-harness -- --fixtures tests/eval/fixtures
|
|
|
822
828
|
npm run routing:eval-replay
|
|
823
829
|
```
|
|
824
830
|
|
|
825
|
-
**CI smoke:** `.github/workflows/eval-harness-smoke.yml` runs on PRs that touch eval scripts, fixtures, or the workflow. It executes `routing:eval-harness:smoke` and eval unit tests — fast, offline, no provider network calls.
|
|
831
|
+
**CI smoke:** `.github/workflows/eval-harness-smoke.yml` runs on PRs that touch eval scripts, fixtures, or the workflow. It executes `routing:eval-harness:smoke`, `routing:eval-harness:corpus-smoke`, and eval unit tests — fast, offline, no provider network calls. Job timeout stays at 10 minutes.
|
|
826
832
|
|
|
827
833
|
**TwinRouterBench static track:** import step-level router-visible prefixes with execution-verified target tiers (`track: "static"`). The adapter in `scripts/eval/twinrouterbench-adapter.ts` converts static track records into native eval fixtures for the three-track harness. See `docs/gemini-research.md` §9 for methodology context.
|
|
828
834
|
|
|
829
|
-
|
|
835
|
+
#### TwinRouterBench CI corpus (SP-186 / SP-187 / SP-188)
|
|
836
|
+
|
|
837
|
+
| Item | Location / command |
|
|
838
|
+
|------|--------------------|
|
|
839
|
+
| **Pinned upstream** | CommonstackAI/TwinRouterBench `@430acecac71141de77afd8e5e13690d236d58e93` (Apache-2.0) |
|
|
840
|
+
| **CI subset** | `tests/eval/corpus/twinrouterbench/ci-subset.json` (≤50 code/tool records) |
|
|
841
|
+
| **Provenance** | `tests/eval/corpus/twinrouterbench/PROVENANCE.md` |
|
|
842
|
+
| **Regenerate** | `npm run routing:ingest-twinrouterbench -- --input <question_bank.jsonl> --output tests/eval/corpus/twinrouterbench/ci-subset.json --limit 50 --prefer-code-tool` |
|
|
843
|
+
| **Harness smoke** | `npm run routing:eval-harness:corpus-smoke` |
|
|
844
|
+
| **Gate soft-feed** | `npm run routing:assert-release-gates:corpus-report` |
|
|
845
|
+
|
|
846
|
+
**Absolute release gates stay on default fixtures.** `npm run release:functional-smoke` continues to assert `tests/eval/fixtures` against `config/release-gates.json` — do not point it at the corpus without operator review. Today the corpus subset fails `mean_over_routing_rate_max` (≈0.85 vs absolute max 0.15); that gap is intentional soft signal for the [#95](https://github.com/beettlle/pi-smart-router/issues/95) public static-track acceptance criteria alongside live dogfood traces. Use `--fixtures tests/eval/corpus/twinrouterbench` (or the corpus-report script) for #95 public-track scoring; keep absolute threshold edits out of band until operators approve.
|
|
847
|
+
|
|
848
|
+
**Deferred:** RouterBench classic (outcome-matrix) smoke is out of scope for SP-188; prefer TwinRouterBench static track + dogfood for #95.
|
|
849
|
+
|
|
850
|
+
Sample fixtures under `tests/eval/fixtures/twinrouterbench/` remain the small adapter unit-test inputs and are unchanged by corpus ingest.
|
|
830
851
|
|
|
831
852
|
Capability scores in `config/benchmark-profiles.json` are grounded from public leaderboard snapshots under `tests/fixtures/benchmark-leaderboards/` (and optional **recorded** live snapshots under `tests/fixtures/benchmark-leaderboards/recorded/`). Each artifact records provenance (`source_urls`, `scrape_date`, `catalog_freeze_date`) in its header.
|
|
832
853
|
|
|
@@ -908,6 +929,8 @@ Tag-triggered publish via GitHub Actions (requires `NPMSECRET` repository secret
|
|
|
908
929
|
2. `routing:verify-benchmark-profiles` — checked-in capability profiles match fixture ingest
|
|
909
930
|
3. `assert-release-gates --fixtures tests/eval/fixtures --baseline-version 0.6.0` — eval harness aggregate metrics vs `config/release-gates.json` and semver baseline regression vs `tests/eval/baselines/v0.6.0.json`
|
|
910
931
|
|
|
932
|
+
The TwinRouterBench CI corpus is **not** part of Tier 0: use `routing:eval-harness:corpus-smoke` / `routing:assert-release-gates:corpus-report` for offline public-track soft-feed ([#95](https://github.com/beettlle/pi-smart-router/issues/95)). Absolute thresholds in `config/release-gates.json` stay fixture-backed until operators approve a change.
|
|
933
|
+
|
|
911
934
|
`release:check` runs the full pre-release path: **live benchmark profile refresh** (fixture fallback; dirty-tree fail), then `verify:ci`, consumer pack verify, then Tier 0 functional smoke.
|
|
912
935
|
|
|
913
936
|
**Baseline re-capture (post-tag):** after shipping a new semver (e.g. v0.7.0), freeze harness metrics for the next regression reference:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-smart-router",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Auto-model router middleware for the pi.dev coding agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -70,6 +70,9 @@
|
|
|
70
70
|
"routing:eval-replay": "tsx scripts/eval/counterfactual-replay.ts",
|
|
71
71
|
"routing:eval-harness": "tsx scripts/eval/run-harness.ts",
|
|
72
72
|
"routing:eval-harness:smoke": "tsx scripts/eval/run-harness.ts --summary-only",
|
|
73
|
+
"routing:eval-harness:corpus-smoke": "tsx scripts/eval/run-harness.ts --fixtures tests/eval/corpus/twinrouterbench --summary-only",
|
|
74
|
+
"routing:assert-release-gates:corpus-report": "tsx scripts/eval/assert-release-gates.ts --fixtures tests/eval/corpus/twinrouterbench --report-only",
|
|
75
|
+
"routing:ingest-twinrouterbench": "tsx scripts/eval/ingest-twinrouterbench-corpus.ts",
|
|
73
76
|
"routing:capture-baseline": "tsx scripts/eval/capture-baseline.ts",
|
|
74
77
|
"routing:test-projection": "npm run build && node --experimental-strip-types scripts/test-hydra-projection.ts",
|
|
75
78
|
"benchmark:encoder": "tsx scripts/benchmark-encoder-latency.ts",
|