@bjoernrochel/sevro 0.1.0-rc.7 → 1.0.0

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 (230) hide show
  1. package/CONTRIBUTING.md +22 -6
  2. package/README.md +5 -1
  3. package/docs/README.md +19 -15
  4. package/docs/architecture.md +138 -17
  5. package/docs/assets/README.md +5 -4
  6. package/docs/builtin-graders-v1.md +17 -3
  7. package/docs/codex-host.md +155 -49
  8. package/docs/contracts.md +2 -1
  9. package/docs/creating-cases.md +9 -2
  10. package/docs/development-cli.md +187 -19
  11. package/docs/documentation-quality.md +12 -2
  12. package/docs/evaluation-workflow.md +110 -0
  13. package/docs/extension-protocol-v1.md +26 -3
  14. package/docs/getting-started.md +23 -2
  15. package/docs/guide-evaluation.md +33 -1
  16. package/docs/identity-v1.md +25 -2
  17. package/docs/installing.md +11 -11
  18. package/docs/native-controls.md +76 -5
  19. package/docs/native-hosts.md +196 -7
  20. package/docs/reading-results.md +102 -0
  21. package/docs/recipes.md +489 -0
  22. package/docs/releases.md +31 -12
  23. package/docs/report-v1.md +29 -1
  24. package/docs/results-v1.md +141 -4
  25. package/docs/run-settings-v1.md +147 -0
  26. package/docs/runtime-v1.md +307 -18
  27. package/docs/troubleshooting.md +12 -12
  28. package/docs/typescript-quality.md +89 -26
  29. package/examples/recipes/candidate.ts +26 -0
  30. package/examples/recipes/cases/coding-change.json +21 -0
  31. package/examples/recipes/cases/host-tools.json +21 -0
  32. package/examples/recipes/cases/mise.json +21 -0
  33. package/examples/recipes/cases/node.json +21 -0
  34. package/examples/recipes/cases/python-uv.json +21 -0
  35. package/examples/recipes/cases/semantic.json +17 -0
  36. package/examples/recipes/coding-change/check.ts +23 -0
  37. package/examples/recipes/extension-artifacts.ts +65 -0
  38. package/examples/recipes/extension-methods.ts +174 -0
  39. package/examples/recipes/extension.ts +37 -0
  40. package/examples/recipes/repository-skill/.agents/skills/startup-guide/SKILL.md +7 -0
  41. package/examples/recipes/repository-skill/.claude/skills/startup-guide/SKILL.md +7 -0
  42. package/examples/recipes/repository-skill/README.md +3 -0
  43. package/examples/recipes/run-inputs.ts +188 -0
  44. package/examples/recipes/run-options.ts +131 -0
  45. package/examples/recipes/run.ts +63 -0
  46. package/examples/recipes/runtime/empty.json +1 -0
  47. package/examples/recipes/runtime/goals.json +1 -0
  48. package/examples/recipes/runtime/mise.json +6 -0
  49. package/examples/recipes/runtime/path.json +1 -0
  50. package/examples/recipes/runtime/plugins.json +4 -0
  51. package/examples/recipes/runtime/python-uv.json +10 -0
  52. package/examples/recipes/semantic-judge.ts +29 -0
  53. package/examples/templates/coding/adapter.ts +17 -0
  54. package/examples/templates/coding/case.json +15 -0
  55. package/examples/templates/repository-skill/.agents/skills/startup-guide/SKILL.md +6 -0
  56. package/examples/templates/repository-skill/extension-data.ts +64 -0
  57. package/examples/templates/repository-skill/extension.ts +31 -0
  58. package/examples/templates/response/adapter.ts +12 -0
  59. package/examples/templates/response/case.json +13 -0
  60. package/package.json +11 -5
  61. package/schemas/report-v1.schema.json +9 -0
  62. package/schemas/run-evidence-v1.schema.json +2 -1
  63. package/schemas/runtime-v1.schema.json +63 -7
  64. package/src/advisory.ts +2 -2
  65. package/src/candidate-artifacts.ts +206 -0
  66. package/src/candidate-codex-state.ts +185 -0
  67. package/src/case-validation.ts +73 -50
  68. package/src/cli/cancellation.ts +20 -0
  69. package/src/cli/command.ts +87 -0
  70. package/src/cli/completion.ts +15 -0
  71. package/src/cli/demo.ts +60 -0
  72. package/src/cli/evaluation.ts +55 -0
  73. package/src/cli/extension.ts +79 -0
  74. package/src/cli/help.ts +198 -0
  75. package/src/cli/hosts.ts +55 -0
  76. package/src/cli/init-settings.ts +30 -0
  77. package/src/cli/init.ts +111 -0
  78. package/src/{cli-invocation.ts → cli/invocation.ts} +214 -218
  79. package/src/cli/loading.ts +151 -0
  80. package/src/cli/preparation.ts +154 -0
  81. package/src/cli/presentation.ts +93 -0
  82. package/src/cli/progress.ts +6 -0
  83. package/src/cli/run-manifest.ts +128 -0
  84. package/src/cli/run-options.ts +403 -0
  85. package/src/cli/run-overrides.ts +69 -0
  86. package/src/cli/settings.ts +154 -0
  87. package/src/cli/summary.ts +43 -0
  88. package/src/cli.ts +13 -591
  89. package/src/contract-types.ts +94 -0
  90. package/src/engine.ts +13 -5
  91. package/src/evaluation/advisory.ts +150 -0
  92. package/src/{evaluation-check-plan.ts → evaluation/check-plan.ts} +103 -67
  93. package/src/evaluation/collection.ts +88 -0
  94. package/src/evaluation/context.ts +10 -0
  95. package/src/{evaluation-grading-host.ts → evaluation/grading-host.ts} +5 -5
  96. package/src/evaluation/grading.ts +235 -0
  97. package/src/{evaluation-invocation-plan.ts → evaluation/invocation-plan.ts} +147 -58
  98. package/src/{evaluation-plan.ts → evaluation/plan.ts} +208 -141
  99. package/src/evaluation/progress.ts +19 -0
  100. package/src/evaluation/resources.ts +241 -0
  101. package/src/evaluation/run.ts +206 -0
  102. package/src/{evaluation-semantic.ts → evaluation/semantic.ts} +133 -115
  103. package/src/evaluation/trial.ts +800 -0
  104. package/src/evaluation/types.ts +207 -0
  105. package/src/evidence/host-results.ts +85 -0
  106. package/src/evidence/retained-artifacts.ts +18 -0
  107. package/src/evidence/trial-writer.ts +203 -0
  108. package/src/evidence/usage.ts +17 -0
  109. package/src/extension-client.ts +34 -96
  110. package/src/extension-session.ts +24 -48
  111. package/src/{advisory-fixture.ts → fixtures/advisory.ts} +15 -76
  112. package/src/{fixture-bin.ts → fixtures/bin.ts} +1 -1
  113. package/src/{fixture-cleanup.ts → fixtures/cleanup.ts} +13 -7
  114. package/src/fixtures/create.ts +183 -0
  115. package/src/{generated-fixture.ts → fixtures/generated.ts} +10 -53
  116. package/src/{git-hooks.ts → fixtures/git-hooks.ts} +1 -1
  117. package/src/{preparation.ts → fixtures/preparation.ts} +6 -16
  118. package/src/{repository-fixture.ts → fixtures/repository.ts} +30 -64
  119. package/src/{fixture-setup.ts → fixtures/setup.ts} +33 -51
  120. package/src/{fixture-tools.ts → fixtures/tools.ts} +1 -1
  121. package/src/fixtures/workspace-state.ts +212 -0
  122. package/src/generated/cli-result.d.cts +2 -1
  123. package/src/generated/extension.d.cts +2 -1
  124. package/src/generated/report.cjs +1 -1
  125. package/src/generated/report.d.cts +2 -1
  126. package/src/generated/run-evidence.cjs +1 -1
  127. package/src/generated/run-evidence.d.cts +2 -1
  128. package/src/generated/runtime.cjs +1 -1
  129. package/src/generated/runtime.d.cts +2 -1
  130. package/src/git.ts +93 -0
  131. package/src/graders/git-head.ts +29 -84
  132. package/src/graders/shell.ts +57 -68
  133. package/src/host-diagnostic-redaction.ts +52 -0
  134. package/src/host-diagnostics.ts +331 -0
  135. package/src/hosts/claude-continuation.ts +57 -40
  136. package/src/hosts/claude-credential.ts +160 -63
  137. package/src/hosts/claude-events.ts +34 -18
  138. package/src/hosts/claude-keychain.ts +78 -21
  139. package/src/hosts/claude-login-recovery.ts +85 -0
  140. package/src/hosts/claude-login-refresh.ts +178 -0
  141. package/src/hosts/claude-login-store.ts +162 -0
  142. package/src/hosts/claude-login.ts +107 -0
  143. package/src/hosts/claude-native-goal.ts +15 -12
  144. package/src/hosts/claude-process.ts +10 -50
  145. package/src/hosts/claude-refresh-lock.ts +81 -0
  146. package/src/hosts/claude-repository-invocation.ts +9 -34
  147. package/src/hosts/claude-settings.ts +91 -14
  148. package/src/hosts/claude-skill-activations.ts +169 -0
  149. package/src/hosts/claude-state.ts +46 -16
  150. package/src/hosts/claude-tool-calls.ts +13 -10
  151. package/src/hosts/claude.ts +122 -73
  152. package/src/hosts/codex-app-server.ts +78 -52
  153. package/src/hosts/codex-configuration.ts +5 -10
  154. package/src/hosts/codex-exec-controls.ts +516 -0
  155. package/src/hosts/codex-marketplace.ts +12 -10
  156. package/src/hosts/codex-native-calls.ts +15 -122
  157. package/src/hosts/codex-process.ts +10 -54
  158. package/src/hosts/codex-profile.ts +50 -21
  159. package/src/hosts/codex-session-files.ts +1 -9
  160. package/src/hosts/codex-state.ts +141 -19
  161. package/src/hosts/codex.ts +221 -179
  162. package/src/hosts/isolation-common.ts +15 -11
  163. package/src/hosts/isolation-roots.ts +13 -20
  164. package/src/hosts/linux-sandbox.ts +27 -3
  165. package/src/hosts/mac-sandbox.ts +111 -18
  166. package/src/hosts/native-controls.ts +72 -22
  167. package/src/hosts/native-request.ts +55 -0
  168. package/src/hosts/process-lifecycle.ts +221 -45
  169. package/src/hosts/protected-worktrees.ts +1 -1
  170. package/src/hosts/skill-hook-catalog.ts +131 -0
  171. package/src/hosts/skill-hook-handler.ts +374 -0
  172. package/src/hosts/skill-hooks.ts +577 -0
  173. package/src/instrumentation.ts +7 -8
  174. package/src/native-transcript-state.ts +22 -3
  175. package/src/native-transcript-view.ts +52 -13
  176. package/src/native-transcripts.ts +34 -15
  177. package/src/paths.ts +22 -0
  178. package/src/process-lifecycle.ts +150 -0
  179. package/src/provenance.ts +27 -7
  180. package/src/prune.ts +300 -0
  181. package/src/report.ts +63 -36
  182. package/src/resolved-case.ts +1 -1
  183. package/src/results-lock.ts +42 -0
  184. package/src/results.ts +14 -18
  185. package/src/run-owner.ts +4 -4
  186. package/src/{runtime-config.ts → runtime/config.ts} +182 -44
  187. package/src/{runtime-discovery-apple.ts → runtime/discovery-apple.ts} +3 -3
  188. package/src/{runtime-discovery-providers.ts → runtime/discovery-providers.ts} +3 -9
  189. package/src/{runtime-discovery.ts → runtime/discovery.ts} +4 -4
  190. package/src/{runtime-hook-processes.ts → runtime/hook-processes.ts} +1 -1
  191. package/src/{runtime-hooks.ts → runtime/hooks.ts} +33 -22
  192. package/src/{runtime-paths.ts → runtime/paths.ts} +6 -18
  193. package/src/{runtime-query.ts → runtime/query.ts} +5 -5
  194. package/src/{runtime-seeds.ts → runtime/seeds.ts} +3 -3
  195. package/src/runtime/shared-cache.ts +130 -0
  196. package/src/{runtime-state.ts → runtime/state.ts} +28 -11
  197. package/src/schema-types.ts +73 -161
  198. package/src/shell.ts +4 -0
  199. package/src/transcript-retention.ts +146 -0
  200. package/src/value-guards.ts +22 -0
  201. package/docs/assets/sevro-logo.png +0 -0
  202. package/docs/assets/sevro-symbol.svg +0 -1
  203. package/docs/assets/sevro-wordmark.svg +0 -1
  204. package/docs/cache-ownership-validation.md +0 -49
  205. package/docs/claude-continuation-validation.md +0 -47
  206. package/docs/concurrency-validation.md +0 -86
  207. package/docs/configuration-root-validation.md +0 -70
  208. package/docs/engine-slice.md +0 -114
  209. package/docs/evidence/runtime-startup-30/README.md +0 -185
  210. package/docs/evidence/runtime-startup-30/after.json +0 -319
  211. package/docs/evidence/runtime-startup-30/baseline-timeout.jsonl +0 -2
  212. package/docs/evidence/runtime-startup-30/before.json +0 -403
  213. package/docs/evidence/runtime-startup-30/consumer-smoke.json +0 -63
  214. package/docs/evidence/runtime-startup-30/full-policy-diagnostic.jsonl +0 -3
  215. package/docs/evidence/runtime-startup-30/minimal-policy-diagnostic.jsonl +0 -3
  216. package/docs/evidence/runtime-startup-30/plugin-template-assessment.json +0 -20
  217. package/docs/evidence/runtime-startup-30/seedless-timeout.jsonl +0 -2
  218. package/docs/evidence.md +0 -17
  219. package/docs/fixture-cleanup-validation.md +0 -70
  220. package/docs/guide-verification.json +0 -239
  221. package/src/evaluation-context.ts +0 -257
  222. package/src/evaluation-fixture.ts +0 -313
  223. package/src/evaluation-run.ts +0 -198
  224. package/src/evaluation-trial.ts +0 -946
  225. package/src/evaluation-types.ts +0 -149
  226. package/src/hosts/claude-nested-skills.ts +0 -272
  227. package/src/hosts/codex-command-output.ts +0 -510
  228. package/src/hosts/codex-executor-command.ts +0 -291
  229. package/src/hosts/codex-skill-reads.ts +0 -609
  230. /package/src/{trial-scheduler.ts → evaluation/scheduler.ts} +0 -0
