@interf/compiler 0.16.0 → 0.21.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 (203) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +90 -73
  3. package/TRADEMARKS.md +4 -4
  4. package/dist/cli/commands/mcp.d.ts +0 -34
  5. package/dist/cli/commands/mcp.js +246 -45
  6. package/dist/cli/commands/method.js +261 -15
  7. package/dist/cli/commands/prep.js +116 -15
  8. package/dist/cli/commands/runs.js +103 -9
  9. package/dist/cli/commands/status.js +4 -2
  10. package/dist/cli/commands/test.d.ts +10 -0
  11. package/dist/cli/commands/{verify.js → test.js} +24 -17
  12. package/dist/cli/commands/web.js +82 -8
  13. package/dist/cli/commands/wizard.js +158 -51
  14. package/dist/cli/index.d.ts +2 -2
  15. package/dist/cli/index.js +3 -3
  16. package/dist/compiler-ui/404.html +1 -1
  17. package/dist/compiler-ui/__next.__PAGE__.txt +5 -5
  18. package/dist/compiler-ui/__next._full.txt +13 -12
  19. package/dist/compiler-ui/__next._head.txt +3 -3
  20. package/dist/compiler-ui/__next._index.txt +5 -4
  21. package/dist/compiler-ui/__next._tree.txt +4 -3
  22. package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +1 -0
  23. package/dist/compiler-ui/_next/static/chunks/{0n51hrfoufc7g.js → 02f_.8.ebn556.js} +1 -1
  24. package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +1 -0
  25. package/dist/compiler-ui/_next/static/chunks/{08m7vf5asqlsm.js → 04d0ly-7xb~-j.js} +10 -10
  26. package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +1 -0
  27. package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +2 -0
  28. package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +116 -0
  29. package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +31 -0
  30. package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +1 -0
  31. package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +1 -0
  32. package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +1 -0
  33. package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +1 -0
  34. package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +1 -0
  35. package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +5 -0
  36. package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +1 -0
  37. package/dist/compiler-ui/_next/static/chunks/{turbopack-0.uq1k8c0j4s..js → turbopack-02-3e_c-yz~5g.js} +1 -1
  38. package/dist/compiler-ui/_next/static/chunks/{turbopack-10e~t1yzi4svj.js → turbopack-0apv8vb-nczuy.js} +1 -1
  39. package/dist/compiler-ui/_not-found/__next._full.txt +10 -9
  40. package/dist/compiler-ui/_not-found/__next._head.txt +3 -3
  41. package/dist/compiler-ui/_not-found/__next._index.txt +5 -4
  42. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +2 -2
  43. package/dist/compiler-ui/_not-found/__next._not-found.txt +3 -3
  44. package/dist/compiler-ui/_not-found/__next._tree.txt +3 -2
  45. package/dist/compiler-ui/_not-found.html +1 -1
  46. package/dist/compiler-ui/_not-found.txt +10 -9
  47. package/dist/compiler-ui/index.html +1 -1
  48. package/dist/compiler-ui/index.txt +13 -12
  49. package/dist/packages/contracts/index.d.ts +2 -2
  50. package/dist/packages/contracts/index.js +1 -1
  51. package/dist/packages/contracts/lib/schema.d.ts +275 -72
  52. package/dist/packages/contracts/lib/schema.js +244 -83
  53. package/dist/packages/engine/action-definitions.d.ts +174 -13
  54. package/dist/packages/engine/action-definitions.js +125 -122
  55. package/dist/packages/engine/action-planner.js +4 -11
  56. package/dist/packages/engine/agents/lib/shells.d.ts +15 -5
  57. package/dist/packages/engine/agents/lib/shells.js +134 -123
  58. package/dist/packages/engine/agents/role-executors.js +1 -1
  59. package/dist/packages/engine/cloud-seams.d.ts +115 -0
  60. package/dist/packages/engine/cloud-seams.js +84 -0
  61. package/dist/packages/engine/compile/artifact-counts.d.ts +1 -1
  62. package/dist/packages/engine/compile/artifact-counts.js +3 -3
  63. package/dist/packages/engine/compile/artifact-status.d.ts +41 -0
  64. package/dist/packages/engine/compile/artifact-status.js +166 -0
  65. package/dist/packages/engine/compile/billing-events.d.ts +89 -0
  66. package/dist/packages/engine/compile/billing-events.js +74 -0
  67. package/dist/packages/engine/compile/check-evaluator.d.ts +66 -0
  68. package/dist/packages/engine/compile/check-evaluator.js +298 -0
  69. package/dist/packages/engine/compile/compiled-paths.js +6 -6
  70. package/dist/packages/engine/compile/compiled-schema.d.ts +7 -17
  71. package/dist/packages/engine/compile/compiled-schema.js +55 -70
  72. package/dist/packages/engine/compile/compiled-stage-plan.d.ts +1 -0
  73. package/dist/packages/engine/compile/compiled-stage-plan.js +32 -15
  74. package/dist/packages/engine/compile/compiled-stage-runner.js +1 -1
  75. package/dist/packages/engine/compile/index.d.ts +0 -1
  76. package/dist/packages/engine/compile/index.js +0 -1
  77. package/dist/packages/engine/compile/lib/schema.d.ts +111 -92
  78. package/dist/packages/engine/compile/lib/schema.js +35 -39
  79. package/dist/packages/engine/compile/method-primitives.d.ts +2 -2
  80. package/dist/packages/engine/compile/method-primitives.js +1 -1
  81. package/dist/packages/engine/compile/reset.js +4 -4
  82. package/dist/packages/engine/compile/runtime-contracts.js +2 -1
  83. package/dist/packages/engine/compile/runtime-prompt.js +3 -2
  84. package/dist/packages/engine/compile/runtime-reconcile.js +35 -35
  85. package/dist/packages/engine/compile/runtime-runs.js +0 -1
  86. package/dist/packages/engine/compile/runtime-types.d.ts +7 -8
  87. package/dist/packages/engine/compile/runtime.d.ts +1 -2
  88. package/dist/packages/engine/compile/runtime.js +0 -1
  89. package/dist/packages/engine/compile/state-health.js +6 -6
  90. package/dist/packages/engine/compile/state-view.js +7 -6
  91. package/dist/packages/engine/compile/validate-compiled.js +61 -30
  92. package/dist/packages/engine/compile/validate.js +26 -24
  93. package/dist/packages/engine/connection-config.js +1 -1
  94. package/dist/packages/engine/execution/lib/schema.d.ts +89 -33
  95. package/dist/packages/engine/execution/lib/schema.js +13 -5
  96. package/dist/packages/engine/index.d.ts +2 -2
  97. package/dist/packages/engine/index.js +1 -1
  98. package/dist/packages/engine/instance-paths.d.ts +15 -9
  99. package/dist/packages/engine/instance-paths.js +15 -9
  100. package/dist/packages/engine/lib/schema.d.ts +1316 -351
  101. package/dist/packages/engine/lib/schema.js +99 -36
  102. package/dist/packages/engine/native-run-handlers.js +25 -15
  103. package/dist/packages/engine/preparation-store.d.ts +9 -7
  104. package/dist/packages/engine/preparation-store.js +20 -0
  105. package/dist/packages/engine/requested-artifacts.d.ts +5 -0
  106. package/dist/packages/engine/requested-artifacts.js +36 -0
  107. package/dist/packages/engine/routes.d.ts +7 -1
  108. package/dist/packages/engine/routes.js +7 -1
  109. package/dist/packages/engine/run-observability.js +4 -4
  110. package/dist/packages/engine/runtime-event-applier.js +7 -0
  111. package/dist/packages/engine/runtime-proposal-helpers.d.ts +2 -2
  112. package/dist/packages/engine/runtime-proposal-helpers.js +6 -8
  113. package/dist/packages/engine/runtime-resource-builders.d.ts +11 -6
  114. package/dist/packages/engine/runtime-resource-builders.js +18 -6
  115. package/dist/packages/engine/runtime.d.ts +70 -8
  116. package/dist/packages/engine/runtime.js +304 -49
  117. package/dist/packages/engine/server.d.ts +25 -0
  118. package/dist/packages/engine/server.js +161 -50
  119. package/dist/packages/engine/verify/index.d.ts +10 -10
  120. package/dist/packages/engine/verify/index.js +8 -8
  121. package/dist/packages/engine/verify/readiness-check-run.d.ts +27 -4
  122. package/dist/packages/engine/verify/readiness-check-run.js +92 -24
  123. package/dist/packages/engine/verify/{test-execution.d.ts → verify-execution.d.ts} +2 -2
  124. package/dist/packages/engine/verify/{test-execution.js → verify-execution.js} +3 -3
  125. package/dist/packages/engine/verify/{test-paths.d.ts → verify-paths.d.ts} +1 -1
  126. package/dist/packages/engine/verify/{test-sandbox.d.ts → verify-sandbox.d.ts} +1 -1
  127. package/dist/packages/engine/verify/{test-specs.d.ts → verify-specs.d.ts} +1 -1
  128. package/dist/packages/engine/verify/{test-specs.js → verify-specs.js} +1 -1
  129. package/dist/packages/engine/verify/{test-targets.d.ts → verify-targets.d.ts} +1 -1
  130. package/dist/packages/engine/verify/{test.d.ts → verify.d.ts} +4 -4
  131. package/dist/packages/engine/verify/{test.js → verify.js} +3 -3
  132. package/dist/packages/engine/wire-schemas.d.ts +549 -0
  133. package/dist/packages/engine/wire-schemas.js +59 -0
  134. package/dist/packages/methods/authoring/method-authoring.d.ts +5 -1
  135. package/dist/packages/methods/authoring/method-authoring.js +68 -18
  136. package/dist/packages/methods/authoring/method-edit-session.js +5 -5
  137. package/dist/packages/methods/authoring/method-improvement.js +1 -1
  138. package/dist/packages/methods/package/builtin-compiled-method.d.ts +12 -12
  139. package/dist/packages/methods/package/builtin-compiled-method.js +26 -23
  140. package/dist/packages/methods/package/context-interface.d.ts +39 -26
  141. package/dist/packages/methods/package/context-interface.js +48 -39
  142. package/dist/packages/methods/package/interf-method-package.js +28 -47
  143. package/dist/packages/methods/package/local-methods.d.ts +4 -4
  144. package/dist/packages/methods/package/local-methods.js +53 -66
  145. package/dist/packages/methods/package/method-definitions.d.ts +4 -6
  146. package/dist/packages/methods/package/method-definitions.js +1 -5
  147. package/dist/packages/methods/package/method-helpers.d.ts +0 -2
  148. package/dist/packages/methods/package/method-helpers.js +0 -4
  149. package/dist/packages/project/interf-detect.js +6 -6
  150. package/dist/packages/project/interf-scaffold.js +12 -12
  151. package/dist/packages/project/lib/schema.d.ts +193 -0
  152. package/dist/packages/project/lib/schema.js +46 -1
  153. package/dist/packages/project/source-config.js +6 -1
  154. package/dist/packages/project/source-folders.js +1 -1
  155. package/package.json +12 -23
  156. package/public-repo/CONTRIBUTING.md +47 -0
  157. package/public-repo/LICENSE.md +1 -0
  158. package/public-repo/README.md +325 -0
  159. package/public-repo/SECURITY.md +67 -0
  160. package/public-repo/TRADEMARKS.md +8 -0
  161. package/{builtin-methods → public-repo/methods}/interf-default/README.md +10 -7
  162. package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/shape/SKILL.md +4 -8
  163. package/{builtin-methods → public-repo/methods}/interf-default/method.json +8 -69
  164. package/public-repo/methods/interf-default/method.schema.json +75 -0
  165. package/public-repo/methods/interf-default/use/query/SKILL.md +23 -0
  166. package/public-repo/plugins/README.md +9 -0
  167. package/public-repo/plugins/interf/.claude-plugin/plugin.json +21 -0
  168. package/public-repo/plugins/interf/.mcp.json +12 -0
  169. package/public-repo/plugins/interf/README.md +29 -0
  170. package/public-repo/plugins/interf/skills/interf/SKILL.md +477 -0
  171. package/public-repo/skills/interf/SKILL.md +477 -0
  172. package/agent-skills/interf-actions/SKILL.md +0 -185
  173. package/agent-skills/interf-actions/references/cli.md +0 -243
  174. package/builtin-methods/interf-default/method.schema.json +0 -73
  175. package/builtin-methods/interf-default/use/query/SKILL.md +0 -28
  176. package/dist/cli/commands/verify.d.ts +0 -8
  177. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +0 -5
  178. package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +0 -1
  179. package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +0 -1
  180. package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +0 -1
  181. package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +0 -1
  182. package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +0 -1
  183. package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +0 -31
  184. package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +0 -1
  185. package/dist/compiler-ui/_next/static/chunks/0jipmpez3_ehh.js +0 -89
  186. package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +0 -1
  187. package/dist/compiler-ui/_next/static/chunks/13awzu4tooflw.css +0 -3
  188. package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +0 -1
  189. package/dist/packages/engine/compile/runtime-acceptance.d.ts +0 -9
  190. package/dist/packages/engine/compile/runtime-acceptance.js +0 -265
  191. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_buildManifest.js +0 -0
  192. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_clientMiddlewareManifest.js +0 -0
  193. /package/dist/compiler-ui/_next/static/{a3UiUF0DiMEbfWy_0gihg → tYHMLL9oKds1yDoNYgkPV}/_ssgManifest.js +0 -0
  194. /package/dist/packages/engine/verify/{test-paths.js → verify-paths.js} +0 -0
  195. /package/dist/packages/engine/verify/{test-profile-presets.d.ts → verify-profile-presets.d.ts} +0 -0
  196. /package/dist/packages/engine/verify/{test-profile-presets.js → verify-profile-presets.js} +0 -0
  197. /package/dist/packages/engine/verify/{test-sandbox.js → verify-sandbox.js} +0 -0
  198. /package/dist/packages/engine/verify/{test-targets.js → verify-targets.js} +0 -0
  199. /package/dist/packages/engine/verify/{test-types.d.ts → verify-types.d.ts} +0 -0
  200. /package/dist/packages/engine/verify/{test-types.js → verify-types.js} +0 -0
  201. /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/structure/SKILL.md +0 -0
  202. /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/summarize/SKILL.md +0 -0
  203. /package/{builtin-methods → public-repo/methods}/interf-default/improve/SKILL.md +0 -0
