INNER CODE UNIT · JavaScript
tail
entropy-cloud/nop-entropy · tools/mission-driver/src/main.js:770
const tail = result.history.slice(-5);
if (tail.length > 0) {
console.log(` Last activity:`);
for (const line of tail) console.log(` ${line}`);
}
console.log(`════════════════════════════════════════`);
const exitCode = EXIT_MAP[result.status];
if (exitCode !== undefined) process.exitCode = exitCode;
} finally {
// Unregister this run from the global active-run registry. Single site:
// we deliberately do NOT scatter unregister across engine.run()'s ~25
// _result() return points. Best-effort + idempotent (ENOENT silently
// ignored) so it's a safe no-op for runs that were never registered
// (missionName=null draft/analyze path). Crash residue is reclaimed by the
// next run's reaper via isAliveAndOurs detecting the dead driverPid.
if (config && config.runDir) {
try { unregisterActiveRun(basename(config.runDir), process.pid); } catch {}