{ "description": "Shared accept/reject fixtures for the control-plane validators the dashboard hand-mirrors in ui/src/settings/validation.ts. The control plane is the authority: every case's `valid` is what internal/infrastructure/controlplanestore accepts or refuses. The Go test in this package runs the real server validators over these cases; the node test ui/test/control-plane-validator-parity.test.ts runs the real dashboard validators over the same cases. A one-sided change to either rule makes one of the two tests fail, which is the tie that stops the two implementations drifting apart (archie-core-ui-dashboard-3). Add a case here, never only to one side.", "cases": { "model-aliases": [ { "why": "a plain provider/model value", "value": { "default": "openai/gpt-4o" }, "valid": true }, { "why": "a trailing space: the server only splits on the slash, so the dashboard must not refuse it", "value": { "default": "openai/gpt-4o " }, "valid": true }, { "why": "a model id with a colon (a real ollama tag), which a stricter shape would wrongly refuse", "value": { "default": "openai/gpt-4o", "fast": "ollama/qwen2.5-coder:7b" }, "valid": true }, { "why": "an empty table: nothing configured yet", "value": {}, "valid": true }, { "why": "no slash at all", "value": { "default": "gpt-4o" }, "valid": false }, { "why": "an empty model half", "value": { "default": "openai/" }, "valid": false }, { "why": "an empty model: the server refuses it, so the dashboard must too (SystemModelsPage deletes the key rather than storing one)", "value": { "default": "" }, "valid": false }, { "why": "aliases without the default alias: an org's own table inherits the instance default, so only the instance save requires it", "value": { "fast": "openai/gpt-4o" }, "valid": true }, { "why": "an alias name with capitals or spaces", "value": { "default": "openai/gpt-4o", "Fast model": "openai/gpt-4o" }, "valid": false } ], "scheduling-policy": [ { "why": "a positive interval, a valid trigger and the label the trigger needs", "value": { "poll_interval": "1m0s", "max_retries": 0, "label": "archie", "dispatch": { "trigger": "assignee" } }, "valid": true }, { "why": "assignee does not require a label", "value": { "poll_interval": "30s", "max_retries": 3, "dispatch": { "trigger": "assignee" } }, "valid": true }, { "why": "either requires a label, and one is present", "value": { "poll_interval": "1h30m", "label": "archie", "dispatch": { "trigger": "either" } }, "valid": true }, { "why": "a fractional duration the server's parser accepts", "value": { "poll_interval": "1.5h", "dispatch": { "trigger": "assignee" } }, "valid": true }, { "why": "a zero interval", "value": { "poll_interval": "0s", "label": "archie", "dispatch": { "trigger": "assignee" } }, "valid": false }, { "why": "an interval the server's parser cannot read", "value": { "poll_interval": "nonsense", "label": "archie", "dispatch": { "trigger": "assignee" } }, "valid": false }, { "why": "the label trigger with no label", "value": { "poll_interval": "30s", "max_retries": 3, "dispatch": { "trigger": "label" } }, "valid": false }, { "why": "the either trigger with an empty label", "value": { "poll_interval": "30s", "max_retries": 0, "label": "", "dispatch": { "trigger": "either" } }, "valid": false } ] } }