Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/runtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Runtime evidence

CodeDecay can ingest **local** OpenTelemetry JSON exports and structured
error/deployment event files as read-only engineering evidence.

## What it can establish

- Which services/routes appear in a supplied export window
- Observed latency/error counts for those operations
- Declared downstream topology neighbors (`calls`/`consumes`) and latency budgets
- Historical vs current-revision trust labels
- Cited investigation tasks for agents (never merge-safe proof by themselves)

## What it cannot establish

- That the current head revision is safe
- Absence of failures when the export is sampled
- Production state without an explicit future provider adapter and command intent
- Unredacted secret/PII payload contents (those are stripped before persistence)

## Defaults

- Provider kind: `local-artifact` only
- Zero network calls when no remote provider is configured
- Artifact: `.codedecay/local/runtime-evidence.json`
- CLI: `codedecay runtime --telemetry ... --errors ... --topology ...`
- MCP: `runtime_evidence`

Remote SaaS providers are intentionally out of this slice.
5 changes: 4 additions & 1 deletion packages/cli/src/docs/command-docs/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export const ANALYSIS_COMMAND_DOCS: Record<string, CommandDoc> = {
"codedecay runtime --telemetry .codedecay/runtime/traces.json --head-revision $(git rev-parse HEAD)",
"codedecay runtime --errors .codedecay/runtime/errors.json --format json"
],
notes: ["Inputs must resolve inside the repository. The command performs no network calls or project command execution."]
notes: [
"Inputs must resolve inside the repository. The command performs no network calls or project command execution.",
"Historical or sampled runtime evidence cannot prove the current tree safe. See docs/runtime.md."
]
},
topology: {
name: "topology",
Expand Down
8 changes: 6 additions & 2 deletions packages/knowledge/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export {
SERVICE_TOPOLOGY_NODE_KINDS,
SERVICE_TOPOLOGY_SCHEMA_VERSION
} from "./topology/types";
export { ingestRuntimeEvidence } from "./runtime/ingest";
export { ingestRuntimeEvidence, persistRuntimeEvidenceArtifact, RUNTIME_EVIDENCE_ARTIFACT_PATH } from "./runtime/ingest";
export { analyzeMigrationSafety } from "./migration/analyze";
export type { AnalyzeMigrationSafetyOptions } from "./migration/analyze";
export { renderMigrationSafetyMarkdown } from "./migration/render";
Expand All @@ -84,11 +84,15 @@ export type { IngestRuntimeEvidenceOptions } from "./runtime/ingest";
export { renderRuntimeEvidenceMarkdown } from "./runtime/render";
export { RUNTIME_EVIDENCE_SCHEMA_VERSION } from "./runtime/types";
export type {
RuntimeDeploymentEvidence,
RuntimeErrorEvidence,
RuntimeEvidenceReport,
RuntimeEvidenceSource,
RuntimeEvidenceTrust,
RuntimeOperationEvidence
RuntimeInvestigationTask,
RuntimeOperationEvidence,
RuntimeProviderConfig,
RuntimeProviderKind
} from "./runtime/types";
export type {
ServiceTopologyConfidence,
Expand Down
Loading
Loading