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
@@ -1,4 +1,8 @@
|
||||
"""Reference fixed-target DSH issue broker; secrets are environment-only."""
|
||||
"""Reference fixed-target DSH static credential distributor; secrets are environment-only.
|
||||
|
||||
Git credentials remain valid until revoked/rotated on the server. The bounded
|
||||
response cache is not a token expiry mechanism. Deploy behind managed HTTPS.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
||||
@@ -24,4 +24,13 @@ assert.equal(auditSnapshot.operations.decision_audit.status,'corrupt');
|
||||
assert.equal(auditSnapshot.operations.decision_audit.code,'audit_log_corrupt');
|
||||
assert.equal(auditSnapshot.operations.decision_audit.checked,2001);
|
||||
assert.equal(auditSnapshot.operations.decision_audit.raw_error,undefined);
|
||||
const scheduleSnapshot=modelSnapshot({operations:{schedules:[{schedule_id:'s',dispatchable:true,
|
||||
requires_confirmation:false,dispatch_authority:'native_future_authorization',plan_hashes:{task:'frozen'}}],
|
||||
schedule_events:Array.from({length:25},(_,i)=>({sequence:i,event:'dispatch',payload:{automatic:true,
|
||||
authority:'native_future_authorization',scope:{plan_hashes:{task:'frozen'}}}}))}});
|
||||
assert.equal(scheduleSnapshot.operations.schedules[0].dispatchable,true);
|
||||
assert.equal(scheduleSnapshot.operations.schedules[0].requires_confirmation,false);
|
||||
assert.equal(scheduleSnapshot.operations.schedule_events.length,10);
|
||||
assert.equal(scheduleSnapshot.operations.schedule_events[0].payload.authority,'native_future_authorization');
|
||||
assert.ok(!JSON.stringify(scheduleSnapshot).includes('frozen'));
|
||||
console.log(JSON.stringify({status:'passed',committedIdsPreserved:true,impactRowsBounded:true,snapshotBounded:true}));
|
||||
@@ -114,6 +114,7 @@ try{
|
||||
await select('Board-A');
|
||||
await send('现在执行 Board-A 任务,只运行这一个工程,按原生确认的范围处理。结束后告诉我真实保存、失败和未命中数量。');
|
||||
await wait(async()=>(await context()).operations?.live_run?.active===true,'live controlled run');
|
||||
assert.equal((await context()).operations.health.checks.find(row=>row.name==='execution')?.code,'execution_running');
|
||||
await pauseLiveRun();
|
||||
await wait(async()=>{const d=await context();return d.operations?.last_execution?.status==='paused'&&!d.operations?.live_run?.active;},'safe pause receipt');
|
||||
const receipt=(await context()).operations.last_execution;assert.equal(receipt.tasks[0].no_match_items,1);assert.equal(receipt.tasks[0].saved_items,0);
|
||||
@@ -148,6 +149,15 @@ try{
|
||||
const schedule=(await context()).operations.schedules[0];assert.equal(schedule.auto_start,true);report.schedule=schedule;
|
||||
await new Promise(r=>setTimeout(r,17000));await click('dx-schedules-refresh');
|
||||
await wait(async()=>(await context()).operations?.schedules?.[0]?.status==='completed','schedule remains terminal');
|
||||
await wait(async()=>{const events=(await context()).operations?.schedule_events||[];
|
||||
return events.some(row=>row.event==='dispatch')&&events.some(row=>row.event==='result');},'persisted schedule audit events');
|
||||
const scheduleEvents=(await context()).operations.schedule_events;
|
||||
assert.equal(scheduleEvents.find(row=>row.event==='dispatch').payload.authority,'native_future_authorization');
|
||||
assert.equal(scheduleEvents.find(row=>row.event==='result').payload.receipt.status,'completed');
|
||||
await wait(()=>c.evaluate(`document.body.innerText.includes('排期派发记录')&&document.body.innerText.includes('排期结果记录')`),'schedule audit cards rendered');
|
||||
report.scheduleEvents=scheduleEvents;
|
||||
await c.screenshot(path.join(output,'schedule-audit-events.png'));
|
||||
report.checks.push('native future-run dispatch and actual receipt persisted and rendered in schedule audit cards');
|
||||
report.checks.push('cancel saved nothing; explicit future-run authorization executed due mapping scope exactly once');
|
||||
await tab('usage');
|
||||
assert.deepEqual(await c.evaluate(`fetch('/dx/runtime').then(r=>r.json()).then(x=>x.settings)`),{response_timeout_seconds:120,model_context_limit:12000});
|
||||
|
||||
Reference in new issue
Block a user