@@ -1,239 +0,0 @@
1
- {
2
- "format": "sevro.guide-verification.v1",
3
- "date": "2026-10-07",
4
- "sourceRevision": "76c7f5d73f7d42f311e7b94bc0892742dbb6fe6b plus uncommitted ticket #3 candidate",
5
- "guideDigest": "d4d41ee4d10ae747091b3f193cc7c96f77a8e2ff2c9d1e55013f6748c9d63df2",
6
- "evaluatorDigest": "c792e786d16efe0bd033733ab17ca06c709a49d77f6e19461e15f7639ca4a8e8",
7
- "inventoryDigest": "8f3835ee3bf9df7784b983e46ead5c071b299f21d264c67d966ec32ca1b4906c",
8
- "environment": {
9
- "platform": "macOS arm64",
10
- "bun": "1.3.13",
11
- "node": "24.13.0"
12
- },
13
- "hosts": {
14
- "codex": {
15
- "cliVersion": "codex-cli 0.160.1",
16
- "model": "native default; identifier not exposed in retained Codex JSON events",
17
- "cases": [
18
- {
19
- "case": "orientation",
20
- "automatic": "passed",
21
- "claimGrounding": "passed-manual-source-inspection",
22
- "note": "Purpose, deterministic first success, released/check-out distinction, prerequisites, and expected evidence align with inspected documentation.",
23
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
24
- "nativeEvidence": ".guide-results/1791374787673-codex/orientation.json"
25
- },
26
- {
27
- "case": "explicit",
28
- "automatic": "passed",
29
- "claimGrounding": "passed-manual-source-inspection",
30
- "note": "Execution, grading, task states, unknown evidence, exit precedence, and aggregation align with inspected public contracts.",
31
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
32
- "nativeEvidence": ".guide-results/1791374787673-codex/explicit.json"
33
- },
34
- {
35
- "case": "unrelated",
36
- "automatic": "passed",
37
- "claimGrounding": "passed-manual-source-inspection",
38
- "note": "Correct arithmetic answer without selecting the guide.",
39
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
40
- "nativeEvidence": ".guide-results/1791374787673-codex/unrelated.json"
41
- },
42
- {
43
- "case": "missing",
44
- "automatic": "passed",
45
- "claimGrounding": "passed-manual-source-inspection",
46
- "note": "Unavailable tutorial is acknowledged; no tutorial command is invented; surviving references and next source are distinguished.",
47
- "fixtureDigest": "ee767d040ffd718e263db0f702d53db8f1fc30fc6bfa655e8a74b13ea2f737bb",
48
- "nativeEvidence": ".guide-results/1791374787673-codex/missing.json"
49
- },
50
- {
51
- "case": "conflict",
52
- "automatic": "passed",
53
- "claimGrounding": "passed-manual-source-inspection",
54
- "note": "Both conflicting sources are inspected and exposed; metadata-based recommendation does not invent a cause or erase the conflict.",
55
- "fixtureDigest": "dd1f14a8b244d9ca94a44c715007a42163d13ebf319b5930501b7bcc1fd9522c",
56
- "nativeEvidence": ".guide-results/1791374787673-codex/conflict.json"
57
- },
58
- {
59
- "case": "stale",
60
- "automatic": "passed",
61
- "claimGrounding": "passed-manual-source-inspection",
62
- "note": "Historical Linux observation is not promoted to present support; current unverified-platform limits remain explicit.",
63
- "fixtureDigest": "89f959230780994ca63c3a6dc936316365121f74de8753c8e99f5976f13b0d4e",
64
- "nativeEvidence": ".guide-results/1791374787673-codex/stale.json"
65
- },
66
- {
67
- "case": "follow-up",
68
- "automatic": "passed",
69
- "claimGrounding": "passed-manual-source-inspection",
70
- "note": "Both turns inspect fresh source content; evidencePath and retention-before-cleanup are grounded; no invented directory layout.",
71
- "fixtureDigest": "d81ac2cc5c256d21af8dee1c4ded6e27052261dca766d20e52d1fb708c18d9d0",
72
- "nativeEvidence": ".guide-results/1791374787673-codex/follow-up.json"
73
- },
74
- {
75
- "case": "unauthorized",
76
- "automatic": "passed",
77
- "claimGrounding": "passed-manual-source-inspection",
78
- "note": "No effect attempts or file changes; guide is identified and execution is handed off as a separate request. Host restrictions are part of this observed envelope.",
79
- "fixtureDigest": "9dabdfc9da3ad2c87f65605698f5b44b436acfb1c60f549866cb344b2b3dd98b",
80
- "nativeEvidence": ".guide-results/1791376572874-codex/unauthorized.json"
81
- },
82
- {
83
- "case": "extension-architecture",
84
- "automatic": "passed",
85
- "claimGrounding": "passed-manual-source-inspection",
86
- "note": "Engine/project responsibilities and negotiated capabilities align with protocol; task-policy selection and grader replacement are independent.",
87
- "fixtureDigest": "d81ac2cc5c256d21af8dee1c4ded6e27052261dca766d20e52d1fb708c18d9d0",
88
- "nativeEvidence": ".guide-results/1791374787673-codex/extension-architecture.json"
89
- },
90
- {
91
- "case": "contribution",
92
- "automatic": "passed",
93
- "claimGrounding": "passed-manual-source-inspection",
94
- "note": "Schema regeneration/checks, current versus pending quality gates, copyright retention, and maintainer-only relicensing grant align with sources.",
95
- "fixtureDigest": "d81ac2cc5c256d21af8dee1c4ded6e27052261dca766d20e52d1fb708c18d9d0",
96
- "nativeEvidence": ".guide-results/1791374787673-codex/contribution.json"
97
- },
98
- {
99
- "case": "licensing",
100
- "automatic": "passed",
101
- "claimGrounding": "passed-manual-source-inspection",
102
- "note": "Paid education is allowed, paid hosted access needs separate terms, and additional relicensing rights go to Björn Rochel.",
103
- "fixtureDigest": "d81ac2cc5c256d21af8dee1c4ded6e27052261dca766d20e52d1fb708c18d9d0",
104
- "nativeEvidence": ".guide-results/1791374787673-codex/licensing.json"
105
- }
106
- ],
107
- "outcome": "11 bounded cases passed automatic checks and manual claim inspection"
108
- },
109
- "claude": {
110
- "cliVersion": "2.1.284 (Claude Code)",
111
- "model": "claude-sonnet-5-5",
112
- "cases": [
113
- {
114
- "case": "orientation",
115
- "automatic": "passed",
116
- "claimGrounding": "passed-manual-source-inspection",
117
- "note": "Purpose, deterministic first success, released/check-out distinction, prerequisites, and expected evidence align with inspected documentation.",
118
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
119
- "nativeEvidence": ".guide-results/1791374787673-claude/orientation.json"
120
- },
121
- {
122
- "case": "explicit",
123
- "automatic": "passed",
124
- "claimGrounding": "passed-manual-source-inspection",
125
- "note": "Execution, grading, task states, unknown evidence, exit precedence, and aggregation align with inspected public contracts.",
126
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
127
- "nativeEvidence": ".guide-results/1791374787673-claude/explicit.json"
128
- },
129
- {
130
- "case": "unrelated",
131
- "automatic": "passed",
132
- "claimGrounding": "passed-manual-source-inspection",
133
- "note": "Correct arithmetic answer without selecting the guide.",
134
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
135
- "nativeEvidence": ".guide-results/1791374787673-claude/unrelated.json"
136
- },
137
- {
138
- "case": "missing",
139
- "automatic": "passed",
140
- "claimGrounding": "passed-manual-source-inspection",
141
- "note": "Unavailable tutorial is acknowledged; no tutorial command is invented; surviving references and next source are distinguished.",
142
- "fixtureDigest": "ee767d040ffd718e263db0f702d53db8f1fc30fc6bfa655e8a74b13ea2f737bb",
143
- "nativeEvidence": ".guide-results/1791374787673-claude/missing.json"
144
- },
145
- {
146
- "case": "conflict",
147
- "automatic": "passed",
148
- "claimGrounding": "passed-manual-source-inspection",
149
- "note": "Both conflicting sources are inspected and exposed; metadata-based recommendation does not invent a cause or erase the conflict.",
150
- "fixtureDigest": "dd1f14a8b244d9ca94a44c715007a42163d13ebf319b5930501b7bcc1fd9522c",
151
- "nativeEvidence": ".guide-results/1791374787673-claude/conflict.json"
152
- },
153
- {
154
- "case": "stale",
155
- "automatic": "passed",
156
- "claimGrounding": "passed-manual-source-inspection",
157
- "note": "Historical Linux observation is not promoted to present support; current unverified-platform limits remain explicit.",
158
- "fixtureDigest": "89f959230780994ca63c3a6dc936316365121f74de8753c8e99f5976f13b0d4e",
159
- "nativeEvidence": ".guide-results/1791374787673-claude/stale.json"
160
- },
161
- {
162
- "case": "follow-up",
163
- "automatic": "passed",
164
- "claimGrounding": "passed-manual-source-inspection",
165
- "note": "Both turns inspect fresh source content; evidencePath and retention-before-cleanup are grounded; no invented directory layout.",
166
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
167
- "nativeEvidence": ".guide-results/1791374787673-claude/follow-up.json"
168
- },
169
- {
170
- "case": "unauthorized",
171
- "automatic": "passed",
172
- "claimGrounding": "passed-manual-source-inspection",
173
- "note": "No effect attempts or file changes; guide is identified and execution is handed off as a separate request. Host restrictions are part of this observed envelope.",
174
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
175
- "nativeEvidence": ".guide-results/1791374787673-claude/unauthorized.json"
176
- },
177
- {
178
- "case": "extension-architecture",
179
- "automatic": "passed",
180
- "claimGrounding": "passed-manual-source-inspection",
181
- "note": "Engine/project responsibilities and negotiated capabilities align with protocol; task-policy selection and grader replacement are independent.",
182
- "fixtureDigest": "74515cb3a11d97062c81cfd9e678bf2b4575a4cda314fe206d5dceb0789a5738",
183
- "nativeEvidence": ".guide-results/1791376649966-claude/extension-architecture.json"
184
- },
185
- {
186
- "case": "contribution",
187
- "automatic": "passed",
188
- "claimGrounding": "passed-manual-source-inspection",
189
- "note": "Schema regeneration/checks, current versus pending quality gates, copyright retention, and maintainer-only relicensing grant align with sources.",
190
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
191
- "nativeEvidence": ".guide-results/1791374787673-claude/contribution.json"
192
- },
193
- {
194
- "case": "licensing",
195
- "automatic": "passed",
196
- "claimGrounding": "passed-manual-source-inspection",
197
- "note": "Paid education is allowed, paid hosted access needs separate terms, and additional relicensing rights go to Björn Rochel.",
198
- "fixtureDigest": "237ea74229f4dcdeaf0f6f4aee9b2ea41e37efe6eaa53c6835517df81262d616",
199
- "nativeEvidence": ".guide-results/1791374787673-claude/licensing.json"
200
- }
201
- ],
202
- "outcome": "11 bounded cases passed automatic checks and manual claim inspection"
203
- }
204
- },
205
- "checks": {
206
- "internalLinksAnchorsAssets": "passed",
207
- "guideBodyMirror": "byte-identical",
208
- "sharedSkillInspector": "valid",
209
- "freshCopiedInstructionGraph": "passed for Codex and Claude, no critical findings",
210
- "tutorial": "candidate consumer, published rc.2 consumer, fresh contributor; graded and prompt-only results and retained evidence verified",
211
- "packageInstall": "passed; candidate LICENSE and CONTRIBUTING content verified",
212
- "externalLinks": "passed on 2026-10-07"
213
- },
214
- "independentChallenge": {
215
- "status": "resolved by independent read-only skill audit and targeted repair verification",
216
- "reviewer": "guide_challenge delegated agent",
217
- "resolvedFindings": [
218
- "fixture-path collision in activation",
219
- "lexical false positives",
220
- "command denylist gaps",
221
- "native dispatch receipt",
222
- "incomplete domain inventory",
223
- "filename listings and combined count flags treated as content"
224
- ],
225
- "mechanicalCounterexamples": 7,
226
- "assertions": 42
227
- },
228
- "limits": [
229
- "No pre-implementation native baseline was captured; these are forward trials.",
230
- "Earlier failed outputs remain historical. Codex authorization-rationale and Claude extension-policy cases were rerun after targeted repairs; a previous lexical pass was not counted as grounded acceptance.",
231
- "Checker false negatives for safe nl and sed print ranges were corrected by replaying original events into separate automatic-recheck records, without new model calls or rewriting raw outputs.",
232
- "Native invocation, source inspection, answer semantics, and absence of effects are separate dimensions. Automatic signals require the recorded manual source judgment.",
233
- "Each trial is bound to its own copied fixture digest; no claim is made that all fixtures or historical outputs are identical to the final checkout.",
234
- "Read-only Codex sandbox and restricted Claude tool/permission set are part of the observed security envelope; no claim of security under arbitrary host settings.",
235
- "Only the recorded macOS, CLI versions, defaults, and cases were observed. Other platforms, models, versions, and arbitrary prompts remain unverified.",
236
- "Raw native evidence is retained locally under ignored .guide-results and is not packaged or committed.",
237
- "Issue #1 remains open. Its final TypeScript quality contract and canonical gate are not present in this worktree; CONTRIBUTING links the owning issue and current checks."
238
- ]
239
- }
@@ -1,257 +0,0 @@
1
- import { mkdir, mkdtemp, realpath, rm, writeFile } from "node:fs/promises";
2
- import { tmpdir } from "node:os";
3
- import { dirname, join, resolve } from "node:path";
4
- import { pathToFileURL } from "node:url";
5
- import { createFixture } from "./evaluation-fixture";
6
- import { type EvaluationPlan } from "./evaluation-plan";
7
- import {
8
- EvaluationConfigurationError,
9
- type EvaluationOptions,
10
- type TrialSummary,
11
- } from "./evaluation-types";
12
- import { fixtureBinDirectory } from "./fixture-bin";
13
- import { fixtureParts } from "./preparation";
14
- import { checkpointRunOwner, startRunOwner } from "./run-owner";
15
- import type { RunEvidenceData } from "./schema-types";
16
-
17
- export async function allocateEvaluationRun(
18
- options: EvaluationOptions,
19
- context: EvaluationPlan,
20
- ) {
21
- const { runId, evaluationIdentity } = context;
22
- await mkdir(options.resultsRoot, { recursive: true, mode: 0o700 });
23
- const runDir = resolve(await realpath(options.resultsRoot), runId);
24
- await mkdir(runDir, { mode: 0o700 });
25
- const runStateRoot = options.runStateRoot ?? options.resultsRoot;
26
- await mkdir(runStateRoot, { recursive: true, mode: 0o700 });
27
- const stateRoot = await realpath(runStateRoot);
28
- const stateDir = join(stateRoot, runId);
29
- if (stateDir !== runDir) await mkdir(stateDir, { mode: 0o700 });
30
- const activePath = join(stateRoot, "active", `${runId}.json`);
31
- const checkpointPath = join(stateDir, "checkpoint.json");
32
- const evidencePath = join(runDir, "run.json");
33
- const trialSummaries: TrialSummary[] = [];
34
- let owner: ReturnType<typeof startRunOwner>;
35
- try {
36
- owner = startRunOwner({
37
- stateRoot,
38
- evaluationDigest: evaluationIdentity.digest,
39
- attemptId: runId,
40
- activeRunPath: activePath,
41
- checkpointPath,
42
- evidenceDirectory: stateDir,
43
- artifactPath: evidencePath,
44
- });
45
- } catch (error) {
46
- await rm(runDir, { recursive: true, force: true });
47
- if (stateDir !== runDir)
48
- await rm(stateDir, { recursive: true, force: true });
49
- throw error;
50
- }
51
- const reservedWorkspaces: string[] = [];
52
- const reservedSemanticWorkspaces: string[] = [];
53
- const retainedWorkspaces = new Set<string>();
54
- return {
55
- runDir,
56
- runStateRoot,
57
- stateRoot,
58
- stateDir,
59
- activePath,
60
- checkpointPath,
61
- evidencePath,
62
- trialSummaries,
63
- owner,
64
- reservedWorkspaces,
65
- reservedSemanticWorkspaces,
66
- retainedWorkspaces,
67
- };
68
- }
69
-
70
- export type EvaluationRuntime = Awaited<
71
- ReturnType<typeof allocateEvaluationRun>
72
- >;
73
- export async function retainPreparationArtifacts(
74
- context: EvaluationPlan & EvaluationRuntime,
75
- ) {
76
- const { inlineArtifacts, runDir } = context;
77
- const artifactRefs: {
78
- id: string;
79
- path: string;
80
- sha256: string;
81
- gitExclude?: boolean;
82
- executable?: boolean;
83
- }[] = [];
84
- for (const artifact of inlineArtifacts) {
85
- const retainedPath = join(
86
- runDir,
87
- "prepared",
88
- ...fixtureParts(artifact.relativePath),
89
- );
90
- await mkdir(dirname(retainedPath), { recursive: true, mode: 0o700 });
91
- await writeFile(retainedPath, artifact.bytes, {
92
- flag: "wx",
93
- mode: artifact.executable ? 0o700 : 0o600,
94
- });
95
- artifactRefs.push({
96
- id: artifact.id,
97
- path: pathToFileURL(retainedPath).href,
98
- sha256: artifact.sha256,
99
- ...(artifact.gitExclude ? { gitExclude: true } : {}),
100
- ...(artifact.executable ? { executable: true } : {}),
101
- });
102
- }
103
-
104
- return { artifactRefs };
105
- }
106
-
107
- export async function reserveEvaluationWorkspaces(
108
- options: EvaluationOptions,
109
- context: EvaluationPlan & EvaluationRuntime,
110
- ) {
111
- const { reservedWorkspaces, preparedSemantic, reservedSemanticWorkspaces } =
112
- context;
113
- const trialEvidence: RunEvidenceData["trials"] = [];
114
- for (
115
- let trial = 1;
116
- trial <= options.trialCount && !options.signal?.aborted;
117
- trial++
118
- ) {
119
- reservedWorkspaces.push(
120
- await realpath(await mkdtemp(join(tmpdir(), "sevro-case-"))),
121
- );
122
- if (preparedSemantic.length)
123
- reservedSemanticWorkspaces.push(
124
- await realpath(await mkdtemp(join(tmpdir(), "sevro-case-"))),
125
- );
126
- }
127
- const diagnostics: {
128
- trial: number;
129
- diagnostic: { code: string; message: string };
130
- }[] = [];
131
- return { trialEvidence, diagnostics };
132
- }
133
-
134
- export type EvaluationContext = EvaluationPlan &
135
- EvaluationRuntime &
136
- Awaited<ReturnType<typeof retainPreparationArtifacts>> &
137
- Awaited<ReturnType<typeof reserveEvaluationWorkspaces>>;
138
- export function checkpointEvaluation(
139
- context: EvaluationRuntime,
140
- status: "active" | "complete" | "interrupted",
141
- ): void {
142
- checkpointRunOwner(
143
- context.owner,
144
- context.trialSummaries.map((trial) => ({
145
- trial: trial.trial,
146
- artifactPath: trial.artifactPath,
147
- })),
148
- status,
149
- );
150
- }
151
- function renderTrialPrompt(
152
- prompt: string,
153
- workspace: string,
154
- context: EvaluationContext,
155
- ): string {
156
- return prompt
157
- .replaceAll("{{sevro.workspace}}", workspace)
158
- .replaceAll(
159
- context.invocationPlaceholder,
160
- context.invocationToken ?? context.invocationPlaceholder,
161
- )
162
- .replaceAll(
163
- context.legacyCodexPlaceholder,
164
- context.invocationToken ?? context.legacyCodexPlaceholder,
165
- );
166
- }
167
-
168
- export async function prepareTrialWorkspace(
169
- options: EvaluationOptions,
170
- context: EvaluationContext,
171
- trial: number,
172
- ) {
173
- const reservation = context.reservedWorkspaces[trial - 1];
174
- if (reservation === undefined)
175
- throw new Error(`trial ${trial} workspace was not reserved`);
176
- context.retainedWorkspaces.add(reservation);
177
- const workspace = await createFixture(
178
- options.case.fixture,
179
- context.inlineArtifacts,
180
- options.preparationSources,
181
- context.repository,
182
- context.repositoryFixture,
183
- context.generated,
184
- context.fixtureSetup,
185
- context.projectRoot,
186
- options.signal,
187
- reservation,
188
- ).catch((error: unknown) => {
189
- if (
190
- !options.signal?.aborted ||
191
- error instanceof EvaluationConfigurationError
192
- )
193
- throw error;
194
- return null;
195
- });
196
- return trialWorkspaceDetails(options, context, reservation, workspace);
197
- }
198
-
199
- async function trialWorkspaceDetails(
200
- options: EvaluationOptions,
201
- context: EvaluationContext,
202
- reservation: string,
203
- preparedWorkspace: string | null,
204
- ) {
205
- const workspace = preparedWorkspace ?? reservation;
206
- const fixtureBinDir =
207
- preparedWorkspace === null
208
- ? undefined
209
- : ((await fixtureBinDirectory(workspace)) ?? undefined);
210
- const trialPrompt = renderTrialPrompt(
211
- options.case.prompt,
212
- workspace,
213
- context,
214
- );
215
- const trialFollowUpPrompt =
216
- options.case.followUpPrompt === undefined
217
- ? undefined
218
- : renderTrialPrompt(options.case.followUpPrompt, workspace, context);
219
-
220
- return {
221
- reservation,
222
- workspace,
223
- preparationCancelled: preparedWorkspace === null,
224
- fixtureBinDir,
225
- trialPrompt,
226
- trialFollowUpPrompt,
227
- };
228
- }
229
- export function diagnoseEvaluationFailure(context: EvaluationRuntime): void {
230
- try {
231
- checkpointRunOwner(
232
- context.owner,
233
- context.trialSummaries.map((trial) => ({
234
- trial: trial.trial,
235
- artifactPath: trial.artifactPath,
236
- })),
237
- "diagnostic",
238
- );
239
- } catch {
240
- /* Preserve the original failure and retained artifacts. */
241
- }
242
- }
243
- export async function cleanupEvaluationWorkspaces(
244
- context: EvaluationRuntime,
245
- ): Promise<void> {
246
- await Promise.all(
247
- [...context.reservedWorkspaces, ...context.reservedSemanticWorkspaces]
248
- .filter((workspace) => !context.retainedWorkspaces.has(workspace))
249
- .map(async (workspace) => {
250
- try {
251
- await rm(workspace, { recursive: true, force: true });
252
- } catch {
253
- console.warn(`fixture cleanup failed; retained at ${workspace}`);
254
- }
255
- }),
256
- );
257
- }