@principles/core 1.177.3 → 1.177.4

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=c2-live-runner-chain.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c2-live-runner-chain.test.d.ts","sourceRoot":"","sources":["../../../../src/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,306 @@
1
+ /**
2
+ * C2-P0 Pinning Test: Live MVP Runner Chain (PRI-457)
3
+ *
4
+ * Asserts the actual successor task chain created in the real store matches
5
+ * the documented live runner chain for each MVP activation channel.
6
+ *
7
+ * ERR Gate:
8
+ * - ERR-004 / ERR-008 / EP-07: successor task kinds are read from the real
9
+ * store after commitNextTaskProposal, not inferred from ALLOWED_EDGES.
10
+ * - EP-09: uses real InternalizationOrchestrator + RuntimeStateManager (SQLite),
11
+ * not a hand-written expected-edge list.
12
+ *
13
+ * This test is the regression guard for C2-P2 (de-surface Quiet runners).
14
+ * If the live chain ever diverges from the documented MVP chain, CI fails.
15
+ */
16
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
17
+ import * as fs from 'fs';
18
+ import * as path from 'path';
19
+ import * as os from 'os';
20
+ import { RuntimeStateManager } from '../../store/runtime-state-manager.js';
21
+ import { InternalizationOrchestrator } from '../internalization-orchestrator.js';
22
+ import { buildDreamerTaskSeed, computeBridgeDecision, } from '../intake-to-internalization-bridge.js';
23
+ // ── Test constants ───────────────────────────────────────────────────────────
24
+ const OWNER = 'test-c2-p0';
25
+ const RUNTIME_KIND = 'test-double';
26
+ /**
27
+ * The expected live runner chain under default config, per channel.
28
+ *
29
+ * This is the ASSERTION target — the test verifies that the real store
30
+ * contains these successor task kinds after each commitNextTaskProposal call.
31
+ *
32
+ * Source: docs/plans/2026-06-mvp-slimming-candidates-1-2/c2-live-runner-chain.md
33
+ */
34
+ const EXPECTED_CHAIN = [
35
+ 'dreamer',
36
+ 'philosopher',
37
+ 'scribe',
38
+ 'artificer',
39
+ 'evaluator',
40
+ 'rollout_reviewer',
41
+ ];
42
+ /**
43
+ * Seed a dreamer task through the real intake bridge path.
44
+ *
45
+ * Uses buildDreamerTaskSeed (the same function the production intake bridge
46
+ * calls) to generate the diagnosticJson, then creates the task in the real
47
+ * store. This is the real seeding path — not a hand-built task record.
48
+ */
49
+ async function seedDreamerTask(stateManager, options) {
50
+ const { candidateId, channel, sourceTaskId } = options;
51
+ const bridgeInput = {
52
+ candidateId,
53
+ recommendationKind: channel === 'code_tool_hook' ? 'rule' : 'principle',
54
+ route: channel === 'code_tool_hook' ? 'rule-candidate' : 'principle-ledger',
55
+ ready: true,
56
+ sourceTaskId,
57
+ sourceArtifactId: sourceTaskId ? `art-${sourceTaskId}` : undefined,
58
+ sourceRunId: sourceTaskId ? `run-${sourceTaskId}` : undefined,
59
+ };
60
+ const seed = buildDreamerTaskSeed(bridgeInput);
61
+ if ('decision' in seed) {
62
+ // BridgeDecision has 4 variants; only not_internalizable/invalid_candidate carry reason.
63
+ const reason = 'reason' in seed ? seed.reason : seed.decision;
64
+ throw new Error(`Failed to seed dreamer task: ${reason}`);
65
+ }
66
+ await stateManager.createTask({
67
+ taskId: seed.taskId,
68
+ taskKind: seed.taskKind,
69
+ status: seed.status,
70
+ attemptCount: seed.attemptCount,
71
+ maxAttempts: seed.maxAttempts,
72
+ diagnosticJson: seed.diagnosticJson,
73
+ inputRef: undefined,
74
+ resultRef: undefined,
75
+ lastError: undefined,
76
+ leaseOwner: undefined,
77
+ leaseExpiresAt: undefined,
78
+ });
79
+ return seed.taskId;
80
+ }
81
+ /**
82
+ * Transition a task from pending → leased → succeeded.
83
+ *
84
+ * This simulates what the auto-consumer / CLI does when a runner completes
85
+ * successfully. The orchestrator's commitNextTaskProposal requires the source
86
+ * task to be in 'succeeded' status.
87
+ */
88
+ async function simulateTaskSuccess(stateManager, taskId) {
89
+ await stateManager.acquireLease({
90
+ taskId,
91
+ owner: OWNER,
92
+ runtimeKind: RUNTIME_KIND,
93
+ });
94
+ await stateManager.markTaskSucceeded(taskId);
95
+ }
96
+ /**
97
+ * Read the actual successor task from the store after commitNextTaskProposal.
98
+ *
99
+ * EP-07 compliance: reads the REAL successor record from the store, not a
100
+ * hand-written expected value. The assertion compares the actual taskKind
101
+ * from the store against the expected chain.
102
+ */
103
+ async function readActualSuccessor(stateManager, successorTaskId) {
104
+ const task = await stateManager.getTask(successorTaskId);
105
+ if (!task) {
106
+ throw new Error(`Successor task ${successorTaskId} not found in store`);
107
+ }
108
+ return {
109
+ taskId: task.taskId,
110
+ taskKind: task.taskKind,
111
+ status: task.status,
112
+ };
113
+ }
114
+ /**
115
+ * Walk the full successor chain from a seeded dreamer task, returning the
116
+ * actual task kinds observed in the store.
117
+ *
118
+ * EP-07: every successor is read from the real store via readActualSuccessor.
119
+ */
120
+ async function walkFullChain(stateManager, orchestrator, dreamerTaskId) {
121
+ let currentTaskId = dreamerTaskId;
122
+ const actualChain = ['dreamer'];
123
+ for (let i = 0; i < EXPECTED_CHAIN.length - 1; i++) {
124
+ const expectedNextKind = EXPECTED_CHAIN[i + 1];
125
+ if (!expectedNextKind) {
126
+ throw new Error(`EXPECTED_CHAIN[${i + 1}] is undefined`);
127
+ }
128
+ await simulateTaskSuccess(stateManager, currentTaskId);
129
+ const commitResult = await orchestrator.commitNextTaskProposal(currentTaskId);
130
+ if (commitResult.decision !== 'successor_created') {
131
+ throw new Error(`Expected successor_created at chain step ${i}, got ${commitResult.decision}`);
132
+ }
133
+ expect(commitResult.successorKind).toBe(expectedNextKind);
134
+ const actualSuccessor = await readActualSuccessor(stateManager, commitResult.successorTaskId);
135
+ expect(actualSuccessor.taskKind).toBe(expectedNextKind);
136
+ expect(actualSuccessor.status).toBe('pending');
137
+ actualChain.push(actualSuccessor.taskKind);
138
+ currentTaskId = commitResult.successorTaskId;
139
+ }
140
+ // Terminal runner has no successor
141
+ await simulateTaskSuccess(stateManager, currentTaskId);
142
+ const terminalCommit = await orchestrator.commitNextTaskProposal(currentTaskId);
143
+ expect(terminalCommit.decision).toBe('no_successor');
144
+ return actualChain;
145
+ }
146
+ // ── Tests ────────────────────────────────────────────────────────────────────
147
+ describe('PRI-457 C2-P0: Live MVP runner chain pinning test', () => {
148
+ let tmpDir;
149
+ let stateManager;
150
+ let orchestrator;
151
+ beforeEach(async () => {
152
+ tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pd-c2-p0-chain-'));
153
+ stateManager = new RuntimeStateManager({ workspaceDir: tmpDir });
154
+ await stateManager.initialize();
155
+ orchestrator = new InternalizationOrchestrator({ stateManager }, { owner: OWNER, runtimeKind: RUNTIME_KIND, dryRun: true });
156
+ });
157
+ afterEach(async () => {
158
+ await stateManager.close();
159
+ fs.rmSync(tmpDir, { recursive: true, force: true });
160
+ });
161
+ // ── Channel: prompt ──────────────────────────────────────────────────────
162
+ it('prompt channel: full successor chain dreamer→philosopher→scribe→artificer→evaluator→rollout_reviewer', async () => {
163
+ const dreamerTaskId = await seedDreamerTask(stateManager, {
164
+ candidateId: `cand-prompt-${Date.now()}`,
165
+ channel: 'prompt',
166
+ });
167
+ const dreamerTask = await stateManager.getTask(dreamerTaskId);
168
+ expect(dreamerTask).not.toBeNull();
169
+ if (!dreamerTask) {
170
+ throw new Error('Dreamer task not found after seeding');
171
+ }
172
+ expect(dreamerTask.taskKind).toBe('dreamer');
173
+ const actualChain = await walkFullChain(stateManager, orchestrator, dreamerTaskId);
174
+ expect(actualChain).toEqual(EXPECTED_CHAIN);
175
+ });
176
+ // ── Channel: code_tool_hook ──────────────────────────────────────────────
177
+ it('code_tool_hook channel: full successor chain dreamer→philosopher→scribe→artificer→evaluator→rollout_reviewer', async () => {
178
+ const dreamerTaskId = await seedDreamerTask(stateManager, {
179
+ candidateId: `cand-hook-${Date.now()}`,
180
+ channel: 'code_tool_hook',
181
+ });
182
+ const dreamerTask = await stateManager.getTask(dreamerTaskId);
183
+ expect(dreamerTask).not.toBeNull();
184
+ if (!dreamerTask) {
185
+ throw new Error('Dreamer task not found after seeding');
186
+ }
187
+ expect(dreamerTask.taskKind).toBe('dreamer');
188
+ const actualChain = await walkFullChain(stateManager, orchestrator, dreamerTaskId);
189
+ expect(actualChain).toEqual(EXPECTED_CHAIN);
190
+ });
191
+ // ── Channel: defer_archive ───────────────────────────────────────────────
192
+ it('defer_archive channel: no route maps to defer_archive — no dreamer task seeded', async () => {
193
+ // The intake bridge has NO route that maps to the defer_archive channel.
194
+ // defer recommendations return 'not_internalizable' at computeBridgeDecision.
195
+ // Use ready: true so the code reaches the route check (not the !ready early exit).
196
+ const bridgeInput = {
197
+ candidateId: `cand-defer-${Date.now()}`,
198
+ recommendationKind: 'defer',
199
+ route: 'deferred',
200
+ ready: true,
201
+ };
202
+ const decision = computeBridgeDecision(bridgeInput);
203
+ expect(decision.decision).toBe('not_internalizable');
204
+ // Verify the rejection is specifically because the route is deferred,
205
+ // not because of a missing ready flag or unknown route.
206
+ if (!('reason' in decision)) {
207
+ throw new Error('Expected not_internalizable decision to have a reason field');
208
+ }
209
+ expect(decision.reason).toContain('deferred');
210
+ // No dreamer task is seeded — no runners run for defer_archive
211
+ // through the internalization pipeline.
212
+ });
213
+ // ── Cross-channel: successor inherits channel from parent ─────────────────
214
+ it('successor tasks inherit the channel from the parent task', async () => {
215
+ for (const channel of ['prompt', 'code_tool_hook']) {
216
+ const dreamerTaskId = await seedDreamerTask(stateManager, {
217
+ candidateId: `cand-${channel}-inherit-${Date.now()}`,
218
+ channel,
219
+ });
220
+ await simulateTaskSuccess(stateManager, dreamerTaskId);
221
+ const commitResult = await orchestrator.commitNextTaskProposal(dreamerTaskId);
222
+ if (commitResult.decision !== 'successor_created') {
223
+ throw new Error(`Expected successor_created, got ${commitResult.decision}`);
224
+ }
225
+ expect(commitResult.successorKind).toBe('philosopher');
226
+ // Read the actual successor and verify its channel via hydrated metadata
227
+ const successorTask = await stateManager.getTask(commitResult.successorTaskId);
228
+ expect(successorTask).not.toBeNull();
229
+ if (!successorTask) {
230
+ throw new Error(`Successor task ${commitResult.successorTaskId} not found`);
231
+ }
232
+ expect(successorTask.diagnosticJson).toBeDefined();
233
+ // Parse the PI metadata to verify channel inheritance
234
+ // Runtime Contract #2/#5: no `as` on untrusted data; use typeof + Object.hasOwn
235
+ const diagJson = successorTask.diagnosticJson;
236
+ if (!diagJson) {
237
+ throw new Error('Successor task diagnosticJson is empty');
238
+ }
239
+ const parsed = JSON.parse(diagJson);
240
+ if (typeof parsed !== 'object' || parsed === null) {
241
+ throw new Error('diagnosticJson is not an object');
242
+ }
243
+ if (!Object.hasOwn(parsed, 'pi_metadata')) {
244
+ throw new Error('pi_metadata key not found in successor diagnosticJson');
245
+ }
246
+ const piMeta = parsed.pi_metadata;
247
+ if (typeof piMeta !== 'object' || piMeta === null) {
248
+ throw new Error('pi_metadata is not an object');
249
+ }
250
+ if (!Object.hasOwn(piMeta, 'channel')) {
251
+ throw new Error('pi_metadata.channel is missing');
252
+ }
253
+ const channelValue = piMeta.channel;
254
+ expect(channelValue).toBe(channel);
255
+ }
256
+ });
257
+ // ── Edge validation: validateEdge does not filter by channel ──────────────
258
+ it('validateEdge returns true for all peer runner edges regardless of channel', async () => {
259
+ // This documents that the job graph does NOT filter by channel.
260
+ // The _channel parameter in validateEdge is unused.
261
+ // This is a key finding for C2-P2: channel-based runner skipping does NOT
262
+ // happen at the job graph level.
263
+ const { validateEdge } = await import('../internalization-job-graph.js');
264
+ const edges = [
265
+ ['dreamer', 'philosopher'],
266
+ ['philosopher', 'scribe'],
267
+ ['scribe', 'artificer'],
268
+ ['artificer', 'evaluator'],
269
+ ['evaluator', 'rollout_reviewer'],
270
+ ];
271
+ for (const [from, to] of edges) {
272
+ expect(validateEdge(from, to, 'prompt')).toBe(true);
273
+ expect(validateEdge(from, to, 'code_tool_hook')).toBe(true);
274
+ expect(validateEdge(from, to, 'defer_archive')).toBe(true);
275
+ }
276
+ });
277
+ // ── Config defaults: document the DEFAULT_AGENT_ENABLED values ────────────
278
+ it('DEFAULT_AGENT_ENABLED: dreamer+scribe+artificer on; philosopher+evaluator+rolloutReviewer off', async () => {
279
+ // This pins the config defaults that the trace doc relies on.
280
+ // If these defaults change, the Core/Quiet classification must be re-evaluated.
281
+ const { getDefaultInternalAgents } = await import('../../config/pd-config-defaults.js');
282
+ const agents = getDefaultInternalAgents();
283
+ expect(agents.agents.dreamer.enabled).toBe(true);
284
+ expect(agents.agents.philosopher.enabled).toBe(false);
285
+ expect(agents.agents.scribe.enabled).toBe(true);
286
+ expect(agents.agents.artificer.enabled).toBe(true);
287
+ expect(agents.agents.evaluator.enabled).toBe(false);
288
+ expect(agents.agents.rolloutReviewer.enabled).toBe(false);
289
+ });
290
+ // ── MVP_CORE_TASK_KINDS excludes rollout_reviewer ─────────────────────────
291
+ it('MVP_CORE_TASK_KINDS excludes rollout_reviewer', async () => {
292
+ const { MVP_CORE_TASK_KINDS } = await import('../queue-actionability.js');
293
+ expect(MVP_CORE_TASK_KINDS).toContain('dreamer');
294
+ expect(MVP_CORE_TASK_KINDS).toContain('philosopher');
295
+ expect(MVP_CORE_TASK_KINDS).toContain('scribe');
296
+ expect(MVP_CORE_TASK_KINDS).toContain('artificer');
297
+ expect(MVP_CORE_TASK_KINDS).toContain('evaluator');
298
+ expect(MVP_CORE_TASK_KINDS).not.toContain('rollout_reviewer');
299
+ });
300
+ // ── DEFAULT_CONSUMER_RUNNER_KINDS is dreamer-only ────────────────────────
301
+ it('DEFAULT_CONSUMER_RUNNER_KINDS is dreamer-only', async () => {
302
+ const { DEFAULT_CONSUMER_RUNNER_KINDS } = await import('../internalization-consumer-decision.js');
303
+ expect(DEFAULT_CONSUMER_RUNNER_KINDS).toEqual(['dreamer']);
304
+ });
305
+ });
306
+ //# sourceMappingURL=c2-live-runner-chain.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c2-live-runner-chain.test.js","sourceRoot":"","sources":["../../../../src/runtime-v2/internal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CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QACrD,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnD,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnD,MAAM,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,4EAA4E;IAE5E,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,EAAE,6BAA6B,EAAE,GAAG,MAAM,MAAM,CAAC,yCAAyC,CAAC,CAAC;QAClG,MAAM,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/core",
3
- "version": "1.177.3",
3
+ "version": "1.177.4",
4
4
  "description": "Universal Evolution SDK - framework-agnostic pain signal capture and principle injection",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",