{"record":{"id":"9a979bd93fb67a84","repo":"zeroclaw-labs/zeroclaw","slug":"purge-session-for-agent-not-supported-by-this-memo","errorCode":null,"errorMessage":"purge_session_for_agent not supported by this memory backend","messagePattern":"purge_session_for_agent not supported by this memory backend","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-api/src/memory_traits.rs","lineNumber":341,"sourceCode":"\n    /// Remove all memories in a session.\n    /// Returns the number of deleted entries.\n    /// Default: returns unsupported error. Backends that support bulk deletion override this.\n    async fn purge_session(&self, _session_id: &str) -> anyhow::Result<usize> {\n        anyhow::bail!(\"purge_session not supported by this memory backend\")\n    }\n\n    /// Remove all memories in a session for one agent.\n    /// Returns the number of deleted entries.\n    /// Default: returns unsupported error. Backends with per-agent storage\n    /// override this; agent-scoped wrappers use it instead of composing a\n    /// session list with key-only deletes.\n    async fn purge_session_for_agent(\n        &self,\n        _session_id: &str,\n        _agent_id: &str,\n    ) -> anyhow::Result<usize> {\n        anyhow::bail!(\"purge_session_for_agent not supported by this memory backend\")\n    }\n\n    /// Remove every memory row attributed to the given agent alias.\n    /// Returns the number of deleted entries. Called when an agent alias is\n    /// removed from `[agents.<alias>]` so the database doesn't accumulate\n    /// rows for retired aliases.\n    /// Default: returns unsupported error. Backends with per-agent storage\n    /// (sqlite, postgres) override this; backends without (markdown, none)\n    /// keep the default and the caller logs a warning.\n    async fn purge_agent(&self, _agent_alias: &str) -> anyhow::Result<usize> {\n        anyhow::bail!(\"purge_agent not supported by this memory backend\")\n    }\n\n    /// Export every memory row attributed to `agent_alias`, for the agent-\n    /// deletion archive (export-then-delete,). Pairs with\n    /// [`Self::purge_agent`]: the surface exports these rows to the archive,\n    /// then purges. Default: empty (backends without per-agent export).\n    async fn export_agent(&self, _agent_alias: &str) -> anyhow::Result<Vec<MemoryEntry>> {","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-api/src/memory_traits.rs#L323-L359","documentation":"expected_sha256_for_asset (src/commands/update.rs:557) parses SHA256SUMS lines in the coreutils format `<64-hex-digest> <filename>` (with an optional `*` binary-mode marker on the name). This bail fires when the line matching the asset is malformed: either there are extra tokens after the filename (parts.next().is_some()), or the digest is not exactly 64 ASCII hex characters (is_sha256_hex). It is a validation failure of the published checksum file itself — the download's integrity was never assessed. Distinct from the neighboring \"asset not found in SHA256SUMS\" bail for a missing entry.","triggerScenarios":"`zeroclaw update` on a release whose SHA256SUMS contains a non-conforming line for the platform asset: an extra column after the filename, a BLAKE2/SHA-512 digest, or a truncated hash. Any generator other than coreutils `sha256sum` (or hand-edited files) can produce such lines.","commonSituations":"CI generating checksums with the wrong tool (b2sum, shasum -a 512) or appending build metadata columns; a hand-edited SHA256SUMS during a hotfix re-upload; release tooling that writes `digest file extra` rows.","solutions":["Fetch the SHA256SUMS from the release page and inspect the line for your asset — confirm it has exactly two whitespace-separated fields and a 64-char hex digest","If you maintain the release: regenerate with coreutils `sha256sum <asset> > SHA256SUMS` in the directory holding the assets and re-upload","If you are a consumer: the release packaging is broken — report it and update to a fixed release; manually verifying the hash is fine for triage but the updater will keep rejecting this release","Pin to the previous known-good release with `zeroclaw update --version <good-tag>` in the meantime"],"exampleFix":"# before (published SHA256SUMS — malformed line)\n9f2ac...e3 zeroclaw-x86_64-unknown-linux-gnu.tar.gz built-by-ci\n\n# after (maintainer fix: regenerate in coreutils format)\n$ cd release-assets/\n$ sha256sum zeroclaw-x86_64-unknown-linux-gnu.tar.gz > SHA256SUMS\n$ cat SHA256SUMS\n9f2ac...e3  zeroclaw-x86_64-unknown-linux-gnu.tar.gz","handlingStrategy":"validation","validationCode":"// Pre-parse the sums file exactly like expected_sha256_for_asset before\n// starting an update, so a malformed release fails fast with context.\nfn sums_entry_valid(sums_text: &str, asset_name: &str) -> bool {\n    sums_text.lines().any(|line| {\n        let mut parts = line.split_whitespace();\n        let (Some(digest), Some(name)) = (parts.next(), parts.next()) else {\n            return false;\n        };\n        parts.next().is_none()\n            && name.trim_start_matches('*') == asset_name\n            && digest.len() == 64\n            && digest.bytes().all(|b| b.is_ascii_hexdigit())\n    })\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = update::run(version, force).await {\n    if e.to_string().contains(\"invalid SHA256SUMS entry\") {\n        // Packaging bug in the release, not a network problem:\n        // do NOT retry. Pin a known-good --version and report the\n        // malformed checksum file to the maintainers.\n    }\n}","preventionTips":["Maintainers: generate SHA256SUMS with coreutils `sha256sum <asset> > SHA256SUMS` in CI — exactly two whitespace-separated fields, 64-char hex digest","Add a release CI check that validates the published SHA256SUMS format against the parser before publishing","Consumers: pin to the previous known-good release when a malformed checksum file ships"],"tags":["checksum","sha256sums","parsing","release-packaging","update"],"backgroundTag":"malformed-checksum-file","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}