carthagent 0.0.0-stage → 1.0.7
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/LICENSE +21 -0
- package/README.md +219 -2
- package/bin/ctg.mjs +736 -0
- package/docs/budgets.md +72 -0
- package/docs/compaction.md +34 -0
- package/docs/context-efficiency-plan.md +24 -0
- package/docs/context-efficiency-review.md +27 -0
- package/docs/context-efficiency.md +49 -0
- package/docs/deepseek-jev-benchmark-plan.md +70 -0
- package/docs/deepseek-jev-benchmark-repair-plan.md +20 -0
- package/docs/deepseek-jev-benchmark-restart.md +9 -0
- package/docs/deepseek-jev-benchmark-results.md +77 -0
- package/docs/deepseek-jev-benchmark-running.md +60 -0
- package/docs/deepseek-jev-benchmark-v3-results.md +41 -0
- package/docs/deepseek-jev-benchmark-v4-protocol.md +15 -0
- package/docs/deepseek-jev-benchmark-v4-results.md +119 -0
- package/docs/deepseek-jev-http400-diagnosis.md +45 -0
- package/docs/delivery-review-evidence.md +53 -0
- package/docs/delivery-timeout-repair-plan.md +51 -0
- package/docs/evaluation-readiness.md +31 -0
- package/docs/evaluation.md +70 -0
- package/docs/extending.md +354 -0
- package/docs/glm-pilot-execution.md +9 -0
- package/docs/glm-pilot-plan.md +15 -0
- package/docs/glm-pilot-results.md +71 -0
- package/docs/graph-context-optimization.md +15 -0
- package/docs/jev-repository-pilot-plan.md +25 -0
- package/docs/jev-repository-pilot-protocol.md +39 -0
- package/docs/jev-repository-pilot-restart.md +7 -0
- package/docs/jev-repository-pilot-results.md +79 -0
- package/docs/jev.md +32 -0
- package/docs/model-registry.md +25 -0
- package/docs/native-compatibility.md +117 -0
- package/docs/opencode-archive.md +9 -0
- package/docs/opencode-migration.md +115 -0
- package/docs/opencode-runtime.md +94 -0
- package/docs/opencode-workspace.md +31 -0
- package/docs/owned-runtime-workflow-registration.md +17 -0
- package/docs/plan-advisor-evaluation.md +38 -0
- package/docs/planning-startup-fix-plan.md +23 -0
- package/docs/planning-startup-fix-review.md +24 -0
- package/docs/planning.md +118 -0
- package/docs/production-merge-review.md +23 -0
- package/docs/quality.md +35 -0
- package/docs/repository-benchmark-design.md +111 -0
- package/docs/review-assurance.md +9 -0
- package/docs/review-experiment-results.md +59 -0
- package/docs/tested-planning-roadmap.md +58 -0
- package/docs/tested-planning.md +58 -0
- package/docs/tui-pickers.md +9 -0
- package/docs/webdriver.md +83 -0
- package/docs/workflow-modes.md +26 -0
- package/docs/workflow.d2 +17 -0
- package/docs/workflow.svg +149 -0
- package/docs/workspace-coordination.md +9 -0
- package/evaluate.mjs +249 -0
- package/extensions/codegraph.ts +36 -0
- package/extensions/delivery.ts +819 -0
- package/extensions/experiential.ts +21 -0
- package/extensions/subscriptions.ts +21 -0
- package/guidance/profiles/authenticated-web.json +24 -0
- package/guidance/profiles/data-visualization.json +25 -0
- package/guidance/profiles/database-change.json +24 -0
- package/guidance/profiles/external-api.json +24 -0
- package/guidance/profiles/transactional-data.json +25 -0
- package/guidance/profiles/web-application.json +26 -0
- package/lib/acceptance-review.mjs +4 -0
- package/lib/browser-bin.mjs +160 -0
- package/lib/browser-errors.mjs +54 -0
- package/lib/browser.mjs +219 -0
- package/lib/budget.mjs +37 -0
- package/lib/cdp.mjs +221 -0
- package/lib/cloud/client.mjs +275 -0
- package/lib/cloud/control-plane.mjs +350 -0
- package/lib/cloud/gateway.mjs +380 -0
- package/lib/cloud/http.mjs +135 -0
- package/lib/cloud/ledger.mjs +215 -0
- package/lib/codegraph-query.mjs +60 -0
- package/lib/codegraph.mjs +378 -0
- package/lib/context-archive.mjs +18 -0
- package/lib/delivery-context.mjs +132 -0
- package/lib/delivery-guidance.mjs +9 -0
- package/lib/delivery-review.mjs +94 -0
- package/lib/delivery.mjs +610 -0
- package/lib/engine.mjs +137 -0
- package/lib/guidance.mjs +71 -0
- package/lib/jev-advisor.mjs +47 -0
- package/lib/opencode/archive.mjs +122 -0
- package/lib/opencode/compatibility.mjs +19 -0
- package/lib/opencode/credentials.mjs +205 -0
- package/lib/opencode/evaluation-budget-plugin/index.ts +147 -0
- package/lib/opencode/evaluation.mjs +242 -0
- package/lib/opencode/file-lock.mjs +86 -0
- package/lib/opencode/headless.mjs +200 -0
- package/lib/opencode/review.mjs +213 -0
- package/lib/opencode/runtime.mjs +246 -0
- package/lib/opencode/service.mjs +249 -0
- package/lib/opencode/session-options.mjs +60 -0
- package/lib/opencode/workspace.mjs +133 -0
- package/lib/openrouter-jev.mjs +37 -0
- package/lib/outcome-contract.mjs +21 -0
- package/lib/plan-advisor.mjs +38 -0
- package/lib/planning-access.mjs +7 -0
- package/lib/planning-advice.mjs +28 -0
- package/lib/planning-discovery.mjs +14 -0
- package/lib/planning-guide.mjs +34 -0
- package/lib/planning-view.mjs +57 -0
- package/lib/planning.mjs +155 -0
- package/lib/probe-diagnostics.mjs +13 -0
- package/lib/providers/experiential.mjs +292 -0
- package/lib/providers/model-catalog.json +700 -0
- package/lib/providers/model-catalog.mjs +7 -0
- package/lib/providers/names.mjs +13 -0
- package/lib/providers/subscription-models.mjs +483 -0
- package/lib/reports.mjs +80 -0
- package/lib/review-state.mjs +49 -0
- package/lib/review.mjs +114 -0
- package/lib/scenarios.mjs +99 -0
- package/lib/ship-auth.mjs +44 -0
- package/lib/ship-jev.mjs +59 -0
- package/lib/ship-telemetry.mjs +183 -0
- package/lib/tui/ansi.mjs +255 -0
- package/lib/tui/app.mjs +2445 -0
- package/lib/tui/auth.mjs +249 -0
- package/lib/tui/carthage.mjs +109 -0
- package/lib/tui/clipboard.mjs +122 -0
- package/lib/tui/d2.mjs +431 -0
- package/lib/tui/feed.mjs +467 -0
- package/lib/tui/framing.mjs +80 -0
- package/lib/tui/glyphs.mjs +172 -0
- package/lib/tui/hash-worker.mjs +11 -0
- package/lib/tui/mock-engine.mjs +222 -0
- package/lib/tui/models.mjs +73 -0
- package/lib/tui/picker.mjs +18 -0
- package/lib/tui/theme.mjs +663 -0
- package/lib/tui/title.mjs +7 -0
- package/lib/update-channel.mjs +62 -0
- package/lib/update.mjs +230 -0
- package/lib/webdriver.mjs +82 -0
- package/lib/workflow.mjs +88 -0
- package/lib/workspace.mjs +39 -0
- package/metadata.json +8 -0
- package/package.json +94 -4
- package/plugins/carthagent/index.ts +3 -0
- package/plugins/carthagent/package.json +28 -0
- package/plugins/carthagent/src/archive-rpc.ts +46 -0
- package/plugins/carthagent/src/bootstrap.ts +38 -0
- package/plugins/carthagent/src/index.ts +62 -0
- package/plugins/carthagent/src/pull-request-rpc.ts +54 -0
- package/plugins/carthagent/src/rpc.ts +76 -0
- package/plugins/carthagent/src/server/archive-rpc.ts +327 -0
- package/plugins/carthagent/src/server/budgets.ts +21 -0
- package/plugins/carthagent/src/server/codegraph.ts +46 -0
- package/plugins/carthagent/src/server/delivery.ts +488 -0
- package/plugins/carthagent/src/server/device-auth.ts +91 -0
- package/plugins/carthagent/src/server/native-delivery.ts +26 -0
- package/plugins/carthagent/src/server/orchestration.ts +56 -0
- package/plugins/carthagent/src/server/policy.ts +24 -0
- package/plugins/carthagent/src/server/providers.ts +424 -0
- package/plugins/carthagent/src/server/pull-request-rpc.ts +387 -0
- package/plugins/carthagent/src/server/session-controls.ts +82 -0
- package/plugins/carthagent/src/server/telemetry.ts +92 -0
- package/plugins/carthagent/src/server/workspace-rpc.ts +349 -0
- package/plugins/carthagent/src/session-rpc.ts +31 -0
- package/plugins/carthagent/src/testing.ts +85 -0
- package/plugins/carthagent/src/workspace-rpc.ts +133 -0
- package/plugins/carthagent/test-plugin/index.ts +4 -0
- package/plugins/carthagent/test-plugin/package.json +1 -0
- package/plugins/carthagent/tsconfig.json +19 -0
- package/plugins/carthagent/tui.ts +1 -0
- package/prompts/delivery.md +7 -0
- package/public/index.html +983 -0
- package/scenarios/cli/grade_cli.py +69 -0
- package/scenarios/cli/scenario.json +21 -0
- package/scenarios/game/baseline/minecraft.py +193 -0
- package/scenarios/game/context.md +1 -0
- package/scenarios/game/grade_minecraft_clone.py +603 -0
- package/scenarios/game/requirements.txt +2 -0
- package/scenarios/game/scenario.json +33 -0
- package/server.mjs +341 -0
- package/skills/game-development/SKILL.md +36 -0
- package/skills/game-development/assets/ursina_starter.py +98 -0
- package/skills/game-development/scripts/verify_ursina.py +80 -0
- package/skills/software-delivery/SKILL.md +50 -0
- package/skills/typescript-delivery/SKILL.md +69 -0
- package/tests/acceptance-review.test.mjs +13 -0
- package/tests/auth.test.mjs +234 -0
- package/tests/bounded-summary.test.mjs +68 -0
- package/tests/browser-bin.test.mjs +91 -0
- package/tests/browser.test.mjs +96 -0
- package/tests/budget-engine.test.mjs +110 -0
- package/tests/budget.test.mjs +23 -0
- package/tests/cli.test.mjs +245 -0
- package/tests/clipboard.test.mjs +79 -0
- package/tests/cloud-client.test.mjs +129 -0
- package/tests/cloud-control-plane.test.mjs +144 -0
- package/tests/cloud-gateway.test.mjs +147 -0
- package/tests/cloud-http.test.mjs +102 -0
- package/tests/cloud-ledger.test.mjs +75 -0
- package/tests/codegraph-query.test.mjs +66 -0
- package/tests/codegraph.test.mjs +142 -0
- package/tests/delivery-context.test.mjs +66 -0
- package/tests/delivery-review.test.mjs +139 -0
- package/tests/delivery.test.mjs +343 -0
- package/tests/engine-api.mjs +24 -0
- package/tests/experiential-extension.test.mjs +37 -0
- package/tests/experiential.test.mjs +300 -0
- package/tests/extension.test.mjs +921 -0
- package/tests/fixtures/archive-plugin/index.ts +10 -0
- package/tests/guidance.test.mjs +78 -0
- package/tests/model-registry.test.mjs +68 -0
- package/tests/models.test.mjs +70 -0
- package/tests/openai-idempotency.test.mjs +99 -0
- package/tests/opencode-archive-rpc.test.mjs +82 -0
- package/tests/opencode-delivery.test.mjs +231 -0
- package/tests/opencode-providers.test.mjs +414 -0
- package/tests/opencode-runtime.test.mjs +455 -0
- package/tests/opencode-session-controls.test.mjs +115 -0
- package/tests/opencode-session-options.test.mjs +26 -0
- package/tests/opencode-workspace.test.mjs +339 -0
- package/tests/outcome-contract.test.mjs +17 -0
- package/tests/picker.test.mjs +34 -0
- package/tests/plan-advisor.test.mjs +88 -0
- package/tests/plan-review-loop.test.mjs +53 -0
- package/tests/planning-advice.test.mjs +27 -0
- package/tests/planning-contract.test.mjs +65 -0
- package/tests/planning-startup.test.mjs +38 -0
- package/tests/planning-view.test.mjs +33 -0
- package/tests/planning.test.mjs +223 -0
- package/tests/probe-diagnostics.test.mjs +21 -0
- package/tests/pull-request-rpc.test.mjs +366 -0
- package/tests/review-state.test.mjs +32 -0
- package/tests/review.test.mjs +127 -0
- package/tests/server.test.mjs +252 -0
- package/tests/ship-jev.test.mjs +77 -0
- package/tests/ship-telemetry.test.mjs +333 -0
- package/tests/standard-workflow.test.mjs +28 -0
- package/tests/subscription-models.test.mjs +416 -0
- package/tests/subscriptions-extension.test.mjs +27 -0
- package/tests/terminal-title.test.mjs +13 -0
- package/tests/test_grade_minecraft_clone.py +199 -0
- package/tests/test_starter.py +78 -0
- package/tests/theme.test.mjs +175 -0
- package/tests/tui-copy-paste.test.mjs +54 -0
- package/tests/tui.test.mjs +808 -0
- package/tests/update-channels.test.mjs +129 -0
- package/tests/update.test.mjs +175 -0
- package/tests/webdriver.test.mjs +31 -0
- package/tests/workflow.test.mjs +47 -0
- package/tests/workspace-rpc.test.mjs +236 -0
- package/tests/workspace.test.mjs +24 -0
- package/tools/benchmark/advisor.test.mjs +7 -0
- package/tools/benchmark/advisor.ts +27 -0
- package/tools/benchmark/campaign.mjs +45 -0
- package/tools/benchmark/diagnose-request.mjs +40 -0
- package/tools/benchmark/eval-common.mjs +32 -0
- package/tools/benchmark/eval-ledger.mjs +22 -0
- package/tools/benchmark/eval-shop.mjs +26 -0
- package/tools/benchmark/eval-voxel.mjs +20 -0
- package/tools/benchmark/evaluate.mjs +24 -0
- package/tools/benchmark/evaluators.test.mjs +13 -0
- package/tools/benchmark/fixtures/shop/server.mjs +18 -0
- package/tools/benchmark/fixtures/shop/ui.html +8 -0
- package/tools/benchmark/freeze.mjs +30 -0
- package/tools/benchmark/gateway.mjs +91 -0
- package/tools/benchmark/gateway.test.mjs +38 -0
- package/tools/benchmark/generator.mjs +11 -0
- package/tools/benchmark/generator.test.mjs +26 -0
- package/tools/benchmark/guard.test.mjs +133 -0
- package/tools/benchmark/guard.ts +136 -0
- package/tools/benchmark/native-plugin/index.ts +24 -0
- package/tools/benchmark/planning-startup.test.mjs +47 -0
- package/tools/benchmark/preflight-live.mjs +31 -0
- package/tools/benchmark/preflight.mjs +22 -0
- package/tools/benchmark/replay-diagnostic.mjs +23 -0
- package/tools/benchmark/runner.mjs +141 -0
- package/tools/benchmark/runner.test.mjs +93 -0
- package/tools/benchmark/runtime.mjs +23 -0
- package/tools/benchmark/selftest.mjs +47 -0
- package/tools/benchmark/smoke-jev.mjs +5 -0
- package/tools/benchmark/tasks.mjs +20 -0
- package/tools/benchmark/transport.mjs +65 -0
- package/tools/benchmark/transport.test.mjs +44 -0
- package/tools/benchmark/upstream-error.mjs +18 -0
- package/tools/benchmark/upstream-error.test.mjs +10 -0
- package/tools/browser-check.mjs +109 -0
- package/tools/check-syntax.mjs +27 -0
- package/tools/evaluate-plan-advisor.mjs +20 -0
- package/tools/native-fixture.mjs +194 -0
- package/tools/native-pty-smoke.py +108 -0
- package/tools/native-report-plugin/index.ts +50 -0
- package/tools/native-report-plugin/package.json +7 -0
- package/tools/patch-compaction.mjs +24 -0
- package/tools/patch-model-catalog.mjs +12 -0
- package/tools/patch-print-shutdown.mjs +39 -0
- package/tools/repo-pilot/evaluator.cjs +32 -0
- package/tools/repo-pilot/reference.mjs +43 -0
- package/tools/repo-pilot/runner.mjs +85 -0
- package/tools/repo-pilot/sandbox-entry.mjs +12 -0
- package/tools/repo-pilot/tasks.mjs +20 -0
- package/tools/repo-pilot/type-evaluator.cjs +6 -0
- package/tools/test-native-controls.mjs +84 -0
- package/tools/test-native-delivery-host.mjs +307 -0
- package/tools/test-native-evaluation.mjs +46 -0
- package/tools/test-native-host.mjs +385 -0
- package/tools/test-native-outcomes.mjs +73 -0
- package/tools/test-native-package.mjs +70 -0
- package/tools/test-native-pty.mjs +20 -0
- package/tools/test-native-report.mjs +88 -0
- package/tools/test-native-swe-host.mjs +132 -0
- package/tools/test-native-swe.mjs +122 -0
- package/tools/test-picker-pty.py +45 -0
- package/tools/test-python.mjs +29 -0
- package/tools/test-webdriver.mjs +54 -0
- package/tools/verify-release-version.mjs +37 -0
- package/tools/webdriver-check.mjs +52 -0
- package/vendor/agent/bounded-summary.mjs +88 -0
- package/vendor/agent/chunks/anthropic-messages-VWZZOSJQ.js +6 -0
- package/vendor/agent/chunks/anthropic.js +75 -0
- package/vendor/agent/chunks/azure-openai-responses-BJLAM6CD.js +2 -0
- package/vendor/agent/chunks/bedrock-converse-stream.js +74 -0
- package/vendor/agent/chunks/chord-context.js +96 -0
- package/vendor/agent/chunks/chunk-4L3WN2XY.js +2 -0
- package/vendor/agent/chunks/chunk-6CYCI3EJ.js +12 -0
- package/vendor/agent/chunks/chunk-6R7UI4IY.js +2 -0
- package/vendor/agent/chunks/chunk-7ZC4UXSL.js +2 -0
- package/vendor/agent/chunks/chunk-AXIIZGTV.js +2 -0
- package/vendor/agent/chunks/chunk-CLNPYIDP.js +42 -0
- package/vendor/agent/chunks/chunk-DRQDKNXA.js +2 -0
- package/vendor/agent/chunks/chunk-GMWCTUPB.js +2 -0
- package/vendor/agent/chunks/chunk-IDDQWTHI.js +2 -0
- package/vendor/agent/chunks/chunk-JVUZSMYM.js +1548 -0
- package/vendor/agent/chunks/chunk-L2ZPNLYD.js +2 -0
- package/vendor/agent/chunks/chunk-NUHFSC37.js +25 -0
- package/vendor/agent/chunks/chunk-OUXLLA64.js +11 -0
- package/vendor/agent/chunks/chunk-PGXDEOVV.js +2 -0
- package/vendor/agent/chunks/chunk-PJACZCIR.js +2 -0
- package/vendor/agent/chunks/chunk-PRRNXB7S.js +2 -0
- package/vendor/agent/chunks/chunk-TEPMHNKQ.js +2 -0
- package/vendor/agent/chunks/chunk-TRDNDS6A.js +4 -0
- package/vendor/agent/chunks/chunk-U6ZMQKGD.js +50 -0
- package/vendor/agent/chunks/chunk-UAQELI3K.js +2 -0
- package/vendor/agent/chunks/chunk-USJZMAIR.js +2 -0
- package/vendor/agent/chunks/chunk-XDUWOHPL.js +6 -0
- package/vendor/agent/chunks/chunk-XNGRGP62.js +2 -0
- package/vendor/agent/chunks/github-copilot.js +2 -0
- package/vendor/agent/chunks/google-generative-ai-Q2K7FBDI.js +2 -0
- package/vendor/agent/chunks/google-vertex-7UJBF4S7.js +2 -0
- package/vendor/agent/chunks/https-proxy-agent-2VXB7436.js +13 -0
- package/vendor/agent/chunks/image-resize-worker.js +2 -0
- package/vendor/agent/chunks/kimi-coding.js +2 -0
- package/vendor/agent/chunks/lib-HGQMNYVT.js +9 -0
- package/vendor/agent/chunks/mistral-conversations-4M6BZBX6.js +5 -0
- package/vendor/agent/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/vendor/agent/chunks/node-KG362ECQ.js +16 -0
- package/vendor/agent/chunks/node-TWVVAGPO.js +2 -0
- package/vendor/agent/chunks/openai-codex-responses-R6VYZTVY.js +10 -0
- package/vendor/agent/chunks/openai-codex.js +75 -0
- package/vendor/agent/chunks/openai-completions-EKZT2IH2.js +7 -0
- package/vendor/agent/chunks/openai-responses-TFDINO6W.js +2 -0
- package/vendor/agent/chunks/openrouter-images-N4XVVFSD.js +2 -0
- package/vendor/agent/chunks/openrouter.js +75 -0
- package/vendor/agent/chunks/pi-messages-PML4SPVJ.js +8 -0
- package/vendor/agent/chunks/radius.js +75 -0
- package/vendor/agent/chunks/src-UK77SYZE.js +4 -0
- package/vendor/agent/chunks/xai.js +2 -0
- package/vendor/agent/cli.js +3 -0
- package/vendor/agent/dist/modes/interactive/theme/dark.json +91 -0
- package/vendor/agent/dist/modes/interactive/theme/light.json +90 -0
- package/vendor/agent/dist/modes/interactive/theme/theme-schema.json +356 -0
- package/vendor/agent/index.js +2 -0
- package/vendor/agent/modes/interactive/theme/dark.json +91 -0
- package/vendor/agent/modes/interactive/theme/light.json +90 -0
- package/vendor/agent/modes/interactive/theme/theme-schema.json +356 -0
- package/vendor/agent/package.json +14 -0
- package/vendor/agent/rpc-entry.js +3 -0
- package/vendor/agent/theme/dark.json +91 -0
- package/vendor/agent/theme/light.json +90 -0
- package/vendor/agent/theme/theme-schema.json +356 -0
package/docs/budgets.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Session delivery budgets
|
|
2
|
+
|
|
3
|
+
The delivery extension supports opt-in execution limits on Windows, macOS,
|
|
4
|
+
Linux and WSL. These are agent orchestration controls, not a security sandbox
|
|
5
|
+
or a dollar/token billing cap.
|
|
6
|
+
|
|
7
|
+
Normal `ctg` launches accept `--max-tools`, `--max-seconds`, and `--max-repairs`
|
|
8
|
+
for both TUI and headless mode. For example:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
node bin/ctg.mjs -p --max-tools 100 --max-seconds 900 --max-repairs 2 "Implement the requested change"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Invalid or missing values, and budget options combined with `--no-delivery`,
|
|
15
|
+
fail before launching the engine. Use `/delivery-budget-status` to inspect
|
|
16
|
+
usage, remaining allowance (null means unlimited), and stop reason without
|
|
17
|
+
spending a tool call. The command displays a JSON status message.
|
|
18
|
+
|
|
19
|
+
Alternatively launch the bundled engine directly with the extension and flags
|
|
20
|
+
(from the repository root; works in PowerShell and POSIX shells):
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
node vendor/agent/cli.js -e extensions/delivery.ts --delivery-max-tools 100 --delivery-max-seconds 900 --delivery-max-repairs 2
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Each flag accepts an integer from 0 to 1000000. Zero disables that dimension;
|
|
27
|
+
all default to zero. The existing maximum of two automatic repair nudges per
|
|
28
|
+
user input still applies. The new repair limit additionally caps nudges over
|
|
29
|
+
the entire budget, including across user follow-ups.
|
|
30
|
+
|
|
31
|
+
- Tool calls count at admission, including status calls and subsequently blocked
|
|
32
|
+
calls. Exactly N calls may be admitted; the next attempt stops the agent.
|
|
33
|
+
- Seconds measure wall time from budget creation, including idle time and time
|
|
34
|
+
while the process is closed. An active turn has a timer that requests abort
|
|
35
|
+
even if no tools are invoked. An idle expired session stops on its next run.
|
|
36
|
+
- Repair rounds count automatic delivery follow-ups, not arbitrary model turns.
|
|
37
|
+
- Limits and counters are stored as session entries independently of plans.
|
|
38
|
+
Replanning, input, compaction and same-session tree navigation do not reset
|
|
39
|
+
them. Restoration reads all session entries, not only the selected branch.
|
|
40
|
+
Existing saved limits remain authoritative until reset.
|
|
41
|
+
|
|
42
|
+
When exhausted, the extension blocks tools, requests engine abort, suppresses
|
|
43
|
+
repair follow-ups, and emits a `delivery-budget-stop` JSON message containing
|
|
44
|
+
its reason, counters, requirements and last recorded evidence. That evidence
|
|
45
|
+
is a snapshot, **not a fresh verification**. The delivery report is not falsely
|
|
46
|
+
marked verified or overwritten; unfinished work remains unfinished.
|
|
47
|
+
|
|
48
|
+
To authorize more work, explicitly run `/delivery-budget-reset` while the agent
|
|
49
|
+
is idle. In headless mode a command-only invocation on a previously failed
|
|
50
|
+
session may still exit 1 because the engine prints its last assistant error;
|
|
51
|
+
the command's persisted reset is applied. Our offline subprocess regression
|
|
52
|
+
checks the saved reset and subsequent tool execution rather than treating that
|
|
53
|
+
exit code as proof that reset failed. It creates a fresh budget using the current launch flags. This is a
|
|
54
|
+
user command, not a model tool. A genuinely new session also starts a new budget.
|
|
55
|
+
Separate processes/sessions do not share a workspace-wide quota, and deliberate
|
|
56
|
+
session-file edits or extension removal can bypass the limits.
|
|
57
|
+
|
|
58
|
+
Cancellation is cooperative: engine/provider/tools must honor abort signals.
|
|
59
|
+
Detached subprocesses, uninterruptible synchronous code, and requests already
|
|
60
|
+
billed by a provider cannot be undone. Time limits are not hard OS process
|
|
61
|
+
termination deadlines. No paid-provider cancellation guarantee is implied.
|
|
62
|
+
|
|
63
|
+
The bundled engine's headless print-mode finalizer also destroys its captured
|
|
64
|
+
Undici dispatcher, but only if that dispatcher is still the process-global
|
|
65
|
+
dispatcher. This releases sockets left open by aborted provider requests without
|
|
66
|
+
destroying a dispatcher that another runtime installed later. After refreshing the
|
|
67
|
+
vendored engine, run `node tools/patch-print-shutdown.mjs`; the patcher fails
|
|
68
|
+
closed if the expected print-mode anchors have changed.
|
|
69
|
+
|
|
70
|
+
Native Windows/macOS/Linux CI runs the regression suite on Node 22 and 24;
|
|
71
|
+
WSL is validated separately locally. This does not establish every terminal,
|
|
72
|
+
OS version, browser or processor architecture as tested.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Bounded context compaction
|
|
2
|
+
|
|
3
|
+
Both vendored engine compaction paths use `vendor/agent/bounded-summary.mjs`.
|
|
4
|
+
After refreshing the engine bundle, run `node tools/patch-compaction.mjs`. The
|
|
5
|
+
patcher validates its anchors and fails rather than guessing at changed code.
|
|
6
|
+
|
|
7
|
+
Compaction starts at the earlier of 70% of the context window or the configured
|
|
8
|
+
reserve boundary. Context estimates take the maximum of usage-based tokens and
|
|
9
|
+
serialized UTF-8 bytes divided by four, including when cache usage is available.
|
|
10
|
+
This is conservative for the managed gateway, whose current catalog advertises
|
|
11
|
+
its serialized byte cap divided by four as the usable context window.
|
|
12
|
+
|
|
13
|
+
Summary requests use half the catalog-derived byte cap (or half an explicit
|
|
14
|
+
`maxRequestBytes`, if stricter), measured against their serialized context.
|
|
15
|
+
The remaining space allows for transport encoding, provider fields, and output.
|
|
16
|
+
This is a conservative bound, not an exact tokenizer or wire-payload measurement.
|
|
17
|
+
Provider size rejections halve the budget and retry with smaller fragments.
|
|
18
|
+
|
|
19
|
+
Oversized history is split at Unicode-safe boundaries. Every fragment includes
|
|
20
|
+
instructions to preserve constraints, paths, unresolved failures, and next steps.
|
|
21
|
+
Ordered fragment summaries are recursively combined into one checkpoint. No raw
|
|
22
|
+
history is silently truncated. Prior summaries and custom instructions are part
|
|
23
|
+
of the input being reduced. Each subrequest has a distinct session/operation seed;
|
|
24
|
+
all returned usage is accumulated. Output is capped at 4096 tokens per request.
|
|
25
|
+
|
|
26
|
+
Aborts, non-size failures, empty/tool-call/truncated responses, non-converging
|
|
27
|
+
reduction, and the 128-request/eight-level limits fail compaction rather than
|
|
28
|
+
persisting an incomplete checkpoint. The UI labels this as a failure, not success.
|
|
29
|
+
There is no guarantee of lossless semantic compression: summaries remain model
|
|
30
|
+
generated. Tests use deterministic transports and cover bytes, chunk coverage,
|
|
31
|
+
adaptive rejection recovery, cancellation, failure states, and UI notices.
|
|
32
|
+
|
|
33
|
+
Restart CTG after updating to load the new engine and UI. Existing session logs
|
|
34
|
+
and working files are not rewritten by this update.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Context efficiency implementation plan
|
|
2
|
+
|
|
3
|
+
Saved before implementation. Based on nine-cell v4 evidence: five harness cells exceeded the local input-byte envelope; one hit output length. Preserve all v1–v4 evidence. No paid benchmark rerun or production repository change is authorized by this implementation stage.
|
|
4
|
+
|
|
5
|
+
## Boundaries and invariants
|
|
6
|
+
|
|
7
|
+
1. `lib/delivery-context.mjs` pure projections own compact recovery/status/review receipts, byte accounting and conservative history selection. They cannot mutate lifecycle, acceptance, checks, evidence or approval. Exact active acceptance text, validator argv, outputs, progress and all unresolved blockers remain in recovery; size is measured, never silently trimmed to a hard cap.
|
|
8
|
+
2. Extension owns archive persistence and event integration. Superseded successful **delivery-only, fully paired** tool turns can become archive receipts in outbound context; original session/report are untouched. Failed results, user messages, mixed coding batches, incomplete pairing, and recent delivery turns remain verbatim. Do not archive captures during pending design review. Receipts link to immutable content-addressed archives; archive failure retains original messages.
|
|
9
|
+
3. Compact normal status and review responses stop serializing nested planning history/capture/revisions. Inspection must remain available in full; large inspection output must have a real complete artifact, not the current misleading generic truncation notice. Reading/semantic review remains model-authored. Any paging is explicit, with digest/source/capture identity retained; large captures are not considered read because a pointer exists.
|
|
10
|
+
4. Compaction integration uses pi's documented lifecycle, not a second summarizer. Refresh active run before restoring a deterministic recovery record. No model summary can create approval, erase blockers or certify freshness. Do not silently enable paid compaction or override user settings. Add explicit pressure advice/telemetry and document conservative native compaction settings; automatic byte-triggered compaction remains gated on tested engine support.
|
|
11
|
+
5. Metrics contain numeric category byte counts (system/schema/messages/reasoning/tool classes), no message bodies. Token estimates are labeled estimates, not tokenizer guarantees. A useful large-fixture test must show meaningful reduction while retaining exact obligations.
|
|
12
|
+
|
|
13
|
+
## Challenges and validation before delivery
|
|
14
|
+
|
|
15
|
+
- Restore after compaction, revision, source edits and branch switching: approval still locked when stale; exact validators/acceptance/outputs and failed evidence remain visible.
|
|
16
|
+
- Old tool-call batches: never orphan IDs or merge tool results across user messages; preserve every failed result. Retained provider reasoning signatures untouched; archived whole turns remove their replay metadata together.
|
|
17
|
+
- Full capture >48KB: parseable response, real retrievable archive, no mutation of capture, missing sections explicitly disclosed. Small-capture compatibility retained.
|
|
18
|
+
- Archive corruption/symlinks/write failure fail conservatively; do not prune data without a verified archive. Session files and reports remain unchanged by projection.
|
|
19
|
+
- Metric category totals, multibyte strings, no prompt/key leakage. Context pressure must not initiate paid retries/compaction unexpectedly.
|
|
20
|
+
- Pure tests + real extension integration + repository quality; benchmark manifests and historic result documents remain preserved. No benchmark superiority claim from synthetic byte savings.
|
|
21
|
+
|
|
22
|
+
## Subsequent repository benchmark design
|
|
23
|
+
|
|
24
|
+
After implementation, design a preregistered suite, not tasks selected because baseline pi failed. Use realistic feature additions across pinned existing repositories: authorization/migrations, cross-layer optimistic updates, third-party API integration, background jobs and compatibility changes. Separate offline hermetic and authorized online documentation tracks. Specify pristine base SHAs, dependencies/services, network rules, protected tests, held-out probes, paired budgets, common compaction settings and >=3 repetitions. Include old/new harness ablation and Jev separately. Publish development pilots separately from untouched test tasks. Actual expensive runs require a separate frozen manifest and cost authorization.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Context-efficiency author review and validation
|
|
2
|
+
|
|
3
|
+
This is an **author review**, not independent approval.
|
|
4
|
+
|
|
5
|
+
## Challenged risks and dispositions
|
|
6
|
+
|
|
7
|
+
1. **Summaries laundering authorization:** recovery is a read-only projection with explicit non-authority text; existing `planningStatus`/tool gate still fingerprints source and binds run/revision/digest. Extension regression changes source after approval and emits compaction notification: mutation remains blocked.
|
|
8
|
+
2. **Losing exact requirements or negative evidence:** recovery retains acceptance/check argv/outputs, open blockers, validation and review findings, review limitations, failed check status and excerpt. Pure regression asserts exact equality and unchanged durable state across projection/revision. Original evidence/history remain in report/session. Extremely large status/finding responses still encounter the existing presentation limit; not represented as universally bounded lossless responses.
|
|
9
|
+
3. **Provider-invalid orphan tool results or altered reasoning signatures:** only a complete contiguous assistant plus all its matching unique successful delivery-only results is replaceable. Never alter an assistant's reasoning field in place; preserve mixed code turns, failures and the newest eligible exchanges. No claim of compatibility with every provider cache/continuation API; live provider smoke remains needed for a new campaign.
|
|
10
|
+
4. **Pointer pretending inspection occurred:** oversized captures include explicit full paged-read instruction and immutable identity, with full artifact on disk. A pointer is not a reading certificate. Existing review capture match/scenario requirements remain in effect; actual comprehension still unprovable. Trusted advisor receives full capture through tool details.
|
|
11
|
+
5. **Archive corruption/write failure:** verify stored bytes on every archive substitution. Any storage failure conservatively retains original history. Tests cover corrupt artifact and symlinked root rejection. Atomic content-addressed create is not an OS sandbox or crash-proof disk guarantee.
|
|
12
|
+
6. **Compaction resetting budgets or selecting another run:** compaction hook refreshes the same selected run only; it does not call session restore, reset timers or clear counters. Branch/session restore retains existing behavior. No automatic paid summarizer is introduced.
|
|
13
|
+
7. **Telemetry leaking source:** only numerical sizes/categories/growth/time written. No prompt snippets or content hashes that imply semantic reading. Categories are coarse wire-JSON attribution; bytes/4 explicitly heuristic.
|
|
14
|
+
8. **Overclaiming savings:** offline historical potential message savings 26–51% assume archive eligibility and simulated references. Not proof of better live completion, not actual serialized-provider request savings. Full design remains retrievable and exact obligations can still be large.
|
|
15
|
+
9. **Benchmark integrity:** no historical candidate/evaluator/receipt edited. Adapter source change requires a new manifest/root; old freeze no longer validates this changed checkout and must not be overwritten.
|
|
16
|
+
10. **Research claims:** repository API/README retrieved directly; identify unstable branches, licensing boundaries and unresolved Cal.com/Cal.diy identity. No claim that proposed tickets or containers are ready.
|
|
17
|
+
|
|
18
|
+
## Results
|
|
19
|
+
|
|
20
|
+
- `npm run quality`: lint, typecheck, build, **352/352 tests passed**; log `/tmp/context-quality-final.log`.
|
|
21
|
+
- `node --test tools/benchmark/advisor.test.mjs tools/benchmark/runner.test.mjs`: **5/5 passed**, including actual installed pi offline discovery/guard and advisor integration; log `/tmp/context-installed-engine.log`.
|
|
22
|
+
- `git diff --check`: clean.
|
|
23
|
+
- No new paid model calls, no browser/Python suite run in this change, no independent review, no remote CI/PR/merge claimed.
|
|
24
|
+
|
|
25
|
+
## Follow-ups, not implemented claims
|
|
26
|
+
|
|
27
|
+
Byte-triggered automatic native-compaction scheduling; incremental section/patch design tools; pagination for every unusually large findings/status response; live context+compaction completion validation; new repository containers/reference patches/held-out evaluators; repeated online/offline paid comparisons. Native compaction is user-configured, with deterministic recovery already integrated.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Delivery context: compact projections, durable obligations
|
|
2
|
+
|
|
3
|
+
## Implemented
|
|
4
|
+
|
|
5
|
+
`lib/delivery-context.mjs` owns pure recovery/status/review projections, context byte metrics and conservative archival selection. `lib/context-archive.mjs` owns immutable content-addressed storage. The extension composes these without changing approval or verification policy.
|
|
6
|
+
|
|
7
|
+
- `delivery_status` no longer echoes full `state.plan.design`, capture, planning history or revision snapshots. It returns exact active acceptance, checks (including argv), outputs, progress, current findings and compact evidence, plus report location and freshness/next-action fields.
|
|
8
|
+
- Successful plan-review responses return counts instead of repeating every walkthrough/challenge. Findings, limitations, identity and provenance stay visible; full reviews remain in reports/session entries.
|
|
9
|
+
- Large `delivery_design inspect` responses return a **complete capture archive path**, ID/digest/source identity and explicit instruction to read the entire artifact in pages. Small captures retain the previous shape. Full large capture remains in tool `details.deliveryCapture` for trusted advisor consumers; it is not automatically placed into model text.
|
|
10
|
+
- After recorded approval, older successful **delivery-only** paired exchanges can become outbound archive references. Keep the two newest eligible exchanges. Failed tool results, reported blocking findings/failed checks, user messages, mixed/code tool turns, unmatched pairs and pending unapproved review contexts stay verbatim. Original session messages and full report history are not rewritten. Archive originals are verified before any replacement; failure retains messages.
|
|
11
|
+
- Context rebuild injects a deterministic recovery record. It preserves exact acceptance, required check definitions, outputs, progress, all persistent open blockers and failed check status. It is explicitly **not authority**. Source freshness, approval and completion remain checked by existing policy immediately before execution/finish.
|
|
12
|
+
- Native `session_compact` refreshes the same selected run without resetting timers, budget, repair counts or planning state. Branch/session restoration continues through the existing reconciliation logic. A generated summary cannot revive approval.
|
|
13
|
+
- `before_provider_request` records numeric category bytes, growth, and labeled bytes/4 token estimate to `.harness/.../context-metrics.jsonl`. No message text is copied. Categories: system, schemas, planning calls, tool results, code calls, reasoning fields, remaining conversation, serialization envelope. Wire formats without messages are conservatively measured as envelope; this is not universal provider tokenizer accounting.
|
|
14
|
+
- Above 240KB in the previously observed payload, inject a pressure warning to reserve room for verification/handoff. It does not silently trigger paid calls or change acceptance.
|
|
15
|
+
|
|
16
|
+
## Compaction: explicit configuration, not a hidden new model call
|
|
17
|
+
|
|
18
|
+
Native pi compaction remains controlled by the user's engine settings. **This change does not turn it on behind the user's back**, and does not add a second summarizing model. Future comparison runs must enable the same native policy in all arms and charge summarization tokens/time to each cell.
|
|
19
|
+
|
|
20
|
+
For a 100k-token engine configuration, an initial development setting to validate is:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{"compaction":{"enabled":true,"reserveTokens":40000,"keepRecentTokens":12000}}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
That requests native compaction around 60k estimated tokens while keeping recent work. These are tuning starting points, **not** a guarantee against a 400KB byte ceiling: escaping, schemas, reasoning metadata and long Unicode/tool results can break bytes/token heuristics. Use the numeric metrics and a preflight that exercises real tool history and compaction before freezing a paid test. A byte-triggered automatic compaction scheduler and incremental plan-authoring APIs remain follow-up work; no implementation or success claim for them is made here.
|
|
27
|
+
|
|
28
|
+
## Measured offline savings
|
|
29
|
+
|
|
30
|
+
Applying eligible archive substitutions to the final saved v4 message histories (assuming approved state, with simulated compact archive references) reduced serialized **message-history** bytes by:
|
|
31
|
+
|
|
32
|
+
| Task | Carthagent | Carthagent + Jev |
|
|
33
|
+
|---|---:|---:|
|
|
34
|
+
| Voxel | 26.4% | 27.6% |
|
|
35
|
+
| Shop | 29.6% | 38.7% |
|
|
36
|
+
| Ledger | 48.4% | 50.9% |
|
|
37
|
+
|
|
38
|
+
Artifact `/home/baissi/benchmarks/context-efficiency/historical-projection.json`. This is an offline potential-savings measurement, not replayed paid runs, live provider tokens, improved correctness, or proof that the old runs would have finished. Post-revision pending review disables archival, so the final-history eligibility assumption can overestimate savings in an actual state. The smaller status/review responses are additional unquantified changes.
|
|
39
|
+
|
|
40
|
+
## Limits and compatibility
|
|
41
|
+
|
|
42
|
+
- Exact requirements/checks/blockers are not silently trimmed to a fixed recovery size. A huge contract can still be huge.
|
|
43
|
+
- Archive files and reports may contain secrets already present in planning/tool data; no default redaction or zero retention. Archives use 0600 for new files. Same-user access and symlink races against a hostile host are outside the participating-tool boundary.
|
|
44
|
+
- Archive pointer/read receipts never certify actual reading or semantic review. The model must explicitly retrieve large captures; all review and approval obligations remain unchanged.
|
|
45
|
+
- The ordinary response truncation helper still applies to extremely large non-inspection responses; this change fixes large inspection retrieval specifically, not every possible result. Review/validation finding-list pagination is future work.
|
|
46
|
+
- Benchmark advisor now accepts large captures from trusted tool details as well as small capture text. This invalidates historic source manifests for rerun; existing freezes/results remain unchanged evidence.
|
|
47
|
+
- No code/test output or user messages are compressed by the deterministic archive selection. Native compaction handles general conversation growth, with the recovery record protecting harness obligations.
|
|
48
|
+
|
|
49
|
+
Validation includes pure size/invariant tests, real extension gate/restore tests, large-capture retrieval, failure-preserving history projection, numeric telemetry redaction-by-design and repository quality. Native compaction's model-generated summary quality and a paid completion-rate improvement remain unmeasured.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Three-task DeepSeek / Jev benchmark — protocol v1
|
|
2
|
+
|
|
3
|
+
Status: design challenged before benchmark implementation; candidates have not run.
|
|
4
|
+
|
|
5
|
+
## Question and experimental arms
|
|
6
|
+
|
|
7
|
+
Does Carthagent improve externally measured task delivery over plain pi, and does advisory Jev add value above the same harness? All arms use the same installed pi engine and pinned `deepseek/deepseek-v4.1-flash` via OpenRouter, high reasoning, identical task text, initial workspace, tool availability and resource ceilings. The harness arms explicitly load this repository's delivery extension/skill; the plain arm has no extensions, skills, context files or prompt templates. This controls engine version rather than conflating vendored-engine differences with harness value. Record exact engine and harness versions.
|
|
8
|
+
|
|
9
|
+
A: plain pi. B: pi + Carthagent, no Jev. C: pi + Carthagent + Jev advisory feedback on the first successful design inspection per revision (at most 3 calls/run). No Jev router: it could choose a different generator and confound the ablation. Jev cannot approve or weaken deterministic gates. Probabilities >=0.5 flag review topics, not proven defects. Use OpenRouter `typesafe/jev-1.13` Decisions API, preserving returned snapshot/provider/cost.
|
|
10
|
+
|
|
11
|
+
Initial exploratory matrix: **3 tasks × 3 arms × 1 independent run = 9 runs**. Balanced task-specific arm order; no selective retries or supervisor repairs. One replicate per cell is exploratory, not statistically conclusive. Infrastructure smoke tests are separate and are never counted as task successes. If infrastructure fails, preserve results and explicitly document any protocol revision before restarting any affected comparisons.
|
|
12
|
+
|
|
13
|
+
## Tasks and external acceptance
|
|
14
|
+
|
|
15
|
+
1. **Rust voxel sandbox (small Minecraft-like clone)**: actual Rust gameplay/voxel state and software-rendered first-person view, deterministic terrain, collision/gravity, block remove/place with bounded reach, save/reload and malformed-save rejection. Browser input/display may be a thin JS frontend to the Rust server. Test Rust compilation and headless scenarios, then real browser controls/rendering and screenshot. Not a Minecraft-complete game: no crafting, mobs, infinite streaming or multiplayer.
|
|
16
|
+
2. **Sales website**: responsive local outdoor-products storefront, search/category/sort, stock-aware persistent cart, exact-cent totals, discount/shipping rules, validated checkout, idempotent order submission, persisted orders and stock, accessible status/error UI. Evaluate API contracts and real browser add/update/reload/checkout at desktop/mobile widths. No real payments/deployment.
|
|
17
|
+
3. **Exact-money transfer ledger**: Node JSONL service/CLI, signed decimal parsing without float rounding, integer-cent balance invariants at large magnitudes, atomic insufficient-funds rejection, idempotent retries/conflict rejection, persistence/restart and malformed log handling. Evaluate ordinary, adversarial and deterministic seeded metamorphic cases. This targets defects that screenshots and agent-owned tests miss.
|
|
18
|
+
|
|
19
|
+
Each task gets a frozen public prompt with observable interfaces and detailed requirements. External tests are written and hashed before candidates start; evaluator files are outside candidate workspaces and never sent to models. They are **withheld, not OS-isolated secrets**: same-host shell access is not a security sandbox. Do not claim blind testing if a trace shows evaluator access. Public API specifications are not hidden-test leakage. No candidate receives external scores or repairs during its initial run.
|
|
20
|
+
|
|
21
|
+
Score separate behavioral categories; report missing/unbuildable/unlaunchable as failures, not missing rows. Collect agent-authored tests separately. Capture visual artifacts but do not pretend pixel existence proves playability or subjective design quality. Report browser/runtime infrastructure failures separately from candidate failures.
|
|
22
|
+
|
|
23
|
+
## Budgets and measurement
|
|
24
|
+
|
|
25
|
+
- Per candidate: 15 minutes wall time, 120 observed tool starts, at most 100 paid generation requests, 16,384 generated tokens per request, 100,000-token engine context setting and 402,000-byte serialized request cap (conservative <=412,000-token reservation envelope including protocol overhead; actual token count is recorded).
|
|
26
|
+
- Provider proxy enforces max input/output prices of $0.30/$1.20 per million for DeepSeek, $0.15 generation-request reservation (covering <=412k input tokens and 16,384 output tokens at these rates) and **$3 maximum reserved spend per candidate**. Stop on unknown/invalid billing instead of interpreting missing cost as free; reconcile `usage.cost` when available. Jev max 3 requests, <=64KB request, $0.01 reservation each, included in candidate ceiling. Overall candidate ceiling $27; smoke/provisioning API calls separately capped at $0.10. No automatic escalation.
|
|
27
|
+
- Track external score, completion/false-completion, all failures, wall time, requests/tool calls, input/output/cache/reasoning token usage, actual provider cost, Jev latency/probabilities and model snapshots. Local provisioning/build time is recorded separately. Missing cost is unknown, not zero.
|
|
28
|
+
- One bounded infrastructure retry only for connection failure before generation, never candidate retries that erase failures. Sequential paid requests per candidate; overlapping tasks may be scheduled for practicality, with hardware contention disclosed.
|
|
29
|
+
|
|
30
|
+
## SRP / DI design
|
|
31
|
+
|
|
32
|
+
- Frozen protocol/task specs: own task meaning and scoring weights, no execution.
|
|
33
|
+
- `gateway`: owns outbound model authentication, model allowlist, bounded requests and spend reservation, sanitized usage receipts. Inject fetch/key/clock; candidates receive a dummy local credential, never the real key. Never log authorization headers. Restrict listening to loopback.
|
|
34
|
+
- `runner`: owns workspace/process lifecycle, resource deadline, JSON event logging, immutable invocation/results; no scoring or model-written repairs. Inject engine path, process environment and gateway address.
|
|
35
|
+
- `advisor`: owns extracting an inspection result, typed Jev rubric and attaching advisory feedback to the corresponding generator tool result; no approval or execution permission. Exactly the same Carthagent policy in B/C.
|
|
36
|
+
- `evaluators`: own independently specified functional oracles and browser checks, no candidate prompts or automatic repair. Real subprocess/HTTP/browser boundaries, not fake-only tests.
|
|
37
|
+
- `report`: joins immutable receipts and scores; missing data stays missing; no synthetic statistical certainty.
|
|
38
|
+
|
|
39
|
+
## Preimplementation challenges / scenario walkthroughs
|
|
40
|
+
|
|
41
|
+
- Availability: OpenRouter's ordinary chat catalog lists DeepSeek and Jev Router, but Jev itself is a separate Decisions API. Verified primary Jev docs before choosing endpoint; never substitute router results for a Jev ablation.
|
|
42
|
+
- Key confidentiality: parent reads only OpenRouter auth; child uses dummy proxy credential and a clean config/environment. Shell can still read host files absent OS isolation, so never represent this as protection against a malicious candidate. No real secrets in prompts, saved configs or request logs.
|
|
43
|
+
- Fairness: same engine/tool set/settings and unmodified public task prompts. Harness guidance and Jev feedback are intentional treatment differences. Tool-budget overhead is part of harness cost; also report generation/request/time overhead so quality is not cherry-picked.
|
|
44
|
+
- Failure: invalid model response, no billing, timeout, exhausted budget, compiler failure and no rendered UI stay visible. Missing Jev is an unavailable treatment, not a successful Jev run.
|
|
45
|
+
- Oracle adequacy: test mutant behaviors (float money, duplicate application, ignored stock, no voxel change) to show evaluators detect meaningful failures before running candidates. Real browser checks complement API/headless checks.
|
|
46
|
+
- Persistence: restart after state changes, then retry same operation; require exactly-once state. Malformed state must reject without overwriting valid state.
|
|
47
|
+
- Visual scope: require a rendered scene plus controls/state transitions; do not award a playable-clone score to only a data structure or screenshot.
|
|
48
|
+
- Environment: Rust is not installed on PATH; provision an isolated toolchain before candidates. Firefox exists but snap cannot use /tmp worktrees; use benchmark runtime under the home directory with an explicit writable profile root.
|
|
49
|
+
- Provenance: generative/model-authored planning reviews are not independent; external tests are supervisor-authored with published limitations. Historical earlier trials remain untouched.
|
|
50
|
+
|
|
51
|
+
Outcome: protocol ready for tooling/evaluator implementation. Freeze implementation hashes before any task candidate. Adjustments needed after infrastructure probes must be logged, not silently retrofitted to favor an arm.
|
|
52
|
+
|
|
53
|
+
## Pre-candidate infrastructure findings and protocol v1.1
|
|
54
|
+
|
|
55
|
+
- Rust 1.98.1/cargo 1.98.1 were already installed under `~/.cargo/bin`; only PATH composition was needed.
|
|
56
|
+
- The first plain smoke preserved a genuine budget-stop: its $0.05 total could not reserve a second $0.05 generation request after the first bill. A separate harness smoke with $0.08 total completed tool use and `SMOKE_OK`. No task candidate ran during these corrections. Paid smoke actual costs: $0.0007059 + $0.0041763 + $0.000019278 (Jev) = $0.004901478, below the $0.10 ceiling.
|
|
57
|
+
- Real Firefox initially exposed two supervisor fixture defects (missing HTML content type; missing WebDriver return). Both were repaired before candidate evaluation and original failing logs retained. Native click + screenshot now pass under home-directory profiles.
|
|
58
|
+
- Jev live endpoint smoke returned valid typed answers and billing. Inspection of the real delivery tool showed an outer `{result,planningStatus}` wrapper; the benchmark adapter now reads `result`. A real loopback integration test reproduces this exact envelope, verifies once-per-revision feedback and proves the adapter leaves the original tool result unchanged. The initial synthetic smoke did not use the real wrapper; it established API connectivity, not end-to-end harness integration.
|
|
59
|
+
- Initial 95KB generation body cap would unnecessarily truncate longer coding contexts. Before all candidates, increased to 402KB after serialization, with $0.15 reservation rather than $0.05. Reservation uses a deliberately conservative byte/token envelope, not a claim that bytes/4 is a guaranteed tokenizer bound. Provider billing remains the external source of truth; unexpected billing stops further requests, not a vendor-enforced account cap.
|
|
60
|
+
- Gateway buffers bounded upstream SSE until billing arrives; all arms have the same buffering and 180-second per-request transport deadline. This delays visible token streaming, not the model's generation. There are no automatic gateway retries. No OS sandbox or absolute account-level spending guarantee is claimed.
|
|
61
|
+
- Evaluator self-tests include a separately authored ledger reference process and float/idempotency mutant processes. Shop quote and voxel-state/change oracles have component-level mutant assertions, not complete reference applications; their full candidate HTTP/browser suites have not been validated against independently built passing apps. Report that limitation. Browser infrastructure uses actual Firefox and native input.
|
|
62
|
+
- Scores are unweighted category pass counts with the complete assertions published afterward; categories are not equal complexity. Visual screenshots support inspection but there is no invented quantitative aesthetic score.
|
|
63
|
+
|
|
64
|
+
## Verified primary references
|
|
65
|
+
|
|
66
|
+
- https://openrouter.ai/api/v1/models (retrieved 2026-09-28): DeepSeek model ID and $0.30/M input, $1.20/M output, $0.006/M cache-read listing.
|
|
67
|
+
- https://openrouter.ai/docs/guides/community/jev : Jev available with OpenRouter key, distinct Decisions/System One endpoints.
|
|
68
|
+
- https://openrouter.ai/docs/guides/community/jev-tutorial : typed answers and `usage.cost`, pinned `typesafe/jev-1.13` resolving to dated snapshot.
|
|
69
|
+
|
|
70
|
+
The full API catalog and primary documentation snapshots were retained under `/tmp/ctg-benchmark-discovery/`. Search snippets were discovery aids, not the basis for endpoint selection.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Benchmark readiness repair (v3)
|
|
2
|
+
|
|
3
|
+
User requested all fixes needed to make the tests runnable. Preserve v1/v2 and their reports. Do not change candidate code or interpret transport failures as model failures.
|
|
4
|
+
|
|
5
|
+
## Design before implementation
|
|
6
|
+
|
|
7
|
+
1. Transport adapter owns HTTPS/process I/O only: use a fresh system-curl process (system OpenSSL, HTTP/1.1, no shared TLS session/pool) per upstream request, with normal certificate/hostname validation. No `-k`, relaxed ciphers, credential argv, redirects, implicit curl config, or automatic POST retry. Fixed gateway endpoints remain authoritative. Bound body, deadline and subprocess lifetime. Return a fetch-compatible buffered response; gateway owns envelope and billing. TLS root cause remains unproven; this is a separately tested avoidance path.
|
|
8
|
+
2. Shared runtime adapter owns explicit sanitized environment, copied offline fd/rg binaries, process cleanup and engine paths. Verify actual pi read/ls/find/grep in an empty isolated config, not merely `--version`. Same tool/guard setup for every arm; planning gates unchanged.
|
|
9
|
+
3. Durable campaign accounting owns exclusive locking, atomic snapshots, reservation before process/request dispatch and conservative crash recovery (holds remain). Seed previous candidate spending plus unresolved holds and smoke spending. No automatic retries, reset, or account-level cap claim.
|
|
10
|
+
4. Freeze owns source/engine/tool hashes and readiness receipts. Runner verifies actual hashes before any candidate, rejects existing directories, classifies terminal assistant errors separately from exit status, records tool attempts/admitted calls and structured infrastructure failures. Pre-execution extension blocks beyond 120 attempts; observed `tool_execution_start` may include blocked calls and is not execution proof.
|
|
11
|
+
5. Evaluation keeps original contracts, sanitizes child environments, bounds process groups and browser waits, uses fresh output directories. Browser waits honor the public 2s UI update allowance rather than fixed subsecond assumptions; reference fixtures and mutants exercise the real HTTP/browser paths. Old evaluator hashes/results remain historical; v3 changes require a new freeze.
|
|
12
|
+
|
|
13
|
+
## Challenges / tests
|
|
14
|
+
|
|
15
|
+
- Malformed HTTP/SSE, wrong model, split Unicode, stalled/chunked/oversized response, TLS self-signed rejection, trusted local TLS, redirects, abort, missing curl, secret-in-argv/log and concurrent body-read races.
|
|
16
|
+
- Unknown billing is not replay-safe: retain reservation and stop campaign rather than retry a paid POST. Reconciled invalid response can stop without labeling its cost unknown.
|
|
17
|
+
- Concurrent processes cannot both spend the same campaign balance; crash leaves a hold. Existing state cannot be silently reset. Freeze modification blocks before paid calls.
|
|
18
|
+
- Installed pi scripted local provider completes discovery, sees missing tools as failure, reaches real plan validation/inspection and Jev hook, respects preapproval mutation lock and preventive tool budget. Exit 0 + terminal error must fail readiness.
|
|
19
|
+
- Reference shop real API/native Firefox controls must pass, deliberate pricing/idempotency mutants must fail. Voxel previous candidate is a retained regression fixture only, not an independent reference; evaluator logic invariants/mutants complement it. Do not fix candidates to satisfy evaluators.
|
|
20
|
+
- No paid candidate matrix until offline readiness and bounded TLS/live connectivity checks pass. Live readiness expenses share the remaining original smoke allowance. A finite soak is evidence, not proof TLS can never fail.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Uniform infrastructure restart (v2)
|
|
2
|
+
|
|
3
|
+
Original frozen tasks and evaluators: original-freeze.json, commit 7087423. No task/evaluator changes between attempts. All v1 runs are retained at ../deepseek-jev-v1, including the partial plain voxel candidate and eight zero-tool failures. The initial gateway hid the root cause behind its sanitized generic failure. Separate tiny diagnostic requests succeeded afterward; no candidate repair or external scores were returned to a generator.
|
|
4
|
+
|
|
5
|
+
Restart announced to user before beginning. Changes are runner root v2, candidate ceiling $2.84 (was $3), extra sanitized error class/code/stage receipts, and stop-the-matrix on the first gateway stopped condition instead of spending startup requests on the remaining arms. Full matrix order is unchanged. The first v2 run is launched individually for early diagnosis; subsequent runs only proceed if infrastructure remains healthy. No copying v1 candidate files into v2.
|
|
6
|
+
|
|
7
|
+
Worst-case accounting for v1: known actual $0.048990234 plus 9 unresolved $0.15 reservations = $1.398990234. Nine v2 ceilings of $2.84 = $25.56. Combined $26.958990234 <= original $27 candidate ceiling. Tiny diagnostic calls are separate smoke expense, within the original $0.10 allowance. Reservations are conservative local limits, not an OpenRouter account-level cap.
|
|
8
|
+
|
|
9
|
+
This is a transparent all-arm infrastructure restart, not another statistically independent replicate or a discarded bad model result. Retain both attempts and report v1 failures. No further automatic restarts authorized by this protocol.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# DeepSeek / Carthagent / Jev benchmark: interrupted, not a comparison
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
The exploratory matrix is **incomplete**. No conclusion about Carthagent or Jev effectiveness is supported. Candidate generation is stopped; no further automatic restarts or paid requests are scheduled.
|
|
6
|
+
|
|
7
|
+
Generator: `deepseek/deepseek-v4.1-flash`, high reasoning, installed pi 0.85.1, Node 26.7.0. Treatment arms add this repository's delivery extension/skill; Jev treatment adds a benchmark-only OpenRouter Decisions adapter using `typesafe/jev-1.13`, never a generator router. Completed v2 generation receipts report provider Together. One replicate per task/arm was intended.
|
|
8
|
+
|
|
9
|
+
Public contracts/evaluators were committed and hashed before candidates at `7087423`; the restart amendment is committed at `dfc5292`. See [protocol](deepseek-jev-benchmark-plan.md) and [restart amendment](deepseek-jev-benchmark-restart.md).
|
|
10
|
+
|
|
11
|
+
## Attempts retained
|
|
12
|
+
|
|
13
|
+
### Original v1 matrix
|
|
14
|
+
|
|
15
|
+
Artifacts: `/home/baissi/benchmarks/deepseek-jev-v1`.
|
|
16
|
+
|
|
17
|
+
Plain voxel made eight observed tool starts, wrote a partial candidate, then hit an unresolved gateway transport/billing failure after 89.181 seconds. Each of the other eight cells failed on its first request with zero tools. The original gateway obscured the exception type, so the root cause for v1 is **unknown**, not retroactively proven to be the TLS error seen later. No v1 candidate was repaired or selectively resumed.
|
|
18
|
+
|
|
19
|
+
The original runner did not stop the matrix on shared infrastructure failures, so it unnecessarily attempted all eight later cells. Its process exit status was zero even though the model's terminal message was an error. Raw `result.json` records are preserved, not rewritten to hide that classification defect.
|
|
20
|
+
|
|
21
|
+
### Uniform v2 restart
|
|
22
|
+
|
|
23
|
+
Artifacts: `/home/baissi/benchmarks/deepseek-jev-v2`.
|
|
24
|
+
|
|
25
|
+
Announced before execution, with the same tasks and evaluator hashes, fresh empty candidate workspaces, no source copied from v1, reduced $2.84/cell ceiling, sanitized transport diagnostics, and matrix stop after the first unreconciled failure. This is an infrastructure restart, not a second successful replicate or a substitute for reporting v1.
|
|
26
|
+
|
|
27
|
+
| Task / arm | Outcome | Time | Tool starts | Known billed generation cost | External evaluation |
|
|
28
|
+
|---|---|---:|---:|---:|---|
|
|
29
|
+
| Voxel / plain pi | Terminal model `stop`; candidate completed | 129.204 s | 32 | $0.067758660 | 8/8 frozen categories passed |
|
|
30
|
+
| Voxel / Carthagent | Terminal model error; interrupted during planning | 86.358 s | 24 | $0.058291788 + unresolved reservation | Not scored as an implementation failure |
|
|
31
|
+
| Voxel / Carthagent + Jev | Not run | — | — | — | — |
|
|
32
|
+
| Shop / all three arms | Not run | — | — | — | — |
|
|
33
|
+
| Ledger / all three arms | Not run | — | — | — | — |
|
|
34
|
+
|
|
35
|
+
The second v2 cell recorded `TypeError`, cause code **`ERR_SSL_SSL/TLS_ALERT_BAD_RECORD_MAC`**, 73 ms after request start. No upstream response identity/billing was available for that request. The matrix stopped immediately. This establishes a transport-layer failure in that attempt, not whether Node, the TLS stack, the network, or the upstream caused it. A separate small request succeeding does not demonstrate the long-running path is repaired.
|
|
36
|
+
|
|
37
|
+
## Completed voxel evidence
|
|
38
|
+
|
|
39
|
+
Frozen categories passed: release compilation; deterministic seeded state; movement/gravity/jump/solid-state checks; reachable removal/placement and material selection; unreachable-sky and unknown-action nonmutation; save/reload plus corrupt-load atomicity; changing Rust PPM frames; actual Firefox keyboard input affecting Rust state.
|
|
40
|
+
|
|
41
|
+
Candidate-owned tests were run separately afterward: **17 unit tests and 9 HTTP integration tests passed** (`evaluation/candidate-tests.log`). This is not additional independent correctness evidence of the same strength as a withheld evaluator.
|
|
42
|
+
|
|
43
|
+
Artifacts under `voxel-plain/evaluation/`: `result.json`, `build.log`, `server.log`, `frame.ppm`, `game.png`, Firefox profile/logs, `candidate-tests.log`. The screenshot was captured successfully; the supervising model could not view the image attachment, so **no visual-quality judgment is claimed**. The candidate is a software-rendered voxel slice, not Minecraft feature parity.
|
|
44
|
+
|
|
45
|
+
The completed candidate reported all required features, but 8/8 category checks are not exhaustive proof of every acceptance condition. For example, the evaluator's world checks do not prove collision safety at every pose, its PPM check is not a full visual-quality metric, and it does not exhaustively mutate every out-of-bounds save field. Do not equate category pass count with full contract correctness or rank this candidate against absent competitors.
|
|
46
|
+
|
|
47
|
+
## Planning observations, not treatment-effect estimates
|
|
48
|
+
|
|
49
|
+
The interrupted Carthagent candidate encountered implementation locks, a malformed design value, an invalid artifact-root proposal, and premature inspection before passing validation; it revised its plan. These recorded errors and recovery attempts are retained. No approved implementation was completed before transport failure.
|
|
50
|
+
|
|
51
|
+
Two advertised discovery tools failed because `fd` and the pi-managed `rg` were unavailable in the isolated configuration and offline mode prevented downloading them. This is a benchmark bootstrap defect with potentially unequal impact: plain pi can use shell alternatives, whereas Carthagent's preapproval gate restricts arbitrary shell. It must be repaired/tested before any future fair comparison, not presented as evidence that the planning approach is worse.
|
|
52
|
+
|
|
53
|
+
The candidate also read harness source beyond the explicitly linked documentation while diagnosing its schema. This was not OS-isolated. No claim of enforced evaluator/credential inaccessibility is made.
|
|
54
|
+
|
|
55
|
+
Jev returned valid typed probabilities in a separate live endpoint smoke. A local integration test used the actual `{result,planningStatus}` inspection envelope and checked once-per-revision, non-authoritative feedback. **No candidate received Jev feedback in either attempted matrix.** Thus there is no empirical Jev quality/latency/net-value comparison here.
|
|
56
|
+
|
|
57
|
+
## Billing
|
|
58
|
+
|
|
59
|
+
Known candidate bills across both attempts: **$0.175040682**. Ten unresolved $0.15 reservations total **$1.50**. These are conservative held amounts, not confirmed charges and not zero-cost assumptions. Known bills plus retained holds: **$1.675040682**; provider-side reconciliation is still needed for unknown requests.
|
|
60
|
+
|
|
61
|
+
Smoke/diagnostic known costs: $0.000705900 + $0.004176300 + $0.000019278 + $0.000017220 + $0.000016380 = **$0.004935078**, below the separate $0.10 allowance. One tiny diagnostic used a direct max-32-token request rather than the gateway; its returned billing is preserved at `v1/diagnostic-response.txt`. No real key was included in receipt logs.
|
|
62
|
+
|
|
63
|
+
V2 token usage totals (sum of request usage, includes repeated context/cache): plain voxel 1,649,799 prompt / 35,859 completion; interrupted harness voxel 747,309 prompt / 26,107 completion. These are not unique task tokens. Provider costs, not nominal catalog multiplication, are reported.
|
|
64
|
+
|
|
65
|
+
## Preflight and remaining limitations
|
|
66
|
+
|
|
67
|
+
- Seven focused benchmark tests passed: gateway bounds/billing, actual advisor envelope, ledger reference and float/idempotency mutants, shop/voxel component oracle checks, real Firefox native click/screenshot. Original failing browser fixture logs are retained.
|
|
68
|
+
- `npm run quality` passed: lint, typecheck, build, **348 repository tests**. Focused benchmark tests run separately. No benchmark GitHub CI/independent review/PR merge is claimed.
|
|
69
|
+
- Shop and voxel did not have full independently authored passing reference applications before freeze. Only the completed plain voxel candidate has exercised the full voxel HTTP/browser evaluator. Shop scoring remains unvalidated end-to-end.
|
|
70
|
+
- The runner records exit status but lacks terminal-model-error classification; analysis above reads actual assistant terminal events. Its tool cap is reactive at start 121, not a preventive stop at 120. The matrix freeze guard only checks file presence; hashes were checked separately for v2 tasks/evaluators. Aggregate budgets are documented per-attempt arithmetic, not centrally enforced across arbitrary extra invocations.
|
|
71
|
+
- Candidate server/test evaluation inherits the supervisor process environment rather than the runner's sanitized environment. No credential isolation guarantee should be inferred from the candidate-generation gateway arrangement. Same-user shell access is outside these controls in all cases.
|
|
72
|
+
- The gateway buffers bounded SSE and uses a 180-second request deadline, altering visible streaming equally in all arms. Model identifier is pinned outbound and returned identities logged; this is not a reproducible immutable provider-weight snapshot.
|
|
73
|
+
- One replicate and an infrastructure restart cannot establish statistical superiority. Incomplete cells remain missing, not zeros or successes.
|
|
74
|
+
|
|
75
|
+
## Before another matrix
|
|
76
|
+
|
|
77
|
+
Investigate the reproducible long-running TLS path using bounded non-candidate traffic; verify clean offline discovery-tool availability; add terminal model status, central attempt accounting, actual freeze verification, and preventive tool-budget checks. Re-freeze a clearly versioned protocol, preserve both existing attempts, and obtain agreement before another full restart. No further candidate run is scheduled by this report.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Running the repaired benchmark (v3)
|
|
2
|
+
|
|
3
|
+
This supersedes the **operating instructions**, not the historical results, in the v1/v2 protocol/reports. Repair design: [repair plan](deepseek-jev-benchmark-repair-plan.md). Previous attempts remain unchanged. No candidate implementation was repaired.
|
|
4
|
+
|
|
5
|
+
## Transport fix and evidence
|
|
6
|
+
|
|
7
|
+
The paid gateway now uses **one fresh system curl/OpenSSL process per request**, HTTP/1.1, rather than Node 26's pooled fetch/TLS transport. Normal certificate and hostname verification remain enabled. There is no insecure flag, TLS downgrade, automatic retry, redirect following, curlrc loading, or credential in argv. Request headers/body enter through an anonymous stdin pipe; output and time are bounded. This bypasses the previously failing path; it does **not** establish the root cause of `BAD_RECORD_MAC` or guarantee future network availability.
|
|
8
|
+
|
|
9
|
+
Real local TLS tests reject an untrusted self-signed certificate and accept the explicitly trusted fixture; exercise 25 fresh connections, Unicode/chunking, redirects, lost POST responses, oversized responses, timeouts, cancellation, and missing curl. Unknown POST billing stops the campaign rather than silently replaying requests.
|
|
10
|
+
|
|
11
|
+
Live repair evidence: **24 sequential DeepSeek requests**, including two 60KB inputs, **one Jev request**, then the installed pi engine completing all four discovery tools and `SMOKE_OK`. All passed with known billing and zero outstanding holds. New repair smoke spend: **$0.005075892**. Historical + repair smoke: **$0.010010970**, under the original $0.10 allowance. Raw receipts: `/home/baissi/benchmarks/deepseek-jev-v3/live-preflight/` and `smoke-plain/`.
|
|
12
|
+
|
|
13
|
+
## Other fixes
|
|
14
|
+
|
|
15
|
+
- Copy verified `fd`/`rg` into each isolated pi config before launch. Scripted loopback-provider tests drive the actual installed pi engine's read/ls/find/grep in **all arms**, with no downloads. The Carthagent preapproval mutation gate and actual validate/inspect→advisor path are also exercised. Fixture planning does not certify semantic plan quality.
|
|
16
|
+
- Identical budget-only extension in all arms blocks tool attempt 121 **before its body executes**. JSON `tool_execution_start` still counts attempts (including blocked calls), not actual execution. Record admitted/blocked counts separately; Carthagent may separately reject admitted calls.
|
|
17
|
+
- Removed the ineffective `toolExecution: sequential` setting: this installed CLI has no such setting. All arms retain its same default (parallel sibling tools with sequential preflight). The original sequential-execution claim was incorrect. Carthagent still serializes its own state operations.
|
|
18
|
+
- Terminal assistant `error`/`aborted`/missing/incomplete is separate from process exit. Smoke passes only on terminal completion plus `SMOKE_OK`. Matrix stops on transport/model/launch infrastructure errors instead of cascading through later cells.
|
|
19
|
+
- Gateway serializes before reading request bodies, preserves split UTF-8, validates returned model and SSE completion, and reconciles known bills before rejecting malformed semantic responses.
|
|
20
|
+
- Persistent campaign accounting reserves **before** dispatch, locks concurrent updates, fsyncs atomic state, and retains holds after crashes/ambiguous failures. Existing state cannot be reset by rerunning setup. A stale lock requires human inspection, not automatic deletion.
|
|
21
|
+
- Every candidate launch verifies actual frozen source, engine, discovery binary and readiness hashes. Newly added files in frozen directories invalidate the manifest. Run/evaluation directories are exclusively created; no overwrite or selective resume.
|
|
22
|
+
- Evaluator subprocesses have explicit sanitized environments, bounded process groups, bounded browser/HTTP waits and cleanup. Shop browser checks use native clicks, honor the 2-second UI update allowance and confirm inventory changes rather than guessing success from English confirmation words. Full shop HTTP/browser evaluation passes a supervisor-only reference fixture and catches pricing/idempotency mutants. Ledger has separate reference/mutants. Voxel regression runs on a **copy** of the retained candidate, not an independent reference app.
|
|
23
|
+
- Candidate-owned tests are collected separately; missing cells remain `not-run`, infrastructure-interrupted cells are not scored as product failures.
|
|
24
|
+
|
|
25
|
+
## Budget / paths
|
|
26
|
+
|
|
27
|
+
- Fresh candidate output: `/home/baissi/benchmarks/deepseek-jev-v3`.
|
|
28
|
+
- Shared durable budget: `/home/baissi/benchmarks/deepseek-jev-campaign.json`.
|
|
29
|
+
- Candidate account starts conservatively charged **$1.675040682**, covering prior actual bills plus all unresolved holds. Those historical holds remain unknown charges, not confirmed spending.
|
|
30
|
+
- New ceiling: **$2.80/cell**, 9 cells, with the same 900 seconds, 120 admitted tool attempts, 100 paid requests including <=3 Jev calls, 16,384 generation output tokens/request. $1.675040682 + 9×$2.80 = **$26.875040682**, below original $27 candidate ceiling. Shared ledger is an additional check, not a vendor-enforced account cap.
|
|
31
|
+
- No automatic paid POST retry, candidate rerun, or supervisor candidate repair. Interrupted historical matrices are still reported.
|
|
32
|
+
|
|
33
|
+
## Reproduction
|
|
34
|
+
|
|
35
|
+
Run from `/tmp/ctg-tested-planning` (branch `bench/deepseek-jev-three-tasks`). Node >=22.19 with TypeScript stripping support as used by this installed environment, local curl/OpenSSL, Rust, Firefox/geckodriver, and the pinned installed pi engine are required.
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
# Offline tests, including real local TLS / installed pi / Firefox:
|
|
39
|
+
node --test tools/benchmark/*.test.mjs tools/benchmark/selftest.mjs
|
|
40
|
+
npm run quality
|
|
41
|
+
|
|
42
|
+
# Live checks are explicit paid opt-in and refuse existing attempt directories:
|
|
43
|
+
# Already completed here. Do NOT rerun or delete old directories to make it run.
|
|
44
|
+
# node tools/benchmark/preflight-live.mjs --paid
|
|
45
|
+
|
|
46
|
+
# Generate source-bound readiness and freeze (new output path; refuses existing freeze):
|
|
47
|
+
node tools/benchmark/preflight.mjs /home/baissi/benchmarks/deepseek-jev-v3/preflight --freeze
|
|
48
|
+
|
|
49
|
+
# Paid task matrix, only after passing freeze verification:
|
|
50
|
+
node tools/benchmark/runner.mjs matrix
|
|
51
|
+
|
|
52
|
+
# External evaluator + separate candidate-owned tests; refuses overwrite:
|
|
53
|
+
node tools/benchmark/evaluate.mjs matrix
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`matrix` does not resume. If interrupted, retain everything and inspect the failing cell/campaign receipts before proposing a new protocol. To inspect accounting without exposing the API key, read only `deepseek-jev-campaign.json`; the supervisor reads the key from existing pi auth, and children receive dummy gateway credentials.
|
|
57
|
+
|
|
58
|
+
## Limits retained
|
|
59
|
+
|
|
60
|
+
This is not an OS sandbox: same-user host access and trusted extension/state replacement remain outside enforcement. Sanitized environment is not filesystem credential isolation. Evaluators remain finite checks; no exhaustive correctness, calibrated aesthetic score, immutable provider weight snapshot, or independent-review claim. Freeze includes installed engine dist files but not every transitive dependency. Finite readiness tests cannot guarantee a future provider/network response. Passing readiness is not benchmark superiority; the full v3 task matrix has not run as part of these repairs.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# V3 matrix execution: stopped on upstream HTTP 400
|
|
2
|
+
|
|
3
|
+
The user authorized execution after the readiness repairs. The v3 matrix was launched with the frozen implementation at commit `90b25c9`; the actual 954-file freeze was verified before launch and after the stop. No source/evaluator changes or candidate repairs were made during the attempt.
|
|
4
|
+
|
|
5
|
+
## Outcome
|
|
6
|
+
|
|
7
|
+
- First cell: voxel / plain pi + `deepseek/deepseek-v4.1-flash`.
|
|
8
|
+
- Runtime: **115.105 seconds**; **11 observed tool starts**.
|
|
9
|
+
- Ten generation requests returned valid model identity/billing. Request eleven returned **upstream HTTP 400** after 145 ms.
|
|
10
|
+
- Status: `infrastructure-error`; assistant terminal status `error`, despite pi process exit code 0.
|
|
11
|
+
- Known generation charges: **$0.0143985192**. Unresolved reservation: **$0.15** (not a confirmed charge).
|
|
12
|
+
- The other **eight cells were not run**. Matrix process stopped automatically, with no retry/resume or further paid diagnostic request.
|
|
13
|
+
|
|
14
|
+
This was **not a recorded TLS error**. curl completed the HTTPS transaction and received HTTP 400 from the upstream endpoint. The gateway's non-2xx receipt contains only the HTTP status, not the error response body. Therefore the specific rejection reason is **unknown**; do not assert a provider outage, invalid message history, context limit, or TLS cause without further evidence.
|
|
15
|
+
|
|
16
|
+
The candidate wrote Rust source, a browser frontend, and HTTP tests and invoked build/tests before the interruption. Its last action was a source edit. It did not deliver a final response. These partial artifacts are retained but are **not scored as a completed candidate or as a product-quality failure**. No current correctness claim is made from its earlier build/test tool output.
|
|
17
|
+
|
|
18
|
+
## Evaluation and accounting
|
|
19
|
+
|
|
20
|
+
Executed the frozen evaluation orchestrator. It correctly classified the interrupted cell as `not-scored-infrastructure`, and all eight absent cells as `not-run`. No external task score or comparative result is available.
|
|
21
|
+
|
|
22
|
+
New v3 candidate expenditure: $0.0143985192 known plus $0.15 held. Shared campaign state now records $1.6894392012 conservatively accounted candidate spending (includes historical unresolved reservations seeded during repair), plus the new $0.15 outstanding hold. Smoke total remains $0.010010970; no extra paid diagnostics were performed for this failure.
|
|
23
|
+
|
|
24
|
+
## Artifacts
|
|
25
|
+
|
|
26
|
+
Root: `/home/baissi/benchmarks/deepseek-jev-v3`.
|
|
27
|
+
|
|
28
|
+
- `matrix.log`
|
|
29
|
+
- `voxel-plain/{invocation.json,events.jsonl,gateway.jsonl,result.json,guard.jsonl}`
|
|
30
|
+
- `voxel-plain/workspace/` and session logs
|
|
31
|
+
- `evaluation-status.jsonl`
|
|
32
|
+
- `freeze.json`, `preflight/`, `live-preflight/`, `smoke-plain/`
|
|
33
|
+
- Shared accounting: `/home/baissi/benchmarks/deepseek-jev-campaign.json`
|
|
34
|
+
|
|
35
|
+
Previous v1/v2 runs and failures remain untouched. The finite live readiness soak passed but did not predict this subsequent HTTP-level rejection; readiness is not a guarantee of future provider acceptance.
|
|
36
|
+
|
|
37
|
+
## Next repair boundary
|
|
38
|
+
|
|
39
|
+
Before another paid attempt, add a bounded, sanitized upstream error receipt (status, safe error code/message, request identity where supplied) with credential-reflection tests. Determine whether the rejection is provider-side or generated-request compatibility using preserved evidence wherever possible. Any paid replay may be billed and must be separately reserved; there is no automatic retry or another full restart scheduled by this report.
|
|
40
|
+
|
|
41
|
+
No conclusion about plain pi versus Carthagent versus Carthagent+Jev is supported by this interrupted attempt.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# V4 authorized execution
|
|
2
|
+
|
|
3
|
+
User authorized live validation and running the matrix after the exact HTTP-body fix. Preserve v1–v3 and their interrupted candidates; no copying candidate source into new cells.
|
|
4
|
+
|
|
5
|
+
- Root: `/home/baissi/benchmarks/deepseek-jev-v4`.
|
|
6
|
+
- Same task texts, evaluator assertions, balanced order, model and reasoning configuration as repaired v3. No provider pinning or selective candidate retry.
|
|
7
|
+
- Corrected large-body transport and sanitized upstream errors described in `deepseek-jev-http400-diagnosis.md`.
|
|
8
|
+
- Per-candidate cap **$2.79**. Historical conservative candidate debit $1.6894392012 plus outstanding $0.15 plus nine times $2.79 = **$26.9494392012**, within the original $27. Shared durable account remains authoritative. No historical holds are released without billing evidence.
|
|
9
|
+
- New live gate: exact reconstructed historical 97,377-byte request, only max_tokens changed to 32, using fixed transport: **HTTP 200**, same requested/returned model, provider AtlasCloud, known bill **$0.0004261776**, no tool execution. Original failing HTTP replay's $0.04 smoke hold remains retained.
|
|
10
|
+
- Known smoke spend now $0.0104371476 plus unresolved $0.04 = $0.0504371476 conservatively accounted, under original $0.10.
|
|
11
|
+
- Re-run complete offline readiness/repository quality and create new source-bound freeze before candidates. Freeze schema remains version 3; attempt identifier/root is v4. V3 freeze and receipts are not overwritten.
|
|
12
|
+
- Matrix stops on recorded transport/model/launch infrastructure errors. Resource-bound task outcomes remain outcomes. No autonomous retries, source repair, or existing-directory overwrite.
|
|
13
|
+
- External evaluation occurs only after candidate termination; no evaluation feedback is returned to generators. Candidate-owned checks and infrastructure failures remain separate from external product scores.
|
|
14
|
+
|
|
15
|
+
This finite live acceptance proves the historical request can pass with the fixed transport, not universal provider availability, semantic correctness, or comparative benefit. Readiness/transport fixes do not alter advisory authority or planning gates.
|