Commit b9f638e
J.A.R.V.I.S.
feat: v2.94 principal_diversity_defense — colluding-pair penalty in bilateral IR
Core implementation:
- _principal_diversity_score(peer_id): concentration_threshold=0.60,
penalty_weight=0.10, min_records=3 (aeoess adversarial-trust-fixture.json)
- effective_bilateral_count = normal_count + excess * 0.10 when top
counterparty ratio > 60%
- _bilateral_ir_adj() → 4-tuple (adj, count, merkle, diversity_dict);
effective_count used in tier threshold instead of raw count
New endpoint:
- GET /trust/bilateral-ir/diversity?peer_id=<did>
- 400: missing peer_id
- 404: unknown peer
- 200: concentration_ratio, penalty_applied, diversity_weight,
effective_bilateral_count, defense_params, version
Test helper:
- POST /trust/bilateral-ir/inject (seeds bilateral IR records in tests)
AgentCard:
- capabilities.principal_diversity_defense: true
- endpoints.bilateral_ir_diversity: /trust/bilateral-ir/diversity
Tests: PD01-PD16, 16/16 PASS
Regression: governance_metadata(16) + hybrid_identity(6) + adversarial_fixtures(7) = 29/29 PASS
VERSION: 2.93.0 → 2.94.0
Addresses A2A #1718 aeoess adversarial-trust-fixture gist:bdcd1dd0512661138ff7a71bf1e946c71 parent 8253453 commit b9f638e
3 files changed
Lines changed: 734 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
10 | 44 | | |
11 | 45 | | |
12 | 46 | | |
| |||
0 commit comments