{"record":{"id":"5d2b9bfb8a7a2cec","repo":"NousResearch/hermes-agent","slug":"job-id-must-be-non-empty","errorCode":null,"errorMessage":"job_id must be non-empty","messagePattern":"job_id must be non-empty","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"cron/notepad.py","lineNumber":83,"sourceCode":"    \"\"\"Open a connection, commit/rollback on exit, always close.\n\n    Mirrors ``cron.executions._transaction``: schema init runs inside the\n    ``try`` so a PRAGMA/DDL failure still closes the connection instead of\n    leaking it.\n    \"\"\"\n    with _lock:\n        conn = _connect()\n        try:\n            _initialize_schema(conn)\n            with conn:\n                yield conn\n        finally:\n            conn.close()\n\n\ndef _validate(job_id: str, key: str, value: str) -> None:\n    if not str(job_id):\n        raise ValueError(\"job_id must be non-empty\")\n    if not key:\n        raise ValueError(\"key must be non-empty\")\n    if len(key) > MAX_KEY_CHARS:\n        raise ValueError(f\"key too long (max {MAX_KEY_CHARS} characters)\")\n    if len(value.encode(\"utf-8\")) > MAX_VALUE_BYTES:\n        raise ValueError(\n            f\"value too large (max {MAX_VALUE_BYTES} bytes per key)\"\n        )\n\n\ndef set_note(job_id: str, key: str, value: str) -> Dict[str, Any]:\n    \"\"\"Upsert one key. Raises ValueError when a size cap would be exceeded.\"\"\"\n    job_id, key, value = str(job_id), str(key), str(value)\n    _validate(job_id, key, value)\n    now = _hermes_now().isoformat()\n    with _transaction() as conn:\n        row = conn.execute(\n            \"\"\"SELECT COALESCE(SUM(LENGTH(CAST(key AS BLOB))","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/cron/notepad.py#L65-L101","documentation":"Error \"job_id must be non-empty\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at cron/notepad.py:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty job_id for the notepad operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}