{"record":{"id":"537a854f989f23f7","repo":"Hmbown/CodeWhale","slug":"pet-checkpoint-exceeds-its-size-limit","errorCode":null,"errorMessage":"Pet checkpoint exceeds its size limit.","messagePattern":"Pet checkpoint exceeds its size limit\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/tui/pet_watch/pet-native.js","lineNumber":71,"sourceCode":"    accept(packet) { this.world.acceptTelemetry(JSON.parse(packet)); }\n    acceptLiveTail(text) {\n        const packet = this.liveTape.readTail(text);\n        if (!packet)\n            return false;\n        this.world.acceptTelemetry(packet);\n        return true;\n    }\n    resetLiveInput() { this.liveTape.reset(); return this.resumeEngine(); }\n    recording(withCheckpoint = false) { return JSON.stringify(this.world.recording(withCheckpoint)); }\n    needsSegment() { return this.world.needsSegment; }\n    prepareSegment() { this.segment = this.world.prepareSegment(); return JSON.stringify(this.segment.recording); }\n    commitSegment() { if (!this.segment)\n        throw new Error('No pet segment was prepared.'); this.segment.commit(); this.segment = undefined; }\n    checkpoint() { return JSON.stringify(this.world.checkpoint()); }\n    recordingChunk(index, completed = false) { return this.world.recordingChunk(index, completed); }\n    restoreCheckpoint(text) {\n        if (text.length > 512 * 1024)\n            throw new Error('Pet checkpoint exceeds its size limit.');\n        this.restoreRecording(JSON.stringify({ ...this.world.recording(false), checkpoint: JSON.parse(text) }));\n    }\n    restoreRecording(text) {\n        if (text.length > 8 * 1024 * 1024)\n            throw new Error('Native habitat exceeds 8 MiB.');\n        const points = this.world.sim.p.map(p => [p.hx, p.hy]);\n        this.world = pet_world_js_1.PetWorld.fromRecording(points, JSON.parse(text));\n        this.liveTape.reset();\n        this.segment = undefined;\n        this.engineTick = Math.round(this.world.frame.timeMs * 30 / 1000);\n        this.engine = new pet_engine_js_1.PetEngineTelemetry();\n    }\n    /** Resume a live host at the first unrecorded bucket. Keep every accepted\n     * interval, but never present its last observed frame as current evidence. */\n    resumeEngine() {\n        this.world.resumeObservation();\n        this.engineTick = Math.round(this.world.frame.timeMs * 30 / 1000);\n        this.engine = new pet_engine_js_1.PetEngineTelemetry();","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/tui/pet_watch/pet-native.js#L53-L89","documentation":"The `browser` tool's `navigate` action requires a non-empty string `url` — unlike `start`, navigation has no default destination. Missing, null, non-string, or whitespace-only url values throw this error.","triggerScenarios":"resolveTool(\"browser\", {action:\"navigate\"}) with no url, url: undefined/null, url: 123, or url: \"   \" (blank after trim).","commonSituations":"A model forgetting the url field when it intends 'go back to the site'; url interpolated from an undefined variable producing undefined; copying the start-action shape (where url is optional) for navigate; trailing-whitespace url from a template.","solutions":["Provide a non-empty string url, e.g. {action:\"navigate\", url:\"https://example.com\"}.","Trim-check the value at the call site: if (!url || !url.trim()) skip the call or fix the source.","If the intent was 'open the default page', use action \"start\" instead of \"navigate\"."],"exampleFix":"// before\nresolveTool(\"browser\", { action: \"navigate\" });\n// after\nresolveTool(\"browser\", { action: \"navigate\", url: \"https://example.com\" });","handlingStrategy":"validation","validationCode":"if (typeof url !== \"string\" || !url.trim()) {\n  throw new Error(\"navigate requires a non-empty url string\");\n}","typeGuard":"const isNavigableUrl = (u) => typeof u === \"string\" && u.trim().length > 0;","tryCatchPattern":null,"preventionTips":["Remember navigate has no default destination — unlike start, url is required.","Interpolate urls with defaults: url ?? lastKnownUrl, and trim before calling.","Use start for opening the browser, navigate only with an explicit destination."],"tags":["argument-validation","missing-argument","browser-automation"],"backgroundTag":"missing-required-argument","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}