Hmbown/CodeWhale · warning · Error
Archive the legacy recording before accepting more…
Error message
Archive the legacy recording before accepting more telemetry.
What it means
In legacy (non-segmented) mode the tape is a dense array indexed by sequence, bounded at 216,000 buckets (~24 hours) by design. Once the incoming sequence number reaches that bound, the legacy format can hold no more history, so acceptTelemetry refuses further packets and demands the recording be archived first. This protects the fixed-size legacy replay authority from overflowing.
Solutions
- Archive the legacy recording, then resume in segmented (checkpoint version 2) mode which supports rotation.
- Migrate the pet to petCheckpointVersion 2 so future telemetry uses the segmented tape log.
- Shorten the session or reset the world once sequence approaches 216,000.
Example fix
// before
world.acceptTelemetry(bucket); // throws once sequence >= 216000 in legacy mode
// after
if (Math.floor(world.tick / 12) + 1 >= 216000) { world = migrateToSegmented(world); }
world.acceptTelemetry(bucket); Defensive patterns
Strategy: try-catch
Validate before calling
function legacyTapeAlmostFull(world) {
return !world.segmented && Math.floor(world.tick / 12) + 1 >= 216000 - 1000;
} Type guard
null
Try / catch
try {
world.acceptTelemetry(bucket);
} catch (e) {
if (e.message.startsWith('Archive the legacy recording')) {
await archiveLegacyRecording(world);
world = migrateToSegmented(world);
world.acceptTelemetry(bucket);
} else throw e;
} Prevention
- Migrate legacy v1 pets to petCheckpointVersion 2 (segmented) early
- Watch the computed sequence number as sessions age
- Archive legacy recordings before they reach ~24 h of ticks
- Avoid accelerating simulation in long-lived production sessions
When it happens
Trigger: Calling world.acceptTelemetry(bucket) on a non-segmented world when the computed sequence = floor(tick/12)+1 is >= 216_000 — i.e. after ~24 hours of simulation ticks without archiving or migrating to segmented checkpoints.
Common situations: Very old sessions recorded with the v1 checkpoint format kept alive across days; hosts that never migrated to petCheckpointVersion 2; replaying an accelerated simulation that burns through sequences quickly 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 this pet recording before accepting more telemetry.
- 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/453eae991cb6e498.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/tui/pet_watch/pet-native.js:450
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 };
this.hashTape(changedFrom);
}
/** dt is bounded so suspending a surface cannot cause an unbounded catch-up. */
step(dt, opts = { motion: true, sensitivity: 1 }) {
if (!Number.isFinite(dt) || dt < 0 || dt > 10)
throw new Error('World dt must be in [0, 10] seconds.');
this.accumulator += dt;
this.voices = [];
while (this.accumulator + 1e-10 >= 1 / HZ) {
this.accumulator -= 1 / HZ;View on GitHub (pinned to 73e0f67d83)