You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdlbench/README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ SDLBench enforces truth in savings claims:
39
39
of the same repo; `tokens.indexCost` is non-zero only on the first warm task.
40
40
-**Coverage**: tasks with `contextTargets` produce `record.coverage` with
41
41
file/symbol coverage, precision, and recall.
42
+
-**Prompt specificity**: tasks declare `sparse`, `normal`, or `explicit`; records persist the tier and `analyze` reports `byPromptSpecificity` so sparse-task savings remain visible.
42
43
43
44
`setup all` creates `sdlbench/.work/tiktoken-venv` and installs OpenAI `tiktoken` from the pinned GitHub tag `0.13.0`. Benchmark runs fail if tiktoken cannot count tokens; they do not fall back to estimates.
44
45
@@ -65,13 +66,13 @@ Each task copies `sdlbench/tests/fixtures/repo` into `sdlbench/.work/repos/<task
65
66
66
67
## SDL Evidence
67
68
68
-
For `--variant sdl`, the runner prepares a normal SDL-MCP HTTP server and indexes the copied fixture repo before the task starts. By default it starts a temporary `serve --http` process, waits until `/health` is reachable, then runs `POST /api/repo/:repoId/reindex-stream` with `mode: "full"`. It does not pre-run task-specific searches or paste fixture SDL context; behavior agents discover context through live tools. Tests can pass `sdlHttpBaseUrl` to use an existing server.
69
+
For `--variant sdl`, the runner prepares a normal SDL-MCP HTTP server and indexes the copied fixture repo before the task starts. By default it starts a temporary `serve --http` process, waits until `/health` is reachable, then runs `POST /api/repo/:repoId/reindex-stream` with `mode: "full"`. It does not pre-run task-specific searches or paste fixture SDL context; behavior agents discover context through live tools. Tests can pass `sdlHttpBaseUrl` to use an existing server. Codex behavior runs using an external server must also pass `sdlConfigPath` so the production hook targets that server's pidfile.
69
70
70
71
The temporary config starts from `config/sdlmcp.config.example.json` and keeps provider-first indexing, Rust indexing, SCIP, semantic retrieval/enrichment, policy, prefetch, and exclusive Code Mode. SDLBench disables file watching because each copied repository is indexed explicitly before the measured run, and overrides only the copied root, graph DB path, local HTTP/auth settings, benchmark ignores, and repo languages. Provider-first counts as evidence only when the indexing response reports it.
71
72
72
73
73
74
74
-
SDL token counts use the rendered prompt plus measured agent session data when available. `context.sdl` and `context.sdlQueries` are fixture metadata, not privileged prompt input. If HTTP indexing fails, the SDL run fails instead of writing savings evidence.
75
+
SDL token counts use the rendered prompt plus measured agent session data when available. `context.raw`, `context.sdl`, and `context.sdlQueries` are fixture metadata, not privileged behavior-mode prompt input. If HTTP indexing fails, or if both Codex attribution and server observability report zero SDL tool activity, the SDL run fails instead of writing savings evidence.
75
76
76
77
## Metrics
77
78
@@ -98,7 +99,7 @@ Every executed non-baseline product uses the same session, analysis, scaling, ca
98
99
Default runs stay in fixture mode: they apply task-local `solution.files`, then run the verifier. Use this for harness and token plumbing checks.
99
100
100
101
Pass `--behavior` to test model behavior. In behavior mode, SDLBench writes `.sdlbench-prompt.md` into the copied repo, runs the configured agent command template from `config/agents/<agent>.json`, then verifies the files the command changed. The checked-in Codex config defaults to `gpt-5.5` with `model_reasoning_effort="xhigh"`. The command template can use `{repo}`, `{prompt}`, `{taskId}`, `{variant}`, `{model}`, `{sdlMcpConfig}`, and `{sdlMcpUrl}` placeholders. Override it directly with `--agent-command "cmd {repo} {prompt}"` for local smoke tests.
101
-
All non-baseline products receive the same neutral task prompt. SDLBench supplies the normal live MCP server; SDL workflow guidance is discovered from the server tool surface when tools are first loaded, not from prompt text, skills, repository files, or hooks supplied by SDLBench.
102
+
Every variant receives the same neutral task prompt. SDLBench supplies the normal live MCP server, and the SDL Codex variant installs the production enforcement assets (`SDL.md`, `AGENTS.md`, `CODEX.md`, and `.codex/hooks/`) in the copied run root. These measured product assets provide workflow guidance and enforce SDL use without adding task-specific hints to the prompt.
102
103
103
104
Codex behavior runs are isolated from the developer environment. SDLBench uses an OS-temp worktree and temporary `CODEX_HOME`, copies only `auth.json`, and disables plugin, app, memory, personality, browser, computer-use, and discovered skill paths. A run fails if no matching Codex session token counts exist or if captured context contains Ponytail, generic plugin/app/skill instructions, or memory context.
"src/audit.js": "export function auditOrder(order) {\n return `${order.id}:paymentFingerprint=${order.paymentFingerprint}:${order.totalCents}:${order.status}`;\n}\n"
100
107
}
101
-
}
108
+
},
109
+
"promptSpecificity": "explicit"
102
110
},
103
111
{
104
112
"schemaVersion": 1,
@@ -131,7 +139,8 @@
131
139
"files": {
132
140
"review-report.md": "# Checkout Risk Review\n\n## Priority Findings\n\n1. Raw payment token is stored on orders and then emitted by auditOrder. Replace the payment token with a one-way payment fingerprint and never include the token in audit output.\n2. Order ids use Date.now, which is predictable and can collide under concurrent order placement. Use random or monotonic ids with enough entropy.\n3. Catalog products expose stock, but placeOrder never checks inventory or reserves stock before marking an order paid. Add an inventory validation/reservation boundary before payment capture is treated as final.\n4. listOrders returns mutable internal order objects, so callers can change stored status. Return defensive copies or immutable records.\n5. Cart tax calculation must be checked around discounts; tax should be calculated on the discounted taxable subtotal, not the pre-discount subtotal.\n6. Shipping rules have no priority path for high-value loyalty customers, so priority support purchases do not affect fulfillment. Make priority shipping rules explicit and covered by tests.\n"
0 commit comments