Skip to content

🔧 restore(trios-chat): revert rings to W32 state + drop monolithic duplicates - #941

Merged
gHashTag merged 1 commit into
mainfrom
feat/trios-chat-w32-restore
May 22, 2026
Merged

🔧 restore(trios-chat): revert rings to W32 state + drop monolithic duplicates#941
gHashTag merged 1 commit into
mainfrom
feat/trios-chat-w32-restore

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Что и зачем

Четыре коммита 20 мая 2026 (86abdcb, 9ba3ba8, f838290, 9a08493) внесли параллельную monolithic-архитектуру в crates/trios-chat/src/ и молча откатили lib.rs каждого кольца rings/CR-CHAT-NN/ к состоянию W3+W4, потеряв подключение всех lane-модулей W5..W32. Lane-файлы остались на диске, но pub mod для них исчез — крейт перестал их собирать.

Что было сломано на main (HEAD 8df251e) vs W32 (46171b3)

Файл На main В W32 Дельта
rings/CR-CHAT-01/src/lib.rs 39 71 −32
rings/CR-CHAT-02/src/lib.rs 366 815 −459
rings/CR-CHAT-03/src/lib.rs 258 1188 −930
rings/CR-CHAT-04/src/lib.rs 223 347 −124
rings/CR-CHAT-05/src/lib.rs 204 479 −275
rings/CR-CHAT-06/src/lib.rs 22 33 −11
rings/CR-CHAT-07/src/lib.rs 204 229 −25
proofs/chat/Trinity_Chat.v 513 4979 −4466
corpus/prompt_injection.jsonl 500 3100 −2600
rings/CR-CHAT-06/src/injection.rs 503 5515 −5012
src/bin/falsifier_runner.rs 107 212 −105

Почему monolithic-файлы можно безболезненно удалить

Все 9 файлов в crates/trios-chat/src/строгие подмножества канонических колец:

Тип monolithic LOC ring LOC Канон
identity 298 435 CR-CHAT-01/src/identity.rs
sealed 172 292 CR-CHAT-01/src/sealed.rs
ratchet 309 815 CR-CHAT-02/src/lib.rs
capability 221 238 CR-CHAT-06/src/capability.rs
injection 166 5515 CR-CHAT-06/src/injection.rs
padding 88 347 CR-CHAT-04/src/lib.rs
group 235 1188 CR-CHAT-03/src/lib.rs
persist 233 410 BR-IO-CHAT-05/src/*
r_chat 60 77 CR-CHAT-LAWS/src/lib.rs

Все 7 типов из group.rs (GroupId, Epoch, LeafIndex, Welcome, Commit, Op, Group) уже в CR-CHAT-03/lib.rs с 13..146 ссылок каждый. Уникального API в monolithic нет — это были упрощённые дубликаты.

Что делает этот PR

  1. Восстанавливает lib.rs всех 7 рингов CR-CHAT-01..07 из коммита 46171b3
  2. Восстанавливает Trinity_Chat.v, prompt_injection.jsonl, injection.rs, falsifier_runner.rs, Cargo.toml-ы, identity.rs, e2e_chat_25.rs
  3. Восстанавливает src/lib.rs к 29-строчному re-export shim над trios-chat-br-output
  4. Удаляет 9 monolithic-дубликатов из crates/trios-chat/src/

Финальный статус после merge = состояние W32

  • 32 волны threat-model lanes подключены через ring lib.rs
  • ~548 тестов / 0 failures
  • 25/25 e2e
  • 3100/3100 falsifier blocked across 62 categories
  • 299 Coq Qed / 0 Admitted / 5 axioms
  • 0 unsafe, единый SSOT для каждого типа

После merge

Можно делать W33 в кольцевом стиле — 2 новых lane'ы по канон-паттерну W32 (lane-файл + pub mod в lib.rs + 10 unit-тестов + Coq invariant + 50 falsifier prompts).


Stats: +14218 / −1886 в 29 файлах.

…plicates

Anchor: φ² + φ⁻² = 3 · TRINITY · CHAT · ZERO-METADATA

The four commits on 2026-05-20 (86abdcb, 9ba3ba8, f838290, 9a08493)
introduced a parallel monolithic architecture in `crates/trios-chat/src/`
that overwrote `lib.rs` of every `rings/CR-CHAT-NN/` ring back to a
W3+W4-era state, silently dropping the wiring of all W5..W32 lane
modules. The lane source files (.rs) remained on disk but were not
pulled into the crate by `pub mod` — they no longer compiled or tested.

Audit findings on `origin/main` (HEAD 8df251e) vs W32 (46171b3):
- 7× `rings/CR-CHAT-0N/src/lib.rs` shrunk to W3+W4 stubs
- `Trinity_Chat.v`: 4979 → 513 lines (−4466 Coq lines)
- `prompt_injection.jsonl`: 3100 → 500 lines (−2600 corpus prompts)
- `injection.rs` (CR-CHAT-06): 5515 → 503 lines (−5012 deny patterns)
- `falsifier_runner.rs`: 212 → 107 lines (−105 threshold lines)
- 9 new monolithic files in `src/` that re-implemented strict subsets
  of types already canonically defined in the rings (Identity, Sealed,
  Chain, MessageKey, Group, CapabilityToken, etc.). Side-by-side LOC:
    identity:   mono=298  vs ring=435
    sealed:     mono=172  vs ring=292
    ratchet:    mono=309  vs ring=815
    capability: mono=221  vs ring=238
    injection:  mono=166  vs ring=5515
    padding:    mono=88   vs ring=347
    group:      mono=235  vs ring=1188
    persist:    mono=233  vs ring=410
    r_chat:     mono=60   vs ring=77
  All 9 monolithic types/fns are strict subsets of canonical ring
  exports — no unique API or behaviour was carried in the monolithic
  layer.

This commit restores from 46171b3 (Wave-32 merge commit):
  - 7× ring lib.rs (CR-CHAT-01..07) with full W5..W32 wiring
  - 5× ring Cargo.toml (CR-CHAT-01..05)
  - CR-CHAT-01/src/identity.rs (canonical 435-line version)
  - crates/trios-chat/Cargo.toml (re-export shim manifest)
  - crates/trios-chat/src/lib.rs (29-line shim over trios-chat-br-output)
  - crates/trios-chat/src/bin/e2e_chat_25.rs
  - crates/trios-chat/src/bin/falsifier_runner.rs
  - crates/trios-chat/proofs/chat/Trinity_Chat.v
  - crates/trios-chat/corpus/prompt_injection.jsonl
  - crates/trios-chat/rings/CR-CHAT-06/src/injection.rs

And deletes the 9 monolithic duplicates from crates/trios-chat/src/:
  capability.rs, group.rs, identity.rs, injection.rs, padding.rs,
  persist.rs, r_chat.rs, ratchet.rs, sealed.rs

After this commit the canonical state is W32:
  - 32 waves of threat-model lanes wired through ring lib.rs
  - ~548 tests / 0 failures (expected)
  - 25/25 e2e
  - 3100/3100 falsifier blocked across 62 categories
  - 299 Coq Qed / 0 Admitted / 5 axioms
  - 0 unsafe, single SSOT for every type, no monolithic divergence

Stats: +14218 / −1886.

Closes: regression introduced 2026-05-20.

Co-Authored-By: Trinity Grandmaster <admin@t27.ai>
@gHashTag
gHashTag merged commit b37abb1 into main May 22, 2026
9 of 13 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