Skip to content

Commit e605323

Browse files
feat(runtime): close local telemetry evidence with UAT-RUNTIME coverage for #685 (#752)
Add downstream/budget correlation, cited investigation tasks, historical non-proof semantics, MCP runtime_evidence, and local-only provider defaults without network calls.
1 parent 3f57439 commit e605323

14 files changed

Lines changed: 807 additions & 74 deletions

File tree

docs/runtime.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Runtime evidence
2+
3+
CodeDecay can ingest **local** OpenTelemetry JSON exports and structured
4+
error/deployment event files as read-only engineering evidence.
5+
6+
## What it can establish
7+
8+
- Which services/routes appear in a supplied export window
9+
- Observed latency/error counts for those operations
10+
- Declared downstream topology neighbors (`calls`/`consumes`) and latency budgets
11+
- Historical vs current-revision trust labels
12+
- Cited investigation tasks for agents (never merge-safe proof by themselves)
13+
14+
## What it cannot establish
15+
16+
- That the current head revision is safe
17+
- Absence of failures when the export is sampled
18+
- Production state without an explicit future provider adapter and command intent
19+
- Unredacted secret/PII payload contents (those are stripped before persistence)
20+
21+
## Defaults
22+
23+
- Provider kind: `local-artifact` only
24+
- Zero network calls when no remote provider is configured
25+
- Artifact: `.codedecay/local/runtime-evidence.json`
26+
- CLI: `codedecay runtime --telemetry ... --errors ... --topology ...`
27+
- MCP: `runtime_evidence`
28+
29+
Remote SaaS providers are intentionally out of this slice.

packages/cli/src/docs/command-docs/analysis.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ export const ANALYSIS_COMMAND_DOCS: Record<string, CommandDoc> = {
3636
"codedecay runtime --telemetry .codedecay/runtime/traces.json --head-revision $(git rev-parse HEAD)",
3737
"codedecay runtime --errors .codedecay/runtime/errors.json --format json"
3838
],
39-
notes: ["Inputs must resolve inside the repository. The command performs no network calls or project command execution."]
39+
notes: [
40+
"Inputs must resolve inside the repository. The command performs no network calls or project command execution.",
41+
"Historical or sampled runtime evidence cannot prove the current tree safe. See docs/runtime.md."
42+
]
4043
},
4144
topology: {
4245
name: "topology",

packages/knowledge/src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export {
6767
SERVICE_TOPOLOGY_NODE_KINDS,
6868
SERVICE_TOPOLOGY_SCHEMA_VERSION
6969
} from "./topology/types";
70-
export { ingestRuntimeEvidence } from "./runtime/ingest";
70+
export { ingestRuntimeEvidence, persistRuntimeEvidenceArtifact, RUNTIME_EVIDENCE_ARTIFACT_PATH } from "./runtime/ingest";
7171
export { analyzeMigrationSafety } from "./migration/analyze";
7272
export type { AnalyzeMigrationSafetyOptions } from "./migration/analyze";
7373
export { renderMigrationSafetyMarkdown } from "./migration/render";
@@ -84,11 +84,15 @@ export type { IngestRuntimeEvidenceOptions } from "./runtime/ingest";
8484
export { renderRuntimeEvidenceMarkdown } from "./runtime/render";
8585
export { RUNTIME_EVIDENCE_SCHEMA_VERSION } from "./runtime/types";
8686
export type {
87+
RuntimeDeploymentEvidence,
8788
RuntimeErrorEvidence,
8889
RuntimeEvidenceReport,
8990
RuntimeEvidenceSource,
9091
RuntimeEvidenceTrust,
91-
RuntimeOperationEvidence
92+
RuntimeInvestigationTask,
93+
RuntimeOperationEvidence,
94+
RuntimeProviderConfig,
95+
RuntimeProviderKind
9296
} from "./runtime/types";
9397
export type {
9498
ServiceTopologyConfidence,

0 commit comments

Comments
 (0)