@bjoernrochel/sevro 0.1.0-rc.2 → 0.1.0-rc.21

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.
Files changed (243) hide show
  1. package/CONTRIBUTING.md +170 -0
  2. package/LICENSE +63 -136
  3. package/README.md +83 -66
  4. package/docs/README.md +44 -0
  5. package/docs/acknowledgements.md +14 -0
  6. package/docs/architecture.md +146 -0
  7. package/docs/assets/README.md +27 -0
  8. package/docs/assets/sevro-logo.png +0 -0
  9. package/docs/assets/sevro-symbol.svg +1 -0
  10. package/docs/assets/sevro-wordmark.svg +1 -0
  11. package/docs/builtin-graders-v1.md +41 -13
  12. package/docs/codex-host.md +184 -52
  13. package/docs/contracts.md +19 -0
  14. package/docs/creating-cases.md +139 -0
  15. package/docs/development-cli.md +190 -30
  16. package/docs/documentation-quality.md +61 -0
  17. package/docs/evaluation-workflow.md +110 -0
  18. package/docs/evidence/code-mode-controls-71.md +64 -0
  19. package/docs/evidence/code-mode-programs-85.md +64 -0
  20. package/docs/evidence/codex-state-73/README.md +204 -0
  21. package/docs/evidence/codex-state-73/darrow-migration.patch +182 -0
  22. package/docs/evidence/codex-state-73/results.json +661 -0
  23. package/docs/evidence/local-http-74.md +104 -0
  24. package/docs/evidence/runtime-startup-30/README.md +185 -0
  25. package/docs/evidence/runtime-startup-30/after.json +319 -0
  26. package/docs/evidence/runtime-startup-30/baseline-timeout.jsonl +2 -0
  27. package/docs/evidence/runtime-startup-30/before.json +403 -0
  28. package/docs/evidence/runtime-startup-30/consumer-smoke.json +63 -0
  29. package/docs/evidence/runtime-startup-30/full-policy-diagnostic.jsonl +3 -0
  30. package/docs/evidence/runtime-startup-30/minimal-policy-diagnostic.jsonl +3 -0
  31. package/docs/evidence/runtime-startup-30/plugin-template-assessment.json +20 -0
  32. package/docs/evidence/runtime-startup-30/seedless-timeout.jsonl +2 -0
  33. package/docs/evidence/skill-reads-70/results.json +823 -0
  34. package/docs/evidence.md +21 -0
  35. package/docs/extension-protocol-v1.md +50 -16
  36. package/docs/fixture-cleanup-validation.md +3 -0
  37. package/docs/getting-started.md +102 -0
  38. package/docs/guide-evaluation.md +89 -0
  39. package/docs/guide-verification.json +239 -0
  40. package/docs/identity-v1.md +35 -1
  41. package/docs/installing.md +88 -0
  42. package/docs/licenses/BUSL-1.1-0.1.0-rc.2.txt +159 -0
  43. package/docs/licensing.md +42 -0
  44. package/docs/native-controls.md +76 -5
  45. package/docs/native-hosts.md +228 -0
  46. package/docs/reading-results.md +141 -0
  47. package/docs/recipes.md +489 -0
  48. package/docs/releases.md +81 -40
  49. package/docs/report-v1.md +29 -1
  50. package/docs/results-v1.md +180 -0
  51. package/docs/run-settings-v1.md +147 -0
  52. package/docs/running-evaluations.md +31 -0
  53. package/docs/runtime-v1.md +614 -0
  54. package/docs/specs/repository-guide.md +58 -0
  55. package/docs/troubleshooting.md +30 -0
  56. package/docs/typescript-quality.md +234 -0
  57. package/docs/usability-study.md +114 -0
  58. package/examples/basic/host.ts +2 -2
  59. package/examples/recipes/candidate.ts +26 -0
  60. package/examples/recipes/cases/coding-change.json +21 -0
  61. package/examples/recipes/cases/host-tools.json +21 -0
  62. package/examples/recipes/cases/mise.json +21 -0
  63. package/examples/recipes/cases/node.json +21 -0
  64. package/examples/recipes/cases/python-uv.json +21 -0
  65. package/examples/recipes/cases/semantic.json +17 -0
  66. package/examples/recipes/coding-change/check.ts +23 -0
  67. package/examples/recipes/extension-artifacts.ts +65 -0
  68. package/examples/recipes/extension-methods.ts +174 -0
  69. package/examples/recipes/extension.ts +37 -0
  70. package/examples/recipes/repository-skill/.agents/skills/startup-guide/SKILL.md +7 -0
  71. package/examples/recipes/repository-skill/.claude/skills/startup-guide/SKILL.md +7 -0
  72. package/examples/recipes/repository-skill/README.md +3 -0
  73. package/examples/recipes/run-inputs.ts +188 -0
  74. package/examples/recipes/run-options.ts +131 -0
  75. package/examples/recipes/run.ts +63 -0
  76. package/examples/recipes/runtime/empty.json +1 -0
  77. package/examples/recipes/runtime/goals.json +1 -0
  78. package/examples/recipes/runtime/mise.json +6 -0
  79. package/examples/recipes/runtime/path.json +1 -0
  80. package/examples/recipes/runtime/plugins.json +4 -0
  81. package/examples/recipes/runtime/python-uv.json +10 -0
  82. package/examples/recipes/semantic-judge.ts +29 -0
  83. package/examples/templates/coding/adapter.ts +17 -0
  84. package/examples/templates/coding/case.json +15 -0
  85. package/examples/templates/repository-skill/.agents/skills/startup-guide/SKILL.md +6 -0
  86. package/examples/templates/repository-skill/extension-data.ts +64 -0
  87. package/examples/templates/repository-skill/extension.ts +31 -0
  88. package/examples/templates/response/adapter.ts +12 -0
  89. package/examples/templates/response/case.json +13 -0
  90. package/package.json +39 -6
  91. package/schemas/report-v1.schema.json +9 -0
  92. package/schemas/run-evidence-v1.schema.json +2 -1
  93. package/schemas/runtime-v1.schema.json +193 -0
  94. package/src/advisory.ts +10 -5
  95. package/src/candidate-artifacts.ts +208 -0
  96. package/src/candidate-codex-state.ts +185 -0
  97. package/src/case-validation.ts +105 -0
  98. package/src/cli/cancellation.ts +20 -0
  99. package/src/cli/command.ts +81 -0
  100. package/src/cli/completion.ts +15 -0
  101. package/src/cli/demo.ts +59 -0
  102. package/src/cli/evaluation.ts +55 -0
  103. package/src/cli/extension.ts +79 -0
  104. package/src/cli/help.ts +222 -0
  105. package/src/cli/hosts.ts +59 -0
  106. package/src/cli/init-settings.ts +30 -0
  107. package/src/cli/init.ts +111 -0
  108. package/src/cli/invocation.ts +627 -0
  109. package/src/cli/loading.ts +151 -0
  110. package/src/cli/preparation.ts +163 -0
  111. package/src/cli/presentation.ts +91 -0
  112. package/src/cli/progress.ts +6 -0
  113. package/src/cli/run-manifest.ts +133 -0
  114. package/src/cli/run-options.ts +101 -0
  115. package/src/cli/run-overrides.ts +83 -0
  116. package/src/cli/settings.ts +160 -0
  117. package/src/cli/summary.ts +43 -0
  118. package/src/cli.ts +13 -843
  119. package/src/contract-types.ts +94 -0
  120. package/src/engine.ts +19 -2373
  121. package/src/evaluation/advisory.ts +150 -0
  122. package/src/evaluation/check-plan.ts +510 -0
  123. package/src/evaluation/collection.ts +88 -0
  124. package/src/evaluation/context.ts +10 -0
  125. package/src/evaluation/grading-host.ts +39 -0
  126. package/src/evaluation/grading.ts +258 -0
  127. package/src/evaluation/invocation-plan.ts +548 -0
  128. package/src/evaluation/plan.ts +736 -0
  129. package/src/evaluation/progress.ts +19 -0
  130. package/src/evaluation/resources.ts +241 -0
  131. package/src/evaluation/run.ts +206 -0
  132. package/src/{trial-scheduler.ts → evaluation/scheduler.ts} +3 -1
  133. package/src/evaluation/semantic.ts +312 -0
  134. package/src/evaluation/trial.ts +866 -0
  135. package/src/evaluation/types.ts +207 -0
  136. package/src/evidence/host-results.ts +92 -0
  137. package/src/evidence/retained-artifacts.ts +18 -0
  138. package/src/evidence/trial-writer.ts +203 -0
  139. package/src/evidence/usage.ts +17 -0
  140. package/src/extension-client.ts +228 -148
  141. package/src/extension-session.ts +326 -195
  142. package/src/fixtures/advisory.ts +338 -0
  143. package/src/fixtures/bin.ts +57 -0
  144. package/src/{fixture-cleanup.ts → fixtures/cleanup.ts} +13 -7
  145. package/src/fixtures/create.ts +187 -0
  146. package/src/fixtures/generated.ts +300 -0
  147. package/src/fixtures/git-hooks.ts +24 -0
  148. package/src/fixtures/preparation.ts +270 -0
  149. package/src/{repository-fixture.ts → fixtures/repository.ts} +207 -85
  150. package/src/fixtures/setup.ts +224 -0
  151. package/src/fixtures/tools.ts +88 -0
  152. package/src/fixtures/workspace-state.ts +212 -0
  153. package/src/generated/cli-result.cjs +2 -0
  154. package/src/generated/cli-result.d.cts +3 -0
  155. package/src/generated/extension.cjs +2 -0
  156. package/src/generated/extension.d.cts +3 -0
  157. package/src/generated/report.cjs +2 -0
  158. package/src/generated/report.d.cts +3 -0
  159. package/src/generated/run-evidence.cjs +2 -0
  160. package/src/generated/run-evidence.d.cts +3 -0
  161. package/src/generated/runtime.cjs +2 -0
  162. package/src/generated/runtime.d.cts +3 -0
  163. package/src/graders/artifact.ts +56 -23
  164. package/src/graders/git-head.ts +79 -75
  165. package/src/graders/output.ts +222 -140
  166. package/src/graders/semantic.ts +102 -43
  167. package/src/graders/shell.ts +379 -207
  168. package/src/host-diagnostic-redaction.ts +52 -0
  169. package/src/host-diagnostics.ts +319 -0
  170. package/src/hosts/claude-continuation.ts +63 -18
  171. package/src/hosts/claude-credential.ts +43 -62
  172. package/src/hosts/claude-events.ts +86 -51
  173. package/src/hosts/claude-keychain.ts +59 -0
  174. package/src/hosts/claude-native-goal.ts +57 -33
  175. package/src/hosts/claude-process.ts +111 -0
  176. package/src/hosts/claude-repository-invocation.ts +208 -117
  177. package/src/hosts/claude-settings.ts +240 -21
  178. package/src/hosts/claude-skill-activations.ts +166 -0
  179. package/src/hosts/claude-state.ts +403 -0
  180. package/src/hosts/claude-tool-calls.ts +171 -106
  181. package/src/hosts/claude.ts +561 -451
  182. package/src/hosts/codex-app-server.ts +326 -178
  183. package/src/hosts/codex-configuration.ts +44 -18
  184. package/src/hosts/codex-events.ts +97 -60
  185. package/src/hosts/codex-exec-controls.ts +516 -0
  186. package/src/hosts/codex-invocation.ts +70 -0
  187. package/src/hosts/codex-marketplace.ts +283 -0
  188. package/src/hosts/codex-native-calls.ts +546 -500
  189. package/src/hosts/codex-process.ts +202 -0
  190. package/src/hosts/codex-profile.ts +257 -28
  191. package/src/hosts/codex-session-files.ts +106 -0
  192. package/src/hosts/codex-state.ts +492 -0
  193. package/src/hosts/codex.ts +783 -832
  194. package/src/hosts/isolation-common.ts +94 -0
  195. package/src/hosts/isolation-roots.ts +54 -27
  196. package/src/hosts/isolation.ts +10 -0
  197. package/src/hosts/linux-sandbox.ts +159 -0
  198. package/src/hosts/mac-sandbox.ts +187 -61
  199. package/src/hosts/native-controls.ts +152 -62
  200. package/src/hosts/process-lifecycle.ts +37 -0
  201. package/src/hosts/protected-worktrees.ts +51 -19
  202. package/src/hosts/skill-hook-catalog.ts +131 -0
  203. package/src/hosts/skill-hook-handler.ts +374 -0
  204. package/src/hosts/skill-hooks.ts +580 -0
  205. package/src/hosts/workspace-fingerprint.ts +55 -35
  206. package/src/identity.ts +102 -48
  207. package/src/instrumentation.ts +109 -48
  208. package/src/native-transcript-state.ts +131 -0
  209. package/src/native-transcript-view.ts +90 -0
  210. package/src/native-transcripts.ts +286 -0
  211. package/src/process-lifecycle.ts +150 -0
  212. package/src/provenance.ts +161 -81
  213. package/src/prune.ts +215 -0
  214. package/src/report.ts +172 -140
  215. package/src/resolved-case.ts +33 -0
  216. package/src/results-lock.ts +29 -0
  217. package/src/results.ts +133 -86
  218. package/src/run-owner.ts +154 -63
  219. package/src/runtime/config.ts +456 -0
  220. package/src/runtime/discovery-apple.ts +90 -0
  221. package/src/runtime/discovery-providers.ts +63 -0
  222. package/src/runtime/discovery.ts +70 -0
  223. package/src/runtime/hook-processes.ts +97 -0
  224. package/src/runtime/hooks.ts +476 -0
  225. package/src/runtime/paths.ts +313 -0
  226. package/src/runtime/query.ts +85 -0
  227. package/src/runtime/seeds.ts +134 -0
  228. package/src/runtime/shared-cache.ts +143 -0
  229. package/src/runtime/state.ts +143 -0
  230. package/src/schema-types.ts +198 -0
  231. package/src/schema.ts +15 -19
  232. package/src/transcript-retention.ts +146 -0
  233. package/src/value-guards.ts +20 -0
  234. package/src/advisory-fixture.ts +0 -282
  235. package/src/fixture-bin.ts +0 -87
  236. package/src/fixture-setup.ts +0 -163
  237. package/src/generated-fixture.ts +0 -220
  238. package/src/git-hooks.ts +0 -63
  239. package/src/hosts/claude-nested-skills.ts +0 -218
  240. package/src/hosts/codex-command-output.ts +0 -399
  241. package/src/hosts/codex-executor-command.ts +0 -195
  242. package/src/hosts/codex-skill-reads.ts +0 -391
  243. package/src/preparation.ts +0 -211
