Skip to content

Refactor and update AGENTS.md, remove stale dependencies and improve documentation#7

Merged
metaphorics merged 22 commits into
mainfrom
docs/inits-agents-md
May 18, 2026
Merged

Refactor and update AGENTS.md, remove stale dependencies and improve documentation#7
metaphorics merged 22 commits into
mainfrom
docs/inits-agents-md

Conversation

@metaphorics
Copy link
Copy Markdown
Contributor

No description provided.

- Correct stale design-decision pointers (§11 → architecture.md + threat-model.md:112 + plan/init.md:13)
- Expand Commands/Strict regime with precise just ci expansion, full deny list, CONTRIBUTING review axes (Correctness > Hygiene > Footprint)
- Update Phase-2 pitfalls + add heavy pre-commit policy bullet (prek, fail-early rationale) + docs-drift warning (protocol.md / tasks.md / PLAN.md are known-stale)
- Add Cross-cutting invariants block: data/control plane split, key-custody + forwarder visibility, R-3 per-position + per-poll audit + region isolation, historical pivot record
- Add 4 high-value "Where to look first" entries (deny.toml supply-chain, release-plz/dist/cliff, .taplo/.editorconfig/.cargo net, .pre-commit-config.yaml prek surface)

Op: correct | extend

Grounded in two explore subagents (root-configs + docs) + full verification (bat, git diff, xtask --check, typos, cargo fmt). One logical concern: restore accuracy and minimality of the AGENTS.md primer after Phase-1 evolution.

Plan: /home/alpha/.grok/sessions/%2Fhome%2Falpha%2Ftoys%2FBiBEAM/019e3597-e253-7d50-8666-567037667d14/plan.md
Session: 019e3597-e253-7d50-8666-567037667d14
…an/init.md)

PLAN.md at repo root was an untracked verbatim copy of docs/plan/init.md
(the canonical as-built Phase-1 record). All pre-D-4 / pre-R-1 design
decisions it contained are superseded by architecture.md, threat-model.md,
and plan/init.md. Git history preserves the old text; the duplicate only
created reader confusion.

Op: compress
Lines 34, 38, 44, 45, 50, 55, 108, 172 contained QUIC / Noise IK /
Noise-sealed framing that predates D-4 (WireGuard wire-compat via
boringtun). All eight references are updated to the post-D-4
terminology while preserving the exact threat-model structure and
adversary analysis.

Op: correct
Restores: docs/architecture.md:54 data-plane invariant
…iles

Eight micro-edits across seven files replace stale QUIC/Noise IK
terminology with post-D-4 WireGuard equivalents and remove brittle
in-source links to docs/plan/tasks.md:

- bibeam-tun/inbound.rs:12  QUIC datagram → WireGuard-encapsulated UDP packet
- bibeam-core/error.rs:25   transport-layer failure (QUIC, TCP, UDP, ...) → (WireGuard/UDP, TCP)
- bibeam-protocol/frame.rs:14  Noise-sealed IP datagram → WG-sealed IP datagram
- bibeam-protocol/tunnel.rs:4,24  Noise-sealed IP packet/frame → WG-sealed
- bibeam-protocol/tests/codec_adversarial.rs:100  QUIC MTU domain → WireGuard MTU domain
- bibeam-tun/backpressure.rs:30  drop F-TUN.8 tasks.md reference
- bibeam-tun/outbound.rs:28  drop F-TUN.8 tasks.md reference

Op: correct
Restores: docs/architecture.md:54 data-plane invariant
…res, quinn-proto) + update keywords

Four workspace dependencies that were only referenced by pre-D-4
Noise/QUIC code paths (snow for Noise IK, quinn-proto for Quinn
internals, serde_with for unused serde adapters, futures for
futures-util only) are removed. The single remaining futures-util
entry is kept because it is still imported.

Keywords updated from the old ["vpn", "p2p", "quic", "noise", "privacy"]
to the post-D-4 set ["vpn", "p2p", "wireguard", "anonymity", "privacy"].

cargo machete and cargo check --workspace --all-targets --all-features
both pass after the removal.

Op: compress
Zero references to clap, anyhow, or tower-http exist inside
crates/bibeam-runtime/src/**/*.rs (confirmed by grep). The three
dependency declarations and the stale entries in the cargo-machete
ignore list are removed.

cargo machete and cargo check -p bibeam-runtime --all-targets both
pass after the removal.

Op: compress
… unreachable_pub covers)

All 31 `#[allow(clippy::redundant_pub_crate)]` blocks in the tree cite
the same rustc-vs-clippy conflict. The workspace already sets
`unreachable_pub = "warn"` under `[workspace.lints.rust]`, which
enforces the load-bearing constraint. Adding the clippy carve-out at
workspace level removes 31 ceremony annotations in the next commit
without weakening any invariant.

`cargo clippy --workspace --all-targets --all-features -- -D warnings`
remains clean after this change.

Op: compress
…cks made redundant by lint loosening

Op: compress
…eam-core (fix crypto→protocol layering inversion)

Op: correct
Restores: docs/architecture.md layering `core → protocol|crypto|...`
…cohort_ws::CohortHandler (planned consolidation)

The duplicate sync trait defined in rotation_handler.rs as a
"provisional forward declaration" pending F-NODE.5 is removed.
RotationHandler::on_rotated is now a public inherent method.
Call sites and tests updated to use the inherent method and the
canonical async cohort_ws::CohortHandler trait.

This pre-empts the consolidation explicitly documented in the
module docs of rotation_handler.rs.

Op: compress
…igError into shared rate_limit::RateLimitConfigError

Op: compress
…_now into single lease_deadline_now

Op: compress
…Error impl

Delete the impl block at `crates/bibeam-node/src/exit_mode.rs:109-116`.
Zero non-test callers existed; the removal is pure dead-code hygiene.

Op: compress
…ony Default derive on SoleLeaderLease

Op: compress
…ant empty-payload roundtrip (M3/M1)

Op: compress
@metaphorics metaphorics merged commit c59355e into main May 18, 2026
10 of 11 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