@@ -1,11 +1,11 @@
1
1
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
- import { buildTestSpecFromCompiledPreparationConfig, fingerprintReadinessChecks, } from "../../project/source-config.js";
4
- import { asPreparationDataDir, preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, normalizePreparationTestRunId, preparationPortableContextPath, } from "../../contracts/lib/preparation-paths.js";
3
+ import { buildTestSpecFromCompiledPreparationConfig, buildTestSpecFromSourceFolderConfig, fingerprintReadinessChecks, resolveConfiguredSourceFolderPath, resolveSourcePreparationPath, } from "../../project/source-config.js";
4
+ import { asPreparationDataDir, preparationLatestReadinessRunPath, preparationLatestReadinessSummaryPath, preparationTestRunPath, preparationTestRunsRoot, preparationTestsRoot, normalizePreparationTestRunId, preparationPortableContextPath, } from "../../contracts/lib/preparation-paths.js";
5
5
  import { testRootForCompiled } from "../compile/compiled-paths.js";
6
6
  import { readJsonFileWithSchema } from "../../contracts/utils/parse.js";
7
7
  import { resolveMethodId } from "../../methods/method-resolution.js";
8
- import { createCompiledTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "./test.js";
8
+ import { createCompiledTestTarget, createSourceFilesTestTarget, runTargetTestsAuto, saveTargetTestRun, } from "./verify.js";
9
9
  import { ReadinessCheckRunSchema, } from "./lib/schema.js";
10
10
  export function readinessPassRate(outcome) {
11
11
  return outcome.result.totalCases > 0
@@ -80,33 +80,48 @@ export function readCurrentSavedReadinessCheckRun(options) {
80
80
  }
81
81
  return { readinessRun: latestRun, stale: false };
82
82
  }
83
+ function modeForOutcomes(sourceFilesOutcome, compiledOutcome) {
84
+ if (sourceFilesOutcome && compiledOutcome)
85
+ return "both";
86
+ if (sourceFilesOutcome)
87
+ return "source-files";
88
+ return "compiled";
89
+ }
90
+ function passRateOf(summary) {
91
+ if (!summary)
92
+ return null;
93
+ if (summary.total_cases <= 0)
94
+ return 0;
95
+ return Math.round((summary.passed_cases / summary.total_cases) * 100);
96
+ }
83
97
  export function saveReadinessCheckRun(options) {
84
98
  const generatedAt = new Date().toISOString();
99
+ const sourceFilesOutcome = options.sourceFilesOutcome ?? null;
100
+ const sourceFilesSummary = sourceFilesOutcome
101
+ ? summarizeSavedTestOutcome("Source Files", sourceFilesOutcome)
102
+ : null;
85
103
  const compiledSummary = options.compiledOutcome
86
104
  ? summarizeSavedTestOutcome("Portable Context", options.compiledOutcome)
87
105
  : null;
88
- const compiledPassRate = compiledSummary
89
- ? Math.round((compiledSummary.passed_cases / compiledSummary.total_cases) * 100)
90
- : null;
91
106
  const payload = {
92
107
  kind: "interf-readiness-check-run",
93
108
  version: 1,
94
109
  generated_at: generatedAt,
95
- // 0.15 — verify always runs in compiled-only mode. We keep the
96
- // `mode: "compiled"` literal in the saved payload so existing
97
- // dashboards / consumers that expect the field still parse.
98
- mode: "compiled",
110
+ // 0.17 — verify carries the target it ran against on the wire so
111
+ // dashboards and the UI can show source-files baselines alongside
112
+ // compiled judgments. `both` is reserved for future combined runs.
113
+ mode: modeForOutcomes(sourceFilesOutcome, options.compiledOutcome),
99
114
  source_path: options.sourcePath,
100
115
  checks_fingerprint: options.checksFingerprint,
101
116
  preparation: {
102
117
  name: options.preparationName,
103
118
  portable_context_path: options.portableContextPath,
104
119
  },
105
- source_files: null,
120
+ source_files: sourceFilesSummary,
106
121
  compiled: compiledSummary,
107
122
  summary: {
108
- source_files_pass_rate: null,
109
- portable_context_pass_rate: compiledPassRate,
123
+ source_files_pass_rate: passRateOf(sourceFilesSummary),
124
+ portable_context_pass_rate: passRateOf(compiledSummary),
110
125
  },
111
126
  };
112
127
  const latestStatePath = preparationLatestReadinessRunPath(asPreparationDataDir(options.sourcePath), options.preparationName);
@@ -156,19 +171,71 @@ export async function runSavedPortableContextCheck(options) {
156
171
  result,
157
172
  };
158
173
  }
159
- export async function runReadinessChecksForExecutor(options) {
160
- // 0.15verify runs always judge against the compiled portable
161
- // context. The legacy `source-files` and `both` modes were retired
162
- // in 0.13.1 and removed from the wire shape here.
163
- const compiledOutcome = await runSavedPortableContextCheck({
164
- sourcePath: options.sourcePath,
165
- preparationConfig: options.preparationConfig,
174
+ /**
175
+ * 0.17restored. Runs the saved readiness checks against the source
176
+ * folder baseline (no portable-context indirection) so users can see how
177
+ * much value the Method actually adds. The lower-level `verify-execution`
178
+ * + `verify-sandbox` source-files paths have stayed in tree since 0.13;
179
+ * this is the orchestrator hook that was missing.
180
+ */
181
+ export async function runSavedSourceFilesCheck(options) {
182
+ const spec = buildTestSpecFromSourceFolderConfig({
183
+ prepDataDir: options.sourcePath,
184
+ targetName: options.preparationConfig.name,
185
+ targetType: "source-files",
186
+ });
187
+ if (!spec)
188
+ return null;
189
+ const sourceFolderPath = resolveConfiguredSourceFolderPath(options.sourcePath) ??
190
+ resolveSourcePreparationPath(options.sourcePath, options.preparationConfig);
191
+ const target = createSourceFilesTestTarget(sourceFolderPath);
192
+ if (!target.eligible)
193
+ return null;
194
+ const run = await runTargetTestsAuto(sourceFolderPath, spec, [target], {
166
195
  executor: options.executor,
167
- portableContextPath: options.portableContextPath,
168
- preserveSandboxes: options.preserveSandboxes,
196
+ preserveSandboxes: options.preserveSandboxes ?? "on-failure",
197
+ artifactRootPath: preparationTestsRoot(asPreparationDataDir(options.sourcePath), options.preparationConfig.name),
198
+ });
199
+ const result = run.results[0];
200
+ if (!result)
201
+ return null;
202
+ const preparationRunPath = writePreparationTargetRun({
203
+ prepDataDir: options.sourcePath,
204
+ preparationName: options.preparationConfig.name,
205
+ target: "source-files",
206
+ generatedAt: run.generated_at,
207
+ runId: normalizePreparationTestRunId(spec.id),
169
208
  runSuffix: options.runSuffix,
209
+ payload: run,
170
210
  });
171
- const modeSatisfied = Boolean(compiledOutcome);
211
+ return {
212
+ runPath: preparationRunPath,
213
+ target,
214
+ result,
215
+ };
216
+ }
217
+ export async function runReadinessChecksForExecutor(options) {
218
+ const target = options.target ?? "compiled";
219
+ const compiledOutcome = target === "compiled"
220
+ ? await runSavedPortableContextCheck({
221
+ sourcePath: options.sourcePath,
222
+ preparationConfig: options.preparationConfig,
223
+ executor: options.executor,
224
+ portableContextPath: options.portableContextPath,
225
+ preserveSandboxes: options.preserveSandboxes,
226
+ runSuffix: options.runSuffix,
227
+ })
228
+ : null;
229
+ const sourceFilesOutcome = target === "source-files"
230
+ ? await runSavedSourceFilesCheck({
231
+ sourcePath: options.sourcePath,
232
+ preparationConfig: options.preparationConfig,
233
+ executor: options.executor,
234
+ preserveSandboxes: options.preserveSandboxes,
235
+ runSuffix: options.runSuffix,
236
+ })
237
+ : null;
238
+ const modeSatisfied = Boolean(compiledOutcome) || Boolean(sourceFilesOutcome);
172
239
  const shouldSave = options.saveLatest !== false;
173
240
  const readinessRunPath = shouldSave && modeSatisfied
174
241
  ? saveReadinessCheckRun({
@@ -176,6 +243,7 @@ export async function runReadinessChecksForExecutor(options) {
176
243
  portableContextPath: options.portableContextPath,
177
244
  preparationName: options.preparationConfig.name,
178
245
  checksFingerprint: fingerprintReadinessChecks(options.preparationConfig.checks),
246
+ sourceFilesOutcome,
179
247
  compiledOutcome,
180
248
  })
181
249
  : null;
@@ -186,7 +254,7 @@ export async function runReadinessChecksForExecutor(options) {
186
254
  sourcePath: options.sourcePath,
187
255
  preparationConfig: options.preparationConfig,
188
256
  portableContextPath: options.portableContextPath,
189
- sourceFilesOutcome: null,
257
+ sourceFilesOutcome,
190
258
  compiledOutcome,
191
259
  readinessRunPath,
192
260
  readinessRun,
@@ -1,6 +1,6 @@
1
1
  import { type MethodExecutor } from "../agents/lib/executors.js";
2
- import type { TestTargetRun, TestTargetCandidate, LoadedTestSpec } from "./test-types.js";
3
- import { type TestSandboxRetentionMode } from "./test-sandbox.js";
2
+ import type { TestTargetRun, TestTargetCandidate, LoadedTestSpec } from "./verify-types.js";
3
+ import { type TestSandboxRetentionMode } from "./verify-sandbox.js";
4
4
  export declare function runTargetTests(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[]): TestTargetRun;
5
5
  export declare function runTargetTestsWithJudge(sourcePath: string, spec: LoadedTestSpec, targets: TestTargetCandidate[], executor: MethodExecutor, options?: {
6
6
  preserveSandboxes?: TestSandboxRetentionMode;
@@ -2,8 +2,8 @@ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync
2
2
  import { join } from "node:path";
3
3
  import { tmpdir } from "node:os";
4
4
  import { buildRuntimeExecutorInfo } from "../agents/lib/executors.js";
5
- import { targetTestRunGitignorePath, targetTestRunsPath, targetTestSandboxGitignorePath, targetTestSandboxesPath, normalizeTestId, } from "./test-paths.js";
6
- import { createTestSandbox, } from "./test-sandbox.js";
5
+ import { targetTestRunGitignorePath, targetTestRunsPath, targetTestSandboxGitignorePath, targetTestSandboxesPath, normalizeTestId, } from "./verify-paths.js";
6
+ import { createTestSandbox, } from "./verify-sandbox.js";
7
7
  function parseWords(content) {
8
8
  return content.trim().split(/\s+/).filter(Boolean).length;
9
9
  }
@@ -203,7 +203,7 @@ function buildTestQueryPrompt(target, testCase, answerPath, tracePath) {
203
203
  "Answer the check question the same way you would answer a real user inside this portable context.",
204
204
  "Prefer the Method-declared portable-context outputs before consulting source references.",
205
205
  "This sandbox is self-contained: the copied portable context has source references in `.interf/runtime/source-snapshot.json`.",
206
- "The original Interf Workspace is intentionally absent from this sandbox. Use the source locators only when the portable context needs verification.",
206
+ "The original Interf instance state is intentionally absent from this sandbox. Use the source locators only when the portable context needs verification.",
207
207
  ]
208
208
  : [
209
209
  "You are running an Interf baseline test inside an isolated source-files test shell.",
@@ -1,4 +1,4 @@
1
- import type { TestTargetType } from "./test-types.js";
1
+ import type { TestTargetType } from "./verify-types.js";
2
2
  export declare const TEST_SPEC_EXTENSIONS: Set<string>;
3
3
  export declare function testSpecRootPath(sourcePath: string): string;
4
4
  export declare function testSpecTypePath(sourcePath: string, type: TestTargetType): string;
@@ -1,4 +1,4 @@
1
- import type { TestTargetCandidate } from "./test-types.js";
1
+ import type { TestTargetCandidate } from "./verify-types.js";
2
2
  export type TestSandboxRetentionMode = "on-failure" | "always";
3
3
  export interface TestSandbox {
4
4
  rootPath: string;
@@ -1,4 +1,4 @@
1
- import type { TestSpec, TestTargetType, LoadedTestSpec } from "./test-types.js";
1
+ import type { TestSpec, TestTargetType, LoadedTestSpec } from "./verify-types.js";
2
2
  export declare function listTestSpecs(sourcePath: string, type: TestTargetType): LoadedTestSpec[];
3
3
  export declare function loadTestSpec(sourcePath: string, type: TestTargetType, id: string): LoadedTestSpec | null;
4
4
  export declare function loadTestSpecFromFile(filePath: string): LoadedTestSpec | null;
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, readdirSync, writeFileSync, } from "node:fs";
2
2
  import { basename, extname, join } from "node:path";
3
3
  import { readJsonFileWithSchema } from "../../contracts/utils/parse.js";
4
4
  import { TestSpecSchema } from "./lib/schema.js";
5
- import { TEST_SPEC_EXTENSIONS, assertTestId, assertWritableTestSpecPath, testSpecFilePath, testSpecTypePath, normalizeTestId, } from "./test-paths.js";
5
+ import { TEST_SPEC_EXTENSIONS, assertTestId, assertWritableTestSpecPath, testSpecFilePath, testSpecTypePath, normalizeTestId, } from "./verify-paths.js";
6
6
  function readTestSpecFile(filePath) {
7
7
  const extension = extname(filePath).toLowerCase();
8
8
  if (!TEST_SPEC_EXTENSIONS.has(extension))
@@ -1,4 +1,4 @@
1
- import type { TestTargetCandidate } from "./test-types.js";
1
+ import type { TestTargetCandidate } from "./verify-types.js";
2
2
  export declare function listCompiledTestTargets(sourcePath: string): TestTargetCandidate[];
3
3
  export declare function createCompiledTestTarget(compiledPath: string, compiledName: string, methodId?: string): TestTargetCandidate;
4
4
  export declare function createSourceFilesTestTarget(sourcePath: string): TestTargetCandidate;
@@ -1,4 +1,4 @@
1
- export type { TestCaseExpect, TestCase, TestSpec, TestCheckResult, TestCaseResult, TestTargetResult, TestTargetRun, TestTargetType, LoadedTestSpec, TestTargetCandidate, } from "./test-types.js";
2
- export { listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, } from "./test-specs.js";
3
- export { createSourceFilesTestTarget, createCompiledTestTarget, listCompiledTestTargets, listTestTargets, } from "./test-targets.js";
4
- export { runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./test-execution.js";
1
+ export type { TestCaseExpect, TestCase, TestSpec, TestCheckResult, TestCaseResult, TestTargetResult, TestTargetRun, TestTargetType, LoadedTestSpec, TestTargetCandidate, } from "./verify-types.js";
2
+ export { listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, } from "./verify-specs.js";
3
+ export { createSourceFilesTestTarget, createCompiledTestTarget, listCompiledTestTargets, listTestTargets, } from "./verify-targets.js";
4
+ export { runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./verify-execution.js";
@@ -1,3 +1,3 @@
1
- export { listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, } from "./test-specs.js";
2
- export { createSourceFilesTestTarget, createCompiledTestTarget, listCompiledTestTargets, listTestTargets, } from "./test-targets.js";
3
- export { runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./test-execution.js";
1
+ export { listTestSpecs, loadTestSpec, loadTestSpecFromFile, writeTestSpec, } from "./verify-specs.js";
2
+ export { createSourceFilesTestTarget, createCompiledTestTarget, listCompiledTestTargets, listTestTargets, } from "./verify-targets.js";
3
+ export { runTargetTests, runTargetTestsWithJudge, runTargetTestsAuto, saveTargetTestRun, } from "./verify-execution.js";