{"record":{"id":"452e17afff134a03","repo":"NousResearch/hermes-agent","slug":"invalid-interval-iv-r-minutes-as-a-positive-in","errorCode":null,"errorMessage":"invalid interval {iv!r} — minutes as a positive integer","messagePattern":"invalid interval (.+?) — minutes as a positive integer","errorType":"validation","errorClass":"BlueprintFillError","httpStatus":null,"severity":"warning","filePath":"cron/blueprint_catalog.py","lineNumber":731,"sourceCode":"            preset = str(values.get(\"recurrence\", \"everyday\")).lower()\n            if preset not in WEEKDAY_PRESETS:\n                raise BlueprintFillError(\n                    f\"unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PRESETS)}\"\n                )\n            repl[\"dow\"] = WEEKDAY_PRESETS[preset]\n        elif \"day\" in values:\n            day = str(values.get(\"day\", \"\")).lower()\n            if day not in _DAY_TO_DOW:\n                raise BlueprintFillError(f\"unknown day {day!r}\")\n            repl[\"dow\"] = _DAY_TO_DOW[day]\n        else:\n            repl[\"dow\"] = \"*\"\n\n    # interval (minutes) for */N schedules\n    if \"{interval_min}\" in sched:\n        iv = str(values.get(\"interval_min\", \"\")).strip()\n        if not iv.isdigit() or int(iv) <= 0:\n            raise BlueprintFillError(f\"invalid interval {iv!r} — minutes as a positive integer\")\n        repl[\"interval_min\"] = iv\n\n    # Any remaining {slot} placeholders are filled verbatim from validated\n    # enum/text slot values (e.g. an hour-range window). Enum options have\n    # already been checked in fill_blueprint, so these are safe to interpolate.\n    for name in re.findall(r\"\\{(\\w+)\\}\", sched):\n        if name not in repl and name in values:\n            repl[name] = str(values[name])\n\n    try:\n        return sched.format(**repl)\n    except KeyError as e:  # pragma: no cover - template/slot mismatch is a dev error\n        raise BlueprintFillError(f\"schedule template missing value for {e}\") from e\n\n\ndef fill_blueprint(\n    blueprint: AutomationBlueprint,\n    values: Dict[str, Any],","sourceCodeStart":713,"sourceCodeEnd":749,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/cron/blueprint_catalog.py#L713-L749","documentation":"BlueprintFillError: the schedule template contains {interval_min} (an */N every-N-minutes schedule) but the supplied interval_min value is not a string of digits, or is <= 0. Values like '15m', '0', '-5', '1.5', or '' are rejected — the unit is implicitly minutes and only a positive integer is accepted.","triggerScenarios":"fill_blueprint on an interval template with interval_min='30m', interval_min='0', or interval_min omitted-but-defaulted-to-empty (note: an empty value fails the isdigit check rather than raising the 'required' error).","commonSituations":"Users appending units ('every 15m'); agent passing an int 30 without str() is fine, but 1.5 floats or empty strings from unfilled form fields fail.","solutions":["Pass a bare positive integer as the minute count: '15' for every 15 minutes","Strip any unit suffix before submitting; validate with value.isdigit() and int(value) > 0"],"exampleFix":"# before\nfill_blueprint(bp, {\"interval_min\": \"30m\"})\n# BlueprintFillError: invalid interval '30m' — minutes as a positive integer\n\n# after\nfill_blueprint(bp, {\"interval_min\": \"30\"})","handlingStrategy":"validation","validationCode":"def valid_interval(v) -> bool:\n    s = str(v).strip()\n    return s.isdigit() and int(s) > 0","typeGuard":null,"tryCatchPattern":"try:\n    spec = fill_blueprint(bp, values)\nexcept BlueprintFillError as e:\n    if str(e).startswith(\"invalid interval\"):\n        values[\"interval_min\"] = strip_unit(values[\"interval_min\"])  # '30m' -> '30'\n        spec = fill_blueprint(bp, values)\n    else:\n        raise","preventionTips":["Submit bare minute counts — no 'm' suffix, no decimals, no zero","Strip units from user input before passing to fill_blueprint","Treat an empty interval as a missing required field and re-ask"],"tags":["cron","blueprint","validation","interval"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}