feat: crate-init — module skeleton (params, wire, producer, consumer, error)
- src/{params,wire,producer,consumer,error}.rs skeletons with module
docs per overview.md §Module Map; lib.rs crate docs + re-exports
- constants in params.rs (OP_TUNNEL_OPEN, TUNNEL_ALPN,
TUNNEL_OPEN_SCOPE) + establishment_reason helper (delegates to
alkcall 0.7.0's ChannelOpenError::establishment_reason)
- MAX_DATAGRAM_LEN (65535) in wire.rs (ADR-003's frame-time bound)
- async-trait dropped: skeleton confirms no trait (ADR-004)
Verified: cargo check, clippy --all-targets -D warnings (native +
wasm32), fmt --check, test, wasm32 check — all clean
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
id: tunnels/crate-init
|
||||
name: Initialize the alktunnels module skeleton (params, wire, producer, consumer, error)
|
||||
status: pending
|
||||
status: completed
|
||||
depends_on: [architecture/oq-promotion-sync]
|
||||
scope: narrow
|
||||
risk: low
|
||||
@@ -67,14 +67,14 @@ pub mod consumer;
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] `src/lib.rs` declares `error`, `params`, `wire`, `producer`,
|
||||
- [x] `src/lib.rs` declares `error`, `params`, `wire`, `producer`,
|
||||
`consumer` with doc comments; public API re-exports listed (empty
|
||||
bodies fine)
|
||||
- [ ] Every skeleton module compiles (`cargo check` clean)
|
||||
- [ ] `cargo clippy --all-targets -- -D warnings` clean
|
||||
- [ ] `cargo fmt --check` clean
|
||||
- [ ] `cargo check --target wasm32-unknown-unknown` passes
|
||||
- [ ] No comments in code beyond doc comments (convention 1)
|
||||
- [x] Every skeleton module compiles (`cargo check` clean)
|
||||
- [x] `cargo clippy --all-targets -- -D warnings` clean
|
||||
- [x] `cargo fmt --check` clean
|
||||
- [x] `cargo check --target wasm32-unknown-unknown` passes
|
||||
- [x] No comments in code beyond doc comments (convention 1)
|
||||
|
||||
## References
|
||||
|
||||
@@ -84,8 +84,29 @@ pub mod consumer;
|
||||
|
||||
## Notes
|
||||
|
||||
> Agent fills during implementation.
|
||||
- All five skeleton modules created per the task's shapes, with module
|
||||
docs pointing at the spec docs + ADRs and `tunnels/*` tasks that fill
|
||||
them in.
|
||||
- Constants placed early (`OP_TUNNEL_OPEN`, `TUNNEL_ALPN`,
|
||||
`TUNNEL_OPEN_SCOPE` in params.rs — they are part of the wire surface,
|
||||
not producer-only, so they live in the shared module per the module
|
||||
map's "params.rs … + open-op input schema").
|
||||
- `establishment_reason` is a thin delegation to
|
||||
`ChannelOpenError::establishment_reason` (alkcall 0.7.0 has the
|
||||
method upstream); the crate-level helper keeps the POC's free-fn
|
||||
shape for consumers and re-exports the typed error.
|
||||
- `MAX_DATAGRAM_LEN` (65535) placed in wire.rs — the one codec constant
|
||||
ADR-003 pins regardless of the codec functions landing later.
|
||||
- **`async-trait` dropped** per the task's IF: the skeleton confirms no
|
||||
trait is needed (ADR-004 — halves functions, not traits);
|
||||
`cargo check` passes without it.
|
||||
|
||||
## Summary
|
||||
|
||||
> Agent fills this on completion.
|
||||
Module skeleton landed (error/params/wire/producer/consumer + lib.rs
|
||||
docs + re-exports); Cargo.toml unchanged except `async-trait` dropped
|
||||
(ADR-004 confirmation). Verified: `cargo check`, `cargo clippy
|
||||
--all-targets -- -D warnings`, `cargo fmt --check`, `cargo test`,
|
||||
`cargo check --target wasm32-unknown-unknown`,
|
||||
`cargo clippy --target wasm32-unknown-unknown -- -D warnings` — all
|
||||
clean.
|
||||
Reference in New Issue
Block a user