@principles/pd-cli 1.152.6 → 1.152.8
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/commands/__tests__/runtime-probe-config.test.js +2 -1
- package/dist/commands/__tests__/runtime-probe-config.test.js.map +1 -1
- package/dist/commands/__tests__/version.test.js +104 -0
- package/dist/commands/__tests__/version.test.js.map +1 -1
- package/dist/commands/diagnose.d.ts.map +1 -1
- package/dist/commands/diagnose.js +3 -6
- package/dist/commands/diagnose.js.map +1 -1
- package/dist/commands/pain-retry.d.ts.map +1 -1
- package/dist/commands/pain-retry.js +3 -6
- package/dist/commands/pain-retry.js.map +1 -1
- package/dist/commands/runtime-activation.d.ts.map +1 -1
- package/dist/commands/runtime-activation.js +9 -3
- package/dist/commands/runtime-activation.js.map +1 -1
- package/dist/commands/runtime-init.d.ts.map +1 -1
- package/dist/commands/runtime-init.js +4 -6
- package/dist/commands/runtime-init.js.map +1 -1
- package/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
- package/dist/commands/runtime-internalization-run-once.js +5 -11
- package/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/dist/commands/runtime-internalization-run-rulehost.d.ts +14 -0
- package/dist/commands/runtime-internalization-run-rulehost.d.ts.map +1 -1
- package/dist/commands/runtime-internalization-run-rulehost.js +67 -15
- package/dist/commands/runtime-internalization-run-rulehost.js.map +1 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +1 -1
- package/dist/services/__tests__/rulehost-readiness.test.js +0 -3
- package/dist/services/__tests__/rulehost-readiness.test.js.map +1 -1
- package/dist/services/pain-flood-simulation-runner.d.ts.map +1 -1
- package/dist/services/pain-flood-simulation-runner.js +0 -4
- package/dist/services/pain-flood-simulation-runner.js.map +1 -1
- package/dist/services/rulehost-pipeline-runner.d.ts +90 -21
- package/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
- package/dist/services/rulehost-pipeline-runner.js +328 -24
- package/dist/services/rulehost-pipeline-runner.js.map +1 -1
- package/dist/services/synthetic-baseline-runner.d.ts.map +1 -1
- package/dist/services/synthetic-baseline-runner.js +0 -4
- package/dist/services/synthetic-baseline-runner.js.map +1 -1
- package/dist/services/version-report.d.ts +16 -0
- package/dist/services/version-report.d.ts.map +1 -1
- package/dist/services/version-report.js +37 -2
- package/dist/services/version-report.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/__tests__/runtime-probe-config.test.ts +2 -1
- package/src/commands/__tests__/version.test.ts +110 -0
- package/src/commands/diagnose.ts +3 -6
- package/src/commands/pain-retry.ts +3 -6
- package/src/commands/runtime-activation.ts +9 -3
- package/src/commands/runtime-init.ts +4 -6
- package/src/commands/runtime-internalization-run-once.ts +5 -11
- package/src/commands/runtime-internalization-run-rulehost.ts +69 -15
- package/src/index.ts +0 -13
- package/src/services/__tests__/rulehost-readiness.test.ts +0 -3
- package/src/services/pain-flood-simulation-runner.ts +0 -4
- package/src/services/rulehost-pipeline-runner.ts +368 -35
- package/src/services/synthetic-baseline-runner.ts +0 -4
- package/src/services/version-report.ts +52 -2
- package/tests/commands/config-doctor.test.ts +0 -2
- package/tests/commands/pain-evidence.test.ts +1 -1
- package/tests/commands/run-rulehost-handler.test.ts +43 -0
- package/tests/commands/runtime-features.test.ts +0 -1
- package/tests/commands/runtime-internalization-run-once-language.test.ts +0 -1
- package/tests/e2e/cross-package-acceptance.test.ts +13 -3
- package/tests/services/pd-config-loader.test.ts +0 -1
- package/tests/services/rulehost-pipeline-runner.test.ts +378 -12
- package/dist/commands/runtime-internalization-context-trace.d.ts +0 -25
- package/dist/commands/runtime-internalization-context-trace.d.ts.map +0 -1
- package/dist/commands/runtime-internalization-context-trace.js +0 -374
- package/dist/commands/runtime-internalization-context-trace.js.map +0 -1
- package/src/commands/runtime-internalization-context-trace.ts +0 -445
- package/tests/bdd/context-trace.steps.ts +0 -229
- package/tests/commands/runtime-internalization-context-trace.test.ts +0 -110
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layer 3 — read-only context-trace CLI command (design §6.7, PR 5 task 11.1).
|
|
3
|
-
*
|
|
4
|
-
* `pd runtime internalization context-trace --task <taskId> [--artifact <artifactId>] [--json]`
|
|
5
|
-
*
|
|
6
|
-
* Produces three-segment diagnosis (pain→dreamer / dreamer→scribe / scribe→artificer),
|
|
7
|
-
* per-hop summary presence/freshness, budget truncation records, and structured
|
|
8
|
-
* degradation reasons — the single Owner-visible exit point for all internal
|
|
9
|
-
* signals from Layers 0/1/2.
|
|
10
|
-
*
|
|
11
|
-
* CLI gates (cli-1..cli-7):
|
|
12
|
-
* - --json emits exactly one parseable JSON object on stdout (cli-1)
|
|
13
|
-
* - uses process.exitCode (not process.exit) so stdout isn't truncated (cli-2)
|
|
14
|
-
* - no --dry-run / --confirm (command is inherently read-only, cli-4 N/A)
|
|
15
|
-
* - zero state writes: no DB/ledger/artifact/enqueue/successor mutations (cli-5)
|
|
16
|
-
* - every degraded/refused output includes structured reason + nextAction (cli-6)
|
|
17
|
-
*/
|
|
18
|
-
import * as path from 'node:path';
|
|
19
|
-
import { RuntimeStateManager, isFeatureEnabled, CandidateLineage, } from '@principles/core/runtime-v2';
|
|
20
|
-
import { resolveWorkspaceDir } from '../resolve-workspace.js';
|
|
21
|
-
import { loadPdConfig, computeFlagsFromLoadResult } from '../services/pd-config-loader.js';
|
|
22
|
-
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
23
|
-
function isRecord(value) {
|
|
24
|
-
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
25
|
-
}
|
|
26
|
-
function safePreview(value, maxLen = 200) {
|
|
27
|
-
try {
|
|
28
|
-
const s = typeof value === 'string' ? value : JSON.stringify(value);
|
|
29
|
-
return s.length <= maxLen ? s : `${s.slice(0, maxLen - 1)}…`;
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
return '<unserializable>';
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function readSummaryPresent(contentJson) {
|
|
36
|
-
if (!isRecord(contentJson))
|
|
37
|
-
return false;
|
|
38
|
-
return Object.hasOwn(contentJson, 'summary');
|
|
39
|
-
}
|
|
40
|
-
function readPredecessorSummaryPresent(contentJson) {
|
|
41
|
-
if (!isRecord(contentJson))
|
|
42
|
-
return false;
|
|
43
|
-
return Object.hasOwn(contentJson, 'predecessorSummary');
|
|
44
|
-
}
|
|
45
|
-
// ── Three-segment verdict computation (design §6.7, Req 10.6) ───────────────
|
|
46
|
-
/** Required dreamer dimensions that should survive into the scribe's principle text. */
|
|
47
|
-
const REQUIRED_DIMENSIONS = ['betterDecision', 'rationale', 'riskLevel'];
|
|
48
|
-
/**
|
|
49
|
-
* Read a dimension value from a node's predecessorSummary (if the node is
|
|
50
|
-
* downstream of dreamer, the predecessorSummary carries the dreamer dims).
|
|
51
|
-
*/
|
|
52
|
-
function readPredecessorDim(contentJson, dim) {
|
|
53
|
-
if (!isRecord(contentJson))
|
|
54
|
-
return null;
|
|
55
|
-
const pred = Object.hasOwn(contentJson, 'predecessorSummary') ? contentJson.predecessorSummary : null;
|
|
56
|
-
if (!isRecord(pred))
|
|
57
|
-
return null;
|
|
58
|
-
const summary = Object.hasOwn(pred, 'summary') ? pred.summary : null;
|
|
59
|
-
if (!isRecord(summary))
|
|
60
|
-
return null;
|
|
61
|
-
const fields = Object.hasOwn(summary, 'fields') ? summary.fields : null;
|
|
62
|
-
if (!isRecord(fields))
|
|
63
|
-
return null;
|
|
64
|
-
const val = Object.hasOwn(fields, dim) ? fields[dim] : undefined;
|
|
65
|
-
return typeof val === 'string' && val.trim() !== '' ? val : null;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Check whether a node's own summary carries a given dimension.
|
|
69
|
-
*/
|
|
70
|
-
function readOwnDim(contentJson, dim) {
|
|
71
|
-
if (!isRecord(contentJson))
|
|
72
|
-
return null;
|
|
73
|
-
const summary = Object.hasOwn(contentJson, 'summary') ? contentJson.summary : null;
|
|
74
|
-
if (!isRecord(summary))
|
|
75
|
-
return null;
|
|
76
|
-
const fields = Object.hasOwn(summary, 'fields') ? summary.fields : null;
|
|
77
|
-
if (!isRecord(fields))
|
|
78
|
-
return null;
|
|
79
|
-
const val = Object.hasOwn(fields, dim) ? fields[dim] : undefined;
|
|
80
|
-
return typeof val === 'string' && val.trim() !== '' ? val : null;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Compute three-segment diagnosis from the resolved chain nodes.
|
|
84
|
-
*
|
|
85
|
-
* Each segment checks whether required dimensions survived the compression hop:
|
|
86
|
-
* - pain_to_dreamer: did pain/diagnosis summaries reach the dreamer node?
|
|
87
|
-
* - dreamer_to_scribe: did dreamer's required dims survive into scribe's text?
|
|
88
|
-
* - scribe_to_artificer: did the principle text reach artificer?
|
|
89
|
-
*
|
|
90
|
-
* When a node is absent or has no summary, the segment is 'fail' (data missing).
|
|
91
|
-
* When a required dimension is absent in the downstream summary, it's 'degraded'.
|
|
92
|
-
* Otherwise 'pass'.
|
|
93
|
-
*/
|
|
94
|
-
function computeSegments(nodes) {
|
|
95
|
-
// Index nodes by taskKind for quick lookup.
|
|
96
|
-
const byKind = new Map();
|
|
97
|
-
for (const n of nodes) {
|
|
98
|
-
if (!byKind.has(n.taskKind))
|
|
99
|
-
byKind.set(n.taskKind, n);
|
|
100
|
-
}
|
|
101
|
-
const dreamerNode = byKind.get('dreamer');
|
|
102
|
-
const scribeNode = byKind.get('scribe');
|
|
103
|
-
const artificerNode = byKind.get('artificer');
|
|
104
|
-
// Segment 1: pain_to_dreamer — pain/diagnosis summaries forwarded to dreamer?
|
|
105
|
-
let seg1Verdict = 'pass';
|
|
106
|
-
let seg1Detail = null;
|
|
107
|
-
if (!dreamerNode) {
|
|
108
|
-
seg1Verdict = 'fail';
|
|
109
|
-
seg1Detail = 'Dreamer node not found in chain.';
|
|
110
|
-
}
|
|
111
|
-
else if (!readSummaryPresent(dreamerNode.contentJson)) {
|
|
112
|
-
seg1Verdict = 'fail';
|
|
113
|
-
seg1Detail = `Dreamer artifact ${dreamerNode.artifactId} has no summary envelope.`;
|
|
114
|
-
}
|
|
115
|
-
else if (!readPredecessorSummaryPresent(dreamerNode.contentJson)) {
|
|
116
|
-
seg1Verdict = 'degraded';
|
|
117
|
-
seg1Detail = 'Dreamer has no predecessorSummary (pain/diagnosis summary may not have been forwarded).';
|
|
118
|
-
}
|
|
119
|
-
// Segment 2: dreamer_to_scribe — did dreamer's required dims survive into scribe?
|
|
120
|
-
let seg2Verdict = 'pass';
|
|
121
|
-
let seg2Detail = null;
|
|
122
|
-
const seg2Missing = [];
|
|
123
|
-
if (!scribeNode) {
|
|
124
|
-
seg2Verdict = 'fail';
|
|
125
|
-
seg2Detail = 'Scribe node not found in chain.';
|
|
126
|
-
}
|
|
127
|
-
else if (!readSummaryPresent(scribeNode.contentJson)) {
|
|
128
|
-
seg2Verdict = 'fail';
|
|
129
|
-
seg2Detail = `Scribe artifact ${scribeNode.artifactId} has no summary envelope.`;
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
// Check if dreamer dims are reachable via scribe's predecessorSummary (via philosopher).
|
|
133
|
-
for (const dim of REQUIRED_DIMENSIONS) {
|
|
134
|
-
const ownVal = readOwnDim(scribeNode.contentJson, dim);
|
|
135
|
-
const predVal = readPredecessorDim(scribeNode.contentJson, dim);
|
|
136
|
-
if (ownVal === null && predVal === null) {
|
|
137
|
-
seg2Missing.push(dim);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (seg2Missing.length > 0) {
|
|
141
|
-
seg2Verdict = 'degraded';
|
|
142
|
-
seg2Detail = `Required dimension(s) missing in scribe summary: ${seg2Missing.join(', ')}`;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
// Segment 3: scribe_to_artificer — did the principle text reach artificer?
|
|
146
|
-
let seg3Verdict = 'pass';
|
|
147
|
-
let seg3Detail = null;
|
|
148
|
-
if (!artificerNode) {
|
|
149
|
-
seg3Verdict = 'fail';
|
|
150
|
-
seg3Detail = 'Artificer node not found in chain.';
|
|
151
|
-
}
|
|
152
|
-
else if (!readSummaryPresent(artificerNode.contentJson)) {
|
|
153
|
-
seg3Verdict = 'degraded';
|
|
154
|
-
seg3Detail = `Artificer artifact ${artificerNode.artifactId} has no summary envelope.`;
|
|
155
|
-
}
|
|
156
|
-
return [
|
|
157
|
-
{ segment: 'pain_to_dreamer', verdict: seg1Verdict, missingDimensions: seg1Verdict === 'degraded' ? undefined : undefined, detail: seg1Detail },
|
|
158
|
-
{ segment: 'dreamer_to_scribe', verdict: seg2Verdict, missingDimensions: seg2Missing.length > 0 ? seg2Missing : undefined, detail: seg2Detail },
|
|
159
|
-
{ segment: 'scribe_to_artificer', verdict: seg3Verdict, detail: seg3Detail },
|
|
160
|
-
];
|
|
161
|
-
}
|
|
162
|
-
// ── Handler ─────────────────────────────────────────────────────────────────
|
|
163
|
-
export async function handleRuntimeInternalizationContextTrace(opts) {
|
|
164
|
-
const workspaceDir = opts.workspace ? path.resolve(opts.workspace) : resolveWorkspaceDir();
|
|
165
|
-
// Validate required --task option.
|
|
166
|
-
if (!opts.task) {
|
|
167
|
-
const result = {
|
|
168
|
-
ok: false,
|
|
169
|
-
command: 'runtime.internalization.context-trace',
|
|
170
|
-
degradations: [],
|
|
171
|
-
error: { code: 'missing_task', message: '--task <taskId> is required' },
|
|
172
|
-
nextAction: 'Provide --task <taskId> to trace the internalization context chain.',
|
|
173
|
-
};
|
|
174
|
-
console.log(JSON.stringify(result, null, 2));
|
|
175
|
-
process.exitCode = 1;
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
const taskId = opts.task;
|
|
179
|
-
// Read feature flags from config (independent of stateManager).
|
|
180
|
-
// CodeRabbit PR #1278 #2: distinguish config-load failure from genuine
|
|
181
|
-
// flags-off — the former needs a different nextAction so the user doesn't
|
|
182
|
-
// waste time editing config that's actually unparseable.
|
|
183
|
-
let summaryFlag = false;
|
|
184
|
-
let manifestFlag = false;
|
|
185
|
-
let progressiveFlag = false;
|
|
186
|
-
let configLoadError = null;
|
|
187
|
-
try {
|
|
188
|
-
const configLoadResult = loadPdConfig(workspaceDir);
|
|
189
|
-
const flags = computeFlagsFromLoadResult(configLoadResult);
|
|
190
|
-
summaryFlag = isFeatureEnabled(flags, 'artifact_summary_redundancy');
|
|
191
|
-
manifestFlag = isFeatureEnabled(flags, 'context_manifest_budget');
|
|
192
|
-
progressiveFlag = isFeatureEnabled(flags, 'progressive_evaluator');
|
|
193
|
-
}
|
|
194
|
-
catch (configErr) {
|
|
195
|
-
configLoadError = configErr instanceof Error ? configErr.message : String(configErr);
|
|
196
|
-
}
|
|
197
|
-
// Config load failed → structured error (not "flags off" masquerade).
|
|
198
|
-
if (configLoadError !== null) {
|
|
199
|
-
const result = {
|
|
200
|
-
ok: false,
|
|
201
|
-
command: 'runtime.internalization.context-trace',
|
|
202
|
-
taskId,
|
|
203
|
-
degradations: [],
|
|
204
|
-
error: { code: 'config_load_failed', message: safePreview(configLoadError) },
|
|
205
|
-
nextAction: 'Fix the .pd/config.yaml parse error, then re-run. The flags could not be read.',
|
|
206
|
-
};
|
|
207
|
-
console.log(JSON.stringify(result, null, 2));
|
|
208
|
-
process.exitCode = 1;
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
// All flags off → structured "feature_disabled" output (still ok: true).
|
|
212
|
-
if (!summaryFlag && !manifestFlag && !progressiveFlag) {
|
|
213
|
-
const result = {
|
|
214
|
-
ok: true,
|
|
215
|
-
command: 'runtime.internalization.context-trace',
|
|
216
|
-
taskId,
|
|
217
|
-
flags: {
|
|
218
|
-
artifact_summary_redundancy: false,
|
|
219
|
-
context_manifest_budget: false,
|
|
220
|
-
progressive_evaluator: false,
|
|
221
|
-
},
|
|
222
|
-
chain: [],
|
|
223
|
-
segments: [],
|
|
224
|
-
truncations: [],
|
|
225
|
-
degradations: [
|
|
226
|
-
{
|
|
227
|
-
code: 'feature_disabled',
|
|
228
|
-
detail: 'All three progressive-disclosure flags are off. Three-segment diagnosis unavailable.',
|
|
229
|
-
},
|
|
230
|
-
],
|
|
231
|
-
nextAction: 'Enable artifact_summary_redundancy and progressive_evaluator in .pd/config.yaml, then re-run the internalization task.',
|
|
232
|
-
};
|
|
233
|
-
console.log(JSON.stringify(result, null, 2));
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
// CodeRabbit PR #1278 #1: construct stateManager INSIDE the try block so
|
|
237
|
-
// a constructor throw is caught and produces structured JSON output (cli-6).
|
|
238
|
-
let stateManager = null;
|
|
239
|
-
try {
|
|
240
|
-
// Open state manager in read-only mode (cli-5: zero state writes).
|
|
241
|
-
stateManager = new RuntimeStateManager({ workspaceDir, readonly: true });
|
|
242
|
-
await stateManager.initialize();
|
|
243
|
-
const sm = stateManager;
|
|
244
|
-
// Resolve the start artifact: either --artifact or the latest artifact for the task.
|
|
245
|
-
const artifactStore = sm.piArtifactStore;
|
|
246
|
-
let startArtifactId = opts.artifact;
|
|
247
|
-
if (!startArtifactId) {
|
|
248
|
-
const artifacts = await artifactStore.listBySourceTaskId(taskId);
|
|
249
|
-
if (artifacts.length > 0 && artifacts[0]) {
|
|
250
|
-
startArtifactId = artifacts[0].artifactId;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
if (!startArtifactId) {
|
|
254
|
-
const result = {
|
|
255
|
-
ok: false,
|
|
256
|
-
command: 'runtime.internalization.context-trace',
|
|
257
|
-
taskId,
|
|
258
|
-
degradations: [],
|
|
259
|
-
error: { code: 'artifact_not_found', message: `No artifact found for task ${taskId}${opts.artifact ? ` / artifact ${opts.artifact}` : ''}` },
|
|
260
|
-
nextAction: 'Verify the task ID and artifact ID. Use `pd runtime internalization integrity` to check chain health.',
|
|
261
|
-
};
|
|
262
|
-
console.log(JSON.stringify(result, null, 2));
|
|
263
|
-
process.exitCode = 1;
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
// Build LineageTaskReader adapter (first production implementation).
|
|
267
|
-
const taskReader = {
|
|
268
|
-
async getTaskById(id) {
|
|
269
|
-
const t = await sm.getTask(id);
|
|
270
|
-
return t === null ? null : { taskId: t.taskId, taskKind: t.taskKind };
|
|
271
|
-
},
|
|
272
|
-
};
|
|
273
|
-
// Construct CandidateLineage and resolve.
|
|
274
|
-
const lineage = new CandidateLineage({
|
|
275
|
-
artifacts: artifactStore,
|
|
276
|
-
tasks: taskReader,
|
|
277
|
-
});
|
|
278
|
-
const lineageResult = await lineage.resolve(startArtifactId);
|
|
279
|
-
// Handle lineage errors (data corruption).
|
|
280
|
-
if (!lineageResult.ok) {
|
|
281
|
-
const result = {
|
|
282
|
-
ok: false,
|
|
283
|
-
command: 'runtime.internalization.context-trace',
|
|
284
|
-
taskId,
|
|
285
|
-
degradations: [],
|
|
286
|
-
error: { code: 'lineage_error', message: `Lineage resolution failed: ${lineageResult.error.kind}` },
|
|
287
|
-
nextAction: `Check data integrity: ${lineageResult.error.detail}. Use \`pd runtime internalization integrity --task ${taskId}\` for a full check.`,
|
|
288
|
-
};
|
|
289
|
-
console.log(JSON.stringify(result, null, 2));
|
|
290
|
-
process.exitCode = 1;
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
// Build the output chain from resolved nodes.
|
|
294
|
-
const chain = lineageResult.value.nodes.map((node) => {
|
|
295
|
-
const { contentJson } = node;
|
|
296
|
-
const summaryPresent = readSummaryPresent(contentJson);
|
|
297
|
-
const predecessorSummaryPresent = readPredecessorSummaryPresent(contentJson);
|
|
298
|
-
return {
|
|
299
|
-
stage: node.taskKind,
|
|
300
|
-
taskKind: node.taskKind,
|
|
301
|
-
artifactId: node.artifactId,
|
|
302
|
-
summaryPresent,
|
|
303
|
-
predecessorSummaryPresent,
|
|
304
|
-
predecessorHashMatches: predecessorSummaryPresent ? true : null,
|
|
305
|
-
};
|
|
306
|
-
});
|
|
307
|
-
// Build degradations from lineage notes.
|
|
308
|
-
const degradations = lineageResult.value.notes.map((note) => ({
|
|
309
|
-
code: note.code === 'ancestor_pruned' ? 'lineage_partial' : note.code,
|
|
310
|
-
detail: safePreview(note.detail),
|
|
311
|
-
artifactId: note.artifactId,
|
|
312
|
-
}));
|
|
313
|
-
// Add summary_absent for nodes without summary.
|
|
314
|
-
for (const node of lineageResult.value.nodes) {
|
|
315
|
-
if (!readSummaryPresent(node.contentJson)) {
|
|
316
|
-
degradations.push({
|
|
317
|
-
code: 'summary_absent',
|
|
318
|
-
detail: `Artifact ${node.artifactId} (${node.taskKind}) has no summary envelope.`,
|
|
319
|
-
artifactId: node.artifactId,
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
// Build three-segment diagnosis from chain data (design §6.7, Req 10.6).
|
|
324
|
-
// Each segment checks whether the downstream node's summary carries the
|
|
325
|
-
// expected dimensions from its edge predecessor.
|
|
326
|
-
const segments = computeSegments(lineageResult.value.nodes);
|
|
327
|
-
const result = {
|
|
328
|
-
ok: true,
|
|
329
|
-
command: 'runtime.internalization.context-trace',
|
|
330
|
-
taskId,
|
|
331
|
-
flags: {
|
|
332
|
-
artifact_summary_redundancy: summaryFlag,
|
|
333
|
-
context_manifest_budget: manifestFlag,
|
|
334
|
-
progressive_evaluator: progressiveFlag,
|
|
335
|
-
},
|
|
336
|
-
chain,
|
|
337
|
-
segments,
|
|
338
|
-
truncations: [],
|
|
339
|
-
degradations,
|
|
340
|
-
nextAction: degradations.length > 0
|
|
341
|
-
? `${degradations.length} degradation(s) detected. Review the chain above for missing summaries or partial lineage.`
|
|
342
|
-
: 'Chain is complete with no degradations.',
|
|
343
|
-
};
|
|
344
|
-
console.log(JSON.stringify(result, null, 2));
|
|
345
|
-
}
|
|
346
|
-
catch (error) {
|
|
347
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
348
|
-
const result = {
|
|
349
|
-
ok: false,
|
|
350
|
-
command: 'runtime.internalization.context-trace',
|
|
351
|
-
taskId,
|
|
352
|
-
degradations: [],
|
|
353
|
-
error: { code: 'unexpected_error', message: safePreview(message) },
|
|
354
|
-
nextAction: 'Check workspace configuration and database accessibility.',
|
|
355
|
-
};
|
|
356
|
-
console.log(JSON.stringify(result, null, 2));
|
|
357
|
-
process.exitCode = 1;
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
finally {
|
|
361
|
-
// CodeRabbit PR #1278 #1: guard close() so it can't overwrite the result
|
|
362
|
-
// or throw unhandled if stateManager was never constructed.
|
|
363
|
-
if (stateManager !== null) {
|
|
364
|
-
try {
|
|
365
|
-
await stateManager.close();
|
|
366
|
-
}
|
|
367
|
-
catch {
|
|
368
|
-
// Best-effort close on a read-only instance — swallow to preserve the
|
|
369
|
-
// structured JSON output already written to stdout.
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
//# sourceMappingURL=runtime-internalization-context-trace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-internalization-context-trace.js","sourceRoot":"","sources":["../../src/commands/runtime-internalization-context-trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GAKjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAkD3F,gFAAgF;AAEhF,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,KAAc,EAAE,MAAM,GAAG,GAAG;IAC/C,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IA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