fix(dsh): align recovery, scheduling audit and credential guarantees
This commit is contained in:
1 parent
e565f67b46
commit
9552f1eb95
32 files changed
+514
-135
No files matched your search
@@ -4,7 +4,7 @@ const fields=(value,keys)=>Object.fromEntries(keys.filter(k=>value?.[k]!==undefi
|
||||
const run=row=>({...fields(row,['run_id','queue_id','status','task_ids','remaining_task_ids','counters','blockers','resume_ready','started_utc']),
|
||||
diff:row.diff?fields(row.diff,['safe','changed','completed','remaining','plan_changes','evidence_changes','blockers']):undefined,
|
||||
result:row.result?fields(row.result,['status','tasks','message','cad_verification']):undefined});
|
||||
const schedule=row=>fields(row,['schedule_id','title','task_ids','priority','not_before','due_at','dependencies','auto_start','status','ready','blockers','run_id']);
|
||||
const schedule=row=>fields(row,['schedule_id','title','task_ids','priority','not_before','due_at','dependencies','auto_start','status','ready','requires_confirmation','dispatchable','dispatch_authority','blockers','run_id']);
|
||||
const experience=row=>({...fields(row,['incident_id','issue_code','verified','verification','evidence','evidence_refs','evidence_references','status']),
|
||||
attempts:row.attempts,analyses:row.analyses?.slice(0,2),outcome:row.outcome,
|
||||
summary:short(row.summary,1200),message:short(row.message)});
|
||||
@@ -28,6 +28,10 @@ export function compactResult(value){
|
||||
if(result.tasks)result.tasks=result.tasks.map(t=>({...t,...t.note?{note:short(t.note,300)}:{}}));
|
||||
if(result.runs)result.runs=result.runs.slice(0,5).map(run);
|
||||
if(result.schedules)result.schedules=result.schedules.slice(0,10).map(schedule);
|
||||
if(result.schedule_events)result.schedule_events=result.schedule_events.slice(0,10).map(row=>({
|
||||
...fields(row,['sequence','schedule_id','at_utc','event','run_id']),
|
||||
payload:{...fields(row.payload,['automatic','authority','status']),
|
||||
receipt:row.payload?.receipt?fields(row.payload.receipt,['status','run_id','tasks','reporting_errors']):undefined}}));
|
||||
if(result.schedule)result.schedule=schedule(result.schedule);
|
||||
if(result.experiences)result.experiences=result.experiences.slice(0,5).map(experience);
|
||||
if(result.tickets)result.tickets=result.tickets.slice(0,5).map(ticket);
|
||||
@@ -42,7 +46,8 @@ export function modelSnapshot(value){
|
||||
const ops=value.operations||{};
|
||||
result.operations=compactResult({busy:ops.busy===true,live_run:ops.live_run,last_execution:ops.last_execution,
|
||||
runs:ops.runs||[],schedules:ops.schedules||[],experiences:ops.experiences||[],tickets:ops.tickets||[],health:ops.health,
|
||||
decision_audit:ops.decision_audit,decisions:ops.decisions||[]});
|
||||
decision_audit:ops.decision_audit,decisions:ops.decisions||[],
|
||||
section_errors:ops.section_errors||[],schedule_events:ops.schedule_events||[]});
|
||||
if(value.automation?.incident_id)result.automation=fields(value.automation,['incident_id','task_id','issue_code','status','attempts','verification']);
|
||||
if(value.lifecycle?.status)result.lifecycle=fields(value.lifecycle,['request_id','status','task_ids','run_id']);
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user