Commit a74cf2a
Attack-vector market: parallel specialists pick structurally different angles each round
Two specialists of the same role kind now coordinate via a 2-step protocol
at the start of every specialist round, so they pursue genuinely different
attack vectors instead of producing near-duplicates.
Phase 1 (intent, parallel): each specialist emits a 1-shot JSON proposal
naming the angle it plans to take, with confidence and a list of vectors
it would pivot to. Phase 2 (referee, single call): the Director sees all
intents in one frame and reconciles overlaps, asking specialists to pivot
based on their own would_pivot_if list. Falls back gracefully (each
specialist gets first choice) when either phase fails.
Why this design: Anthropic's "Building effective agents" reports the
biggest multi-agent gains come from sectioning (different attack vectors)
rather than voting (same task, different samples). Wang et al.'s
self-consistency requires a votable answer, useless for free-form
derivations. Du et al.'s debate works but converges via sycophantic mode
collapse on long horizons. Method-specialization with a referee threads
the needle.
Implementation:
- src/halfseed/agents/attack_market.py — AttackIntent / AttackAssignment
/ AttackMarketResult types + collect_intents + referee_intents
primitives, completely architecture-agnostic.
- _run_specialist_round now returns (artifacts, market_result | None).
Market only fires when ≥2 enabled specialists share a role kind. Each
specialist's task prompt gets the assigned vector injected verbatim.
After every market round, _append_attack_market_note appends a HALFSEED-
NOTE block to paper.tex so a human reading source can audit which
vectors got assigned and why.
- New SSE event "attack_market_done" carrying {round, assigned, fell_back}.
- Validator surfaces "parallel_specialists_engaged" as INFO (not warn) so
users see ≥2 same-kind specialists is supported, not a misconfiguration.
- paper.tex.j2: removed the legacy "Result 1, Result 2..." artifact-dump
fallback path and the Supporting Artifacts appendix. Sections now emit
a single \halfseedTODO[derive|data] placeholder when no Writer prose
exists, so missing content surfaces as a TODO instead of a bookkeeping
log. Old artifact data still available via the SQLite store and API.
- 14 new tests in tests/test_attack_market.py covering intent/referee/
fallback/result rendering + 2 integration tests with a scripted backend
driving the full _run_specialist_round path.
Verified live on heavyoperatorstatistics iter-7: 2 rounds, 4 specialists,
8 intent calls + 2 referee calls. Round 1 assigned distinct vectors
(perturbation expansion / RMT prediction / literature survey / ED
sampling); Round 2 EVOLVED them based on the round-1 output (saddle-point
/ replica trick). max_confidence rose from ~0.8 in earlier iterations to
0.95. Two HALFSEED-NOTE blocks landed in paper.tex with the full
attack-vector log.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 00ae245 commit a74cf2a
8 files changed
Lines changed: 1260 additions & 107 deletions
File tree
- frontend/src/api
- src/halfseed
- agents
- publish/templates
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
174 | 199 | | |
175 | 200 | | |
176 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 223 | + | |
| 224 | + | |
227 | 225 | | |
228 | 226 | | |
229 | 227 | | |
230 | 228 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 229 | + | |
| 230 | + | |
244 | 231 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | 232 | | |
255 | 233 | | |
256 | 234 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 235 | + | |
| 236 | + | |
268 | 237 | | |
269 | 238 | | |
270 | 239 | | |
| |||
285 | 254 | | |
286 | 255 | | |
287 | 256 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 257 | + | |
| 258 | + | |
296 | 259 | | |
297 | 260 | | |
298 | 261 | | |
299 | 262 | | |
300 | | - | |
| 263 | + | |
| 264 | + | |
301 | 265 | | |
302 | 266 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | 267 | | |
315 | 268 | | |
316 | 269 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | 270 | | |
345 | 271 | | |
346 | 272 | | |
| |||
0 commit comments