Repository navigation
Conversation
Migration 0004 keeps rules that need order or grouping as
{"type": "check", "check": "unsupported", "legacy": {...}} and says
the engine reports them as INCONCLUSIVE. validate_rules rejected that
shape, so validate_agentic_metadata raised for every such revision: the
agentic evaluation ended in ERROR and the scenario could not be saved.
Skip validation for exactly that shape.
renderCustom read rule.select.kind, which the unsupported rules kept by migration 0004 do not have. render() threw on them, so no card after the rule was drawn and sync() never ran: a rule added afterwards never reached agentic_rules_json and was lost on save. Draw an unsupported rule as a read-only card with the reason and a Remove button, and leave it in the rule list unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #67; merging #67 first keeps this diff to the editor and its test.
renderCustomintemplates/partials/agentic_rules_editor.htmlreadsrule.select.kind, which theunsupportedrules kept by migration 0004 ({"type": "check", "check": "unsupported", "legacy": {...}}) do not have. With such a rule stored,render()throws a TypeError: no card after it is drawn, andsync()at the end ofrender()never runs, so a rule added with "+ Add rule" never reachesagentic_rules_jsonand is lost on save.This draws an
unsupportedrule as a read-only card: the reason, worded asrule_engine.unsupported_textwords it, the storedlegacyobject, and a Remove button. The rule stays in the list unchanged and is saved as it was.The repo has no JavaScript test harness, so the editor change was checked by hand in a browser on the rendered partial with one
unsupportedand one ordinary rule. Before the change: a TypeError in the console, no cards, and after "+ Add rule" the stored JSON still held 2 rules. After the change: no errors, both cards drawn, "+ Add rule" gives 3 stored rules with theunsupportedone unchanged, and Remove works. The new test ininfra/tests/test_rules_form.pycovers the save path the editor feeds: anunsupportedrule and an ordinary one posted together are saved unchanged.pytest -n 4 -m "not embedded_hatchet"(no API keys in the environment, the local-Ollama live test deselected) gave 1380 passed, 2 skipped on #67 and 1381 passed, 2 skipped with the change;ruff check .is clean.AI disclosure: implemented with Claude Code.