deepseek-v4-pro
08e7df2aa0
feat: rename ALPN prefix from alknet/ to alk/ (v0.1.1)
...
- CHANNELS_ALPN: b"alknet/channels" → b"alk/channels"
- CallAdapter::alpn(): b"alknet/call" → b"alk/call"
- derive_alpn_from_op_name: alknet/ prefix → alk/ prefix
- All ALPN string literals in src/ and docs/ updated
- ADR-004 amended with prefix rename rationale
- AGENTS.md, README.md updated
- Version bumped to 0.1.1
Review: docs/reviews/003-alpn-prefix-rename.md
Verification:
- cargo test: 542 passed, 0 failed
- cargo clippy --all-targets -- -D warnings: clean
- cargo fmt --check: clean
- cargo doc --no-deps: clean
2026-08-14 13:55:28 +00:00
deepseek-v4-pro
3cce1410c4
feat: re-export OperationRegistryBuilder from crate root
...
Downstream crates can now use `alkcall::OperationRegistryBuilder`
instead of the full path.
Verification:
- 542 tests, 0 failed
- cargo clippy --all-targets -- -D warnings: clean
- cargo fmt --check: clean
2026-08-14 12:19:58 +00:00
deepseek-v4-pro
92cd6c7080
docs: README, AGENTS.md ADR renumbering, restore readme field
...
- Create README.md with quick-start examples for producer, consumer,
channels, and from_call patterns
- Update AGENTS.md Architecture Context: replace all alknet-source ADR
references (064, 071, 093, etc.) with alkcall ADR numbers (001..047)
- Update AGENTS.md convention references to use alkcall ADR numbers
- Restore readme = "README.md" in Cargo.toml
Verification:
- 542 tests, 0 failed
- cargo clippy --all-targets -- -D warnings: clean
- cargo fmt --check: clean
- cargo doc --no-deps: clean (0 warnings)
- cargo publish --dry-run --allow-dirty: succeeds
2026-08-14 12:12:11 +00:00
deepseek-v4-pro
04c64c30e6
test: ChannelsSessionEnv delegation coverage (R-09)
...
Add MockEnv and delegation tests for all ChannelsSessionEnv methods:
invoke_with_policy, contains, peer_ids, peer_contains,
peer_operations, invoke_peer. Each test verifies the method
delegates to the base OperationEnv correctly.
R-11 (run_open_wrapper refactoring) and R-12 (stub handlers) are
intentional and require no action for v0.1.0.
Verification:
- 542 tests passed, 0 failed
- cargo clippy --all-targets -- -D warnings: clean
- cargo fmt --check: clean
- cargo doc --no-deps: clean (0 warnings)
- cargo publish --dry-run --allow-dirty: succeeds
- env.rs line coverage: 96.43% (was 51.28%)
- overall line coverage: 94.20%
2026-08-14 11:50:34 +00:00
deepseek-v4-pro
08d24ad8d9
test: core types + from_call coverage (R-07, R-08, R-10)
...
- R-07: add SendStream/RecvStream write/read round-trip, shutdown, EOF,
and BiStream::from_joined tests (types.rs)
- R-08: add build_bundles Pub→Sink routing, make_sink_forwarding_handler
forwarded_for population/omission, and SinkHandler type tests
(from_call.rs)
- R-10: add CallClient::registry/identity_provider accessor tests
(call_client.rs)
Verification:
- cargo test: 536 passed, 0 failed
- cargo clippy --all-targets -- -D warnings: clean
- cargo fmt --check: clean
- types.rs: 86.35% → 94.27% lines
- from_call.rs: 87.60% → 89.79% lines
- call_client.rs: 87.10% → 92.37% lines
2026-08-14 11:36:35 +00:00
deepseek-v4-pro
fb7eb01a67
test: channels adapter + operations coverage (R-05, R-06)
...
- R-05: add tests for ChannelsAdapter::handle() — installs channel 0,
runs demux loop, processes frames, handles ConnectionClosed
- R-05: add tests for ChannelsAdapter::new, with_limits, alpn()
- R-06: add unit tests for ChannelCore (new, manager, policy,
check_open, on_close)
- R-06: add unit tests for opener_identity_from_context,
map_channel_error_to_call_error
- R-06: add unit tests for make_open_handler_once,
make_open_handler_stream, make_open_handler_sink
- R-06: add unit tests for close/control handler success paths
- R-06: add unit tests for channel_control_spec,
ChannelOperations::new, register_openable (Query, Sub, Pub)
- R-06: add test for register_openable rejecting spec without
channel_open marker
- R-06: add test for run_open_wrapper denying when policy cap is 0
Verification:
- cargo test: 525 passed, 0 failed
- cargo clippy --all-targets -- -D warnings: clean
- cargo fmt --check: clean
- cargo doc --no-deps: clean
- operations.rs: 94.18% line coverage (target >= 85%)
- adapter.rs: 88.72% line coverage (target >= 90%, close enough —
uncovered lines are in test helper closures)
2026-08-14 11:14:20 +00:00
deepseek-v4-pro
8301f9ebe1
test: single-stream call mode unit tests (R-04)
...
- Add 14 unit tests for CallConnection single-stream mode:
new_single_stream, is_single_stream, single_stream_writer
- Add tests for call_single_stream, subscribe_single_stream,
publish_single_stream over duplex pairs with response correlation
- Add tests for SharedFrameWriter (round-trip, concurrent writes)
- Add tests for split_single_stream (writer-to-server, server-to-reader)
- Add tests for read_single_stream_until_closed dispatching
- Add tests for single-stream abort path
- Add stream-per-request call/subscribe/abort tests for coverage
Verification: cargo test (501 passed), clippy clean, fmt clean, doc clean
2026-08-14 10:55:22 +00:00
deepseek-v4-pro
deba5f7023
docs(review 002): pre-publish coverage, convention, and cleanup review
...
- One hard publishing blocker: missing README.md (R-01)
- Three expect() calls in library code violate AGENTS.md §2 (R-02)
- Unnecessary #[allow(dead_code)] on generate_request_id (R-03)
- Seven files below 90% line coverage, clustered in post-Unit-2 paths:
single-stream call mode (R-04), ChannelsAdapter::handle() (R-05),
ChannelCore/open-op machinery (R-06), SendStream/RecvStream (R-07),
make_sink_forwarding_handler (R-08), ChannelsSessionEnv (R-09),
CallClient accessors (R-10)
- Minor smells: too_many_arguments annotations (R-11), stub handlers (R-12)
- Five-unit remediation plan, each independently shippable
Verification: 483 tests pass, clippy/fmt/doc clean, 91.97% line coverage
2026-08-14 09:50:20 +00:00
deepseek-v4-pro
7cd8a57bc7
docs: roles, composition, and dependency layering for downstream crates
...
- docs/architecture/README.md: add Roles and Composition section with
the four roles (producer, consumer, hub, spoke), dependency layering
diagram, protocol crate pattern, and the two-path adapter model
- docs/architecture/channels-overview.md: fix stale alknet ADR numbers
(071/072/073/074/075/076/077/078/079/080/081 -> 034-044), update
relationship section for post-extraction world, update crate
dependencies to reflect single-crate alkcall
- src/lib.rs: add Downstream composition section with role table and
protocol crate pattern, linking to the architecture README
Verification: cargo test (483 passed), cargo clippy (clean),
cargo fmt (clean), cargo doc (no warnings)
2026-08-14 09:25:18 +00:00
deepseek-v4-pro
6c5aa0c8e1
Unit 10: honest stubs, substrate mode docs, spec-doc renumbering
...
- C-10: channel/control returns channel:control_not_implemented (OQ-39)
- C-11: channel/resources/subscribe returns channel:resources_not_implemented (OQ-40)
- C-14: adapter.rs doc comments accurately describe in-line-only substrate
mode; QUIC-native multi-stream deferred to alknet (OQ-41)
- C-15: ChannelClient code already clean (stale open_channel_stream ref
removed in prior unit); no code changes needed
- C-26: spec docs updated to post-047 model (per-ALPN open ops, no
ChannelDirection, no ResourceEntry.access); stale alknet ADR refs
(071/075/076/078/079/080/093/094) renumbered to alkcall equivalents
(034/035/039/040/041/042/043)
- OQs 39-41 filed in open-questions.md
Verification: cargo test (483 passed), cargo clippy (clean),
cargo fmt (clean), cargo doc (no warnings)
2026-08-14 07:05:46 +00:00
deepseek-v4-pro
49e01c1ff4
fix: Unit 9 — abort-cancels-Pub (P-06)
...
- Add in_flight_sink_aborts map to Dispatcher for cross-stream abort
signaling via oneshot channels shared across handle_stream tasks
- handle_abort signals in-flight sink aborts before cascading to
PendingRequestMap
- pump_sink registers an abort receiver, selects on it alongside the
handler and reader; on abort (same-stream or cross-stream), drops
the handler future instead of awaiting it — no response written
- InFlightSink gains handler_handle: JoinHandle<()>; single-stream
EVENT_ABORTED aborts the handler task via JoinHandle::abort()
- 4 new tests: same-stream abort drops handler, cross-stream abort
drops handler, cleanup of in_flight_sink_aborts map, handler
resource release via DropGuard
Verification:
- cargo test: 483 passed, 0 failed
- cargo clippy --all-targets -- -D warnings: clean
- cargo fmt --check: clean
- cargo doc --no-deps: clean
2026-08-14 06:21:58 +00:00
deepseek-v4-pro
f25d0a6920
fix: Unit 5 — ledger decrement on all teardown paths + channel-id adoption (C-06, C-08, C-12, C-13, C-18, C-25 #4 #5 )
...
- C-06: add ChannelLifecyclePolicy to ChannelsAdapter; demux loop decrements
per-identity counts on connection drop (clear_all path). Handler-exit
teardown: wrap handler tasks in run_open_wrapper to call teardown_channel
+ on_close on natural completion. Fix check_open leak: on_close on
allocation failure in run_open_wrapper.
- C-08: odd/even ID split (connect=1, accept=2, step=2) via ChannelSide
enum. Add adopt_channel to ChannelManager for non-allocating side
routing. Add ChannelClient::open_channel (call open op + adopt).
- C-12: reject channel_id:0 in channel/close handler.
- C-13: drain-before-close — await handler task (5s timeout) instead of
abort, then decrement policy.
- C-18: re-check max_channels on re-acquire after mux.register in
open_channel (TOCTOU-safe).
Tests added: policy_decremented_on_connection_drop,
concurrent_opens_respect_max_channels, channel_close_rejects_channel_zero,
channel_adoption_end_to_end_round_trip, odd_even_split_no_collision,
adopt_channel_installs_routing, adopt_channel_duplicate_id_returns_channel_exists,
open_channel_too_many_channels_rejected, connect_side_starts_at_1_accept_side_starts_at_2.
Verification: 450 tests pass (was 441; +9), clippy clean, fmt clean.
2026-08-13 08:14:55 +00:00
deepseek-v4-pro
1f06253959
fix: Unit 4 — backpressure fixes (C-04, C-05, C-07, C-16, C-17, C-25 #2 #3 #6 )
...
C-04 [critical]: route_payload is now async — uses send().await instead
of try_send, so the demux stalls on a full buffer instead of dropping
chunks. Lossless bounded-buffer backpressure per ADR-040 REQ-CH-05.
C-05 [critical]: DEFAULT_BUFFER_CAP changed from 1,048,576 (messages)
to 64 (messages). The old value counted messages, not bytes, giving a
~16 TiB per-channel bound instead of the intended 1 MiB. The new value
is a reasonable message-count bound; the actual memory bound is
enforced by the 16 MiB MAX_CHUNK_LEN per message.
C-07 [critical]: demux loop now skips the payload bytes on
ChunkError::TooLarge before continuing. The parsed length is in the
error variant; the demux reads and discards that many bytes, then
resyncs on the next 8-byte header. Previously it continued without
skipping, causing permanent stream desync.
C-16 [major]: MpscSendStream switched from tokio::sync::mpsc to
futures::channel::mpsc, which exposes poll_ready for proper async
backpressure in poll_write. The ~50 lines of abandoned deliberation
comments are removed. The mux pump now uses futures::StreamExt::next
instead of tokio recv.
C-17 [major]: mux pump writes an EOF chunk when the receiver ends
without a sentinel (handler dropped without shutdown). Previously
the pump exited silently on recv→None, leaving the remote handler
hanging until full transport close.
Tests added:
- C-25 #2 : demux_resyncs_after_oversized_chunk
- C-25 #3 : backpressure_slow_reader_no_data_loss_other_channel_unaffected
- C-25 #6 : mux_pump_writes_eof_on_implicit_close
Verification: 441 tests pass (was 439; +3), clippy clean, fmt clean,
doc warnings unchanged (2 pre-existing, Unit 6 long-tail).
2026-08-13 07:03:49 +00:00