@@ -0,0 +1,104 @@
1
+ # Local HTTP isolation validation for #74
2
+
3
+ Observed on 2026-10-14, macOS arm64, Bun 1.3.13, Node 24.13.0 and Codex CLI
4
+ 0.162.1. This record addresses [issue #74](https://github.com/BjRo/sevro/issues/74).
5
+ The supported operator interface is the runtime
6
+ [local HTTP option](../runtime-v1.md#local-http-test-servers).
7
+
8
+ ## Host boundary
9
+
10
+ The installed `codex sandbox` command ran the same wildcard Node HTTP listener
11
+ and loopback client under four generated permission profiles:
12
+
13
+ | Configuration | Observed result |
14
+ | ----------------------------------------------------- | -------------------------------------- |
15
+ | Command networking disabled | `listen()` fails with `EPERM` |
16
+ | Disabled networking with `allow_local_binding = true` | `listen()` fails with `EPERM` |
17
+ | Enabled managed proxy with local binding | HTTP round trip succeeds |
18
+ | Enabled networking without managed proxy | HTTP round trip and public TCP succeed |
19
+
20
+ With the managed proxy and local binding, a direct TCP connection to
21
+ `1.1.1.1:443` instead fails with `EPERM`; its unproxied control connects. The
22
+ regression fixture uses the documentation-only `192.0.2.1` address and requires
23
+ an explicit denial rather than treating a timeout as evidence. The macOS shell
24
+ boundary separately permits binding and loopback traffic while denying other
25
+ outbound IP traffic. Source/authentication/configuration denials remain part of
26
+ the candidate's real native preflight.
27
+
28
+ The implementation does not use an outer macOS sandbox around Codex: the
29
+ native Codex sandbox cannot nest inside `sandbox-exec`. Codex's managed proxy
30
+ and its native local-binding rules establish that boundary. This selection can
31
+ reach existing loopback services and does not establish per-trial network
32
+ privacy on macOS. Native DNS permissions remain Codex-owned.
33
+
34
+ ## Original upstream outcomes
35
+
36
+ Both fresh evaluations used Darrow's `fix/pr257-validation` checkout at
37
+ `1e6759c4349567f897a167a588b3714095889e86` with its existing unpublished fixture
38
+ repairs, the Sevro source override, and a replacement runtime profile containing
39
+ `network.localHttp: true`. Candidate route: `gpt-6.1-sol/medium`, Codex
40
+ `app-server`, passive, N=1, jobs=1, threshold=1, timeout 1,200,000 ms. Semantic
41
+ route: `gpt-6-luna/medium`; these cases use shell graders. No Darrow case or
42
+ integration test was removed or edited for these runs.
43
+
44
+ | Case | Hidden contract | Configured upstream check |
45
+ | ---------------------------------- | --------------- | ------------------------------------------------------------------------------------------ |
46
+ | `orchestration-oss-express-links` | Passed, exit 0 | `npx mocha --reporter dot test/res.links.js`: exit 0 |
47
+ | `orchestration-oss-requests-proxy` | Passed, exit 0 | `python -m pytest -q tests/test_requests.py -k 'proxy or send' --disable-warnings`: exit 0 |
48
+
49
+ The native Express candidate also ran
50
+ `node node_modules/mocha/bin/_mocha --reporter dot test/res.links.js`: **8
51
+ passing**, exit 0. Its `npx` invocation attempted the public npm registry and
52
+ was denied by the native proxy; `npm test` exited 255 without test output. The
53
+ direct Mocha run and shell-grader outcome remain distinct from those failures.
54
+
55
+ The two exact commands quoted in #74 were additionally rerun through Sevro's
56
+ isolated shell grader against the original retained rc.11 candidates:
57
+
58
+ ```sh
59
+ node node_modules/mocha/bin/_mocha --reporter dot test/res.links.js
60
+ .git/fixture-python/bin/python -m pytest tests/test_requests.py -q -k '(session or redirect or proxy or mixed_case or ALTERNATIVE or prepared or requests_are_updated_each_time) and not proxy_error'
61
+ ```
62
+
63
+ Express: **8 passing**, exit 0. Requests: **77 passed, 2 failed, 229 deselected**,
64
+ exit 1, with no socket-binding setup errors. Both Requests failures ran their
65
+ local servers: `test_pyopenssl_redirect` encounters an expired pytest-httpbin
66
+ certificate; `test_redirecting_to_bad_url` receives an HTTP 500 from the newer
67
+ Werkzeug fixture instead of the expected invalid-URL redirect. The fresh native
68
+ candidate reproduced both against the original `HEAD:requests/sessions.py`.
69
+ Neither failure was waived in this exact-command rerun. A supplemental native
70
+ selection excluding them passed 126 tests; it does not replace the full result.
71
+
72
+ Fresh run IDs are `acba33c5-974c-4ab5-ba6f-5d9e947560dc` (Express) and
73
+ `a3868fae-bca0-4e29-a995-09d749bbe367` (Requests). Local retained evidence is
74
+ under Darrow's `evals/results/sevro-74-orchestration-oss-{express-links,requests-proxy}`;
75
+ the exact-command outputs are in `/private/tmp/sevro-74-original-upstream`.
76
+ Raw native evidence remains local. These model runs used the implementation
77
+ snapshot rooted at Sevro `f66e6667f28c956c41aae096bd11581f81c18a40`, build digest
78
+ `a4b11528f46daafa541ff672aad815a1183ca0615543eb587ae79e268680566b`, before final
79
+ helper cleanup and documentation. Final-source integration and CI evidence
80
+ must be assessed separately.
81
+
82
+ ## Regression development
83
+
84
+ Observed test-first slices, in order:
85
+
86
+ 1. Red — `lean-ctx -c 'bun test tests/runtime-cli.test.ts -t "CLI snapshots local HTTP"'`:
87
+ the new runtime field is refused with exit 64.
88
+ Green — `lean-ctx -c 'bun test tests/runtime-cli.test.ts -t "CLI snapshots local HTTP"'`:
89
+ 1 passed, including retained policy and changed evaluation identity.
90
+ 2. Red — `lean-ctx -c 'bun test tests/shell-grader.test.ts -t "shell local HTTP"'`:
91
+ the real listener reports `bind-error:EPERM`, exit 1.
92
+ Green — `lean-ctx -c 'bun test tests/shell-grader.test.ts -t "shell local HTTP"'`:
93
+ 1 passed, with real HTTP round trip and outbound TCP denial.
94
+ 3. Red — `lean-ctx -c 'bun test tests/runtime-host.test.ts -t "Codex candidate local HTTP"'`:
95
+ the unchanged native command policy returns `unavailable` for the socket probe.
96
+ Green — `lean-ctx -c 'bun test tests/runtime-host.test.ts -t "Codex candidate local HTTP"'`:
97
+ 1 passed through the installed Codex sandbox.
98
+
99
+ The affected six-file integration selection passed **296 tests**, skipped three
100
+ platform-specific tests, and failed none. Additional semantic/advisory native
101
+ probes passed and confirm the opt-in leaves those roles disabled.
102
+ `bun run check:typescript --fast` passed. Full acceptance is owned by the exact
103
+ published commit's GitHub `TypeScript quality` gate; these local observations
104
+ do not establish Ubuntu acceptance or replace that gate.
@@ -0,0 +1,185 @@
1
+ # Runtime startup measurements for issue 30
2
+
3
+ The matched synthetic native-host benchmark reduced candidate setup plus the
4
+ controlled participant from 14.37–14.92 seconds to 6.20–6.66 seconds. The response-only
5
+ grading host call, including its separate native startup, fell from 13.49–15.03
6
+ seconds to 5.45–5.65 seconds. These are runner-boundary measurements with synthetic
7
+ model responses, not measurements of API latency or live model quality.
8
+
9
+ ## Reproduction and conditions
10
+
11
+ Run the same maintained [benchmark harness](../../../scripts/benchmark-runtime-startup.ts)
12
+ against an unchanged checkout of `c205482b25d4d52a395c70434f2b392f6acfb279` and this
13
+ candidate, sequentially on one machine:
14
+
15
+ ```sh
16
+ bun scripts/benchmark-runtime-startup.ts /absolute/baseline /tmp/before.json
17
+ bun scripts/benchmark-runtime-startup.ts /absolute/candidate /tmp/after.json
18
+ ```
19
+
20
+ The retained [before](before.json) and [after](after.json) observations used
21
+ macOS arm64, Bun 1.3.13, Codex CLI 0.162.1, the same synthetic plugin/response case,
22
+ `synthetic-candidate` and `synthetic-semantic` model labels, and `low` effort.
23
+ There were three candidate/semantic repetitions in each process, with a 32 MiB,
24
+ 2,049-entry public dependency tree. Every role received a fresh private home and
25
+ native plugin installation. The first candidate used a cold verified-snapshot
26
+ cache; repetitions two and three reused the policy. OS filesystem caches were
27
+ uncontrolled and are not described as cold. Baseline ran before candidate;
28
+ order effects and three repetitions limit generalization.
29
+
30
+ The harness wraps the same production functions and process boundaries without
31
+ changing their arguments or timeout. Only external model output is replaced by a
32
+ fixed event stream. The native plugin installer and `codex sandbox` remain real.
33
+ This fixture does not claim live skill invocation; separate native integration
34
+ coverage and consumer smoke own that evidence. Timings overlap: runtime and
35
+ sandbox phases are inside candidate/grading-host totals, and plugin commands are
36
+ inside plugin installation. Do not sum both levels. The `grading` measurement surrounds the semantic host
37
+ call with its response-only policy; it excludes engine fixture preparation,
38
+ verdict parsing, and extension bookkeeping.
39
+
40
+ ## Observed timings
41
+
42
+ All values below are milliseconds, in repetition order.
43
+
44
+ | Boundary | Before | After |
45
+ | -------------------------------------------- | ------------------------ | --------------------- |
46
+ | Configuration fingerprint (once) | 262 | 299 |
47
+ | Candidate runtime preparation | 1,969 / 1,357 / 1,273 | 721 / 431 / 443 |
48
+ | Candidate hook dependency preparation | 1,226 / 1,465 / 1,235 | No invocation |
49
+ | Fresh native plugin installation | 385 / 141 / 143 | 188 / 141 / 143 |
50
+ | Candidate sandbox probes, summed per role | 10,938 / 11,032 / 11,622 | 5,490 / 5,404 / 5,448 |
51
+ | Controlled participant process | 27 / 29 / 39 | 27 / 27 / 24 |
52
+ | Candidate total | 14,925 / 14,369 / 14,666 | 6,659 / 6,199 / 6,257 |
53
+ | Semantic runtime preparation | 1,174 / 1,236 / 2,262 | Under 1 each |
54
+ | Semantic hook dependency preparation | 1,105 / 1,087 / 1,363 | No invocation |
55
+ | Semantic sandbox probes, summed per role | 10,855 / 10,803 / 11,032 | 5,548 / 5,360 / 5,365 |
56
+ | Controlled semantic response process | 28 / 44 / 27 | 29 / 28 / 28 |
57
+ | Grading host total, including native startup | 13,495 / 13,534 / 15,030 | 5,647 / 5,454 / 5,460 |
58
+
59
+ The probe count fell from two to one per fresh role. Candidate dependency
60
+ materialization reuses immutable verified bytes after its first capture, and
61
+ response-only grading no longer materializes implicit candidate dependencies.
62
+ Configuration hashing remains necessary for identity. Fresh-install warm timings
63
+ were essentially unchanged; no plugin-install speedup is claimed. Participant
64
+ and semantic outputs are synthetic controls, so no API/model saving is claimed.
65
+
66
+ ## Startup deadline diagnosis
67
+
68
+ A separate authenticated Darrow baseline using Codex 0.162.1 and `gpt-6-luna`
69
+ with medium effort failed before participant execution: the first sandbox probe
70
+ hit its 10-second deadline at 10,004.8 ms. A seedless control retained the same
71
+ tool declarations and also timed out at 10,004.2 ms. With only the diagnostic
72
+ probe deadline increased to 60 seconds, both original full-policy probes passed
73
+ at 10,649.1 and 10,690.4 ms. Participant execution was deliberately withheld in
74
+ that diagnostic. A minimal-policy control without tool grants or seeds passed
75
+ at 5,372.8 and 5,681.1 ms.
76
+
77
+ Raw diagnostic records are retained for the [original timeout](baseline-timeout.jsonl),
78
+ [seedless timeout](seedless-timeout.jsonl), [full policy with diagnostic deadline](full-policy-diagnostic.jsonl),
79
+ and [minimal policy](minimal-policy-diagnostic.jsonl). The maintained
80
+ [diagnostic preload](../../../scripts/diagnose-codex-startup.ts) records bounded
81
+ phase timing/errors and withholds app-server participant execution. To reproduce
82
+ against an explicit checkout, set `SEVRO_DIAGNOSTIC_SOURCE_ROOT` and
83
+ `SEVRO_DIAGNOSTIC_PHASE_FILE`, then use a CLI wrapper running:
84
+
85
+ ```sh
86
+ bun --preload /absolute/candidate/scripts/diagnose-codex-startup.ts /absolute/baseline/src/cli.ts "$@" --runner-checkout-root /absolute/baseline
87
+ ```
88
+
89
+ Point Darrow's `SEVRO_PACKAGE_BIN` at that wrapper and run:
90
+
91
+ ```sh
92
+ bun evals/runner/run.ts --harness codex --owner-evaluation passive --skill create-commit --case create-commit-conventional-format --model gpt-6-luna --effort medium --trials 1 --jobs 1 --threshold 1 --results-root /absolute/outside-project-results --output /absolute/selection.json
93
+ ```
94
+
95
+ For the deadline control, additionally set `SEVRO_DIAGNOSTIC_TIMEOUT_MS=60000`.
96
+ For runtime controls, append `-- --runtime-config-file /absolute/runtime.json`:
97
+ seedless keeps the original policy except `runtime.seedDirectories=[]`; minimal
98
+ keeps only `format`, `nativeTranscripts: true`, and `hooks.nativeGoal: true`.
99
+ The original diagnostic used the same wrappers with fixed paths; the retained
100
+ preload makes those paths explicit through environment variables.
101
+
102
+ These one-off controls locate the failure in native sandbox startup and show
103
+ that dependency copying is not necessary for the timeout. Declared tool grants
104
+ increase observed startup on this machine. They do not establish the exact
105
+ native CLI mechanism or a general policy-size scaling law. The product now uses
106
+ a bounded 60-second preflight; the measured saving comes from eliminating the
107
+ second invocation and repeated preparation, not from increasing that deadline.
108
+ The unavailable baseline participant, activation, and grading evidence remain
109
+ unavailable rather than being assigned successful outcomes.
110
+
111
+ ## Snapshot and copy-on-write assessment
112
+
113
+ The production snapshot owns verified bytes only in runner memory, keyed by the
114
+ policy's seed descriptor. Candidate, peer, checker, and hook writable files never
115
+ alias it. First capture must match the configured digest; later source changes
116
+ do not change that snapshot. Regression coverage changes candidate files and the
117
+ operator source between trials and verifies that the next trial still receives
118
+ the original bytes. Executable modes, internal-link dereferencing, empty
119
+ directories, source protection, offline environment, and role separation remain
120
+ checked.
121
+
122
+ The benchmark also exercised `COPYFILE_FICLONE_FORCE` on a 32 MiB file. It
123
+ succeeded in about one millisecond in both runs, and changing the destination
124
+ left the source length unchanged. This establishes local copy-on-write support,
125
+ not portable availability or an immutable directory snapshot. The current
126
+ in-memory snapshot deliberately avoids a persistent cache path and its cleanup,
127
+ source-mutation, and cross-process trust requirements. Native clone reuse is not
128
+ implemented; ordinary materialization works on filesystems without cloning.
129
+ Retained policies retain their verified bytes until garbage collection, up to
130
+ the existing per-seed bounds. This memory tradeoff should be measured separately
131
+ for substantially larger dependency sets.
132
+
133
+ ## Native installation reuse assessment
134
+
135
+ Every actual native installation in both benchmark runs produced configuration
136
+ containing its private home and fixture workspace paths, as retained in the
137
+ `installation-assets` observations. Native install receipts bind an
138
+ `installedPath` inside that particular home's plugin cache; production verifies
139
+ it before accepting explicit invocation. Authorized hook wrappers also bind the
140
+ private runtime, sandbox profile, and execution receipt directory.
141
+
142
+ A separate [native cache-only reuse experiment](plugin-template-assessment.json)
143
+ installed a local synthetic plugin into a fresh credential-free home. The native
144
+ registration wrote `source_type = "local"` and the original absolute marketplace
145
+ path; the receipt contained the original private `installedPath`. After copying
146
+ only `plugins/cache` into a second fresh home, `codex plugin list --json` returned
147
+ empty `installed` and `available` arrays. To reproduce, use fresh `HOME` and
148
+ `CODEX_HOME`, run `codex plugin marketplace add /absolute/market --json` and
149
+ `codex plugin add probe@sevro-assessment --json`, copy `plugins/cache` to another
150
+ fresh home, and list there. Paths in the raw record use `<assessment>` for the
151
+ throwaway root; no credential file was present.
152
+
153
+ An entire installed-home template therefore cannot be replayed into a new trial
154
+ without rewriting and reverifying those identities, isolating credentials and
155
+ configuration, and obtaining evidence for the new installed paths. Reusing
156
+ just package files would still require native registration and receipt checks.
157
+ For the measured fixture, warm fresh installation costs about 140 ms versus
158
+ roughly 5.4 seconds for one sandbox startup. No template reuse is implemented.
159
+ Fresh authentication/configuration, native registration and plugin installation,
160
+ receipt validation, hook projection, the combined preflight, and native
161
+ invocation evidence remain per-request work. Fresh-install integration coverage
162
+ is retained.
163
+
164
+ ## Authenticated consumer smoke
165
+
166
+ The [bounded consumer summary](consumer-smoke.json) records Darrow revision
167
+ `34606ad9e1952b7f4e9c56befa446c18e1a2eb5d`, with no tracked consumer edits. The
168
+ candidate's explicit `tdd-explicit-invocation` case passed execution, shell and
169
+ semantic grading, and complete native explicit-invocation activation. Candidate
170
+ and semantic routes used Codex 0.162.1, `gpt-6-luna`, medium effort, one trial,
171
+ one job, and threshold one:
172
+
173
+ ```sh
174
+ SEVRO_CHECKOUT=/absolute/candidate bun evals/runner/run.ts --harness codex --owner-evaluation passive --skill tdd --case tdd-explicit-invocation --model gpt-6-luna --effort medium --semantic-check-model gpt-6-luna --semantic-check-effort medium --trials 1 --jobs 1 --threshold 1 --results-root /absolute/outside-project-results --output /absolute/selection.json
175
+ ```
176
+
177
+ The earlier implicit `create-commit-conventional-format` smoke completed
178
+ execution and grading on the candidate, including its three shell checks, but
179
+ failed the expected HEAD-change assertion. Its fixture mounted the backend under
180
+ `.agents` without plugin manifests required by the launcher; the participant
181
+ refused the commit. Activation stayed unavailable. The unchanged baseline had
182
+ failed that case before participant execution at sandbox preflight. These
183
+ outcomes are retained honestly; neither the fixture failure nor the later
184
+ single-trial success establishes a matched live latency comparison or repeated
185
+ model reliability. Private native transcripts and credentials remain outside Git.
@@ -0,0 +1,319 @@
1
+ {
2
+ "format": "sevro.runtime-startup-benchmark.v1",
3
+ "sourceRoot": "/Users/bjro/Sources/sevro/.worktrees/perf/30-runtime-startup-overhead",
4
+ "platform": "darwin",
5
+ "arch": "arm64",
6
+ "bun": "1.3.13",
7
+ "codex": "codex-cli 0.162.1",
8
+ "case": "synthetic-plugin-response",
9
+ "model": "synthetic-candidate / synthetic-semantic",
10
+ "effort": "low",
11
+ "seed": {
12
+ "entries": 2049,
13
+ "bytes": 33554432
14
+ },
15
+ "repetitions": 3,
16
+ "conditions": "Fresh role homes each invocation; first verified snapshot cold, later repetitions warm; OS filesystem caches uncontrolled; no live API/model calls",
17
+ "rows": [
18
+ {
19
+ "repetition": 0,
20
+ "role": "candidate",
21
+ "phase": "configuration",
22
+ "milliseconds": 298.645833,
23
+ "status": "completed"
24
+ },
25
+ {
26
+ "repetition": 1,
27
+ "role": "candidate",
28
+ "phase": "runtime.candidate",
29
+ "milliseconds": 721.155541,
30
+ "status": "completed"
31
+ },
32
+ {
33
+ "repetition": 1,
34
+ "role": "candidate",
35
+ "phase": "plugin-command",
36
+ "milliseconds": 113.721,
37
+ "status": "completed"
38
+ },
39
+ {
40
+ "repetition": 1,
41
+ "role": "candidate",
42
+ "phase": "plugin-command",
43
+ "milliseconds": 70.76491699999997,
44
+ "status": "completed"
45
+ },
46
+ {
47
+ "repetition": 1,
48
+ "role": "candidate",
49
+ "phase": "installation-assets",
50
+ "files": [
51
+ "cache"
52
+ ],
53
+ "configurationContainsPrivateHome": true,
54
+ "configurationContainsWorkspace": true
55
+ },
56
+ {
57
+ "repetition": 1,
58
+ "role": "candidate",
59
+ "phase": "plugin-install",
60
+ "milliseconds": 187.57354199999986,
61
+ "status": "completed"
62
+ },
63
+ {
64
+ "repetition": 1,
65
+ "role": "candidate",
66
+ "phase": "sandbox-probe",
67
+ "milliseconds": 5489.6383749999995,
68
+ "status": "completed"
69
+ },
70
+ {
71
+ "repetition": 1,
72
+ "role": "candidate",
73
+ "phase": "participant-execution",
74
+ "milliseconds": 27.323707999999897,
75
+ "status": "completed"
76
+ },
77
+ {
78
+ "repetition": 1,
79
+ "role": "candidate",
80
+ "phase": "candidate-total",
81
+ "milliseconds": 6659.420667,
82
+ "status": "completed"
83
+ },
84
+ {
85
+ "repetition": 1,
86
+ "role": "semantic",
87
+ "phase": "runtime.semantic",
88
+ "milliseconds": 0.3450830000001588,
89
+ "status": "completed"
90
+ },
91
+ {
92
+ "repetition": 1,
93
+ "role": "semantic",
94
+ "phase": "plugin-install",
95
+ "milliseconds": 0.005458999999973457,
96
+ "status": "completed"
97
+ },
98
+ {
99
+ "repetition": 1,
100
+ "role": "semantic",
101
+ "phase": "sandbox-probe",
102
+ "milliseconds": 5548.128959000001,
103
+ "status": "completed"
104
+ },
105
+ {
106
+ "repetition": 1,
107
+ "role": "semantic",
108
+ "phase": "participant-execution",
109
+ "milliseconds": 28.713165999999546,
110
+ "status": "completed"
111
+ },
112
+ {
113
+ "repetition": 1,
114
+ "role": "semantic",
115
+ "phase": "grading",
116
+ "milliseconds": 5646.800708000001,
117
+ "status": "completed"
118
+ },
119
+ {
120
+ "repetition": 2,
121
+ "role": "candidate",
122
+ "phase": "runtime.candidate",
123
+ "milliseconds": 430.6864170000008,
124
+ "status": "completed"
125
+ },
126
+ {
127
+ "repetition": 2,
128
+ "role": "candidate",
129
+ "phase": "plugin-command",
130
+ "milliseconds": 73.67158399999971,
131
+ "status": "completed"
132
+ },
133
+ {
134
+ "repetition": 2,
135
+ "role": "candidate",
136
+ "phase": "plugin-command",
137
+ "milliseconds": 65.96320800000103,
138
+ "status": "completed"
139
+ },
140
+ {
141
+ "repetition": 2,
142
+ "role": "candidate",
143
+ "phase": "installation-assets",
144
+ "files": [
145
+ "cache"
146
+ ],
147
+ "configurationContainsPrivateHome": true,
148
+ "configurationContainsWorkspace": true
149
+ },
150
+ {
151
+ "repetition": 2,
152
+ "role": "candidate",
153
+ "phase": "plugin-install",
154
+ "milliseconds": 141.00866599999972,
155
+ "status": "completed"
156
+ },
157
+ {
158
+ "repetition": 2,
159
+ "role": "candidate",
160
+ "phase": "sandbox-probe",
161
+ "milliseconds": 5404.434915999998,
162
+ "status": "completed"
163
+ },
164
+ {
165
+ "repetition": 2,
166
+ "role": "candidate",
167
+ "phase": "participant-execution",
168
+ "milliseconds": 26.502958000000945,
169
+ "status": "completed"
170
+ },
171
+ {
172
+ "repetition": 2,
173
+ "role": "candidate",
174
+ "phase": "candidate-total",
175
+ "milliseconds": 6199.1395840000005,
176
+ "status": "completed"
177
+ },
178
+ {
179
+ "repetition": 2,
180
+ "role": "semantic",
181
+ "phase": "runtime.semantic",
182
+ "milliseconds": 0.314249999999447,
183
+ "status": "completed"
184
+ },
185
+ {
186
+ "repetition": 2,
187
+ "role": "semantic",
188
+ "phase": "plugin-install",
189
+ "milliseconds": 0.005916999998589745,
190
+ "status": "completed"
191
+ },
192
+ {
193
+ "repetition": 2,
194
+ "role": "semantic",
195
+ "phase": "sandbox-probe",
196
+ "milliseconds": 5359.928749999999,
197
+ "status": "completed"
198
+ },
199
+ {
200
+ "repetition": 2,
201
+ "role": "semantic",
202
+ "phase": "participant-execution",
203
+ "milliseconds": 27.60699999999997,
204
+ "status": "completed"
205
+ },
206
+ {
207
+ "repetition": 2,
208
+ "role": "semantic",
209
+ "phase": "grading",
210
+ "milliseconds": 5454.279749999998,
211
+ "status": "completed"
212
+ },
213
+ {
214
+ "repetition": 3,
215
+ "role": "candidate",
216
+ "phase": "runtime.candidate",
217
+ "milliseconds": 442.62854199999856,
218
+ "status": "completed"
219
+ },
220
+ {
221
+ "repetition": 3,
222
+ "role": "candidate",
223
+ "phase": "plugin-command",
224
+ "milliseconds": 72.3325420000001,
225
+ "status": "completed"
226
+ },
227
+ {
228
+ "repetition": 3,
229
+ "role": "candidate",
230
+ "phase": "plugin-command",
231
+ "milliseconds": 68.99258300000292,
232
+ "status": "completed"
233
+ },
234
+ {
235
+ "repetition": 3,
236
+ "role": "candidate",
237
+ "phase": "installation-assets",
238
+ "files": [
239
+ "cache"
240
+ ],
241
+ "configurationContainsPrivateHome": true,
242
+ "configurationContainsWorkspace": true
243
+ },
244
+ {
245
+ "repetition": 3,
246
+ "role": "candidate",
247
+ "phase": "plugin-install",
248
+ "milliseconds": 142.90399999999863,
249
+ "status": "completed"
250
+ },
251
+ {
252
+ "repetition": 3,
253
+ "role": "candidate",
254
+ "phase": "sandbox-probe",
255
+ "milliseconds": 5447.905040999998,
256
+ "status": "completed"
257
+ },
258
+ {
259
+ "repetition": 3,
260
+ "role": "candidate",
261
+ "phase": "participant-execution",
262
+ "milliseconds": 23.8626669999976,
263
+ "status": "completed"
264
+ },
265
+ {
266
+ "repetition": 3,
267
+ "role": "candidate",
268
+ "phase": "candidate-total",
269
+ "milliseconds": 6256.5165830000005,
270
+ "status": "completed"
271
+ },
272
+ {
273
+ "repetition": 3,
274
+ "role": "semantic",
275
+ "phase": "runtime.semantic",
276
+ "milliseconds": 0.3507499999977881,
277
+ "status": "completed"
278
+ },
279
+ {
280
+ "repetition": 3,
281
+ "role": "semantic",
282
+ "phase": "plugin-install",
283
+ "milliseconds": 0.01341600000159815,
284
+ "status": "completed"
285
+ },
286
+ {
287
+ "repetition": 3,
288
+ "role": "semantic",
289
+ "phase": "sandbox-probe",
290
+ "milliseconds": 5365.139791000001,
291
+ "status": "completed"
292
+ },
293
+ {
294
+ "repetition": 3,
295
+ "role": "semantic",
296
+ "phase": "participant-execution",
297
+ "milliseconds": 28.228125000001455,
298
+ "status": "completed"
299
+ },
300
+ {
301
+ "repetition": 3,
302
+ "role": "semantic",
303
+ "phase": "grading",
304
+ "milliseconds": 5460.212874999997,
305
+ "status": "completed"
306
+ },
307
+ {
308
+ "repetition": 4,
309
+ "role": "semantic",
310
+ "phase": "cow-copy",
311
+ "milliseconds": 1.0158329999976559,
312
+ "status": "completed"
313
+ },
314
+ {
315
+ "phase": "cow-isolation",
316
+ "sourceUnchanged": true
317
+ }
318
+ ]
319
+ }
@@ -0,0 +1,2 @@
1
+ {"phase":"sandbox-probe","durationMs":10004.7745,"error":"Codex run timed out"}
2
+ {"phase":"host-failure","error":"Codex run timed out"}