@principles/core 1.259.1 → 1.260.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__/activation-compatibility-read-model.test.d.ts +2 -0
- package/dist/runtime-v2/__tests__/activation-compatibility-read-model.test.d.ts.map +1 -0
- package/dist/runtime-v2/__tests__/activation-compatibility-read-model.test.js +148 -0
- package/dist/runtime-v2/__tests__/activation-compatibility-read-model.test.js.map +1 -0
- package/dist/runtime-v2/__tests__/architecture-regression.test.js +6 -5
- package/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/dist/runtime-v2/__tests__/golden-trace.test.js +2 -2
- package/dist/runtime-v2/__tests__/golden-trace.test.js.map +1 -1
- package/dist/runtime-v2/__tests__/internalization-contracts.test.js +4 -6
- package/dist/runtime-v2/__tests__/internalization-contracts.test.js.map +1 -1
- package/dist/runtime-v2/__tests__/rule-host-evaluator.test.js +4 -4
- package/dist/runtime-v2/__tests__/rule-host-evaluator.test.js.map +1 -1
- package/dist/runtime-v2/__tests__/story-a-demo.test.js +8 -8
- package/dist/runtime-v2/__tests__/story-a-demo.test.js.map +1 -1
- package/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js +31 -0
- package/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js.map +1 -1
- package/dist/runtime-v2/activation-compatibility-read-model.d.ts +24 -0
- package/dist/runtime-v2/activation-compatibility-read-model.d.ts.map +1 -0
- package/dist/runtime-v2/activation-compatibility-read-model.js +132 -0
- package/dist/runtime-v2/activation-compatibility-read-model.js.map +1 -0
- package/dist/runtime-v2/config/__tests__/pd-validate-profile-legacy-keys.test.d.ts +13 -0
- package/dist/runtime-v2/config/__tests__/pd-validate-profile-legacy-keys.test.d.ts.map +1 -0
- package/dist/runtime-v2/config/__tests__/pd-validate-profile-legacy-keys.test.js +73 -0
- package/dist/runtime-v2/config/__tests__/pd-validate-profile-legacy-keys.test.js.map +1 -0
- package/dist/runtime-v2/config/pd-config-types.d.ts +0 -23
- package/dist/runtime-v2/config/pd-config-types.d.ts.map +1 -1
- package/dist/runtime-v2/config/pd-config-types.js.map +1 -1
- package/dist/runtime-v2/config/pd-profile-constants.d.ts +11 -5
- package/dist/runtime-v2/config/pd-profile-constants.d.ts.map +1 -1
- package/dist/runtime-v2/config/pd-profile-constants.js +10 -45
- package/dist/runtime-v2/config/pd-profile-constants.js.map +1 -1
- package/dist/runtime-v2/config/pd-validate-profile.d.ts.map +1 -1
- package/dist/runtime-v2/config/pd-validate-profile.js +27 -135
- package/dist/runtime-v2/config/pd-validate-profile.js.map +1 -1
- package/dist/runtime-v2/core-principles/core-principle-registry.d.ts +4 -4
- package/dist/runtime-v2/core-principles/core-principle-registry.d.ts.map +1 -1
- package/dist/runtime-v2/core-principles/core-principle-registry.js +2 -2
- package/dist/runtime-v2/golden-trace-replay-validator.d.ts.map +1 -1
- package/dist/runtime-v2/golden-trace-replay-validator.js +0 -2
- package/dist/runtime-v2/golden-trace-replay-validator.js.map +1 -1
- package/dist/runtime-v2/golden-trace.d.ts.map +1 -1
- package/dist/runtime-v2/golden-trace.js +0 -3
- package/dist/runtime-v2/golden-trace.js.map +1 -1
- package/dist/runtime-v2/index.d.ts +7 -5
- package/dist/runtime-v2/index.d.ts.map +1 -1
- package/dist/runtime-v2/index.js +6 -5
- package/dist/runtime-v2/index.js.map +1 -1
- package/dist/runtime-v2/internalization/__tests__/external-review-p0-regressions.test.js +2 -2
- package/dist/runtime-v2/internalization/__tests__/external-review-p0-regressions.test.js.map +1 -1
- package/dist/runtime-v2/internalization/__tests__/internalization-transition-decision.test.js.map +1 -1
- package/dist/runtime-v2/internalization/__tests__/legacy-rule-contract-scanner.test.d.ts +2 -0
- package/dist/runtime-v2/internalization/__tests__/legacy-rule-contract-scanner.test.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/legacy-rule-contract-scanner.test.js +101 -0
- package/dist/runtime-v2/internalization/__tests__/legacy-rule-contract-scanner.test.js.map +1 -0
- package/dist/runtime-v2/internalization/__tests__/mvp-core-loop-journeys.test.js +28 -28
- package/dist/runtime-v2/internalization/__tests__/mvp-core-loop-journeys.test.js.map +1 -1
- package/dist/runtime-v2/internalization/index.d.ts +2 -0
- package/dist/runtime-v2/internalization/index.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/index.js +1 -0
- package/dist/runtime-v2/internalization/index.js.map +1 -1
- package/dist/runtime-v2/internalization/legacy-rule-contract-scanner.d.ts +51 -0
- package/dist/runtime-v2/internalization/legacy-rule-contract-scanner.d.ts.map +1 -0
- package/dist/runtime-v2/internalization/legacy-rule-contract-scanner.js +81 -0
- package/dist/runtime-v2/internalization/legacy-rule-contract-scanner.js.map +1 -0
- package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js +0 -2
- package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js.map +1 -1
- package/dist/runtime-v2/internalization/rule-host-contracts.d.ts +0 -3
- package/dist/runtime-v2/internalization/rule-host-contracts.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/rule-host-helpers.d.ts +4 -2
- package/dist/runtime-v2/internalization/rule-host-helpers.d.ts.map +1 -1
- package/dist/runtime-v2/internalization/rule-host-helpers.js +4 -2
- package/dist/runtime-v2/internalization/rule-host-helpers.js.map +1 -1
- package/dist/runtime-v2/pain-signal-observability.js +3 -3
- package/dist/runtime-v2/pain-signal-observability.js.map +1 -1
- package/dist/runtime-v2/story-a-demo.d.ts.map +1 -1
- package/dist/runtime-v2/story-a-demo.js +2 -0
- package/dist/runtime-v2/story-a-demo.js.map +1 -1
- package/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts.map +1 -1
- package/dist/runtime-v2/tools/artificer-l2-tool-contract.js +0 -4
- package/dist/runtime-v2/tools/artificer-l2-tool-contract.js.map +1 -1
- package/dist/runtime-v2/types/event-payload.d.ts +1 -20
- package/dist/runtime-v2/types/event-payload.d.ts.map +1 -1
- package/dist/runtime-v2/types/event-payload.js +0 -12
- package/dist/runtime-v2/types/event-payload.js.map +1 -1
- package/dist/runtime-v2/types/event-types.d.ts +3 -18
- package/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/dist/runtime-v2/types/event-types.js +0 -8
- package/dist/runtime-v2/types/event-types.js.map +1 -1
- package/dist/runtime-v2/types/index.d.ts +3 -3
- package/dist/runtime-v2/types/index.d.ts.map +1 -1
- package/dist/runtime-v2/types/index.js +2 -2
- package/dist/runtime-v2/types/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.d.ts +0 -2
- package/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.d.ts.map +0 -1
- package/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.js +0 -149
- package/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.js.map +0 -1
- package/dist/runtime-v2/thinking-models/index.d.ts +0 -3
- package/dist/runtime-v2/thinking-models/index.d.ts.map +0 -1
- package/dist/runtime-v2/thinking-models/index.js +0 -3
- package/dist/runtime-v2/thinking-models/index.js.map +0 -1
- package/dist/runtime-v2/thinking-models/thinking-models-policy.d.ts +0 -73
- package/dist/runtime-v2/thinking-models/thinking-models-policy.d.ts.map +0 -1
- package/dist/runtime-v2/thinking-models/thinking-models-policy.js +0 -227
- package/dist/runtime-v2/thinking-models/thinking-models-policy.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activation-compatibility-read-model.test.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/__tests__/activation-compatibility-read-model.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
import * as os from 'node:os';
|
|
5
|
+
import { SqliteConnection } from '../store/sqlite-connection.js';
|
|
6
|
+
import { ActivationCompatibilityReadModel } from '../activation-compatibility-read-model.js';
|
|
7
|
+
import { createRuleArtifact, seedArtifactToDb } from '../activation/__tests__/helpers.js';
|
|
8
|
+
/**
|
|
9
|
+
* Persisted-workspace regression fixture (P1-3): a workspace upgraded from an
|
|
10
|
+
* older PD may hold an ACTIVE owner-approved rule whose RuleCode reads
|
|
11
|
+
* `input.session.recentThinking` — a contract symbol the current runtime
|
|
12
|
+
* removed. The compatibility read model must detect it; it must NOT silently
|
|
13
|
+
* report clean (which would let an upgrade change the rule's semantics), and
|
|
14
|
+
* it must never mutate the workspace.
|
|
15
|
+
*/
|
|
16
|
+
function createBareWorkspace() {
|
|
17
|
+
// Local variant of the shared helper (avoids pulling the dispatcher deps
|
|
18
|
+
// we do not need here) — same real-SQLite production stores.
|
|
19
|
+
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pd-compat-scan-'));
|
|
20
|
+
fs.mkdirSync(path.join(tmpDir, '.pd'), { recursive: true });
|
|
21
|
+
const connection = new SqliteConnection({ workspaceDir: tmpDir });
|
|
22
|
+
connection.getDb();
|
|
23
|
+
return {
|
|
24
|
+
workspaceDir: tmpDir,
|
|
25
|
+
connection,
|
|
26
|
+
approvalStore: null,
|
|
27
|
+
stateStore: null,
|
|
28
|
+
artifactStore: null,
|
|
29
|
+
cleanup: () => {
|
|
30
|
+
connection.close();
|
|
31
|
+
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const LEGACY_RECENT_THINKING_CODE = `function evaluate(input, helpers) {
|
|
36
|
+
var hasRecentDiagnosis = false;
|
|
37
|
+
if (input.session && input.session.recentThinking === true) { hasRecentDiagnosis = true; }
|
|
38
|
+
if (!hasRecentDiagnosis) {
|
|
39
|
+
return { decision: 'requireApproval', matched: true, reason: 'no recent diagnosis evidence' };
|
|
40
|
+
}
|
|
41
|
+
return { decision: 'allow', matched: false };
|
|
42
|
+
}`;
|
|
43
|
+
const CLEAN_V2_CODE = `function evaluate(input, helpers) {
|
|
44
|
+
var h = input.context && input.context.history;
|
|
45
|
+
if (h && h.status === 'available' && h.recentCalls.length > 0) {
|
|
46
|
+
return { decision: 'requireApproval', matched: true, reason: 'diagnosis evidence present' };
|
|
47
|
+
}
|
|
48
|
+
return { decision: 'allow', matched: false, reason: 'cannot verify: history unavailable' };
|
|
49
|
+
}`;
|
|
50
|
+
function seedActiveCodeToolHookRule(ws, spec) {
|
|
51
|
+
const { artifactId, ruleId, implementationCode, activationId } = spec;
|
|
52
|
+
const artifact = createRuleArtifact({
|
|
53
|
+
artifactId,
|
|
54
|
+
sourceRuleId: ruleId,
|
|
55
|
+
contentJson: JSON.stringify({
|
|
56
|
+
ruleId,
|
|
57
|
+
implementationCode,
|
|
58
|
+
ruleHostGateDecision: 'accepted_shadow',
|
|
59
|
+
affectedTools: ['write_file'],
|
|
60
|
+
}),
|
|
61
|
+
});
|
|
62
|
+
seedArtifactToDb(ws, artifact);
|
|
63
|
+
const db = ws.connection.getDb();
|
|
64
|
+
db.prepare(`
|
|
65
|
+
INSERT INTO activations (activation_id, idempotency_key, artifact_id, channel, action, target_ref, activated_at, promoted_at, deactivated_at)
|
|
66
|
+
VALUES (?, ?, ?, 'code_tool_hook', 'code_tool_hook_shadow_activate', ?, ?, NULL, NULL)
|
|
67
|
+
`).run(activationId, `idem-${activationId}`, artifactId, ruleId, new Date().toISOString());
|
|
68
|
+
}
|
|
69
|
+
describe('ActivationCompatibilityReadModel', () => {
|
|
70
|
+
it('detects an active rule that reads the retired recentThinking contract', () => {
|
|
71
|
+
const ws = createBareWorkspace();
|
|
72
|
+
try {
|
|
73
|
+
seedActiveCodeToolHookRule(ws, { artifactId: 'art-legacy-1', ruleId: 'rule-real-diagnosis-first', implementationCode: LEGACY_RECENT_THINKING_CODE, activationId: 'act-legacy-1' });
|
|
74
|
+
const result = new ActivationCompatibilityReadModel({ workspaceDir: ws.workspaceDir }).scan();
|
|
75
|
+
expect(result.ok).toBe(false);
|
|
76
|
+
expect(result.status).toBe('legacy_dependency');
|
|
77
|
+
expect(result.scannedActivations).toBe(1);
|
|
78
|
+
expect(result.findings).toHaveLength(1);
|
|
79
|
+
expect(result.findings[0]).toMatchObject({
|
|
80
|
+
symbol: 'recentThinking',
|
|
81
|
+
ruleId: 'rule-real-diagnosis-first',
|
|
82
|
+
activationId: 'act-legacy-1',
|
|
83
|
+
channel: 'code_tool_hook',
|
|
84
|
+
});
|
|
85
|
+
expect(result.reason).toBe('legacy_rule_contract_dependency');
|
|
86
|
+
expect(result.nextAction).toContain('Migrate or deactivate');
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
ws.cleanup();
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
it('passes a clean RuleContextV2-only active rule', () => {
|
|
93
|
+
const ws = createBareWorkspace();
|
|
94
|
+
try {
|
|
95
|
+
seedActiveCodeToolHookRule(ws, { artifactId: 'art-clean-1', ruleId: 'rule-clean-v2', implementationCode: CLEAN_V2_CODE, activationId: 'act-clean-1' });
|
|
96
|
+
const result = new ActivationCompatibilityReadModel({ workspaceDir: ws.workspaceDir }).scan();
|
|
97
|
+
expect(result.ok).toBe(true);
|
|
98
|
+
expect(result.status).toBe('clean');
|
|
99
|
+
expect(result.findings).toEqual([]);
|
|
100
|
+
}
|
|
101
|
+
finally {
|
|
102
|
+
ws.cleanup();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
it('ignores deactivated rules (only active activations block upgrades)', () => {
|
|
106
|
+
const ws = createBareWorkspace();
|
|
107
|
+
try {
|
|
108
|
+
seedActiveCodeToolHookRule(ws, { artifactId: 'art-legacy-2', ruleId: 'rule-retired-old', implementationCode: LEGACY_RECENT_THINKING_CODE, activationId: 'act-legacy-2' });
|
|
109
|
+
ws.connection.getDb().prepare('UPDATE activations SET deactivated_at = ? WHERE activation_id = ?').run(new Date().toISOString(), 'act-legacy-2');
|
|
110
|
+
const result = new ActivationCompatibilityReadModel({ workspaceDir: ws.workspaceDir }).scan();
|
|
111
|
+
expect(result.status).toBe('clean');
|
|
112
|
+
expect(result.scannedActivations).toBe(0);
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
ws.cleanup();
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
it('treats a workspace without state.db as a clean pass (fresh install)', () => {
|
|
119
|
+
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pd-compat-empty-'));
|
|
120
|
+
try {
|
|
121
|
+
const result = new ActivationCompatibilityReadModel({ workspaceDir: tmpDir }).scan();
|
|
122
|
+
expect(result.ok).toBe(true);
|
|
123
|
+
expect(result.status).toBe('no_state_db');
|
|
124
|
+
// Side-effect-free: no state.db was created by the scan (EP-02).
|
|
125
|
+
expect(fs.existsSync(path.join(tmpDir, '.pd', 'state.db'))).toBe(false);
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
it('never mutates the scanned workspace (activations and artifacts intact)', () => {
|
|
132
|
+
const ws = createBareWorkspace();
|
|
133
|
+
try {
|
|
134
|
+
seedActiveCodeToolHookRule(ws, { artifactId: 'art-legacy-3', ruleId: 'rule-kept-3', implementationCode: LEGACY_RECENT_THINKING_CODE, activationId: 'act-legacy-3' });
|
|
135
|
+
const result = new ActivationCompatibilityReadModel({ workspaceDir: ws.workspaceDir }).scan();
|
|
136
|
+
expect(result.ok).toBe(false);
|
|
137
|
+
const db = ws.connection.getDb();
|
|
138
|
+
const activations = db.prepare('SELECT COUNT(*) AS n FROM activations').get();
|
|
139
|
+
const artifacts = db.prepare('SELECT COUNT(*) AS n FROM pi_artifacts').get();
|
|
140
|
+
expect(activations.n).toBe(1);
|
|
141
|
+
expect(artifacts.n).toBeGreaterThanOrEqual(1);
|
|
142
|
+
}
|
|
143
|
+
finally {
|
|
144
|
+
ws.cleanup();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
//# sourceMappingURL=activation-compatibility-read-model.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activation-compatibility-read-model.test.js","sourceRoot":"","sources":["../../../src/runtime-v2/__tests__/activation-compatibility-read-model.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAsB,MAAM,oCAAoC,CAAC;AAE9G;;;;;;;GAOG;AAEH,SAAS,mBAAmB;IAC1B,yEAAyE;IACzE,6DAA6D;IAC7D,MAAM,MAAM,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC;IACzE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,UAAU,GAAG,IAAI,gBAAgB,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IAClE,UAAU,CAAC,KAAK,EAAE,CAAC;IACnB,OAAO;QACL,YAAY,EAAE,MAAM;QACpB,UAAU;QACV,aAAa,EAAE,IAAa;QAC5B,UAAU,EAAE,IAAa;QACzB,aAAa,EAAE,IAAa;QAC5B,OAAO,EAAE,GAAG,EAAE;YACZ,UAAU,CAAC,K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AE,CAAC;YACjC,MAAM,WAAW,GAAG,EAAE,CAAC,OAAO,CAAC,uCAAuC,CAAC,CAAC,GAAG,EAAmB,CAAC;YAC/F,MAAM,SAAS,GAAG,EAAE,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC,GAAG,EAAmB,CAAC;YAC9F,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAChD,CAAC;gBAAS,CAAC;YACT,EAAE,CAAC,OAAO,EAAE,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -303,8 +303,6 @@ const KNOWN_PLUGIN_CORE_FILES = new Set([
|
|
|
303
303
|
'training-program.ts',
|
|
304
304
|
'replay-engine.ts',
|
|
305
305
|
'merge-gate-audit.ts',
|
|
306
|
-
'control-ui-db.ts',
|
|
307
|
-
'thinking-models.ts',
|
|
308
306
|
'pd-task-reconciler.ts',
|
|
309
307
|
'correction-cue-learner.ts',
|
|
310
308
|
// MVP core-loop closure (P0-B/P0-D/E/F): live correction-cue store projection
|
|
@@ -406,7 +404,7 @@ describe('PRI-212 plugin core anti-growth guard', () => {
|
|
|
406
404
|
expect.fail(msg);
|
|
407
405
|
}
|
|
408
406
|
});
|
|
409
|
-
it('known baseline count is self-consistent (
|
|
407
|
+
it('known baseline count is self-consistent (96 files)', async () => {
|
|
410
408
|
// Sanity check: if the baseline grows, update this number.
|
|
411
409
|
// Prevents accidental baseline bloat from going unnoticed.
|
|
412
410
|
// See docs/archive/reviews/plugin-core-inventory-2026-05.md §7
|
|
@@ -446,10 +444,13 @@ describe('PRI-212 plugin core anti-growth guard', () => {
|
|
|
446
444
|
// PRI-530: Added principle-receipt-metadata.ts (94 → 95) — plugin I/O boundary
|
|
447
445
|
// for principle receipt attribution reads (readonly state.db joins).
|
|
448
446
|
// PRI-531: Added principle-application-ledger.ts (95 → 96) — receipt ledger writer.
|
|
447
|
+
// 2026-08-19 retirement: Removed control-ui-db.ts and thinking-models.ts
|
|
448
|
+
// (96 → 94) — zero production consumers after the Thinking Activity
|
|
449
|
+
// writer retirement (census in the PR description).
|
|
449
450
|
// MVP core-loop closure (P0-B/P0-D): Added signal-keyword-store.ts +
|
|
450
|
-
// auto-consumer-governance-wiring.ts (
|
|
451
|
+
// auto-consumer-governance-wiring.ts (94 → 96) — live correction-cue store
|
|
451
452
|
// projection + auto-consumer governance dispatcher/repair wiring (I/O boundary).
|
|
452
|
-
expect(KNOWN_PLUGIN_CORE_FILES.size).toBe(
|
|
453
|
+
expect(KNOWN_PLUGIN_CORE_FILES.size).toBe(96);
|
|
453
454
|
});
|
|
454
455
|
});
|
|
455
456
|
const REQUIRED_TEST_FILES = [
|