@principles/core 1.161.0 → 1.163.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/dist/runtime-v2/__tests__/adversarial-loop.test.js +24 -78
- package/dist/runtime-v2/__tests__/adversarial-loop.test.js.map +1 -1
- package/dist/runtime-v2/__tests__/architecture-regression.test.js +9 -5
- package/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js +32 -80
- package/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js.map +1 -1
- package/dist/runtime-v2/__tests__/full-chain-real-llm.test.js +2 -2
- package/dist/runtime-v2/__tests__/full-chain-real-llm.test.js.map +1 -1
- package/dist/runtime-v2/__tests__/principle-compiler-core.test.js +7 -7
- package/dist/runtime-v2/__tests__/principle-compiler-core.test.js.map +1 -1
- package/dist/runtime-v2/activation/__tests__/production-gate-deps.test.js +24 -1
- package/dist/runtime-v2/activation/__tests__/production-gate-deps.test.js.map +1 -1
- package/dist/runtime-v2/activation/production-gate-deps.d.ts.map +1 -1
- package/dist/runtime-v2/activation/production-gate-deps.js +18 -1
- package/dist/runtime-v2/activation/production-gate-deps.js.map +1 -1
- package/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.js +277 -475
- package/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.js.map +1 -1
- package/dist/runtime-v2/adapter/artificer-l2-adapter.d.ts +14 -34
- package/dist/runtime-v2/adapter/artificer-l2-adapter.d.ts.map +1 -1
- package/dist/runtime-v2/adapter/artificer-l2-adapter.js +182 -222
- package/dist/runtime-v2/adapter/artificer-l2-adapter.js.map +1 -1
- package/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +2 -2
- package/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/dist/runtime-v2/adversarial-loop.d.ts.map +1 -1
- package/dist/runtime-v2/adversarial-loop.js +5 -27
- package/dist/runtime-v2/adversarial-loop.js.map +1 -1
- package/dist/runtime-v2/golden-trace-replay-validator.d.ts +8 -0
- package/dist/runtime-v2/golden-trace-replay-validator.d.ts.map +1 -1
- package/dist/runtime-v2/golden-trace-replay-validator.js +3 -3
- package/dist/runtime-v2/golden-trace-replay-validator.js.map +1 -1
- package/dist/runtime-v2/golden-trace.d.ts +16 -1
- package/dist/runtime-v2/golden-trace.d.ts.map +1 -1
- package/dist/runtime-v2/golden-trace.js +13 -4
- package/dist/runtime-v2/golden-trace.js.map +1 -1
- package/dist/runtime-v2/index.d.ts +8 -5
- package/dist/runtime-v2/index.d.ts.map +1 -1
- package/dist/runtime-v2/index.js +11 -4
- package/dist/runtime-v2/index.js.map +1 -1
- package/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +3 -2
- package/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -1
- package/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/{artificer-output-v2.test.js → artificer-rule-output.test.js} +126 -127
- package/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.js +270 -0
- package/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.js +180 -0
- package/dist/runtime-v2/internalization/__tests__/rule-host-input-builder.test.js.map +1 -0
- package/dist/runtime-v2/internalization/artificer-output.d.ts +33 -51
- package/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/artificer-output.js +48 -87
- package/dist/runtime-v2/internalization/artificer-output.js.map +1 -1
- package/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +1 -1
- package/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/artificer-prompt-builder.js +5 -17
- package/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
- package/dist/runtime-v2/internalization/artificer-runner.d.ts +8 -8
- package/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/artificer-runner.js +5 -5
- package/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
- package/dist/runtime-v2/internalization/evaluator-runner.d.ts +1 -1
- package/dist/runtime-v2/internalization/evaluator-runner.js +2 -2
- package/dist/runtime-v2/internalization/index.d.ts +9 -4
- package/dist/runtime-v2/internalization/index.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/index.js +8 -3
- package/dist/runtime-v2/internalization/index.js.map +1 -1
- package/dist/runtime-v2/internalization/rule-code-validator.d.ts +16 -0
- package/dist/runtime-v2/internalization/rule-code-validator.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/rule-code-validator.js +50 -1
- package/dist/runtime-v2/internalization/rule-code-validator.js.map +1 -1
- package/dist/runtime-v2/internalization/rule-host-input-builder.d.ts +62 -0
- package/dist/runtime-v2/internalization/rule-host-input-builder.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-input-builder.js +182 -0
- package/dist/runtime-v2/internalization/rule-host-input-builder.js.map +1 -0
- package/dist/runtime-v2/internalization/rule-host-validator.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/rule-host-validator.js +22 -1
- package/dist/runtime-v2/internalization/rule-host-validator.js.map +1 -1
- package/dist/runtime-v2/internalization/template-generator.d.ts +7 -2
- package/dist/runtime-v2/internalization/template-generator.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/template-generator.js +10 -5
- package/dist/runtime-v2/internalization/template-generator.js.map +1 -1
- package/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.d.ts +2 -0
- package/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.d.ts.map +1 -0
- package/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js +322 -0
- package/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js.map +1 -0
- package/dist/runtime-v2/tools/__tests__/artificer-output-typebox.test.d.ts +2 -0
- package/dist/runtime-v2/tools/__tests__/artificer-output-typebox.test.d.ts.map +1 -0
- package/dist/runtime-v2/tools/__tests__/artificer-output-typebox.test.js +149 -0
- package/dist/runtime-v2/tools/__tests__/artificer-output-typebox.test.js.map +1 -0
- package/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts +72 -0
- package/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts.map +1 -0
- package/dist/runtime-v2/tools/artificer-l2-tool-contract.js +275 -0
- package/dist/runtime-v2/tools/artificer-l2-tool-contract.js.map +1 -0
- package/dist/runtime-v2/tools/artificer-output-typebox.d.ts +78 -0
- package/dist/runtime-v2/tools/artificer-output-typebox.d.ts.map +1 -0
- package/dist/runtime-v2/tools/artificer-output-typebox.js +70 -0
- package/dist/runtime-v2/tools/artificer-output-typebox.js.map +1 -0
- package/dist/telemetry-event.d.ts +2 -2
- package/dist/telemetry-event.d.ts.map +1 -1
- package/dist/telemetry-event.js +5 -3
- package/dist/telemetry-event.js.map +1 -1
- package/package.json +1 -1
- package/dist/runtime-v2/internalization/__tests__/artificer-output-v2.test.d.ts +0 -2
- package/dist/runtime-v2/internalization/__tests__/artificer-output-v2.test.d.ts.map +0 -1
- package/dist/runtime-v2/internalization/__tests__/artificer-output-v2.test.js.map +0 -1
|
@@ -1,55 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ArtificerRuleOutput unified validator tests (PRI-439).
|
|
3
3
|
*
|
|
4
|
-
* TDD
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* TDD RED — these tests assert the UNIFIED ArtificerRuleOutput behavior that
|
|
5
|
+
* replaces the V1/V2 dual-version system. They will fail until the V1/V2
|
|
6
|
+
* types, isArtificerOutputV2, degradeToV1, and the V1 compatibility path are
|
|
7
|
+
* removed and the unified type + validator are in place.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* Key behavioral changes from V1/V2:
|
|
10
|
+
* - implementationCode is MANDATORY (no V1 plan-only acceptance)
|
|
11
|
+
* - implementationPlan field is REMOVED (no plan-only path)
|
|
12
|
+
* - isArtificerOutputV2 is DELETED (there is only one output type)
|
|
13
|
+
* - degradeToV1 is DELETED (exhaustion fails loud)
|
|
14
|
+
* - V1-shaped output (with implementationPlan but no implementationCode)
|
|
15
|
+
* is REJECTED, not accepted as backward-compatible
|
|
15
16
|
*
|
|
16
|
-
* ERR checklist (EP-01 Trust Boundary):
|
|
17
|
-
* - ERR-001
|
|
18
|
-
*
|
|
19
|
-
* - ERR-
|
|
20
|
-
* - ERR-009 / ERR-010: required V2 fields fail loud when missing/malformed.
|
|
21
|
-
* - ERR-007: goldenTraceCases array elements validated individually.
|
|
17
|
+
* ERR checklist (EP-01 Trust Boundary, EP-03 Fail Loud):
|
|
18
|
+
* - ERR-001/005/013: validator accepts `unknown`, uses Object.hasOwn, no `as`
|
|
19
|
+
* - ERR-009/010: missing implementationCode fails loud
|
|
20
|
+
* - ERR-002: no silent V1 degradation
|
|
22
21
|
*/
|
|
23
22
|
import { describe, it, expect } from 'vitest';
|
|
24
23
|
import { DefaultArtificerValidator } from '../artificer-output.js';
|
|
25
24
|
const ARTIFICER_TASK_ID = 'task-artificer-001';
|
|
26
25
|
const SCRIBE_ARTIFACT_ID = 'pi-art-scribe-001-run-001';
|
|
27
26
|
/**
|
|
28
|
-
* Minimal valid
|
|
29
|
-
*
|
|
30
|
-
*
|
|
27
|
+
* Minimal valid ArtificerRuleOutput. Has implementationCode (mandatory),
|
|
28
|
+
* goldenTraceCases (1 positive + 1 negative), affectedTools, and the lineage
|
|
29
|
+
* fields. Does NOT have implementationPlan (removed in PRI-439).
|
|
31
30
|
*/
|
|
32
|
-
function
|
|
31
|
+
function makeRuleOutput() {
|
|
33
32
|
return {
|
|
34
33
|
taskId: ARTIFICER_TASK_ID,
|
|
35
34
|
sourceScribeArtifactId: SCRIBE_ARTIFACT_ID,
|
|
36
|
-
implementationPlan: {
|
|
37
|
-
summary: 'Block writes to system directories',
|
|
38
|
-
targetSurface: 'edit tool gate',
|
|
39
|
-
changes: ['add path-prefix check'],
|
|
40
|
-
tests: ['golden trace replay passes'],
|
|
41
|
-
rolloutNotes: ['shadow mode first'],
|
|
42
|
-
confidence: 0.8,
|
|
43
|
-
},
|
|
44
|
-
sourceTrace: { scribeArtifactId: SCRIBE_ARTIFACT_ID },
|
|
45
|
-
risks: ['false positive on symlinked paths'],
|
|
46
|
-
generatedAt: '2026-06-17T00:00:00.000Z',
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
/** Minimal valid V2 output: V1 + code fields with 1 positive + 1 negative case. */
|
|
50
|
-
function makeV2Output() {
|
|
51
|
-
return {
|
|
52
|
-
...makeV1Output(),
|
|
53
35
|
implementationCode: 'function evaluate(input, helpers) { return helpers.getToolName(input) === "edit" ? { decision: "block", matched: true, reason: "x" } : { decision: "allow", matched: false, reason: "x" }; }',
|
|
54
36
|
goldenTraceCases: [
|
|
55
37
|
{
|
|
@@ -68,84 +50,97 @@ function makeV2Output() {
|
|
|
68
50
|
},
|
|
69
51
|
],
|
|
70
52
|
affectedTools: ['edit'],
|
|
53
|
+
implementationSummary: 'Block writes to system directories',
|
|
54
|
+
risks: ['false positive on symlinked paths'],
|
|
55
|
+
sourceTrace: { scribeArtifactId: SCRIBE_ARTIFACT_ID },
|
|
56
|
+
generatedAt: '2026-06-17T00:00:00.000Z',
|
|
71
57
|
};
|
|
72
58
|
}
|
|
73
|
-
|
|
74
|
-
* Produce a mutable shallow copy as an untrusted record. Tests mutate fields
|
|
75
|
-
* to exercise validator rejection paths; the validator itself receives these
|
|
76
|
-
* as `unknown` and never `as`-casts (Runtime Contract Rule 1/2, ERR-001).
|
|
77
|
-
* Using a typed mutable clone keeps test code readable without weakening
|
|
78
|
-
* the readonly contract on the production interface.
|
|
79
|
-
*/
|
|
80
|
-
function mutable(output) {
|
|
81
|
-
return { ...output, ...output };
|
|
82
|
-
}
|
|
83
|
-
describe('DefaultArtificerValidator — V2 (RuleHost MVP Activation)', () => {
|
|
59
|
+
describe('DefaultArtificerValidator — unified ArtificerRuleOutput (PRI-439)', () => {
|
|
84
60
|
const validator = new DefaultArtificerValidator();
|
|
85
|
-
// ──
|
|
86
|
-
it('accepts
|
|
87
|
-
const result = await validator.validate(
|
|
61
|
+
// ── Happy path ──────────────────────────────────────────────────────────
|
|
62
|
+
it('accepts a valid ArtificerRuleOutput with mandatory implementationCode', async () => {
|
|
63
|
+
const result = await validator.validate(makeRuleOutput(), ARTIFICER_TASK_ID);
|
|
88
64
|
expect(result.valid).toBe(true);
|
|
89
65
|
expect(result.errors).toEqual([]);
|
|
90
66
|
});
|
|
91
|
-
// ──
|
|
92
|
-
it('
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
67
|
+
// ── implementationCode is mandatory (no V1 acceptance) ──────────────────
|
|
68
|
+
it('rejects output missing implementationCode (no V1 plan-only acceptance)', async () => {
|
|
69
|
+
const output = makeRuleOutput();
|
|
70
|
+
delete output.implementationCode;
|
|
71
|
+
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
72
|
+
expect(result.valid).toBe(false);
|
|
73
|
+
expect(result.errors.some((e) => e.toLowerCase().includes('implementationcode'))).toBe(true);
|
|
96
74
|
});
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const output = mutable(makeV2Output());
|
|
75
|
+
it('rejects output with empty implementationCode', async () => {
|
|
76
|
+
const output = makeRuleOutput();
|
|
100
77
|
output.implementationCode = ' ';
|
|
101
78
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
102
79
|
expect(result.valid).toBe(false);
|
|
103
|
-
expect(result.errors.some((e) => e.includes('
|
|
80
|
+
expect(result.errors.some((e) => e.toLowerCase().includes('implementationcode'))).toBe(true);
|
|
104
81
|
});
|
|
105
|
-
it('rejects
|
|
106
|
-
const output =
|
|
82
|
+
it('rejects output with non-string implementationCode', async () => {
|
|
83
|
+
const output = makeRuleOutput();
|
|
107
84
|
output.implementationCode = 42;
|
|
108
85
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
109
86
|
expect(result.valid).toBe(false);
|
|
110
|
-
expect(result.errors.some((e) => e.includes('
|
|
87
|
+
expect(result.errors.some((e) => e.toLowerCase().includes('implementationcode'))).toBe(true);
|
|
88
|
+
});
|
|
89
|
+
// ── V1-shaped output is rejected (implementationPlan no longer accepted) ─
|
|
90
|
+
it('rejects V1-shaped output that has implementationPlan but no implementationCode', async () => {
|
|
91
|
+
const v1Shaped = {
|
|
92
|
+
taskId: ARTIFICER_TASK_ID,
|
|
93
|
+
sourceScribeArtifactId: SCRIBE_ARTIFACT_ID,
|
|
94
|
+
implementationPlan: {
|
|
95
|
+
summary: 'Block writes to system directories',
|
|
96
|
+
targetSurface: 'edit tool gate',
|
|
97
|
+
changes: ['add path-prefix check'],
|
|
98
|
+
tests: ['golden trace replay passes'],
|
|
99
|
+
rolloutNotes: ['shadow mode first'],
|
|
100
|
+
confidence: 0.8,
|
|
101
|
+
},
|
|
102
|
+
sourceTrace: { scribeArtifactId: SCRIBE_ARTIFACT_ID },
|
|
103
|
+
risks: ['false positive on symlinked paths'],
|
|
104
|
+
generatedAt: '2026-06-17T00:00:00.000Z',
|
|
105
|
+
};
|
|
106
|
+
const result = await validator.validate(v1Shaped, ARTIFICER_TASK_ID);
|
|
107
|
+
expect(result.valid).toBe(false);
|
|
108
|
+
expect(result.errors.some((e) => e.toLowerCase().includes('implementationcode'))).toBe(true);
|
|
109
|
+
});
|
|
110
|
+
// ── implementationSummary is mandatory ───────────────────────────────────
|
|
111
|
+
it('rejects output missing implementationSummary', async () => {
|
|
112
|
+
const output = makeRuleOutput();
|
|
113
|
+
delete output.implementationSummary;
|
|
114
|
+
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
115
|
+
expect(result.valid).toBe(false);
|
|
116
|
+
expect(result.errors.some((e) => e.toLowerCase().includes('implementationsummary'))).toBe(true);
|
|
111
117
|
});
|
|
112
|
-
it('rejects
|
|
113
|
-
const output =
|
|
114
|
-
|
|
115
|
-
const [first, ...remainingCases] = cases;
|
|
116
|
-
if (typeof first !== 'object' || first === null || Array.isArray(first))
|
|
117
|
-
throw new Error('invalid fixture');
|
|
118
|
-
output.goldenTraceCases = [{
|
|
119
|
-
...first,
|
|
120
|
-
expectedDecision: 'propose_correction',
|
|
121
|
-
expectedProposedParams: { path: '/safe/path' },
|
|
122
|
-
}, ...remainingCases];
|
|
118
|
+
it('rejects output with empty implementationSummary', async () => {
|
|
119
|
+
const output = makeRuleOutput();
|
|
120
|
+
output.implementationSummary = ' ';
|
|
123
121
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
124
122
|
expect(result.valid).toBe(false);
|
|
125
|
-
expect(result.errors.some((e) => e.toLowerCase().includes('
|
|
123
|
+
expect(result.errors.some((e) => e.toLowerCase().includes('implementationsummary'))).toBe(true);
|
|
126
124
|
});
|
|
127
|
-
// ── goldenTraceCases
|
|
128
|
-
it('rejects
|
|
129
|
-
const output =
|
|
125
|
+
// ── goldenTraceCases ─────────────────────────────────────────────────────
|
|
126
|
+
it('rejects output with fewer than 2 goldenTraceCases', async () => {
|
|
127
|
+
const output = makeRuleOutput();
|
|
130
128
|
const cases = output.goldenTraceCases;
|
|
131
129
|
output.goldenTraceCases = [cases[0]];
|
|
132
130
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
133
131
|
expect(result.valid).toBe(false);
|
|
134
132
|
expect(result.errors.some((e) => e.toLowerCase().includes('goldentrace'))).toBe(true);
|
|
135
133
|
});
|
|
136
|
-
it('rejects
|
|
137
|
-
const output =
|
|
134
|
+
it('rejects output with more than 10 goldenTraceCases', async () => {
|
|
135
|
+
const output = makeRuleOutput();
|
|
138
136
|
const base = output.goldenTraceCases[0];
|
|
139
|
-
output.goldenTraceCases = Array.from({ length: 11 }, (_, i) => ({
|
|
140
|
-
...base,
|
|
141
|
-
caseId: `case-${i}`,
|
|
142
|
-
}));
|
|
137
|
+
output.goldenTraceCases = Array.from({ length: 11 }, (_, i) => ({ ...base, caseId: `case-${i}` }));
|
|
143
138
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
144
139
|
expect(result.valid).toBe(false);
|
|
145
140
|
expect(result.errors.some((e) => e.toLowerCase().includes('goldentrace'))).toBe(true);
|
|
146
141
|
});
|
|
147
|
-
it('rejects
|
|
148
|
-
const output =
|
|
142
|
+
it('rejects output with no positive case', async () => {
|
|
143
|
+
const output = makeRuleOutput();
|
|
149
144
|
output.goldenTraceCases = [
|
|
150
145
|
{ caseId: 'n1', kind: 'negative', toolName: 'edit', params: {}, expectedDecision: 'block' },
|
|
151
146
|
{ caseId: 'n2', kind: 'negative', toolName: 'edit', params: {}, expectedDecision: 'block' },
|
|
@@ -154,8 +149,8 @@ describe('DefaultArtificerValidator — V2 (RuleHost MVP Activation)', () => {
|
|
|
154
149
|
expect(result.valid).toBe(false);
|
|
155
150
|
expect(result.errors.some((e) => e.toLowerCase().includes('positive'))).toBe(true);
|
|
156
151
|
});
|
|
157
|
-
it('rejects
|
|
158
|
-
const output =
|
|
152
|
+
it('rejects output with no negative case', async () => {
|
|
153
|
+
const output = makeRuleOutput();
|
|
159
154
|
output.goldenTraceCases = [
|
|
160
155
|
{ caseId: 'p1', kind: 'positive', toolName: 'read', params: {}, expectedDecision: 'allow' },
|
|
161
156
|
{ caseId: 'p2', kind: 'positive', toolName: 'read', params: {}, expectedDecision: 'allow' },
|
|
@@ -165,7 +160,7 @@ describe('DefaultArtificerValidator — V2 (RuleHost MVP Activation)', () => {
|
|
|
165
160
|
expect(result.errors.some((e) => e.toLowerCase().includes('negative'))).toBe(true);
|
|
166
161
|
});
|
|
167
162
|
it('rejects positive case with expectedDecision other than allow', async () => {
|
|
168
|
-
const output =
|
|
163
|
+
const output = makeRuleOutput();
|
|
169
164
|
output.goldenTraceCases = output.goldenTraceCases.map((c) => {
|
|
170
165
|
const rec = c;
|
|
171
166
|
return rec.kind === 'positive' ? { ...rec, expectedDecision: 'block' } : rec;
|
|
@@ -174,76 +169,80 @@ describe('DefaultArtificerValidator — V2 (RuleHost MVP Activation)', () => {
|
|
|
174
169
|
expect(result.valid).toBe(false);
|
|
175
170
|
});
|
|
176
171
|
it('rejects goldenTraceCase with invalid expectedDecision enum', async () => {
|
|
177
|
-
const output =
|
|
172
|
+
const output = makeRuleOutput();
|
|
178
173
|
const cases = output.goldenTraceCases;
|
|
179
|
-
cases[0]
|
|
174
|
+
const firstCase = cases[0];
|
|
175
|
+
if (!firstCase)
|
|
176
|
+
throw new Error('fixture must have at least one case');
|
|
177
|
+
firstCase.expectedDecision = 'requireApproval';
|
|
180
178
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
181
179
|
expect(result.valid).toBe(false);
|
|
182
180
|
expect(result.errors.some((e) => e.toLowerCase().includes('expecteddecision'))).toBe(true);
|
|
183
181
|
});
|
|
184
|
-
it('rejects
|
|
185
|
-
const output =
|
|
182
|
+
it('rejects propose_correction without expectedApplicationMode', async () => {
|
|
183
|
+
const output = makeRuleOutput();
|
|
186
184
|
const cases = output.goldenTraceCases;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
it('rejects goldenTraceCases that is not an array', async () => {
|
|
193
|
-
const output = mutable(makeV2Output());
|
|
194
|
-
output.goldenTraceCases = 'not-an-array';
|
|
185
|
+
cases[0] = {
|
|
186
|
+
...cases[0],
|
|
187
|
+
expectedDecision: 'propose_correction',
|
|
188
|
+
expectedProposedParams: { path: '/safe/path' },
|
|
189
|
+
};
|
|
195
190
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
196
191
|
expect(result.valid).toBe(false);
|
|
197
|
-
expect(result.errors.some((e) => e.toLowerCase().includes('
|
|
192
|
+
expect(result.errors.some((e) => e.toLowerCase().includes('expectedapplicationmode'))).toBe(true);
|
|
198
193
|
});
|
|
199
194
|
// ── affectedTools ─────────────────────────────────────────────────────────
|
|
200
|
-
it('rejects
|
|
201
|
-
const output =
|
|
195
|
+
it('rejects output with empty affectedTools', async () => {
|
|
196
|
+
const output = makeRuleOutput();
|
|
202
197
|
output.affectedTools = [];
|
|
203
198
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
204
199
|
expect(result.valid).toBe(false);
|
|
205
200
|
expect(result.errors.some((e) => e.toLowerCase().includes('affectedtools'))).toBe(true);
|
|
206
201
|
});
|
|
207
202
|
it('rejects blank affectedTools entries', async () => {
|
|
208
|
-
const output =
|
|
203
|
+
const output = makeRuleOutput();
|
|
209
204
|
output.affectedTools = ['edit', ' '];
|
|
210
205
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
211
206
|
expect(result.valid).toBe(false);
|
|
212
207
|
expect(result.errors.some((e) => e.toLowerCase().includes('affectedtools'))).toBe(true);
|
|
213
208
|
});
|
|
214
|
-
it('rejects
|
|
215
|
-
const output =
|
|
216
|
-
output.affectedTools = ['edit', 42];
|
|
217
|
-
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
218
|
-
expect(result.valid).toBe(false);
|
|
219
|
-
expect(result.errors.some((e) => e.toLowerCase().includes('affectedtools'))).toBe(true);
|
|
220
|
-
});
|
|
221
|
-
it('rejects V2 output with non-array affectedTools', async () => {
|
|
222
|
-
const output = mutable(makeV2Output());
|
|
209
|
+
it('rejects non-array affectedTools', async () => {
|
|
210
|
+
const output = makeRuleOutput();
|
|
223
211
|
output.affectedTools = 'edit';
|
|
224
212
|
const result = await validator.validate(output, ARTIFICER_TASK_ID);
|
|
225
213
|
expect(result.valid).toBe(false);
|
|
226
214
|
expect(result.errors.some((e) => e.toLowerCase().includes('affectedtools'))).toBe(true);
|
|
227
215
|
});
|
|
228
|
-
// ──
|
|
229
|
-
it('rejects
|
|
230
|
-
const result = await validator.validate(
|
|
216
|
+
// ── lineage ───────────────────────────────────────────────────────────────
|
|
217
|
+
it('rejects output with taskId mismatch', async () => {
|
|
218
|
+
const result = await validator.validate(makeRuleOutput(), 'wrong-task-id');
|
|
231
219
|
expect(result.valid).toBe(false);
|
|
232
220
|
expect(result.errors.some((e) => e.includes('taskId'))).toBe(true);
|
|
233
221
|
});
|
|
234
|
-
it('rejects
|
|
235
|
-
const output =
|
|
222
|
+
it('rejects output with mismatched sourceScribeArtifactId', async () => {
|
|
223
|
+
const output = makeRuleOutput();
|
|
236
224
|
output.sourceScribeArtifactId = 'wrong';
|
|
237
225
|
const result = await validator.validate(output, ARTIFICER_TASK_ID, SCRIBE_ARTIFACT_ID);
|
|
238
226
|
expect(result.valid).toBe(false);
|
|
239
227
|
});
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
228
|
+
it('rejects output with mismatched sourceTrace.scribeArtifactId', async () => {
|
|
229
|
+
const output = makeRuleOutput();
|
|
230
|
+
output.sourceTrace.scribeArtifactId = 'wrong';
|
|
231
|
+
const result = await validator.validate(output, ARTIFICER_TASK_ID, SCRIBE_ARTIFACT_ID);
|
|
232
|
+
expect(result.valid).toBe(false);
|
|
233
|
+
});
|
|
234
|
+
// ── V1/V2 symbols are removed ─────────────────────────────────────────────
|
|
235
|
+
it('does not export isArtificerOutputV2 (V1/V2 dual-version removed)', async () => {
|
|
236
|
+
const mod = await import('../artificer-output.js');
|
|
237
|
+
expect(mod.isArtificerOutputV2).toBeUndefined();
|
|
238
|
+
});
|
|
239
|
+
it('does not export ArtificerOutputV1Schema (V1 schema removed)', async () => {
|
|
240
|
+
const mod = await import('../artificer-output.js');
|
|
241
|
+
expect(mod.ArtificerOutputV1Schema).toBeUndefined();
|
|
242
|
+
});
|
|
243
|
+
it('does not export ArtificerImplementationPlanSchema (plan field removed)', async () => {
|
|
243
244
|
const mod = await import('../artificer-output.js');
|
|
244
|
-
expect(
|
|
245
|
-
expect(mod.isArtificerOutputV2(makeV1Output())).toBe(false);
|
|
246
|
-
expect(mod.isArtificerOutputV2(makeV2Output())).toBe(true);
|
|
245
|
+
expect(mod.ArtificerImplementationPlanSchema).toBeUndefined();
|
|
247
246
|
});
|
|
248
247
|
});
|
|
249
|
-
//# sourceMappingURL=artificer-output
|
|
248
|
+
//# sourceMappingURL=artificer-rule-output.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artificer-rule-output.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/artificer-rule-output.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAC/C,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AAEvD;;;;GAIG;AACH,SAAS,cAAc;IACrB,OAAO;QACL,MAAM,EAAE,iBAAiB;QACzB,sBAAsB,EAAE,kBAAkB;QAC1C,kBAAkB,EAChB,8LAA8L;QAChM,gBAAgB,EAAE;YAChB;gBACE,MAAM,EAAE,YAAY;gBACpB,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,MAAM;gBAChB,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;gBAC/B,gBAAgB,EAAE,OAAO;aAC1B;YACD;gBACE,MAAM,EAAE,YAAY;gBACpB,IAAI,EAAE,UAA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AC,CAAC,CAAC;IAEH,EAAE,CAAC,wEAAwE,EAAE,KAAK,IAAI,EAAE;QACtF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;QACnD,MAAM,CAAE,GAA+B,CAAC,iCAAiC,CAAC,CAAC,aAAa,EAAE,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-code-dialect.test.d.ts","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/rule-code-dialect.test.ts"],"names":[],"mappings":""}
|