@openwop/openwop-conformance 2.1.6 → 2.2.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.
- package/CHANGELOG.md +98 -0
- package/README.md +2 -2
- package/dist/spec-artifacts.lock.json +2 -2
- package/fixtures/conformance-approval-refine.json +45 -0
- package/fixtures/conformance-envelope-nl-to-format-engaged.json +1 -1
- package/fixtures/conformance-envelope-recovery-applied.json +2 -2
- package/fixtures/conformance-envelope-refusal.json +1 -1
- package/fixtures/conformance-envelope-retry-attempted.json +2 -2
- package/fixtures/conformance-envelope-retry-exhausted.json +1 -1
- package/fixtures/conformance-envelope-truncated.json +1 -1
- package/fixtures/conformance-envelope-truncation-cap-exhaustion.json +1 -1
- package/fixtures/conformance-phase4-nondet-tool.json +2 -2
- package/fixtures/conformance-phase4-replay-divergence.json +2 -2
- package/fixtures.md +16 -0
- package/package.json +2 -2
- package/requirements.json +93 -12
- package/scenario-majors.json +5 -2
- package/schemas/CORPUS-STAMP.json +21 -21
- package/src/lib/bound-id.ts +69 -0
- package/src/scenarios/envelope-completion-distinguishes-truncation.test.ts +20 -11
- package/src/scenarios/envelope-nl-to-format-engaged.test.ts +1 -1
- package/src/scenarios/envelope-recovery-applied.test.ts +1 -1
- package/src/scenarios/envelope-refusal-shape.test.ts +1 -1
- package/src/scenarios/envelope-retry-attempted.test.ts +1 -1
- package/src/scenarios/envelope-retry-exhausted.test.ts +1 -1
- package/src/scenarios/envelope-truncated.test.ts +1 -1
- package/src/scenarios/envelope-truncation-cap-exhaustion.test.ts +1 -1
- package/src/scenarios/interrupt-approval.test.ts +87 -0
- package/src/scenarios/replay-divergence-at-refusal.test.ts +2 -2
- package/src/scenarios/v2-bound-id-path-projection.test.ts +121 -0
- package/src/scenarios/v2-created-run-readable.test.ts +1 -1
- package/src/scenarios/v2-id-grammar.test.ts +1 -1
- package/src/scenarios/v2-stream-sse-projection.test.ts +1 -1
- package/src/setup.ts +38 -0
package/src/setup.ts
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* `it` here; vitest treats setupFiles differently from scenario files.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
+
import { driver } from './lib/driver.js';
|
|
28
29
|
import { setAdvertisedFixtures, setDiscoveryUnreadable } from './lib/fixtures.js';
|
|
29
30
|
import { setMultiAgentCapabilities } from './lib/multi-agent-capabilities.js';
|
|
30
31
|
import { OtelCollector, setCollector } from './lib/otel-collector.js';
|
|
@@ -351,6 +352,43 @@ beforeEach(({ task }) => {
|
|
|
351
352
|
_itSoftSkipMarks.set(file, softSkipMark()); // rc.56: this test's own softSkip window
|
|
352
353
|
takeExplicitRequirementId(); // clear any override left by a test that threw before afterEach
|
|
353
354
|
});
|
|
355
|
+
/**
|
|
356
|
+
* Wipe the host's conformance-mock program store between scenario FILES.
|
|
357
|
+
*
|
|
358
|
+
* WHY THIS IS NECESSARY AND WAS MISSING. The host keeps the mock's programs in a
|
|
359
|
+
* module-level map keyed by `nodeId`, with a cursor. Several scenarios here
|
|
360
|
+
* deliberately seed programs that return `finishReason: 'length'` to exercise
|
|
361
|
+
* RFC 0033 truncation handling — `envelope-truncation-cap-exhaustion`,
|
|
362
|
+
* `envelope-truncated`, `envelope-retry-exhausted`,
|
|
363
|
+
* `envelope-completion-distinguishes-truncation`. A program that a scenario does
|
|
364
|
+
* not fully DRAIN stays pending for the life of the host process.
|
|
365
|
+
*
|
|
366
|
+
* This suite had no way to clear it. The host exposed a seam to SEED
|
|
367
|
+
* (`POST …/test/mock-ai/program`) and none to reset, while the host-side
|
|
368
|
+
* `resetMockPrograms` carried a header claiming it was "called between
|
|
369
|
+
* conformance scenarios" — it was called only by the host's own unit tests.
|
|
370
|
+
*
|
|
371
|
+
* The failure it produced accuses the wrong file: a later scenario dispatching
|
|
372
|
+
* on a colliding nodeId consumes the leftover truncation entries, its run fails
|
|
373
|
+
* `envelope_truncation_unrecoverable`, and nothing in that scenario explains it.
|
|
374
|
+
* MEASURED on `replay-observable-sequence-determinism`: red in-suite, green
|
|
375
|
+
* alone, five runs across unchanged bases, one of the reds at load1 3.4 on an
|
|
376
|
+
* idle box — so not contention, and a WRONG VALUE rather than a missing result.
|
|
377
|
+
*
|
|
378
|
+
* Per FILE rather than per test: programs are seeded for a whole scenario's
|
|
379
|
+
* sequence and a mid-file wipe would break the multi-attempt scenarios this
|
|
380
|
+
* store exists to serve. Best-effort — a host that predates the reset seam
|
|
381
|
+
* answers 404, and a conformance suite must not fail a compliant host for
|
|
382
|
+
* lacking a TEST seam.
|
|
383
|
+
*/
|
|
384
|
+
afterAll(async () => {
|
|
385
|
+
try {
|
|
386
|
+
await driver.post('/v1/host/openwop-app/test/mock-ai/reset', {});
|
|
387
|
+
} catch {
|
|
388
|
+
/* seam absent or host down — see above; never fail a scenario for this */
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
|
|
354
392
|
afterEach(({ task }) => {
|
|
355
393
|
const file = _fileOf(task as { file?: { filepath?: string; name?: string } });
|
|
356
394
|
if (file === null) return;
|