Skip to content

feat(clara-gap1): redteam_filter — 5 adversarial detectors +250 cells (DARPA TA1) - #61

Merged
gHashTag merged 7 commits into
mainfrom
feat/clara-gap1-redteam-filter
May 16, 2026
Merged

gHashTag merged 7 commits into
mainfrom
feat/clara-gap1-redteam-filter

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

CLARA Gap-1: redteam_filter — 5 adversarial input detectors

DARPA PA-25-07-02 TA1 — Gap-1 silicon implementation

Closes the first RTL gap identified in CROWN47_DARPA_DRONE_ANALYSIS.md §3.4:

Add redteam_filter.v: 5 channels of adversarial input checking (fuel deception, action exhaustion, timeline manipulation, resource poisoning, proof trace overflow). Each channel ~50 cells. Total ~250 cells = ~0.5% utilization GAMMA.


New files

File Purpose
src/redteam_filter.v 5-channel adversarial detector, pure Verilog-2005
test/redteam_filter_tb.v 18 test cases (5 categories + boundary + multi-attack)

Detector summary

Bit Category Trigger condition Est. cells
[0] fuel_deception abs(reported_fuel minus actual_fuel) > 30 ~50
[1] action_exhaustion any action appears > 11/16 times (>70%) ~90
[2] timeline_manipulation abs(timeline_offset) > 50 ~50
[3] resource_poisoning compute_demand sign bit=1 OR > 150 ~30
[4] proof_trace_overflow proof_trace_len > 10 ~20
— filter_block OR of all above —
Total ~240 cells ~0.5% GAMMA

Top-level integration

redteam_filter instantiated in tt_um_trinity_max_true with input_echo packet fields as inputs.
filter_block routed to uio[2] (previously 1'b0) — observability only, does NOT block computation.

Spec source

Derived directly from gHashTag/trinity-clara/evidence/CLARA-RED-TEAM.md — all 5 categories, thresholds, and detection mechanisms match the spec exactly.

t27 redteam spec: No redteam.t27 found in gHashTag/t27/specs/ar/. Available specs cover composition, restraint, proof_trace etc. — none specifically cover the 5 adversarial categories. RTL written directly from CLARA-RED-TEAM.md.

Verification

  • R-SI-1: grep * src/redteam_filter.v | grep -v comments → EMPTY (clean)
  • iverilog -g2005: 18/18 tests PASS
  • Categories verified: fuel (T2/T3/T4), action (T5/T6/T7), timeline (T8/T9/T10), resource (T11/T12/T13), trace (T14/T15/T16), multi-attack (T17/T18)

Base branch

Off main at 647d25b0dbea (current GAMMA HEAD). DO NOT MERGE — awaiting CI green.


Anchor: phi squared + phi minus 2 = 3 · DOI 10.5281/zenodo.19227877

gHashTag and others added 7 commits May 16, 2026 18:21
- Fix sim/tb_canonical.v: Split 'reg stable = 1' into declaration + assignment
- Fix src/bitnet_encoder.v:
  - Replace indexed part-select x[2*i +: 2] with shift/mask approach
  - Remove size casts (10'(), 16'sd1)
  - Replace indexed part-select y_out[8*j +: 8] with case statement
  - Add newline at end of file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix src/gf16_popcount.v: Replace a_row[2*k +: 2] with shift/mask
- Fix src/gf16_popcount16.v: Replace a_row[2*k +: 2] with shift/mask
- Fix src/blake3_anchor.v: Replace m_in[32*i +: 32] with shift/mask
- Fix src/vsa_matmul_8x8.v: Replace indexed part-select with intermediate wires and case statement
- Fix src/vsa_matmul_16x16.v: Replace indexed part-select with intermediate wires and case statement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	info.yaml
#	src/tt_um_trinity_max_true.v
@gHashTag
gHashTag merged commit fc7cdb3 into main May 16, 2026
6 of 10 checks passed
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