{"record":{"id":"4092cc653b9e0608","repo":"NousResearch/hermes-agent","slug":"unknown-slot-s-if-len-unknown-1-else","errorCode":null,"errorMessage":"unknown slot{'s' if len(unknown) > 1 else ''}: {', '.join(unknown)} — valid: {', '.join(s.name for s in blueprint.slots)}","messagePattern":"unknown slot(.+?): (.+?) — valid: (.+?)","errorType":"validation","errorClass":"BlueprintFillError","httpStatus":null,"severity":"warning","filePath":"cron/blueprint_catalog.py","lineNumber":764,"sourceCode":"\ndef fill_blueprint(\n    blueprint: AutomationBlueprint,\n    values: Dict[str, Any],\n    *,\n    origin: Optional[Dict[str, Any]] = None,\n) -> Dict[str, Any]:\n    \"\"\"Validate ``values`` and return ``cron.jobs.create_job`` kwargs.\n\n    Missing required (non-optional) slots raise BlueprintFillError naming the\n    slot, so a form can show field errors and the agent knows what to ask.\n    Unknown slot names are rejected (a typo'd ``tiem=07:15`` must not silently\n    create a job with the default time). Enum values are checked against their\n    options. The result is passed straight to ``create_job`` — no second schema.\n    \"\"\"\n    known = {s.name for s in blueprint.slots}\n    unknown = sorted(set(values) - known)\n    if unknown:\n        raise BlueprintFillError(\n            f\"unknown slot{'s' if len(unknown) > 1 else ''}: \"\n            f\"{', '.join(unknown)} — valid: {', '.join(s.name for s in blueprint.slots)}\"\n        )\n    resolved: Dict[str, Any] = {}\n    for s in blueprint.slots:\n        raw = values.get(s.name, s.default)\n        if raw in (None, \"\"):\n            if s.optional:\n                continue\n            raise BlueprintFillError(f\"missing required value: {s.name} ({s.label})\")\n        if s.type == \"enum\" and s.strict and s.options and str(raw) not in {str(o) for o in s.options}:\n            raise BlueprintFillError(\n                f\"{s.name}={raw!r} not allowed — one of {', '.join(map(str, s.options))}\"\n            )\n        resolved[s.name] = raw\n\n    schedule = _resolve_schedule(blueprint, resolved)\n","sourceCodeStart":746,"sourceCodeEnd":782,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/cron/blueprint_catalog.py#L746-L782","documentation":"BlueprintFillError from fill_blueprint: the values dict contains keys that are not slot names defined on the blueprint. Unknown keys are rejected on purpose — the docstring calls out that a typo'd tiem=07:15 must not silently create a job at the default time. The message enumerates the valid slot names.","triggerScenarios":"fill_blueprint(bp, {'tiem': '07:15', 'day': 'monday'}) — 'tiem' is not in {s.name for s in bp.slots}, so it raises before any other validation runs.","commonSituations":"Typos in slot names; passing schedule-construction keywords (like 'hour'/'minute') directly instead of the slot 'time'; stale caller code after a blueprint renamed its slots.","solutions":["Read the valid names listed in the error and re-submit with only those keys","Inspect blueprint.slots ([s.name for s in bp.slots]) before building the values dict","For schedule overrides use the reserved 'schedule' key, not cron field names"],"exampleFix":"# before\nfill_blueprint(bp, {\"tiem\": \"07:15\"})\n# BlueprintFillError: unknown slot: tiem — valid: time, day, deliver\n\n# after\nfill_blueprint(bp, {\"time\": \"07:15\"})","handlingStrategy":"type-guard","validationCode":"def only_known_slots(bp, values: dict) -> dict:\n    known = {s.name for s in bp.slots} | {\"schedule\"}\n    unknown = set(values) - known\n    if unknown:\n        raise KeyError(f\"typo? {sorted(unknown)}; valid: {sorted(known)}\")\n    return values","typeGuard":"from cron.blueprint_catalog import Blueprint\n\ndef is_valid_slot_map(bp: Blueprint, values: dict) -> bool:\n    known = {s.name for s in bp.slots}\n    return set(values) <= known","tryCatchPattern":"from cron.blueprint_catalog import BlueprintFillError\n\ntry:\n    spec = fill_blueprint(bp, values)\nexcept BlueprintFillError as e:\n    if str(e).startswith(\"unknown slot\"):\n        raise ValueError(f\"Fix slot names: {e}\") from e\n    raise","preventionTips":["Build the values dict from blueprint.slots metadata, not hand-typed keys","Unit-test blueprint callers against the current slot names so renames surface early","Never pass cron field names (hour/minute) — use the `time` slot or `schedule`"],"tags":["cron","blueprint","validation","typo"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}