- <%= if @run do %>
-
-
- <.vue_surface
- id="run-detail-governance-overview-widget"
- component="RunGovernanceOverviewWidget"
- socket={@socket}
- props={run_governance_widget_props(assigns)}
- />
-
-
- Governance
-
-
-
- Review request: {Map.get(@change_request, :status) |> status_label()}
-
-
- {Map.get(@change_request, :summary) |> normalize_optional_string()}
-
-
-
-
- Work item
-
- <%= if @work_item do %>
-
-
- {Map.get(@work_item, :summary)}
-
-
- Status: {Map.get(@work_item, :status) |> status_label()}
-
-
- Category: {Map.get(@work_item, :category)}
-
-
- <% else %>
-
- No governed work item is linked to this run yet.
-
- <% end %>
-
-
-
- Conversation lineage
-
- <%= cond do %>
- <% @conversation_linkage && @conversation_linkage.conversation -> %>
-
-
- <.conversation_role_badge
- id="run-detail-conversation-role"
- scope={Map.get(@conversation_linkage.conversation, :scope)}
- attachment_mode={Map.get(@conversation_linkage.conversation, :attachment_mode)}
- work_item_id={Map.get(@conversation_linkage.conversation, :work_item_id)}
- />
- <.conversation_status_badge
- id="run-detail-conversation-status"
- status={Map.get(@conversation_linkage.conversation, :status)}
- />
-
-
- Conversation: {@conversation_linkage.conversation.id}
-
-
- Work resolution: {conversation_resolution_action(@conversation_linkage.conversation)}
-
-
- {conversation_resolution_detail(@conversation_linkage.conversation)}
-
-
- Origin workflow: {@conversation_linkage.origin["workflow"]}
-
-
- {@conversation_linkage.origin["resolution_reason"]}
-
-
- {@conversation_linkage.notice.detail}
-
-
- <.conversation_role_badge
- id="run-detail-conversation-historical-role"
- historical={true}
- />
-
- Historical origin: {@conversation_linkage.historical_conversation.id}
-
-
- <.link
- id="run-detail-conversation-open-repo"
- class="link link-primary text-xs"
- navigate={route_for_conversation_linkage(@project_id, @conversation_linkage, @return_to_path)}
- >
- {@conversation_linkage.action_label}
-
-
- <% @conversation_linkage && @conversation_linkage.origin -> %>
-
- <.conversation_role_badge id="run-detail-conversation-origin-role" historical={true} />
-
- Historical conversation lineage is preserved on this work item.
-
-
- Origin workflow: {@conversation_linkage.origin["workflow"]}
-
-
- {@conversation_linkage.origin["resolution_reason"]}
-
-
- {@conversation_linkage.notice.detail}
-
- <.link
- id="run-detail-conversation-open-repo"
- class="link link-primary text-xs"
- navigate={route_for_conversation_linkage(@project_id, @conversation_linkage, @return_to_path)}
- >
- {@conversation_linkage.action_label}
-
-
- <% @conversation_linkage && @conversation_linkage.notice -> %>
-
-
- Conversation lineage is temporarily unavailable.
-
-
- {@conversation_linkage.notice.detail}
-
- <.link
- id="run-detail-conversation-open-repo"
- class="link link-primary text-xs"
- navigate={route_for_conversation_linkage(@project_id, @conversation_linkage, @return_to_path)}
- >
- Open repo detail
-
-
- <% @work_item -> %>
-
- No productive repository conversation is linked to this governed work item yet.
-
- <% true -> %>
-
- No governed work item is linked to this run yet, so conversation lineage is unavailable.
-
- <% end %>
-
-
-
- Evidence records
-
- <%= if @evidence_records == [] do %>
-
- No governed evidence records have been captured yet.
-
- <% else %>
-
- -
-
- {Map.get(evidence, :key)}
-
-
- {Map.get(evidence, :summary)}
-
-
-
- <% end %>
-
-
-
- Runtime evidence
-
- <%= if @runtime_evidence_summary do %>
-
-
- Runtime posture:
-
- {runtime_evidence_status_label(@runtime_evidence_summary.status)}
-
-
-
- {@runtime_evidence_summary.summary}
-
-
- Delivery path: {humanize_runtime_value(@runtime_evidence_summary.delivery_mode)}
-
-
- Runtime reason: {humanize_runtime_value(@runtime_evidence_summary.reason_code)}
-
-
- Latest integration signal: {@runtime_evidence_summary.integration_summary}
-
-
- Product governance stores bounded runtime evidence here; runtime transport remains opaque.
-
-
- <% else %>
-
- No bounded runtime evidence has been materialized for this run yet.
-
- <% end %>
-
-
-
- Decisions
-
- <%= if @decisions == [] do %>
-
- No governance decisions have been recorded yet.
-
- <% else %>
-
- -
-
- {Map.get(decision, :decision) |> status_label()}
-
-
- {Map.get(decision, :rationale)}
-
-
-
- <% end %>
-
-
-
-
-
Repository memory context
-
- Memory state: {Map.get(@memory_context.graph, :state, :unavailable)}
-
- <.operator_state_notice
- :if={@memory_action_feedback}
- id="run-detail-memory-action-feedback"
- title="Run memory update"
- state={@memory_action_feedback}
- kind={memory_feedback_kind(@memory_action_feedback)}
- compact={true}
- />
- <.memory_status_notice
- :if={@memory_context.notice}
- id="run-detail-memory-context-notice"
- title="Run memory status"
- state={@memory_context.notice}
- kind={Map.get(@memory_context, :notice_kind, :warning)}
- recovery={Map.get(@memory_context, :recovery)}
- recover_event="recover_memory_graph"
- recover_id="run-detail-memory-recover"
- />
-
-
-
-
-
- Work item history
-
-
-
{@memory_context.governed_history.work_item.label}
-
- Memory: {@memory_context.governed_history.work_item.memory_count} | Provenance: {@memory_context.governed_history.work_item.provenance_count}
-
-
-
-
-
-
- Evidence history
-
-
- -
-
{entry.label}
-
- Memory: {entry.memory_count} | Provenance: {entry.provenance_count}
-
-
-
-
-
-
-
- Decision history
-
-
- -
-
{entry.label}
-
- Memory: {entry.memory_count} | Provenance: {entry.provenance_count}
-
-
-
-
-
-
-
-
- Conversation-origin recall
-
-
- <%= if @memory_context.conversation_recall.items == [] do %>
-
- No bounded conversation-origin recall currently points at this governed history.
-
- <% else %>
-
- -
- <.conversation_origin_card
- dom_prefix={"run-detail-conversation-recall-#{index}"}
- item={item}
- />
-
-
- <% end %>
-
-
-
-
-
- Work item memory context
-
- <.governed_memory_surface
- dom_prefix="run-detail-work-item-memory"
- context={@memory_context.governed_surfaces.work_item}
- />
-
-
-
-
- Evidence memory context
-
-
- -
- <.governed_memory_surface
- dom_prefix={"run-detail-evidence-memory-#{governed_record_dom_token(context.id)}"}
- context={context}
- />
-
-
-
-
-
-
- Decision memory context
-
-
- -
- <.governed_memory_surface
- dom_prefix={"run-detail-decision-memory-#{governed_record_dom_token(context.id)}"}
- context={context}
- />
-
-
-
-
-
-
-
-
- Durable memories
-
-
- <%= if @memory_context.memories.items == [] do %>
-
- No durable memories currently point at this governed history.
-
- <% else %>
-
- -
-
- {memory_item_kind(item)}: {memory_item_content(item)}
-
-
- Freshness: {memory_item_freshness(item)} | Decision status: {memory_item_decision_status(item)}
-
-
-
-
-
-
- <.memory_link_groups dom_prefix={"run-detail-memory-#{index}"} item={item} />
-
-
- <% end %>
-
-
-
-
- Memory-aware follow-up
-
-
- {@memory_follow_up_preview.summary}
-
-
- Recommended action: {@memory_follow_up_preview.recommended_action_label} | Priority: {@memory_follow_up_preview.priority} | Urgency: {@memory_follow_up_preview.urgency}
-
-
- Selected memory kinds: {Enum.join(@memory_follow_up_preview.memory_kinds, ", ")}
-
- <.link
- :if={@memory_follow_up_preview.route}
- id="run-detail-memory-follow-up-preview-route"
- class="link link-primary text-xs"
- navigate={@memory_follow_up_preview.route}
- >
- {@memory_follow_up_preview.route_label}
-
-
-
-
-
- Conversation-aware follow-up
-
-
- {@conversation_follow_up_preview.summary}
-
-
- Recommended action: {@conversation_follow_up_preview.recommended_action_label} | Priority: {@conversation_follow_up_preview.priority} | Urgency: {@conversation_follow_up_preview.urgency}
-
-
- Selected bounded recalls: {@conversation_follow_up_preview.selected_count}
-
- <.link
- :if={@conversation_follow_up_preview.route}
- id="run-detail-conversation-follow-up-preview-route"
- class="link link-primary text-xs"
- navigate={@conversation_follow_up_preview.route}
- >
- {@conversation_follow_up_preview.route_label}
-
-
-
-
-
- Workflow provenance
-
-
- <%= if @memory_context.provenance.items == [] do %>
-
- No workflow provenance currently points at this governed history.
-
- <% else %>
-
- -
-
- {provenance_item_kind(item)}: {provenance_item_label(item)}
-
-
- Revision: {provenance_item_revision(item)}
-
- <.memory_link_groups dom_prefix={"run-detail-memory-provenance-#{index}"} item={item} />
-
-
- <% end %>
-
-
-
-
- <%= if @issue_triage_artifacts do %>
-
- Issue triage artifacts
-
- Persistence status: {@issue_triage_artifacts.persistence_status}
-
-
- Classification: {@issue_triage_artifacts.classification}
-
-
- {@issue_triage_artifacts.research_summary}
-
-
- {@issue_triage_artifacts.proposed_response}
-
-
- Response post status: {@issue_triage_artifacts.response_post_status}
-
-
- Posted comment:
- <.link
- href={@issue_triage_artifacts.posted_comment_url}
- target="_blank"
- rel="noopener noreferrer"
- class="link link-primary break-all"
- >
- {@issue_triage_artifacts.posted_comment_url}
-
-
-
-
- Posted at: {@issue_triage_artifacts.response_posted_at}
-
-
- Issue reference: {@issue_triage_artifacts.issue_reference}
-
-
- Source issue number: {@issue_triage_artifacts.source_issue_number}
-
-
- Linked run: {@issue_triage_artifacts.linked_run_id}
-
-
- <%= if @issue_triage_artifacts.typed_failure do %>
-
-
- Typed persistence failure: {@issue_triage_artifacts.typed_failure.error_type}
-
-
- {@issue_triage_artifacts.typed_failure.detail}
-
-
- {@issue_triage_artifacts.typed_failure.remediation}
-
-
- <% end %>
-
- <%= if @issue_triage_artifacts.response_post_failure do %>
-
-
- Typed post failure: {@issue_triage_artifacts.response_post_failure.error_type}
-
-
- {@issue_triage_artifacts.response_post_failure.detail}
-
-
- {@issue_triage_artifacts.response_post_failure.remediation}
-
-
- <% end %>
-
- <% end %>
-
-
- Run artifacts
-
- Browse persisted artifact records grouped by category.
-
-
-
-
- {category.label}
-
-
- <%= if category.entries == [] do %>
-
- Missing artifact records for this category.
-
- <% else %>
-
- -
-
- Identifier: {entry.identifier}
-
-
- Source: {entry.source}
-
- <.link
- id={"run-detail-artifact-view-#{entry.identifier}"}
- href={"#run-detail-artifact-payload-#{entry.identifier}"}
- class="link link-primary text-xs"
- >
- View artifact
-
-
- {entry.summary}
- {entry.payload}
-
-
-
- <% end %>
-
-
-
- <%= if @failure_context do %>
-
- Failure context
-
- Error type: {@failure_context.error_type}
-
-
- Typed reason: {@failure_context.reason_type}
-
-
- Last successful step: {@failure_context.last_successful_step}
-
-
- Failed step: {@failure_context.failed_step}
-
-
- {@failure_context.detail}
-
-
- {@failure_context.remediation}
-
-
- <%= if @failure_context.missing_fields != [] do %>
-
- Missing failure context fields: {Enum.join(@failure_context.missing_fields, ", ")}
-
- <% end %>
-
- <% end %>
-
- <%= if awaiting_approval?(@run.status) do %>
-
- Approval request payload
-
- Review this context before approving.
-
-
- <%= if @approval_context do %>
-
-
- Diff summary: {@approval_context.diff_summary}
-
-
- Test summary: {@approval_context.test_summary}
-
-
-
- <% else %>
-
- Approval context is unavailable.
-
- <% end %>
-
- <%= if @approval_context_blocker do %>
-
-
- {@approval_context_blocker.message}
-
-
- {@approval_context_blocker.detail}
-
-
- {@approval_context_blocker.remediation}
-
-
- <% end %>
-
-
-
-
-
-
-
- <%= if @approval_action_error do %>
-
-
- Typed action failure: {@approval_action_error.error_type}
-
-
- {@approval_action_error.detail}
-
-
- {@approval_action_error.remediation}
-
-
- <% end %>
-
- <% end %>
-
- <%= if full_run_retry_available?(@run.status) do %>
-
- Retry run
-
- Starts a full-run retry attempt and preserves failure lineage for artifact and reason lookup.
-
-
-
- <%= if @step_retry_state.available do %>
-
-
- Restarts retry at contract step {@step_retry_state.retry_step}
- while preserving prior failure lineage.
-
-
-
- <% else %>
-
-
- {@step_retry_state.guidance.detail}
-
-
- {@step_retry_state.guidance.remediation}
-
-
- <% end %>
-
- <%= if @retry_action_error do %>
-
-
- Typed action failure: {@retry_action_error.error_type}
-
-
- {@retry_action_error.detail}
-
-
- {@retry_action_error.remediation}
-
-
- <% end %>
-
- <% end %>
-
- <%= if @retry_lineage_entries != [] do %>
-
- Retry lineage
-
- -
-
- Prior run: {entry.run_id}
-
-
- Status: {entry.status} (attempt {entry.retry_attempt})
-
-
- Typed reason: {entry.reason_type}
-
-
- {entry.detail}
-
-
- Preserved artifact keys: {entry.artifact_count}
-
-
-
-
- <% end %>
-
-
- Status timeline
-
- <%= if @timeline_entries == [] do %>
-
- No status transitions recorded.
-
- <% else %>
-
- -
-
- {entry.to_status}
-
-
- Step: {entry.current_step}
-
-
- Duration: {entry.duration}
-
-
- Recorded at: {entry.transitioned_at}
-
- <%= if entry.approval_audit do %>
-
- Approval audit: {entry.approval_audit}
-
- <% end %>
-
-
- <% end %>
-
- <% else %>
-
- Run not found
-
- Could not find run {@run_id} for this project.
-
-
- <% end %>
-
-
- <:footer_actions>
- <.link
- id="run-detail-return-link"
- class="btn btn-sm btn-outline"
- navigate={@return_to_path}
- >
- Back to {return_to_label(@return_to_path)}
-
-
-
-