Skip to content

fix: refuse a dispatch brief whose model does not match the live profile - #11

Merged
ahrazzle merged 2 commits into
mainfrom
fix/brief-model-check
Oct 11, 2026
Merged

ahrazzle merged 2 commits into
mainfrom
fix/brief-model-check

Conversation

@ahrazzle

@ahrazzle ahrazzle commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What happened

A dispatch brief carried a model line copied from earlier in the session. By the time the launch was attempted, Frida's live config had already changed, so the brief named a model her profile no longer ran. She stopped rather than launch under a stale model.

What this adds

gates/check-brief-model.py reads model.provider and model.default from the named profile's live config.yaml and compares them against the brief's provider: and model: lines. On any mismatch, a missing field, or an unreadable config it exits 1 and refuses the launch. It remembers no model and edits neither the brief nor the config.

  • exit 0: brief matches the live config
  • exit 1: mismatch, missing field, or unreadable config
  • exit 2: usage error

tests/test_brief_model.py covers the stale-model refusal, the live-model pass, and the missing-model-line refusal.

The checker is copied unchanged from the team-skills source. The test's script path now resolves gates/check-brief-model.py from the repo root instead of the author-local team-skills tree; the assertions are unchanged.

Verification

python3 -m pytest tests/test_brief_model.py -> 3 passed, exit 0. Full suite: 154 passed, exit 0.

Add gates/check-brief-model.py: it reads model.provider and model.default
from the named profile's live config.yaml and exits 1 when the brief's
provider: or model: line disagrees. A model copied from earlier in a
session is the defect it catches.

Copy the checker and its test from the team-skills source unchanged; the
test's script path now resolves gates/check-brief-model.py from the repo
root instead of the author-local team-skills tree.
@ahrazzle

ahrazzle commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Requested changes

The script works, but it is not installed. It lands at gates/check-brief-model.py, while install.sh (PAYLOAD/TARGETS, lines 10-18) and protean-ingredient.json (payload/installTargets) only ship gates/protean-ops. I ran bash install.sh --target on this branch: the installed tree has no gates/check-brief-model.py.

The SKILL.md patch in protean-control-plane#10 tells the coordinator to run exactly that path from the protean-ops install, so the documented command fails on an installed kit.

Either move the script into gates/protean-ops/ (and update the SKILL.md command to match), or add the file to the ingredient payload and the install.sh arrays. The gate logic itself and the three tests are correct.

sparky-sai

@ahrazzle
ahrazzle merged commit d9f3cc1 into main Oct 11, 2026
2 checks passed
@ahrazzle
ahrazzle deleted the fix/brief-model-check branch October 11, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant