@jinn-network/client 0.1.8 → 0.1.9-canary.02befda9
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 +6 -0
- package/deployments/deployment-phase1b-mech-baseSepolia-fast.json +3 -3
- package/deployments/deployment-stolas-l2-baseSepolia-fast.json +23 -3
- package/deployments/deployment-task-coordinator-router-v3-baseSepolia-fast.json +34 -6
- package/dist/adapters/mech/adapter.d.ts +21 -1
- package/dist/adapters/mech/adapter.js +107 -52
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +174 -13
- package/dist/adapters/mech/contracts.js +99 -49
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/safe-revert.d.ts +4 -0
- package/dist/adapters/mech/safe-revert.js +5 -1
- package/dist/adapters/mech/safe-revert.js.map +1 -1
- package/dist/adapters/mech/safe.js +77 -1
- package/dist/adapters/mech/safe.js.map +1 -1
- package/dist/adapters/mech/types.d.ts +4 -42
- package/dist/adapters/mech/types.js +8 -20
- package/dist/adapters/mech/types.js.map +1 -1
- package/dist/adapters/mech/verdict-code.js +1 -1
- package/dist/adapters/mech/verdict-code.js.map +1 -1
- package/dist/api/bootstrap-endpoint.d.ts +1 -0
- package/dist/api/bootstrap-endpoint.js +1 -0
- package/dist/api/bootstrap-endpoint.js.map +1 -1
- package/dist/api/discovery-endpoint.d.ts +1 -0
- package/dist/api/discovery-endpoint.js +24 -0
- package/dist/api/discovery-endpoint.js.map +1 -1
- package/dist/api/fleet-build.d.ts +1 -7
- package/dist/api/fleet-build.js +0 -7
- package/dist/api/fleet-build.js.map +1 -1
- package/dist/api/gather-status.d.ts +26 -17
- package/dist/api/gather-status.js +57 -516
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/harness-auth-status-endpoint.d.ts +21 -0
- package/dist/api/harness-auth-status-endpoint.js +17 -0
- package/dist/api/harness-auth-status-endpoint.js.map +1 -0
- package/dist/api/loop-completion-build.d.ts +79 -0
- package/dist/api/loop-completion-build.js +155 -0
- package/dist/api/loop-completion-build.js.map +1 -0
- package/dist/api/operator-artifacts-endpoint.js +1 -1
- package/dist/api/operator-artifacts-endpoint.js.map +1 -1
- package/dist/api/peers.js +2 -0
- package/dist/api/peers.js.map +1 -1
- package/dist/api/rewards-build.d.ts +8 -1
- package/dist/api/rewards-build.js +32 -4
- package/dist/api/rewards-build.js.map +1 -1
- package/dist/api/rewards-endpoint.d.ts +12 -0
- package/dist/api/rewards-endpoint.js +46 -0
- package/dist/api/rewards-endpoint.js.map +1 -0
- package/dist/api/server.d.ts +6 -16
- package/dist/api/server.js +29 -26
- package/dist/api/server.js.map +1 -1
- package/dist/api/setup-endpoints.d.ts +41 -0
- package/dist/api/setup-endpoints.js +258 -45
- package/dist/api/setup-endpoints.js.map +1 -1
- package/dist/api/solvernets-endpoints.js +4 -1
- package/dist/api/solvernets-endpoints.js.map +1 -1
- package/dist/api/status-build.d.ts +71 -94
- package/dist/api/status-build.js +11 -77
- package/dist/api/status-build.js.map +1 -1
- package/dist/api/status-rollup-build.d.ts +0 -4
- package/dist/api/status-rollup-build.js +0 -4
- package/dist/api/status-rollup-build.js.map +1 -1
- package/dist/api/stop-hook.d.ts +1 -1
- package/dist/api/stop-hook.js +1 -1
- package/dist/api/stop-hook.js.map +1 -1
- package/dist/build-info.json +4 -4
- package/dist/build-meta.json +1 -1
- package/dist/captures/live-publisher.d.ts +9 -0
- package/dist/captures/live-publisher.js +1 -0
- package/dist/captures/live-publisher.js.map +1 -1
- package/dist/captures/publish.d.ts +11 -0
- package/dist/captures/publish.js +15 -5
- package/dist/captures/publish.js.map +1 -1
- package/dist/cli/commands/codedigest-revert-check.js +6 -2
- package/dist/cli/commands/codedigest-revert-check.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.js +36 -4
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/eval.d.ts +87 -0
- package/dist/cli/commands/eval.js +481 -0
- package/dist/cli/commands/eval.js.map +1 -0
- package/dist/cli/commands/rewards.d.ts +2 -0
- package/dist/cli/commands/rewards.js +39 -10
- package/dist/cli/commands/rewards.js.map +1 -1
- package/dist/cli/commands/solver-nets.js +68 -0
- package/dist/cli/commands/solver-nets.js.map +1 -1
- package/dist/cli/commands/status.js +0 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/update.js +8 -0
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/version.js +4 -0
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/introspection-context.js +0 -3
- package/dist/cli/introspection-context.js.map +1 -1
- package/dist/config.d.ts +158 -541
- package/dist/config.js +189 -196
- package/dist/config.js.map +1 -1
- package/dist/corpus/acquire.d.ts +7 -6
- package/dist/corpus/acquire.js +10 -10
- package/dist/corpus/acquire.js.map +1 -1
- package/dist/corpus/fetch-artifact.d.ts +21 -0
- package/dist/corpus/fetch-artifact.js +33 -0
- package/dist/corpus/fetch-artifact.js.map +1 -0
- package/dist/corpus/index.d.ts +2 -2
- package/dist/corpus/route-resolver.d.ts +3 -3
- package/dist/corpus/route-resolver.js +3 -3
- package/dist/daemon/ai-units-gate.d.ts +6 -6
- package/dist/daemon/ai-units-gate.js +11 -10
- package/dist/daemon/ai-units-gate.js.map +1 -1
- package/dist/daemon/balance-topup-loop.js +3 -0
- package/dist/daemon/balance-topup-loop.js.map +1 -1
- package/dist/daemon/checkpoint-loop.js +2 -2
- package/dist/daemon/creator.d.ts +1 -0
- package/dist/daemon/creator.js +26 -14
- package/dist/daemon/creator.js.map +1 -1
- package/dist/daemon/daemon.d.ts +15 -10
- package/dist/daemon/daemon.js +71 -39
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/delivery-watcher.d.ts +9 -0
- package/dist/daemon/delivery-watcher.js +24 -1
- package/dist/daemon/delivery-watcher.js.map +1 -1
- package/dist/daemon/eviction-loop.d.ts +7 -0
- package/dist/daemon/eviction-loop.js +19 -3
- package/dist/daemon/eviction-loop.js.map +1 -1
- package/dist/daemon/join-applier.d.ts +35 -0
- package/dist/daemon/join-applier.js +49 -0
- package/dist/daemon/join-applier.js.map +1 -0
- package/dist/daemon/loop-heartbeat.d.ts +34 -0
- package/dist/daemon/loop-heartbeat.js +38 -0
- package/dist/daemon/loop-heartbeat.js.map +1 -0
- package/dist/daemon/reward-claim-loop.js +4 -1
- package/dist/daemon/reward-claim-loop.js.map +1 -1
- package/dist/daemon/skip-log-dedup.d.ts +1 -1
- package/dist/daemon/skip-log-dedup.js +3 -0
- package/dist/daemon/skip-log-dedup.js.map +1 -1
- package/dist/daemon/watchdog-loop.d.ts +84 -0
- package/dist/daemon/watchdog-loop.js +91 -0
- package/dist/daemon/watchdog-loop.js.map +1 -0
- package/dist/dashboard/assets/index-BsrAAmvC.js +171 -0
- package/dist/dashboard/assets/index-DQOWJ2SF.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/discovery/http.d.ts +17 -0
- package/dist/discovery/http.js +295 -25
- package/dist/discovery/http.js.map +1 -1
- package/dist/discovery/onchain.js +158 -2
- package/dist/discovery/onchain.js.map +1 -1
- package/dist/discovery/types.d.ts +106 -0
- package/dist/discovery/types.js +40 -0
- package/dist/discovery/types.js.map +1 -1
- package/dist/discovery/with-fallback.js +14 -0
- package/dist/discovery/with-fallback.js.map +1 -1
- package/dist/earning/bootstrap.d.ts +25 -0
- package/dist/earning/bootstrap.js +79 -28
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +0 -229
- package/dist/earning/contracts.js +4 -184
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/faucet-topup-store.d.ts +41 -0
- package/dist/earning/faucet-topup-store.js +89 -0
- package/dist/earning/faucet-topup-store.js.map +1 -0
- package/dist/earning/faucet.d.ts +1 -1
- package/dist/earning/faucet.js +2 -2
- package/dist/earning/faucet.js.map +1 -1
- package/dist/earning/safe-adapter.js +11 -0
- package/dist/earning/safe-adapter.js.map +1 -1
- package/dist/earning/stolas-claim.js +8 -8
- package/dist/earning/stolas-claim.js.map +1 -1
- package/dist/earning/{jinn-rewards.d.ts → stolas-staking.d.ts} +4 -8
- package/dist/earning/{jinn-rewards.js → stolas-staking.js} +6 -10
- package/dist/earning/stolas-staking.js.map +1 -0
- package/dist/earning/testnet-setup-migration.d.ts +1 -0
- package/dist/earning/testnet-setup-migration.js +7 -2
- package/dist/earning/testnet-setup-migration.js.map +1 -1
- package/dist/earning/types.d.ts +1 -1
- package/dist/earning/types.js +1 -1
- package/dist/earning/types.js.map +1 -1
- package/dist/earning/viem-clients.d.ts +3 -19
- package/dist/earning/viem-clients.js +4 -31
- package/dist/earning/viem-clients.js.map +1 -1
- package/dist/eval/eval-harness-run.d.ts +63 -0
- package/dist/eval/eval-harness-run.js +123 -0
- package/dist/eval/eval-harness-run.js.map +1 -0
- package/dist/eval/orchestrator.d.ts +224 -0
- package/dist/eval/orchestrator.js +250 -0
- package/dist/eval/orchestrator.js.map +1 -0
- package/dist/eval/paired.d.ts +68 -0
- package/dist/eval/paired.js +93 -0
- package/dist/eval/paired.js.map +1 -0
- package/dist/eval/resolve-slate-tasks.d.ts +35 -0
- package/dist/eval/resolve-slate-tasks.js +56 -0
- package/dist/eval/resolve-slate-tasks.js.map +1 -0
- package/dist/eval/screen-discovery.d.ts +22 -0
- package/dist/eval/screen-discovery.js +71 -0
- package/dist/eval/screen-discovery.js.map +1 -0
- package/dist/eval/screen-progress.d.ts +41 -0
- package/dist/eval/screen-progress.js +60 -0
- package/dist/eval/screen-progress.js.map +1 -0
- package/dist/eval/screen-runner.d.ts +30 -0
- package/dist/eval/screen-runner.js +289 -0
- package/dist/eval/screen-runner.js.map +1 -0
- package/dist/eval/screen.d.ts +107 -0
- package/dist/eval/screen.js +159 -0
- package/dist/eval/screen.js.map +1 -0
- package/dist/eval/slope.d.ts +29 -0
- package/dist/eval/slope.js +46 -0
- package/dist/eval/slope.js.map +1 -0
- package/dist/eval/train-sequence.d.ts +35 -0
- package/dist/eval/train-sequence.js +59 -0
- package/dist/eval/train-sequence.js.map +1 -0
- package/dist/eval/wilson.d.ts +45 -0
- package/dist/eval/wilson.js +48 -0
- package/dist/eval/wilson.js.map +1 -0
- package/dist/events/types.d.ts +1 -1
- package/dist/events/types.js +1 -1
- package/dist/events/types.js.map +1 -1
- package/dist/harnesses/auth-source.d.ts +51 -0
- package/dist/harnesses/auth-source.js +155 -0
- package/dist/harnesses/auth-source.js.map +1 -0
- package/dist/harnesses/engine/canonical-json.js +5 -3
- package/dist/harnesses/engine/canonical-json.js.map +1 -1
- package/dist/harnesses/engine/engine.d.ts +32 -0
- package/dist/harnesses/engine/engine.js +76 -9
- package/dist/harnesses/engine/engine.js.map +1 -1
- package/dist/harnesses/engine/packaging.js +5 -5
- package/dist/harnesses/engine/packaging.js.map +1 -1
- package/dist/harnesses/engine/persistence.d.ts +17 -0
- package/dist/harnesses/engine/persistence.js +28 -0
- package/dist/harnesses/engine/persistence.js.map +1 -1
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.d.ts +1 -1
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.js +1 -1
- package/dist/harnesses/impls/claude-mcp-hyperliquid/mcp-tools.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/adapter.d.ts +2 -0
- package/dist/harnesses/impls/hermes-agent/adapter.js +8 -5
- package/dist/harnesses/impls/hermes-agent/adapter.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/bootstrap.d.ts +1 -0
- package/dist/harnesses/impls/hermes-agent/bootstrap.js +6 -1
- package/dist/harnesses/impls/hermes-agent/bootstrap.js.map +1 -1
- package/dist/harnesses/impls/hermes-agent/harness.d.ts +25 -3
- package/dist/harnesses/impls/hermes-agent/harness.js +89 -5
- package/dist/harnesses/impls/hermes-agent/harness.js.map +1 -1
- package/dist/harnesses/impls/index.d.ts +2 -0
- package/dist/harnesses/impls/index.js +10 -1
- package/dist/harnesses/impls/index.js.map +1 -1
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.d.ts +34 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.js +111 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/eval-runner.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.d.ts +24 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.js +19 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/evaluator.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.d.ts +64 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.js +125 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/harness.js.map +1 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.d.ts +32 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.js +73 -0
- package/dist/harnesses/impls/jinn-repo-evaluator/repro.js.map +1 -0
- package/dist/harnesses/impls/learner/adapters/claude-code.js +5 -0
- package/dist/harnesses/impls/learner/adapters/claude-code.js.map +1 -1
- package/dist/harnesses/impls/learner/adapters/codex-code.d.ts +8 -0
- package/dist/harnesses/impls/learner/adapters/codex-code.js +91 -11
- package/dist/harnesses/impls/learner/adapters/codex-code.js.map +1 -1
- package/dist/harnesses/impls/learner/harness.d.ts +29 -1
- package/dist/harnesses/impls/learner/harness.js +85 -1
- package/dist/harnesses/impls/learner/harness.js.map +1 -1
- package/dist/harnesses/impls/learner/harvest.d.ts +2 -0
- package/dist/harnesses/impls/learner/harvest.js +51 -1
- package/dist/harnesses/impls/learner/harvest.js.map +1 -1
- package/dist/harnesses/impls/learner/plugin-path.js +1 -0
- package/dist/harnesses/impls/learner/plugin-path.js.map +1 -1
- package/dist/harnesses/impls/stub.d.ts +2 -2
- package/dist/harnesses/impls/stub.js +2 -2
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js +3 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/harness.js.map +1 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.d.ts +2 -2
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.js +3 -1
- package/dist/harnesses/impls/swe-rebench-v2-evaluator/index.js.map +1 -1
- package/dist/harnesses/readiness-registry.d.ts +16 -0
- package/dist/harnesses/readiness-registry.js +28 -6
- package/dist/harnesses/readiness-registry.js.map +1 -1
- package/dist/harnesses/types.d.ts +26 -0
- package/dist/learner/revert-decision.d.ts +16 -1
- package/dist/learner/revert-decision.js +38 -18
- package/dist/learner/revert-decision.js.map +1 -1
- package/dist/learner/revert-stats.d.ts +14 -0
- package/dist/learner/revert-stats.js +42 -0
- package/dist/learner/revert-stats.js.map +1 -1
- package/dist/local-provider-url.d.ts +3 -0
- package/dist/local-provider-url.js +28 -0
- package/dist/local-provider-url.js.map +1 -0
- package/dist/main.js +125 -120
- package/dist/main.js.map +1 -1
- package/dist/mcp/acquire-artifact.d.ts +3 -3
- package/dist/mcp/acquire-artifact.js +3 -3
- package/dist/mcp/operator-server.js +1 -1
- package/dist/mcp/operator-server.js.map +1 -1
- package/dist/mcp/server.js +5 -6
- package/dist/mcp/server.js.map +1 -1
- package/dist/observability/emit-event.d.ts +1 -1
- package/dist/observability/emit-event.js +0 -4
- package/dist/observability/emit-event.js.map +1 -1
- package/dist/plugins/learner/.claude-plugin/plugin.json +1 -1
- package/dist/plugins/learner/.codex-plugin/plugin.json +1 -1
- package/dist/plugins/learner/hooks/session-start +30 -1
- package/dist/plugins/learner/skills/learn/consolidator-prompt.md +4 -0
- package/dist/preflight/deployment-readiness.d.ts +127 -0
- package/dist/preflight/deployment-readiness.js +308 -0
- package/dist/preflight/deployment-readiness.js.map +1 -0
- package/dist/preflight/pidfile-liveness.d.ts +7 -1
- package/dist/preflight/pidfile-liveness.js +14 -0
- package/dist/preflight/pidfile-liveness.js.map +1 -1
- package/dist/rpc/transport.d.ts +43 -5
- package/dist/rpc/transport.js +131 -30
- package/dist/rpc/transport.js.map +1 -1
- package/dist/scripts/swe-rebench-v2-seed-pool.json +2 -1
- package/dist/solver-nets/registry.d.ts +19 -0
- package/dist/solver-nets/registry.js +95 -66
- package/dist/solver-nets/registry.js.map +1 -1
- package/dist/solver-types/_jinn-repo-pool.d.ts +27 -0
- package/dist/solver-types/_jinn-repo-pool.js +27 -0
- package/dist/solver-types/_jinn-repo-pool.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.d.ts +76 -0
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.js +156 -0
- package/dist/solver-types/_swe-rebench-v2-held-out-slate.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-pool-recovery.d.ts +81 -0
- package/dist/solver-types/_swe-rebench-v2-pool-recovery.js +116 -0
- package/dist/solver-types/_swe-rebench-v2-pool-recovery.js.map +1 -0
- package/dist/solver-types/_swe-rebench-v2-state.d.ts +9 -0
- package/dist/solver-types/_swe-rebench-v2-state.js +14 -0
- package/dist/solver-types/_swe-rebench-v2-state.js.map +1 -1
- package/dist/solver-types/_swe-rebench-v2-validated-pool.d.ts +30 -0
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js +40 -0
- package/dist/solver-types/_swe-rebench-v2-validated-pool.js.map +1 -1
- package/dist/solver-types/index.js +2 -0
- package/dist/solver-types/index.js.map +1 -1
- package/dist/solver-types/jinn-repo-admit.d.ts +17 -0
- package/dist/solver-types/jinn-repo-admit.js +16 -0
- package/dist/solver-types/jinn-repo-admit.js.map +1 -0
- package/dist/solver-types/jinn-repo-auto.d.ts +60 -0
- package/dist/solver-types/jinn-repo-auto.js +163 -0
- package/dist/solver-types/jinn-repo-auto.js.map +1 -0
- package/dist/solver-types/jinn-repo-definition.d.ts +15 -0
- package/dist/solver-types/jinn-repo-definition.js +34 -0
- package/dist/solver-types/jinn-repo-definition.js.map +1 -0
- package/dist/solver-types/jinn-repo-extract.d.ts +16 -0
- package/dist/solver-types/jinn-repo-extract.js +32 -0
- package/dist/solver-types/jinn-repo-extract.js.map +1 -0
- package/dist/solver-types/jinn-repo.d.ts +21 -0
- package/dist/solver-types/jinn-repo.js +23 -0
- package/dist/solver-types/jinn-repo.js.map +1 -0
- package/dist/solver-types/learner-loop-test.js +1 -1
- package/dist/solver-types/learner-loop-test.js.map +1 -1
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v1.json +20 -0
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v2.json +19 -0
- package/dist/solver-types/slates/held-out-slate.swe-rebench-v2.v2.screening-report.json +628 -0
- package/dist/solver-types/solver-type.d.ts +8 -0
- package/dist/solver-types/swe-rebench-v2.d.ts +2 -0
- package/dist/solver-types/swe-rebench-v2.js +115 -10
- package/dist/solver-types/swe-rebench-v2.js.map +1 -1
- package/dist/solvernets/launched-record-dispatcher.d.ts +5 -0
- package/dist/solvernets/launched-record-dispatcher.js +8 -1
- package/dist/solvernets/launched-record-dispatcher.js.map +1 -1
- package/dist/solvernets/registry-client-erc8004.js +29 -37
- package/dist/solvernets/registry-client-erc8004.js.map +1 -1
- package/dist/solvernets/registry-client.d.ts +6 -0
- package/dist/solvernets/store.d.ts +1 -1
- package/dist/solvernets/store.js +8 -3
- package/dist/solvernets/store.js.map +1 -1
- package/dist/spend/ai-units-config.d.ts +10 -0
- package/dist/spend/ai-units-config.js +7 -1
- package/dist/spend/ai-units-config.js.map +1 -1
- package/dist/spend/ai-units.d.ts +51 -0
- package/dist/spend/ai-units.js +73 -0
- package/dist/spend/ai-units.js.map +1 -1
- package/dist/spend/record.js +12 -5
- package/dist/spend/record.js.map +1 -1
- package/dist/spend/usage.js +39 -3
- package/dist/spend/usage.js.map +1 -1
- package/dist/store/store.d.ts +92 -5
- package/dist/store/store.js +184 -7
- package/dist/store/store.js.map +1 -1
- package/dist/trajectory/emit.d.ts +6 -0
- package/dist/trajectory/emit.js +9 -1
- package/dist/trajectory/emit.js.map +1 -1
- package/dist/trajectory/harness-bundle-schema.d.ts +1 -1
- package/dist/trajectory/harness-bundle-schema.js +1 -1
- package/dist/trajectory/harness-bundle-schema.js.map +1 -1
- package/dist/trajectory/schema.d.ts +1 -1
- package/dist/trajectory/schema.js +1 -1
- package/dist/trajectory/schema.js.map +1 -1
- package/dist/trajectory/scrub/build.d.ts +27 -0
- package/dist/trajectory/scrub/build.js +43 -0
- package/dist/trajectory/scrub/build.js.map +1 -0
- package/dist/trajectory/scrub/emit-scrub.d.ts +41 -0
- package/dist/trajectory/scrub/emit-scrub.js +88 -0
- package/dist/trajectory/scrub/emit-scrub.js.map +1 -0
- package/dist/trajectory/scrub/key-policy.d.ts +20 -0
- package/dist/trajectory/scrub/key-policy.js +43 -0
- package/dist/trajectory/scrub/key-policy.js.map +1 -0
- package/dist/trajectory/scrub/ml-pii-stage.d.ts +24 -0
- package/dist/trajectory/scrub/ml-pii-stage.js +43 -0
- package/dist/trajectory/scrub/ml-pii-stage.js.map +1 -0
- package/dist/trajectory/scrub/openredaction-stage.d.ts +14 -0
- package/dist/trajectory/scrub/openredaction-stage.js +36 -0
- package/dist/trajectory/scrub/openredaction-stage.js.map +1 -0
- package/dist/trajectory/scrub/pii-build.d.ts +31 -0
- package/dist/trajectory/scrub/pii-build.js +64 -0
- package/dist/trajectory/scrub/pii-build.js.map +1 -0
- package/dist/trajectory/scrub/pipeline.d.ts +16 -0
- package/dist/trajectory/scrub/pipeline.js +26 -0
- package/dist/trajectory/scrub/pipeline.js.map +1 -0
- package/dist/trajectory/scrub/secretlint-stage.d.ts +13 -0
- package/dist/trajectory/scrub/secretlint-stage.js +121 -0
- package/dist/trajectory/scrub/secretlint-stage.js.map +1 -0
- package/dist/trajectory/scrub/transformers-detector.d.ts +35 -0
- package/dist/trajectory/scrub/transformers-detector.js +68 -0
- package/dist/trajectory/scrub/transformers-detector.js.map +1 -0
- package/dist/trajectory/scrub/types.d.ts +25 -0
- package/dist/trajectory/scrub/types.js +2 -0
- package/dist/trajectory/scrub/types.js.map +1 -0
- package/dist/trajectory/transcript-parsers/types.d.ts +1 -1
- package/dist/trajectory/transcript-parsers/types.js +1 -1
- package/dist/trajectory/transcript-parsers/types.js.map +1 -1
- package/dist/tx-retry.d.ts +12 -0
- package/dist/tx-retry.js +41 -12
- package/dist/tx-retry.js.map +1 -1
- package/dist/types/envelope.d.ts +1 -1
- package/dist/types/envelope.js +1 -1
- package/dist/types/envelope.js.map +1 -1
- package/dist/types/payloads/index.d.ts +1 -1
- package/dist/types/payloads/index.js +7 -1
- package/dist/types/payloads/index.js.map +1 -1
- package/dist/types/payloads/portfolio-v0.d.ts +1 -1
- package/dist/types/payloads/portfolio-v0.js +1 -1
- package/dist/types/payloads/portfolio-v0.js.map +1 -1
- package/dist/types/payloads/prediction-apy-v0.d.ts +1 -1
- package/dist/types/payloads/prediction-apy-v0.js +1 -1
- package/dist/types/payloads/prediction-apy-v0.js.map +1 -1
- package/dist/types/payloads/prediction-v0.d.ts +1 -1
- package/dist/types/payloads/prediction-v0.js +1 -1
- package/dist/types/payloads/prediction-v0.js.map +1 -1
- package/dist/types/portfolio.d.ts +1 -1
- package/dist/types/portfolio.js +1 -1
- package/dist/types/portfolio.js.map +1 -1
- package/dist/types/prediction-apy.d.ts +1 -1
- package/dist/types/prediction-apy.js +1 -1
- package/dist/types/prediction-apy.js.map +1 -1
- package/dist/types/prediction.d.ts +1 -1
- package/dist/types/prediction.js +1 -1
- package/dist/types/prediction.js.map +1 -1
- package/dist/types/session-provenance.d.ts +1 -1
- package/dist/types/session-provenance.js +1 -1
- package/dist/types/session-provenance.js.map +1 -1
- package/dist/types/task-document.d.ts +315 -1
- package/dist/types/task-document.js +9 -1
- package/dist/types/task-document.js.map +1 -1
- package/dist/types/task.d.ts +29 -1
- package/dist/types/task.js +1 -1
- package/dist/types/task.js.map +1 -1
- package/dist/types/window.d.ts +1 -1
- package/dist/types/window.js +1 -1
- package/dist/types/window.js.map +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/checkpoint.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/checkpoint.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/contracts.d.ts +3 -2
- package/dist/vendor/@jinn-network/sdk/dist/contracts.js +49 -0
- package/dist/vendor/@jinn-network/sdk/dist/jinn-repo.d.ts +44 -0
- package/dist/vendor/@jinn-network/sdk/dist/jinn-repo.js +25 -0
- package/dist/vendor/@jinn-network/sdk/dist/json-schema.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/json-schema.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/jinn-repo.d.ts +38 -0
- package/dist/vendor/@jinn-network/sdk/dist/payloads/jinn-repo.js +22 -0
- package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/prediction-v1.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/session-derived.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/session-derived.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.d.ts +109 -2
- package/dist/vendor/@jinn-network/sdk/dist/payloads/swe-rebench-v2.js +26 -2
- package/dist/vendor/@jinn-network/sdk/dist/prediction-v1.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/prediction-v1.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/jinn-repo.d.ts +4 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/jinn-repo.js +2 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/manifest-schema.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2-held-out-slate.d.ts +65 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2-held-out-slate.js +123 -0
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2.d.ts +2 -2
- package/dist/vendor/@jinn-network/sdk/dist/solvernets/swe-rebench-v2.js +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/swe-rebench-v2.d.ts +1 -1
- package/dist/vendor/@jinn-network/sdk/dist/swe-rebench-v2.js +1 -1
- package/dist/vendor/@jinn-network/sdk/package.json +9 -1
- package/docker-compose.yml +3 -2
- package/package.json +36 -26
- package/plugins/jinn-repo-runtime/.claude-plugin/plugin.json +5 -0
- package/plugins/jinn-repo-runtime/.codex-plugin/plugin.json +39 -0
- package/plugins/jinn-repo-runtime/README.md +27 -0
- package/plugins/jinn-repo-runtime/hooks/hooks.json +16 -0
- package/plugins/jinn-repo-runtime/hooks/session-start +73 -0
- package/plugins/jinn-repo-runtime/jinn.plugin.json +11 -0
- package/plugins/jinn-repo-runtime/skills/task/SKILL.md +92 -0
- package/plugins/learner/.claude-plugin/plugin.json +1 -1
- package/plugins/learner/.codex-plugin/plugin.json +1 -1
- package/plugins/learner/hooks/session-start +30 -1
- package/plugins/learner/skills/learn/consolidator-prompt.md +4 -0
- package/plugins/swe-rebench-v2-runtime/hooks/hooks.json +16 -0
- package/plugins/swe-rebench-v2-runtime/hooks/session-start +74 -0
- package/deployments/deployment-jinn-mvi-l1-sepolia-fast.json +0 -55
- package/deployments/deployment-jinn-mvi-l1-sepolia.json +0 -55
- package/deployments/deployment-jinn-mvi-l2-baseSepolia.json +0 -13
- package/deployments/deployment-jinn-testnet-faucet-baseSepolia-fast.json +0 -15
- package/dist/daemon/jinn-claim-loop-canonical.d.ts +0 -207
- package/dist/daemon/jinn-claim-loop-canonical.js +0 -296
- package/dist/daemon/jinn-claim-loop-canonical.js.map +0 -1
- package/dist/daemon/jinn-claim-loop-mock.d.ts +0 -61
- package/dist/daemon/jinn-claim-loop-mock.js +0 -122
- package/dist/daemon/jinn-claim-loop-mock.js.map +0 -1
- package/dist/daemon/jinn-claim-loop-wiring.d.ts +0 -33
- package/dist/daemon/jinn-claim-loop-wiring.js +0 -40
- package/dist/daemon/jinn-claim-loop-wiring.js.map +0 -1
- package/dist/daemon/jinn-claim-loop.d.ts +0 -130
- package/dist/daemon/jinn-claim-loop.js +0 -328
- package/dist/daemon/jinn-claim-loop.js.map +0 -1
- package/dist/dashboard/assets/index-CzKxvMcU.css +0 -32
- package/dist/dashboard/assets/index-yVemxHot.js +0 -351
- package/dist/earning/jinn-rewards.js.map +0 -1
- package/dist/scripts/donation-consumption-acceptance.d.ts +0 -85
- package/dist/scripts/donation-consumption-acceptance.js +0 -1382
- package/dist/scripts/donation-consumption-acceptance.js.map +0 -1
- package/dist/x402/acquire.d.ts +0 -17
- package/dist/x402/acquire.js +0 -49
- package/dist/x402/acquire.js.map +0 -1
- package/dist/x402/facilitator.d.ts +0 -11
- package/dist/x402/facilitator.js +0 -52
- package/dist/x402/facilitator.js.map +0 -1
- package/dist/x402/handler.d.ts +0 -27
- package/dist/x402/handler.js +0 -236
- package/dist/x402/handler.js.map +0 -1
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `jinn eval` held-out checkpoint orchestrator (issue #818).
|
|
3
|
+
*
|
|
4
|
+
* Runs a held-out slate against a checkpoint in FROZEN mode, persists per-task
|
|
5
|
+
* pass/fail, and emits a Wilson-CI resolved-rate comparison vs the parent
|
|
6
|
+
* checkpoint. Every external boundary is constructor-injected — this is the
|
|
7
|
+
* thin slice #819 drives a deterministic slate against with NO Docker/IPFS.
|
|
8
|
+
*
|
|
9
|
+
* Acceptance criteria:
|
|
10
|
+
* AC#1 — run the slate frozen, write per-task pass/fail.
|
|
11
|
+
* AC#2 — emit a resolved-rate comparison vs the parent with a CI.
|
|
12
|
+
* AC#3 — the freeze-fence holds: a `runHarnessOnce` `{ violation }` throws
|
|
13
|
+
* LOUD and the instance is NOT recorded (no implStateDir mutation
|
|
14
|
+
* slips through; enforcement lives in `runHarnessWithFreezeFence`).
|
|
15
|
+
*
|
|
16
|
+
* Per log/decisions/2026-05-28-rl-eval-measurement.md §4: v1-simple. Only large
|
|
17
|
+
* deltas are trustworthy (disjoint Wilson intervals). No seed control, no
|
|
18
|
+
* multi-run averaging.
|
|
19
|
+
*/
|
|
20
|
+
import type { Harness, HarnessContext } from '../harnesses/types.js';
|
|
21
|
+
import type { HarnessCheckpointManifest } from '../vendor/@jinn-network/sdk/dist/checkpoint.js';
|
|
22
|
+
import type { LoadedHeldOutSlate } from '../solver-types/_swe-rebench-v2-held-out-slate.js';
|
|
23
|
+
import type { ResolvedSlateTask } from './resolve-slate-tasks.js';
|
|
24
|
+
import type { EvalAggregate, EvalResultRecord } from '../store/store.js';
|
|
25
|
+
import { type RateComparison } from './wilson.js';
|
|
26
|
+
import { type PairedComparison, type PairedInput } from './paired.js';
|
|
27
|
+
/** Thrown when `runHarnessOnce` reports a freeze-fence violation (AC#3). */
|
|
28
|
+
export declare class FreezeFenceViolationError extends Error {
|
|
29
|
+
readonly instanceId: string;
|
|
30
|
+
constructor(instanceId: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Thrown when the locally-evaluated impl-state's codeDigest does not match the
|
|
34
|
+
* named checkpoint's manifest (C1). Guards against persisting + comparing
|
|
35
|
+
* results under a checkpoint name while the operator's local impl-state has
|
|
36
|
+
* drifted from that checkpoint.
|
|
37
|
+
*/
|
|
38
|
+
export declare class CheckpointStateMismatchError extends Error {
|
|
39
|
+
readonly checkpointCid: string;
|
|
40
|
+
readonly manifestCodeDigest: string;
|
|
41
|
+
readonly evaluatedCodeDigest: string;
|
|
42
|
+
constructor(checkpointCid: string, manifestCodeDigest: string, evaluatedCodeDigest: string);
|
|
43
|
+
}
|
|
44
|
+
/** Thrown when the parent checkpoint has no aggregate for this slate version (AC#2). */
|
|
45
|
+
export declare class ParentNotEvaluatedError extends Error {
|
|
46
|
+
readonly parentCheckpointCid: string;
|
|
47
|
+
readonly slateVersion: string;
|
|
48
|
+
constructor(parentCheckpointCid: string, slateVersion: string);
|
|
49
|
+
}
|
|
50
|
+
/** A checkpoint whose recorded results carry slate hashes other than the current one. */
|
|
51
|
+
export interface SlateHashDrift {
|
|
52
|
+
checkpointCid: string;
|
|
53
|
+
/** The drifted hashes (each != the current slate hash). */
|
|
54
|
+
hashes: string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Thrown when EITHER compared checkpoint was scored on a DIFFERENT slate
|
|
58
|
+
* *content* under the same version label (DR-2026-05-28 §2 — confounder control).
|
|
59
|
+
* A slate is content-addressed and scores are comparable ONLY within identical
|
|
60
|
+
* content; the store keys aggregates by version, so a content edit that skipped
|
|
61
|
+
* the version bump (or re-derived the declared hash — which the slate loader
|
|
62
|
+
* admits passes), or stale rows surviving `recordEvalResult`'s by-instance
|
|
63
|
+
* upsert, would let the comparison silently compare two checkpoints scored on
|
|
64
|
+
* different task sets. That is confounder #1 (task-selection) — exactly what the
|
|
65
|
+
* held-out exam exists to defeat — so we refuse the comparison loudly instead.
|
|
66
|
+
*/
|
|
67
|
+
export declare class SlateHashMismatchError extends Error {
|
|
68
|
+
readonly slateVersion: string;
|
|
69
|
+
readonly currentSlateHash: string;
|
|
70
|
+
readonly drifted: ReadonlyArray<SlateHashDrift>;
|
|
71
|
+
constructor(slateVersion: string, currentSlateHash: string, drifted: ReadonlyArray<SlateHashDrift>);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Injected `runHarnessOnce`-shaped boundary. Mirrors the production
|
|
75
|
+
* `runHarnessOnce` (freeze-fence + mode propagation) but also surfaces the
|
|
76
|
+
* harness `solution` so the orchestrator can extract the patch to grade. On a
|
|
77
|
+
* freeze violation it returns `{ violation }` and no solution.
|
|
78
|
+
*/
|
|
79
|
+
export type RunHarnessOnceForEval = (params: {
|
|
80
|
+
harness: Harness;
|
|
81
|
+
implStateDir: string;
|
|
82
|
+
mode: 'train' | 'frozen';
|
|
83
|
+
task?: HarnessContext['task'];
|
|
84
|
+
}) => Promise<{
|
|
85
|
+
envelope?: {
|
|
86
|
+
executor: {
|
|
87
|
+
mode: 'train' | 'frozen';
|
|
88
|
+
codeDigest: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
violation?: {
|
|
92
|
+
taskId: string;
|
|
93
|
+
};
|
|
94
|
+
solution?: {
|
|
95
|
+
patch: string;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* The grade verdict the orchestrator consumes. It reads exactly two fields:
|
|
100
|
+
* `passed_match` (→ per-task pass/fail) and `test_log` (→ recorded excerpt).
|
|
101
|
+
* This is the swe-rebench-v2 verdict surface; the repo-native JinnRepoEvaluator
|
|
102
|
+
* is projected onto it by the adapter in eval.ts. Anything unscorable is
|
|
103
|
+
* signalled by THROWING (the orchestrator's catch records `unscorable`) — never
|
|
104
|
+
* by a verdict flag — so both backends agree on the unscorable contract.
|
|
105
|
+
*/
|
|
106
|
+
export interface EvalGradeVerdict {
|
|
107
|
+
passed_match: boolean;
|
|
108
|
+
test_log: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Minimal structural evaluator the orchestrator depends on. `SweRebenchV2Evaluator`
|
|
112
|
+
* satisfies it directly (its verdict is a superset of `EvalGradeVerdict`); the
|
|
113
|
+
* jinn-repo path supplies an adapter in eval.ts that wraps `JinnRepoEvaluator`,
|
|
114
|
+
* translating the call and projecting its `{ passed, unscorable, logExcerpt }`
|
|
115
|
+
* result onto this verdict (throwing on unscorable). `task`/`solutionPayload`/`row`
|
|
116
|
+
* are the swe-rebench-v2 grade call; the orchestrator passes them verbatim and
|
|
117
|
+
* the backend adapter interprets them.
|
|
118
|
+
*/
|
|
119
|
+
export interface SolutionEvaluator {
|
|
120
|
+
grade(args: {
|
|
121
|
+
task: {
|
|
122
|
+
instance_id: string;
|
|
123
|
+
};
|
|
124
|
+
solutionPayload: {
|
|
125
|
+
schemaVersion: string;
|
|
126
|
+
patch: string;
|
|
127
|
+
};
|
|
128
|
+
row?: unknown;
|
|
129
|
+
}): Promise<EvalGradeVerdict>;
|
|
130
|
+
}
|
|
131
|
+
export interface EvalOrchestratorDeps {
|
|
132
|
+
harness: Harness;
|
|
133
|
+
fetchImplStateDirToLocal(implStateDirCid: string, targetDir: string): Promise<string>;
|
|
134
|
+
evaluator: SolutionEvaluator;
|
|
135
|
+
runHarnessOnce: RunHarnessOnceForEval;
|
|
136
|
+
store: {
|
|
137
|
+
recordEvalResult(args: EvalResultRecord): void;
|
|
138
|
+
getEvalAggregate(checkpointCid: string, slateVersion: string): EvalAggregate;
|
|
139
|
+
/** Distinct slate_hash values the parent's results were recorded under (drift guard). */
|
|
140
|
+
getEvalSlateHashes(checkpointCid: string, slateVersion: string): string[];
|
|
141
|
+
/**
|
|
142
|
+
* Optional: per-instance results for a (checkpoint, slate version). When
|
|
143
|
+
* present, the orchestrator also emits the paired (matched-design) McNemar
|
|
144
|
+
* verdict (DR-2026-06-02-b §2a) — the same slate is scored before & after, so
|
|
145
|
+
* the matched test is the statistically correct one and is far more powerful
|
|
146
|
+
* than the marginal disjoint-interval test. Reported ALONGSIDE `comparison`,
|
|
147
|
+
* never replacing it (the exam is strengthened, not weakened).
|
|
148
|
+
*/
|
|
149
|
+
getEvalResults?(checkpointCid: string, slateVersion: string): PairedInput[];
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
export interface PerTaskResult {
|
|
153
|
+
instance_id: string;
|
|
154
|
+
/** null when unscorable. */
|
|
155
|
+
passed: boolean | null;
|
|
156
|
+
unscorable: boolean;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Provenance of the graded artifact (Legibility). The CLI grades the operator's
|
|
160
|
+
* LOCAL frozen impl-state — verified == the named checkpoint via the C1
|
|
161
|
+
* codeDigest guard (CheckpointStateMismatchError) — NOT a state re-fetched from
|
|
162
|
+
* the checkpoint CID. Surfacing this stops a reader from assuming the tool
|
|
163
|
+
* fetched and graded the published checkpoint's state.
|
|
164
|
+
*/
|
|
165
|
+
export interface EvalProvenance {
|
|
166
|
+
/** Local impl-state directory that was actually run. */
|
|
167
|
+
implStateDir: string;
|
|
168
|
+
/** Real codeDigest of the evaluated impl-state (verified == manifest.codeDigest). */
|
|
169
|
+
codeDigest: string;
|
|
170
|
+
/** Always true on a returned result — a mismatch throws CheckpointStateMismatchError. */
|
|
171
|
+
matchedCheckpoint: true;
|
|
172
|
+
}
|
|
173
|
+
export interface EvalRunResult {
|
|
174
|
+
perTask: PerTaskResult[];
|
|
175
|
+
comparison: RateComparison;
|
|
176
|
+
/**
|
|
177
|
+
* Paired (matched-design) McNemar verdict vs the parent — present only when
|
|
178
|
+
* the store exposes `getEvalResults`. The marginal `comparison` above is
|
|
179
|
+
* conservative; this is the statistically correct test for the same-slate
|
|
180
|
+
* before/after design and is reported alongside it (DR-2026-06-02-b §2a).
|
|
181
|
+
*/
|
|
182
|
+
paired?: PairedComparison;
|
|
183
|
+
/** What was actually graded (local impl-state), not the checkpoint identity. */
|
|
184
|
+
evaluated: EvalProvenance;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* One slate instance normalised for the backend-agnostic run/grade loop. The
|
|
188
|
+
* BACKEND (eval.ts) owns construction of both `harnessTask` (the LEAK-CONTROLLED
|
|
189
|
+
* view the solver sees — for jinn-repo this is `solverView(item)`, never the
|
|
190
|
+
* pool item) and `gradeTask`/`row` (what the evaluator needs — for jinn-repo the
|
|
191
|
+
* full pool item incl. gold tests). The swe-rebench-v2 path derives these from
|
|
192
|
+
* `tasksWithRows` via the default mapping below, unchanged.
|
|
193
|
+
*/
|
|
194
|
+
export interface EvalSlateInstance {
|
|
195
|
+
instance_id: string;
|
|
196
|
+
/** Task handed to the solver harness — already leak-controlled by the backend. */
|
|
197
|
+
harnessTask: NonNullable<HarnessContext['task']>;
|
|
198
|
+
/** Backend-specific grade payload; passed verbatim as the evaluator's `task`. */
|
|
199
|
+
gradeTask: {
|
|
200
|
+
instance_id: string;
|
|
201
|
+
};
|
|
202
|
+
/** Solution payload `schemaVersion` the evaluator expects. */
|
|
203
|
+
solutionSchemaVersion: string;
|
|
204
|
+
/** swe-rebench-v2 HF row reused at grade time; absent for repo-native. */
|
|
205
|
+
row?: unknown;
|
|
206
|
+
}
|
|
207
|
+
export declare function runEval(args: {
|
|
208
|
+
checkpointManifest: HarnessCheckpointManifest;
|
|
209
|
+
checkpointCid: string;
|
|
210
|
+
slate: LoadedHeldOutSlate;
|
|
211
|
+
/**
|
|
212
|
+
* swe-rebench-v2 slate tasks (the historical input). When given, each is
|
|
213
|
+
* normalised via the default swe-rebench mapping. Mutually informative with
|
|
214
|
+
* `slateInstances`: a backend that builds its own leak-controlled instances
|
|
215
|
+
* (jinn-repo) passes `slateInstances` directly instead.
|
|
216
|
+
*/
|
|
217
|
+
tasksWithRows?: ResolvedSlateTask[];
|
|
218
|
+
/** Pre-built, backend-normalised instances (jinn-repo path). Overrides `tasksWithRows`. */
|
|
219
|
+
slateInstances?: EvalSlateInstance[];
|
|
220
|
+
parentCheckpointCid: string;
|
|
221
|
+
deps: EvalOrchestratorDeps;
|
|
222
|
+
/** Working dir for the fetched impl-state-dir (defaults to a checkpoint-scoped tmp path). */
|
|
223
|
+
implStateDir?: string;
|
|
224
|
+
}): Promise<EvalRunResult>;
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `jinn eval` held-out checkpoint orchestrator (issue #818).
|
|
3
|
+
*
|
|
4
|
+
* Runs a held-out slate against a checkpoint in FROZEN mode, persists per-task
|
|
5
|
+
* pass/fail, and emits a Wilson-CI resolved-rate comparison vs the parent
|
|
6
|
+
* checkpoint. Every external boundary is constructor-injected — this is the
|
|
7
|
+
* thin slice #819 drives a deterministic slate against with NO Docker/IPFS.
|
|
8
|
+
*
|
|
9
|
+
* Acceptance criteria:
|
|
10
|
+
* AC#1 — run the slate frozen, write per-task pass/fail.
|
|
11
|
+
* AC#2 — emit a resolved-rate comparison vs the parent with a CI.
|
|
12
|
+
* AC#3 — the freeze-fence holds: a `runHarnessOnce` `{ violation }` throws
|
|
13
|
+
* LOUD and the instance is NOT recorded (no implStateDir mutation
|
|
14
|
+
* slips through; enforcement lives in `runHarnessWithFreezeFence`).
|
|
15
|
+
*
|
|
16
|
+
* Per log/decisions/2026-05-28-rl-eval-measurement.md §4: v1-simple. Only large
|
|
17
|
+
* deltas are trustworthy (disjoint Wilson intervals). No seed control, no
|
|
18
|
+
* multi-run averaging.
|
|
19
|
+
*/
|
|
20
|
+
import { compareRates } from './wilson.js';
|
|
21
|
+
import { comparePaired } from './paired.js';
|
|
22
|
+
/** Thrown when `runHarnessOnce` reports a freeze-fence violation (AC#3). */
|
|
23
|
+
export class FreezeFenceViolationError extends Error {
|
|
24
|
+
instanceId;
|
|
25
|
+
constructor(instanceId) {
|
|
26
|
+
super(`freeze-fence violation on instance ${instanceId}: the harness mutated implStateDir ` +
|
|
27
|
+
`during a frozen-mode eval run — refusing to record a tainted result`);
|
|
28
|
+
this.instanceId = instanceId;
|
|
29
|
+
this.name = 'FreezeFenceViolationError';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Thrown when the locally-evaluated impl-state's codeDigest does not match the
|
|
34
|
+
* named checkpoint's manifest (C1). Guards against persisting + comparing
|
|
35
|
+
* results under a checkpoint name while the operator's local impl-state has
|
|
36
|
+
* drifted from that checkpoint.
|
|
37
|
+
*/
|
|
38
|
+
export class CheckpointStateMismatchError extends Error {
|
|
39
|
+
checkpointCid;
|
|
40
|
+
manifestCodeDigest;
|
|
41
|
+
evaluatedCodeDigest;
|
|
42
|
+
constructor(checkpointCid, manifestCodeDigest, evaluatedCodeDigest) {
|
|
43
|
+
super(`local impl-state does not match checkpoint ${checkpointCid}: ` +
|
|
44
|
+
`manifest codeDigest=${manifestCodeDigest} but the evaluated impl-state hashes to ` +
|
|
45
|
+
`${evaluatedCodeDigest}. Check out the impl-state for this checkpoint or pass the ` +
|
|
46
|
+
`correct --impl-state-dir; refusing to record results under a codeDigest that is a lie`);
|
|
47
|
+
this.checkpointCid = checkpointCid;
|
|
48
|
+
this.manifestCodeDigest = manifestCodeDigest;
|
|
49
|
+
this.evaluatedCodeDigest = evaluatedCodeDigest;
|
|
50
|
+
this.name = 'CheckpointStateMismatchError';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** Thrown when the parent checkpoint has no aggregate for this slate version (AC#2). */
|
|
54
|
+
export class ParentNotEvaluatedError extends Error {
|
|
55
|
+
parentCheckpointCid;
|
|
56
|
+
slateVersion;
|
|
57
|
+
constructor(parentCheckpointCid, slateVersion) {
|
|
58
|
+
super(`parent checkpoint ${parentCheckpointCid} has no eval results for slate ${slateVersion} — ` +
|
|
59
|
+
`eval the parent checkpoint first (scores are only comparable within a slate version)`);
|
|
60
|
+
this.parentCheckpointCid = parentCheckpointCid;
|
|
61
|
+
this.slateVersion = slateVersion;
|
|
62
|
+
this.name = 'ParentNotEvaluatedError';
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Thrown when EITHER compared checkpoint was scored on a DIFFERENT slate
|
|
67
|
+
* *content* under the same version label (DR-2026-05-28 §2 — confounder control).
|
|
68
|
+
* A slate is content-addressed and scores are comparable ONLY within identical
|
|
69
|
+
* content; the store keys aggregates by version, so a content edit that skipped
|
|
70
|
+
* the version bump (or re-derived the declared hash — which the slate loader
|
|
71
|
+
* admits passes), or stale rows surviving `recordEvalResult`'s by-instance
|
|
72
|
+
* upsert, would let the comparison silently compare two checkpoints scored on
|
|
73
|
+
* different task sets. That is confounder #1 (task-selection) — exactly what the
|
|
74
|
+
* held-out exam exists to defeat — so we refuse the comparison loudly instead.
|
|
75
|
+
*/
|
|
76
|
+
export class SlateHashMismatchError extends Error {
|
|
77
|
+
slateVersion;
|
|
78
|
+
currentSlateHash;
|
|
79
|
+
drifted;
|
|
80
|
+
constructor(slateVersion, currentSlateHash, drifted) {
|
|
81
|
+
const detail = drifted
|
|
82
|
+
.map((d) => `${d.checkpointCid} carries [${d.hashes.join(', ')}]`)
|
|
83
|
+
.join('; ');
|
|
84
|
+
super(`a checkpoint was evaluated against a different slate content under the same version label ` +
|
|
85
|
+
`${slateVersion}: current slate hash is ${currentSlateHash} but ${detail}. Same version must ` +
|
|
86
|
+
`mean the same exam — a slate content change is a measurement discontinuity that must bump the ` +
|
|
87
|
+
`version. Bump the slate version and re-evaluate; refusing to report a delta across two ` +
|
|
88
|
+
`different task sets (confounder #1, task-selection)`);
|
|
89
|
+
this.slateVersion = slateVersion;
|
|
90
|
+
this.currentSlateHash = currentSlateHash;
|
|
91
|
+
this.drifted = drifted;
|
|
92
|
+
this.name = 'SlateHashMismatchError';
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Default swe-rebench-v2 instance mapping — preserves the exact harness `task`
|
|
97
|
+
* envelope and grade call the orchestrator used before the backend seam existed.
|
|
98
|
+
*/
|
|
99
|
+
function sweRebenchSlateInstance(rt) {
|
|
100
|
+
return {
|
|
101
|
+
instance_id: rt.task.instance_id,
|
|
102
|
+
// Carry the full SweRebenchV2Task in `spec` + the `solverType` dispatch key
|
|
103
|
+
// so the harness can restore the repo (clone/checkout from
|
|
104
|
+
// spec.repo/base_commit). id/description/role alone are insufficient.
|
|
105
|
+
harnessTask: {
|
|
106
|
+
id: rt.task.instance_id,
|
|
107
|
+
description: rt.task.problem_statement,
|
|
108
|
+
role: 'restoration',
|
|
109
|
+
solverType: 'swe-rebench-v2.v1',
|
|
110
|
+
spec: rt.task,
|
|
111
|
+
window: { startTs: 0, endTs: Date.now() + 3_600_000 },
|
|
112
|
+
},
|
|
113
|
+
gradeTask: rt.task,
|
|
114
|
+
solutionSchemaVersion: 'swe-rebench-v2-solution.v1',
|
|
115
|
+
row: rt.row,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export async function runEval(args) {
|
|
119
|
+
const { deps, slate, checkpointCid, parentCheckpointCid } = args;
|
|
120
|
+
const slateInstances = args.slateInstances ?? (args.tasksWithRows ?? []).map(sweRebenchSlateInstance);
|
|
121
|
+
// Confounder guard (DR-2026-05-28 §2). The store keys aggregates by slate
|
|
122
|
+
// VERSION; if EITHER checkpoint has results recorded under a different slate
|
|
123
|
+
// CONTENT for that version — a content edit that skipped the version bump, or
|
|
124
|
+
// stale rows surviving recordEvalResult's by-instance upsert — comparing
|
|
125
|
+
// child-vs-parent reintroduces confounder #1 (task-selection: two scores over
|
|
126
|
+
// different task sets). Both arms' hashes are known up front, so detect drift
|
|
127
|
+
// in EITHER before the loop and refuse — never burn N× real spend producing a
|
|
128
|
+
// number we'd have to throw away.
|
|
129
|
+
const drifted = [parentCheckpointCid, checkpointCid]
|
|
130
|
+
.map((cid) => ({
|
|
131
|
+
checkpointCid: cid,
|
|
132
|
+
hashes: deps.store.getEvalSlateHashes(cid, slate.version).filter((hash) => hash !== slate.hash),
|
|
133
|
+
}))
|
|
134
|
+
.filter((arm) => arm.hashes.length > 0);
|
|
135
|
+
if (drifted.length > 0) {
|
|
136
|
+
throw new SlateHashMismatchError(slate.version, slate.hash, drifted);
|
|
137
|
+
}
|
|
138
|
+
// Hoist the impl-state-dir fetch outside the loop: every slate instance runs
|
|
139
|
+
// against the SAME checkpoint state.
|
|
140
|
+
const implStateDir = args.implStateDir ?? `/tmp/jinn-eval-${checkpointCid}`;
|
|
141
|
+
const localImplStateDir = await deps.fetchImplStateDirToLocal(args.checkpointManifest.implStateDirCid, implStateDir);
|
|
142
|
+
const perTask = [];
|
|
143
|
+
const runAtMs = Date.now();
|
|
144
|
+
let digestChecked = false;
|
|
145
|
+
// Real digest of the evaluated impl-state (from the freeze-fence), captured on
|
|
146
|
+
// the first run for provenance. Falls back to the manifest digest, which the
|
|
147
|
+
// C1 guard proves equal.
|
|
148
|
+
let evaluatedDigest = args.checkpointManifest.codeDigest;
|
|
149
|
+
for (const inst of slateInstances) {
|
|
150
|
+
const task = inst.gradeTask;
|
|
151
|
+
let passed;
|
|
152
|
+
let unscorable = false;
|
|
153
|
+
let logExcerpt = '';
|
|
154
|
+
try {
|
|
155
|
+
const run = await deps.runHarnessOnce({
|
|
156
|
+
harness: deps.harness,
|
|
157
|
+
implStateDir: localImplStateDir,
|
|
158
|
+
mode: 'frozen',
|
|
159
|
+
// The harness task is built by the BACKEND (eval.ts) and is already
|
|
160
|
+
// leak-controlled (jinn-repo hands the solver `solverView(item)` only —
|
|
161
|
+
// no gold tests / reference solution). swe-rebench-v2 carries the full
|
|
162
|
+
// task in `spec` so the harness can restore the repo.
|
|
163
|
+
task: inst.harnessTask,
|
|
164
|
+
});
|
|
165
|
+
// AC#3: a freeze violation is loud and terminal — do NOT record this
|
|
166
|
+
// instance (its implStateDir mutation taints the run). Thrown OUTSIDE the
|
|
167
|
+
// unscorable catch below so it propagates and aborts the whole eval.
|
|
168
|
+
if (run.violation) {
|
|
169
|
+
throw new FreezeFenceViolationError(inst.instance_id);
|
|
170
|
+
}
|
|
171
|
+
if (!run.solution) {
|
|
172
|
+
throw new Error(`harness produced no solution for instance ${inst.instance_id}`);
|
|
173
|
+
}
|
|
174
|
+
// C1: on the FIRST successful run, verify the real digest of the evaluated
|
|
175
|
+
// impl-state (computed by the freeze-fence) matches the named checkpoint's
|
|
176
|
+
// manifest. Fail fast — before grading any instance — to avoid Docker spend
|
|
177
|
+
// and to never persist a result under a codeDigest that is a lie.
|
|
178
|
+
if (!digestChecked) {
|
|
179
|
+
digestChecked = true;
|
|
180
|
+
const runDigest = run.envelope?.executor.codeDigest;
|
|
181
|
+
if (runDigest && runDigest !== args.checkpointManifest.codeDigest) {
|
|
182
|
+
throw new CheckpointStateMismatchError(checkpointCid, args.checkpointManifest.codeDigest, runDigest);
|
|
183
|
+
}
|
|
184
|
+
if (runDigest)
|
|
185
|
+
evaluatedDigest = runDigest;
|
|
186
|
+
}
|
|
187
|
+
const verdict = await deps.evaluator.grade({
|
|
188
|
+
task,
|
|
189
|
+
solutionPayload: { schemaVersion: inst.solutionSchemaVersion, patch: run.solution.patch },
|
|
190
|
+
...(inst.row !== undefined ? { row: inst.row } : {}),
|
|
191
|
+
});
|
|
192
|
+
passed = verdict.passed_match;
|
|
193
|
+
logExcerpt = verdict.test_log.slice(0, 1000);
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
// A freeze-fence violation taints the run and must stay a LOUD terminal
|
|
197
|
+
// abort (AC#3). Likewise the C1 digest mismatch — never record results
|
|
198
|
+
// under a codeDigest that is a lie. Both re-throw and abort the eval.
|
|
199
|
+
if (err instanceof FreezeFenceViolationError || err instanceof CheckpointStateMismatchError) {
|
|
200
|
+
throw err;
|
|
201
|
+
}
|
|
202
|
+
// Everything else is unscorable: excluded from the denominator, NEVER
|
|
203
|
+
// coerced to a fail (#476). This covers both grade-side failures
|
|
204
|
+
// (EvalCouldNotGradeError / InsufficientDiskError) and harness-run
|
|
205
|
+
// failures (Defect A — harvest missing-artifact, "produced no patch",
|
|
206
|
+
// clone/timeout, etc.); a harness/infra failure to produce a gradeable
|
|
207
|
+
// solution is environment-side, not an agent capability fail. The slate
|
|
208
|
+
// continues to the next instance.
|
|
209
|
+
passed = null;
|
|
210
|
+
unscorable = true;
|
|
211
|
+
logExcerpt = (err instanceof Error ? err.message : String(err)).slice(0, 1000);
|
|
212
|
+
}
|
|
213
|
+
deps.store.recordEvalResult({
|
|
214
|
+
checkpoint_cid: checkpointCid,
|
|
215
|
+
slate_hash: slate.hash,
|
|
216
|
+
slate_version: slate.version,
|
|
217
|
+
instance_id: inst.instance_id,
|
|
218
|
+
passed,
|
|
219
|
+
unscorable,
|
|
220
|
+
code_digest: args.checkpointManifest.codeDigest,
|
|
221
|
+
run_at_ms: runAtMs,
|
|
222
|
+
test_log_excerpt: logExcerpt,
|
|
223
|
+
});
|
|
224
|
+
perTask.push({ instance_id: inst.instance_id, passed, unscorable });
|
|
225
|
+
}
|
|
226
|
+
// AC#2: compare child vs parent at the SAME slate version. A parent with no
|
|
227
|
+
// rows is a hard error — no cross-version compare, eval the parent first.
|
|
228
|
+
const parentAgg = deps.store.getEvalAggregate(parentCheckpointCid, slate.version);
|
|
229
|
+
if (parentAgg.scorable === 0 && parentAgg.unscorable === 0) {
|
|
230
|
+
throw new ParentNotEvaluatedError(parentCheckpointCid, slate.version);
|
|
231
|
+
}
|
|
232
|
+
const childAgg = deps.store.getEvalAggregate(checkpointCid, slate.version);
|
|
233
|
+
const comparison = compareRates({ passed: childAgg.passed, scorable: childAgg.scorable }, { passed: parentAgg.passed, scorable: parentAgg.scorable });
|
|
234
|
+
// Paired (matched-design) verdict — same slate scored before & after, so the
|
|
235
|
+
// matched McNemar test is the correct, higher-power one. Additive: only when
|
|
236
|
+
// the store exposes per-instance results (DR-2026-06-02-b §2a).
|
|
237
|
+
let paired;
|
|
238
|
+
if (deps.store.getEvalResults) {
|
|
239
|
+
const parentResults = deps.store.getEvalResults(parentCheckpointCid, slate.version);
|
|
240
|
+
const childResults = deps.store.getEvalResults(checkpointCid, slate.version);
|
|
241
|
+
paired = comparePaired(parentResults, childResults);
|
|
242
|
+
}
|
|
243
|
+
return {
|
|
244
|
+
perTask,
|
|
245
|
+
comparison,
|
|
246
|
+
...(paired ? { paired } : {}),
|
|
247
|
+
evaluated: { implStateDir: localImplStateDir, codeDigest: evaluatedDigest, matchedCheckpoint: true },
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/eval/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,OAAO,EAAE,YAAY,EAAuB,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,aAAa,EAA2C,MAAM,aAAa,CAAC;AAErF,4EAA4E;AAC5E,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IACtB;IAA5B,YAA4B,UAAkB;QAC5C,KAAK,CACH,sCAAsC,UAAU,qCAAqC;YACnF,qEAAqE,CACxE,CAAC;QAJwB,eAAU,GAAV,UAAU,CAAQ;QAK5C,IAAI,CAAC,IAAI,GAAG,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,EAAE,IAAI,EAAE;KACrG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paired (matched-design) comparison for the held-out exam.
|
|
3
|
+
*
|
|
4
|
+
* The exam scores the SAME slate against the before- and after-checkpoints, so
|
|
5
|
+
* the two result sets are MATCHED, not independent. The marginal test in
|
|
6
|
+
* `wilson.ts` (`compareRates`) compares two INDEPENDENT Wilson intervals and
|
|
7
|
+
* calls a delta trustworthy only when they are disjoint. On a matched design
|
|
8
|
+
* that is statistically wasteful: it carries the full between-instance
|
|
9
|
+
* difficulty variance ("this bug is just hard") in BOTH intervals, which swamps
|
|
10
|
+
* a real, consistent within-instance improvement. Example: a learner that flips
|
|
11
|
+
* 3 hard instances fail→pass and regresses none moves 4/10→7/10 — two Wilson
|
|
12
|
+
* intervals ([17,69]% vs [40,89]%) overlap → "within-noise", even though every
|
|
13
|
+
* observed change was an improvement.
|
|
14
|
+
*
|
|
15
|
+
* McNemar's test is the textbook test for matched binary data: it looks ONLY at
|
|
16
|
+
* the discordant pairs (instances that flipped) and asks whether the flips are
|
|
17
|
+
* asymmetric beyond chance. This is NOT a weaker bar — it is the CORRECT test
|
|
18
|
+
* for the design, and it still gates the claim on significance (exact two-sided
|
|
19
|
+
* p < alpha) AND on the improvement direction (more fail→pass than pass→fail).
|
|
20
|
+
* It is reported ALONGSIDE the conservative marginal verdict, never replacing it
|
|
21
|
+
* — so the exam is strengthened, never weakened (DR-2026-06-02-b §2a).
|
|
22
|
+
*
|
|
23
|
+
* R=1 (one run per instance) ships here: McNemar exact on per-instance flips.
|
|
24
|
+
* R>1 (per-instance pass RATES → Wilcoxon signed-rank / paired bootstrap) layers
|
|
25
|
+
* on once `eval_results` supports appended runs (DR-2026-06-02-b §2b).
|
|
26
|
+
*/
|
|
27
|
+
/** Minimal per-instance result (subset of PerTaskResult / EvalResultRow). */
|
|
28
|
+
export interface PairedInput {
|
|
29
|
+
instance_id: string;
|
|
30
|
+
/** null when unscorable. */
|
|
31
|
+
passed: boolean | null;
|
|
32
|
+
unscorable: boolean;
|
|
33
|
+
}
|
|
34
|
+
export type PairedVerdict = 'trustworthy' | 'within-noise';
|
|
35
|
+
export interface PairedComparison {
|
|
36
|
+
/** Instances scorable (passed !== null) in BOTH arms — the matched pairs. */
|
|
37
|
+
pairs: number;
|
|
38
|
+
/** b: before fail → after pass (improvements). */
|
|
39
|
+
improved: number;
|
|
40
|
+
/** c: before pass → after fail (regressions). */
|
|
41
|
+
regressed: number;
|
|
42
|
+
concordantPass: number;
|
|
43
|
+
concordantFail: number;
|
|
44
|
+
/** Instances unscorable/absent in either arm — excluded from the paired test. */
|
|
45
|
+
excluded: number;
|
|
46
|
+
/** Exact two-sided McNemar p-value over the discordant pairs. */
|
|
47
|
+
pValue: number;
|
|
48
|
+
/** 'trustworthy' iff pValue < alpha AND improved > regressed; else 'within-noise'. */
|
|
49
|
+
verdict: PairedVerdict;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Exact two-sided McNemar p-value for discordant counts `b` (improvements) and
|
|
53
|
+
* `c` (regressions). Under H0 each discordant pair is an independent fair coin,
|
|
54
|
+
* so the count of one direction is Binomial(n=b+c, 0.5); the two-sided p is
|
|
55
|
+
* `2 * P(X <= min(b,c))`, capped at 1. No `b==c==0` division (returns 1: no
|
|
56
|
+
* evidence). Computed iteratively (term ratio) so it is exact and overflow-free
|
|
57
|
+
* for any slate size.
|
|
58
|
+
*/
|
|
59
|
+
export declare function mcnemarExact(b: number, c: number): number;
|
|
60
|
+
/**
|
|
61
|
+
* Paired McNemar comparison of two matched per-instance result sets. An instance
|
|
62
|
+
* contributes a pair ONLY when it is scorable (passed !== null, not unscorable)
|
|
63
|
+
* in BOTH arms — an unscorable/missing side is excluded (honest: a disk-skip or
|
|
64
|
+
* harness failure is never coerced into a flip). `alpha` defaults to 0.05.
|
|
65
|
+
*/
|
|
66
|
+
export declare function comparePaired(before: readonly PairedInput[], after: readonly PairedInput[], opts?: {
|
|
67
|
+
alpha?: number;
|
|
68
|
+
}): PairedComparison;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paired (matched-design) comparison for the held-out exam.
|
|
3
|
+
*
|
|
4
|
+
* The exam scores the SAME slate against the before- and after-checkpoints, so
|
|
5
|
+
* the two result sets are MATCHED, not independent. The marginal test in
|
|
6
|
+
* `wilson.ts` (`compareRates`) compares two INDEPENDENT Wilson intervals and
|
|
7
|
+
* calls a delta trustworthy only when they are disjoint. On a matched design
|
|
8
|
+
* that is statistically wasteful: it carries the full between-instance
|
|
9
|
+
* difficulty variance ("this bug is just hard") in BOTH intervals, which swamps
|
|
10
|
+
* a real, consistent within-instance improvement. Example: a learner that flips
|
|
11
|
+
* 3 hard instances fail→pass and regresses none moves 4/10→7/10 — two Wilson
|
|
12
|
+
* intervals ([17,69]% vs [40,89]%) overlap → "within-noise", even though every
|
|
13
|
+
* observed change was an improvement.
|
|
14
|
+
*
|
|
15
|
+
* McNemar's test is the textbook test for matched binary data: it looks ONLY at
|
|
16
|
+
* the discordant pairs (instances that flipped) and asks whether the flips are
|
|
17
|
+
* asymmetric beyond chance. This is NOT a weaker bar — it is the CORRECT test
|
|
18
|
+
* for the design, and it still gates the claim on significance (exact two-sided
|
|
19
|
+
* p < alpha) AND on the improvement direction (more fail→pass than pass→fail).
|
|
20
|
+
* It is reported ALONGSIDE the conservative marginal verdict, never replacing it
|
|
21
|
+
* — so the exam is strengthened, never weakened (DR-2026-06-02-b §2a).
|
|
22
|
+
*
|
|
23
|
+
* R=1 (one run per instance) ships here: McNemar exact on per-instance flips.
|
|
24
|
+
* R>1 (per-instance pass RATES → Wilcoxon signed-rank / paired bootstrap) layers
|
|
25
|
+
* on once `eval_results` supports appended runs (DR-2026-06-02-b §2b).
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Exact two-sided McNemar p-value for discordant counts `b` (improvements) and
|
|
29
|
+
* `c` (regressions). Under H0 each discordant pair is an independent fair coin,
|
|
30
|
+
* so the count of one direction is Binomial(n=b+c, 0.5); the two-sided p is
|
|
31
|
+
* `2 * P(X <= min(b,c))`, capped at 1. No `b==c==0` division (returns 1: no
|
|
32
|
+
* evidence). Computed iteratively (term ratio) so it is exact and overflow-free
|
|
33
|
+
* for any slate size.
|
|
34
|
+
*/
|
|
35
|
+
export function mcnemarExact(b, c) {
|
|
36
|
+
const n = b + c;
|
|
37
|
+
if (n === 0)
|
|
38
|
+
return 1;
|
|
39
|
+
const k = Math.min(b, c);
|
|
40
|
+
// sum_{i=0}^{k} C(n,i) * 0.5^n, via prob_0 = 0.5^n, prob_i = prob_{i-1}*(n-i+1)/i.
|
|
41
|
+
let term = Math.pow(0.5, n); // i = 0
|
|
42
|
+
let cdf = term;
|
|
43
|
+
for (let i = 1; i <= k; i++) {
|
|
44
|
+
term = (term * (n - i + 1)) / i;
|
|
45
|
+
cdf += term;
|
|
46
|
+
}
|
|
47
|
+
return Math.min(1, 2 * cdf);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Paired McNemar comparison of two matched per-instance result sets. An instance
|
|
51
|
+
* contributes a pair ONLY when it is scorable (passed !== null, not unscorable)
|
|
52
|
+
* in BOTH arms — an unscorable/missing side is excluded (honest: a disk-skip or
|
|
53
|
+
* harness failure is never coerced into a flip). `alpha` defaults to 0.05.
|
|
54
|
+
*/
|
|
55
|
+
export function comparePaired(before, after, opts = {}) {
|
|
56
|
+
const alpha = opts.alpha ?? 0.05;
|
|
57
|
+
const scorable = (r) => !r.unscorable && r.passed !== null;
|
|
58
|
+
const beforeById = new Map(before.map((r) => [r.instance_id, r]));
|
|
59
|
+
let improved = 0;
|
|
60
|
+
let regressed = 0;
|
|
61
|
+
let concordantPass = 0;
|
|
62
|
+
let concordantFail = 0;
|
|
63
|
+
let pairs = 0;
|
|
64
|
+
let excluded = 0;
|
|
65
|
+
const seen = new Set();
|
|
66
|
+
for (const a of after) {
|
|
67
|
+
seen.add(a.instance_id);
|
|
68
|
+
const b = beforeById.get(a.instance_id);
|
|
69
|
+
if (!b || !scorable(b) || !scorable(a)) {
|
|
70
|
+
excluded++;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
pairs++;
|
|
74
|
+
const wasPass = b.passed === true;
|
|
75
|
+
const nowPass = a.passed === true;
|
|
76
|
+
if (!wasPass && nowPass)
|
|
77
|
+
improved++;
|
|
78
|
+
else if (wasPass && !nowPass)
|
|
79
|
+
regressed++;
|
|
80
|
+
else if (wasPass && nowPass)
|
|
81
|
+
concordantPass++;
|
|
82
|
+
else
|
|
83
|
+
concordantFail++;
|
|
84
|
+
}
|
|
85
|
+
// before-only instances (absent from after) are excluded too.
|
|
86
|
+
for (const b of before)
|
|
87
|
+
if (!seen.has(b.instance_id))
|
|
88
|
+
excluded++;
|
|
89
|
+
const pValue = mcnemarExact(improved, regressed);
|
|
90
|
+
const verdict = pValue < alpha && improved > regressed ? 'trustworthy' : 'within-noise';
|
|
91
|
+
return { pairs, improved, regressed, concordantPass, concordantFail, excluded, pValue, verdict };
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=paired.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paired.js","sourceRoot":"","sources":["../../src/eval/paired.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AA6BH;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,CAAS,EAAE,CAAS;IAC/C,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChB,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,mFAAmF;IACnF,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ;IACrC,IAAI,GAAG,GAA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