Repository navigation
Commit c0b5202
fix: stop silently dropping --system-prompt (B26/B30/B31/B32) and fixture metadata overrides (#68)
* fix(inspections): send the configured system prompt in single-turn probes
B26, B30, B31 and B32 build their probe message list inline as
`[ChatMessage(role="user", ...)]` and call `provider.send_message`
directly, bypassing `harness.base.send_single_turn`. That helper is what
prepends `build_system_message(config.system_prompt, config.run_nonce)`,
so for these four inspections the system prompt supplied via
`--system-prompt` never reached the model: they scored a bare model with
no deployed configuration, and the run_nonce anti-cache marker was absent.
Every other inspection routes through `send_single_turn` or
`run_conversation`, so a single run could grade some inspections with the
system prompt and others without it.
The impact is largest on B30 (malicious deployer rules) and B32
(off-topic detection): both grade refusal behaviour that a system prompt
is precisely what establishes. On a real agent, B30 measured 0.68 without
the prompt and 1.00 with it — the same model and the same seeds.
Route all four through `send_single_turn`. B26's module-level
`_INSPECTION_MESSAGE` list becomes `_INSPECTION_PROMPT`, since the
message list is now built per call.
* fix(fixtures): apply metadata overrides declared by fixture authors
`FixtureMetadata` declares three author-facing override fields —
`on_topic_examples` (B32), `b06_probes` (B06) and `case_id_prefixes`
(B31) — and the inspections read them. But `_parse_fixture` builds
`FixtureMetadata` from an explicit field list that omits all three, so
they always fell back to their `default_factory=list` empty defaults.
Setting them in a fixture had no effect.
`case_id_prefixes` was already documented in the fixture JSON schema, so
authors could set it, pass validation, and still get the built-in
ESC/INC/TKT set.
The most visible symptom is B32 on a single-tool system: it cannot derive
enough on-topic prompts from one tool and errors out with a message
telling the author to set `fixture.metadata.on_topic_examples` — which
the loader then discards.
Copy all three off the raw metadata, and document `on_topic_examples`
and `b06_probes` in the fixture schema alongside `case_id_prefixes`.
---------
Co-authored-by: Peter <as.peter@ime.life>1 parent 6717e14 commit c0b5202
6 files changed
Lines changed: 26 additions & 28 deletions
File tree
- ifixai
- core
- fixtures
- inspections
- b26_rate_limiting
- b30_malicious_deployer_rules
- b31_escalation_correctness
- b32_off_topic_detection
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
314 | 320 | | |
315 | 321 | | |
316 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 64 | + | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
| |||
135 | 132 | | |
136 | 133 | | |
137 | 134 | | |
138 | | - | |
| 135 | + | |
139 | 136 | | |
140 | 137 | | |
141 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 107 | + | |
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
305 | 304 | | |
306 | 305 | | |
307 | 306 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
| 307 | + | |
312 | 308 | | |
313 | 309 | | |
314 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
330 | 329 | | |
331 | 330 | | |
332 | 331 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 332 | + | |
337 | 333 | | |
338 | 334 | | |
339 | 335 | | |
| |||
375 | 371 | | |
376 | 372 | | |
377 | 373 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 374 | + | |
382 | 375 | | |
383 | 376 | | |
384 | 377 | | |
| |||
0 commit comments