Hmbown/CodeWhale · warning · Error
Archive this pet recording before accepting more telemetry.
Error message
Archive this pet recording before accepting more telemetry.
What it means
In segmented mode, acceptTelemetry stores one bucket per 400 ms sequence in tapeLog, which is hard-capped at 216,000 entries (~24 hours). When the tape log is full, further telemetry is refused and the caller must archive the recording first so replay history is never silently overwritten in the live segmented path. This is an explicit capacity guard, not a corruption error.
Solutions
- Archive the current pet recording (snapshot and reset the world/tape) before accepting more telemetry.
- Start a new PetWorld/session for continued live telemetry and keep the archived one for replay.
- If the session must run indefinitely, periodically rotate: persist the tapeLog, then construct a fresh world seeded from the latest checkpoint.
Example fix
// before if (world.tapeLog.length >= 216000) world.acceptTelemetry(bucket); // throws // after if (world.tapeLog.length >= 216000) archivePetRecording(world); // persist & restart world.acceptTelemetry(bucket);
Defensive patterns
Strategy: try-catch
Validate before calling
function canAcceptTelemetry(world) {
return Array.isArray(world.tapeLog) && world.tapeLog.length < 216000;
} Type guard
null
Try / catch
try {
world.acceptTelemetry(bucket);
} catch (e) {
if (e.message.startsWith('Archive this pet recording')) {
await archivePetRecording(world);
world = startFreshSegmentedWorld();
world.acceptTelemetry(bucket);
} else throw e;
} Prevention
- Monitor tapeLog.length and archive before hitting 216,000 buckets
- Rotate long-running pet sessions periodically (~24 h of telemetry)
- Archive proactively on session milestones rather than on failure
- Alert when a live watcher approaches the tape capacity
When it happens
Trigger: Calling world.acceptTelemetry(bucket) when this.tapeLog.length >= 216_000 in segmented (petCheckpointVersion 2) mode — i.e. the session has accumulated 216,000 telemetry buckets without being archived.
Common situations: A pet session left running for more than ~24 hours of continuous telemetry; a long-lived background watcher never archiving; repeated acceptTelemetry of distinct sequences filling the log in tests.
Understand the failure class
Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.
Related errors
- Archive the legacy recording before accepting more…
- Archive the legacy recording before accepting more…
- Archive the legacy recording before accepting more…
- Archive this pet recording before accepting more telemetry.
- Archive this pet recording before accepting more telemetry.
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/fe6d318a1605f440.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/tui/pet_watch/pet-native.js:440
this.voices = [];
}
/** Branch at the current playhead; input is journalled for the next fixed tick.
* A live touch never needs to re-simulate the creature's entire lifetime. */
interact(kind, x, y) {
if (!['attention', 'food'].includes(kind) || !Number.isFinite(x) || !Number.isFinite(y) || Math.abs(x) > 1 || Math.abs(y) > 1)
throw new Error('Invalid pet interaction.');
if (this.branchTick !== this.tick)
this.interactionLog.splice(this.interactionIndex);
this.branchTick = this.tick;
this.interactionLog.push({ timeMs: (this.tick + 1) * 1000 / HZ, kind, x, y });
}
/** Accept a live source packet at the next 400ms boundary. The accepted tape,
* including any missing intervals, is the exact replay authority for this host. */
acceptTelemetry(input) {
(0, pet_telemetry_js_1.validatePetBucket)(input);
const sequence = Math.floor(this.tick / 12) + 1;
if (this.tapeLog.length >= 216_000)
throw new Error('Archive this pet recording before accepting more telemetry.');
this.hasTelemetry = true;
if (this.segmented) {
const at = this.tapeLog.findIndex(b => b.sequence >= sequence);
const index = at < 0 ? this.tapeLog.length : at;
this.tapeLog.splice(index, at >= 0 && this.tapeLog[at].sequence === sequence ? 1 : 0, { ...structuredClone(input), sequence, simTimeMs: sequence * 400 });
this.hashTape(index);
return;
}
if (sequence >= 216_000)
throw new Error('Archive the legacy recording before accepting more telemetry.');
const changedFrom = Math.min(sequence, this.tapeLog.length);
while (this.tapeLog.length <= sequence) {
const at = this.tapeLog.length;
this.tapeLog.push({ version: 1, sequence: at, simTimeMs: at * 400, durationMs: 400,
activity: .12, coherence: .25, attention: 0, channel: 'other', observed: 0, roamX: 0, roamY: 0, flip: 1, lit: 1,
onsets: Array(13).fill(0), activeMs: Array(13).fill(0), errors: 0, agentIds: [], waiting: false });
}
this.tapeLog[sequence] = { ...structuredClone(input), sequence, simTimeMs: sequence * 400 };View on GitHub (pinned to 73e0f67d83)