Initial import: ICE-NET research docs and Rust workspace (v0.4)
Some checks failed
rust-ci / checks (push) Has been cancelled

- Rust workspace: 7 library crates, icenetd CLI, icenet-city (Slint GUI)
- Sim: fix false Delivered after a route cut, derive traffic class from
  payload size, per-link airtime slots (link capacity, queueing)
- Docs: single docs/STATUS.md for all figures, remove v0.2/egui leftovers,
  drop unimplemented seed claims, uncheck store-and-forward
- License: LGPL-3.0-or-later (LICENSE, LICENSES/GPL-3.0.txt)
This commit is contained in:
Loki 2026-11-13 12:28:48 +01:00
commit 2e61688eb3
Signed by: boba
GPG key ID: 6CDE87BC9A778D97
141 changed files with 13993 additions and 0 deletions

42
docs/guides/testing.md Normal file
View file

@ -0,0 +1,42 @@
# Tests / CI
В Rust тесты лежат **только** в отдельной папке каждого крейта:
`crates/<name>/tests/*.rs` и `apps/<name>/tests/*.rs`. Inline `#[cfg(test)]` в `src` запрещён.
```bash
cd workspace
python3 tools/check_layout.py
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo doc --workspace --no-deps
```
## Пирамида
1. `core`: классы и логические ID.
2. `wire`: roundtrip + отказ на malformed frame / oversize.
3. `routing`: slow-only route for Text / forbidden for Bulk / oversized Text treated as Bulk / link-down.
4. `guard`: deny unknown service, cap payload, no fake authentication.
5. `sim`: node failure, in-flight state, queued retry, no false `Delivered` after a cut, link capacity (`tests/capacity/`).
6. `city`: GUI smoke test вручную (позднее snapshot/interaction integration tests).
## Приёмка
- Все новые тесты воспроизводимы без сети/радио.
- Каждый алгоритм не нуждается в реальном `sleep`; используется sim clock.
- При дефекте добавить regression test отдельно от production module.
- Маркеры `TODO`/`unimplemented!()` не прятать в ветки реальных пакетов.
Что проверено и сколько тестов проходит — в [STATUS](../STATUS.md).
## Быстрые и полные проверки
```bash
cd workspace
sh tools/check_all.sh # core routing/simulator, без Slint-сборки
sh tools/check_all.sh --full # также Slint GUI и все integration tests
```
`cargo fmt --all` форматирует в том числе GUI crate; `.slint` не проверяется
`rustfmt` и проверяется компилятором Slint в `build.rs`.