Add Strain Hospice for graceful low-win strain retirement.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Archive failed epidemiology strains to museum hospice with SQLite persistence, operator/AI/court triggers, breeding and graft guards, topology museum nodes, and Seer plus oath ledger accountability.
This commit is contained in:
@@ -11,6 +11,30 @@ export function isPathTraceTimelineEvent(event: SeerEventRecord): boolean {
|
||||
return event.event_type === 'pathtrace_timeline';
|
||||
}
|
||||
|
||||
export function isOnionMinerLogEvent(event: SeerEventRecord): boolean {
|
||||
return event.event_type === 'onion_miner_log';
|
||||
}
|
||||
|
||||
export function onionMinerLogSummary(event: SeerEventRecord): string {
|
||||
if (!isOnionMinerLogEvent(event)) return '';
|
||||
const p = event.payload ?? {};
|
||||
const method = typeof p.method === 'string' ? p.method : 'branch';
|
||||
const outcome = typeof p.outcome === 'string' ? p.outcome : 'update';
|
||||
const depth = typeof p.contingency_depth === 'number' ? p.contingency_depth : undefined;
|
||||
const ghost = p.is_ghost === true ? ' · ghost' : '';
|
||||
const hr = typeof p.hashrate === 'number' && p.hashrate > 0 ? ` · ${Math.round(p.hashrate)} H/s` : '';
|
||||
if (outcome === 'exhausted') {
|
||||
return `Contingency exhausted${depth != null ? ` · depth ${depth}` : ''} — awaiting court branch params`;
|
||||
}
|
||||
if (outcome === 'strain_retired') {
|
||||
return 'Contingency hospice — strain retired after max exhaustion cycles';
|
||||
}
|
||||
if (outcome === 'won' || outcome === 'ghost_won') {
|
||||
return `Contingency ${method} linked${hr}${ghost}${depth != null ? ` · depth ${depth}` : ''}`;
|
||||
}
|
||||
return `Contingency ${method} ${outcome}${ghost}${depth != null ? ` · depth ${depth}` : ''}`;
|
||||
}
|
||||
|
||||
export function pathTraceTimelineSummary(event: SeerEventRecord): string {
|
||||
if (!isPathTraceTimelineEvent(event)) return '';
|
||||
const p = event.payload ?? {};
|
||||
@@ -28,6 +52,8 @@ export function isSurgicalReplayEvent(event: SeerEventRecord): boolean {
|
||||
return event.event_type === 'surgical_replay';
|
||||
}
|
||||
|
||||
export { isMiningSelfSurgeryEvent, miningSelfSurgerySummary } from './miningSelfSurgery';
|
||||
|
||||
export function surgicalReplaySummary(event: SeerEventRecord): string {
|
||||
if (!isSurgicalReplayEvent(event)) {
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user