Skip to content

feat(brain): FP-discipline triage model + no-silent-substitution safety#16

Open
venkatas wants to merge 2 commits into
mainfrom
feat/model-selection-safety-openmythos
Open

feat(brain): FP-discipline triage model + no-silent-substitution safety#16
venkatas wants to merge 2 commits into
mainfrom
feat/model-selection-safety-openmythos

Conversation

@venkatas

Copy link
Copy Markdown
Owner

Summary

2026-07-16 benchmark (73-judge FP-discipline panel over 7 local models, on a client header-sqlmap false-positive fixture) found openmythos-27b best for triage; the RavenX line invents confirmations. This wires the finding into the repo, plus the model-selection safety hardening a codex+grok review surfaced.

Triage ranking (provisional)

  • TRIAGE_MODEL_PRIORITY reordered by false-positive discipline: openmythos first, clean alternates (nemesis/devstral/glm), baron-llm demoted, uninstalled historical tags dropped.
  • ⚠️ Provisional — the fixture had 0 true-positives, so false-negatives/sensitivity were NOT measured. Narrator (MODEL_PRIORITY) and scanner lists left unchanged (triage-only evidence).

No silent model substitution (safety)

A set-but-uninstalled pin (BRAIN_MODEL/TRIAGE_MODEL/BRAIN_SCANNER_MODEL) no longer silently falls back:

  • warns loudly + records provenance (MODEL_SELECTION_LOG); raises under BRAIN_REQUIRE_PIN=1
  • honors Ollama :latest aliases; empty/unreachable inventory no longer bypasses the check
  • triage fallback can no longer select excluded/assert-biased tags (xploiter/bugtraceai/aya) — disables triage instead
  • scanner distinguishes model-not-found from a network outage; standalone brain_scanner.py honors brain.env; hunt.py propagates strict-pin failures

Docs

  • README + backlog model recommendations corrected
  • New docs/benchmarks/2026-07-16-triage-fp-discipline.md — leaderboard, caveats, re-bench validation gate, follow-ups

Test plan

  • New tests/test_brain_model_selection_safety.py (16 tests, incl. the exact review repros)
  • Full tests/ suite green (0 regressions)

Follow-ups (not in this PR)

  • True-positive re-bench — the validation gate to make the triage order non-provisional
  • Persist MODEL_SELECTION_LOG into the session/report
  • Make agent.py's ReAct selector pin-aware (strict mode currently covers brain.py + brain_scanner, not the --agent path)

🤖 Generated with Claude Code

Venkata Satish and others added 2 commits July 13, 2026 12:37
Keep the working tree clean and prevent accidental commits of:
- .friends_*/ — codex/grok/agy review output that may reference client
  names (leak-guard discipline: never commit)
- cloned external tool repos under tools/ (LinkFinder, SecretFinder,
  XSStrike, graphql-cop, nomore403) and tools/__pycache__/

Local copies are untouched; these are simply no longer tracked.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 benchmark (73-judge FP-discipline panel over 7 local models) found
openmythos-27b best for triage; the RavenX line invents confirmations. Wire the
finding into the repo, plus the model-selection safety the codex+grok review surfaced.

- brain.py: rank TRIAGE_MODEL_PRIORITY by false-positive discipline (openmythos first,
  clean alternates, baron demoted). PROVISIONAL, pending a true-positive re-bench — the
  fixture had 0 true-positives so false-negatives were not measured. Narrator/scanner
  lists unchanged (triage-only evidence).
- No silent model substitution: a set-but-uninstalled pin (BRAIN_MODEL/TRIAGE_MODEL/
  BRAIN_SCANNER_MODEL) warns loudly, records provenance (MODEL_SELECTION_LOG), and raises
  under BRAIN_REQUIRE_PIN=1. Honors :latest aliases; empty/unreachable inventory no longer
  bypasses the check; triage fallback can no longer pick excluded/assert-biased tags
  (xploiter/bugtraceai/aya) and disables triage instead; scanner distinguishes
  model-not-found from a network outage; standalone brain_scanner honors brain.env (loaded
  once at import); hunt.py propagates strict-pin failures instead of swallowing them.
- docs: README + backlog model recommendations corrected; new
  docs/benchmarks/2026-07-16-triage-fp-discipline.md (leaderboard, caveats, re-bench
  validation gate, follow-ups: provenance persistence + agent pin-awareness).
- tests: tests/test_brain_model_selection_safety.py (16, incl. the review repros).

Full tests/ suite green, 0 regressions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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