get_decision_details
Retrieve a PAST CodeRifts decision by decision_id (or fingerprint): full report payload, breaking changes list, scores, and linked receipt metadata if stored.
Use this when:
You have a decision_id (or fingerprint) from a previous preflight, PR comment, or CI log and need to inspect or explain that past decision.
You are auditing why a prior ALLOW/WARN/BLOCK was issued.
You are NOT requesting a new analysis of current before/after specs.
Do not use when:
You need a decision for the CURRENT uncommitted or PR head change set — call coderifts.preflight_change_set with the current artifacts.
You hold a receipt token and only need cryptographic/lifecycle verification — use coderifts.verify_receipt.
You have no decision_id/fingerprint — run preflight first to create one.
Inputs: at least one of decision_id (preferred) or fingerprint is required (empty {} is rejected by the server as INVALID_INPUT). Returns the stored decision document or not_found.
Scoping — fingerprint lookup returns only YOUR OWN decisions. A fingerprint is derived from content, not from an account, so two callers who preflight byte-identical specs derive the same one; the lookup is therefore constrained to the decisions your credential can prove it owns.
A decision that exists but is not yours returns the SAME not_found as one that was never issued. This is deliberate: a distinguishable "exists but forbidden" would confirm to any caller that a given content hash had been decided on by someone, which is the fact the scoping exists to withhold. Do not read not_found as proof that no such decision exists anywhere.
Decisions persisted without context.repository cannot currently be attributed to an account, and are not retrievable by fingerprint at all — not by their owner either. Retrieve those by decision_id, which is unchanged and unscoped. This is a limitation of what older stored rows carry, not a property of the lookup: rows written from now on record the account directly, so the gap narrows as older rows age out. If a fingerprint you expect returns not_found, use the decision_id before concluding the decision is missing.
When the stored envelope carries control fields, control_envelope.next_agent_step is structured remediation guidance the agent MAY follow for non-CONTINUE execution_action values (null on CONTINUE*). Still branch on execution_action; next_agent_step is a suggestion, not permission.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| decision_id | No | The decision_id from a prior decision_result envelope. Provide this and/or fingerprint (at least one non-empty string required). | |
| fingerprint | No | A verdict fingerprint (sha256:...); returns the latest matching decision. Provide this and/or decision_id (at least one non-empty string required). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | Yes | ||
| decision | No | ||
| evidence | No | ||
| patterns | No | ||
| operation | No | ||
| timestamp | No | ||
| risk_score | No | ||
| receipt_kind | No | ||
| chain_receipt | No | ||
| preflight_mode | No | ||
| safe_for_agent | No | ||
| decision_result | Yes | decision-result.v1 envelope (control enums closed). Additive fields may appear and are not permission. Full schema: https://coderifts.com/schemas/decision-result.v1.consumer.json (producer: https://coderifts.com/schemas/decision-result.v1.producer.json). | |
| pattern_sources | No | ||
| breaking_changes | No | ||
| control_envelope | No | Control envelope (control/1.0) derived from the stored decision_result. Includes next_agent_step (structured remediation SUGGESTION for non-CONTINUE execution_action; null on CONTINUE*; not permission — still branch on execution_action). | |
| evidence_quality | No | ||
| execution_action | No | ||
| coderifts_version | No | ||
| requires_migration | No | ||
| verdict_fingerprint | No | ||
| required_action_core | No | Branchable required-action core { type, reason_code, recheck_required } when present on the envelope. | |
| decision_spec_version | No | ||
| decision_semantic_hash | No |