Skip to content

Claude/review project q8y2 u#1

Merged
lileding merged 10 commits intomainfrom
claude/review-project-Q8y2U
Feb 27, 2026
Merged

Claude/review project q8y2 u#1
lileding merged 10 commits intomainfrom
claude/review-project-Q8y2U

Conversation

@lileding
Copy link
Copy Markdown
Owner

No description provided.

Phase 1 of QoS=2 implementation:
- Add PubRecPacket, PubRelPacket, PubCompPacket structs
- Add PubRec, PubRel, PubComp variants to Packet enum
- Implement decode logic for all three packet types
- Implement encode functions with correct fixed header flags
- PUBREL requires flags=0x02 per MQTT 3.1.1 spec

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
Phase 2 of QoS=2 implementation:
- Add Qos2State enum (AwaitingPubRec, AwaitingPubComp)
- Add qos2_state field to InflightMessage struct
- Add ReceivedQos2Message struct for inbound QoS=2 tracking
- Rename qos1_queue to inflight_queue (handles both QoS levels)
- Add inbound_qos2 HashMap for incoming QoS=2 messages

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
Phase 3 of QoS=2 implementation:
- Add on_pubrec handler (transition to AwaitingPubComp, send PUBREL)
- Add on_pubrel handler (route message, send PUBCOMP)
- Add on_pubcomp handler (remove from inflight queue)
- Update on_publish to handle QoS=2 (store in inbound_qos2, send PUBREC)
- Update on_message to handle outbound QoS=2 messages
- Update on_packet dispatch for new handlers

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
Phase 4 of QoS=2 implementation:
- QoS=1 or QoS=2 AwaitingPubRec: retransmit PUBLISH
- QoS=2 AwaitingPubComp: retransmit PUBREL directly
- Separate handling for PUBLISH (via mailbox) and PUBREL (direct)

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
Phase 5 of QoS=2 implementation:
- Update MAX_SUPPORTED_QOS from 1 to 2
- Add QoS::ExactlyOnce case to min_qos function
- Server now grants QoS=2 subscriptions

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
Phase 6 of QoS=2 implementation:
- Add PersistedQos2State enum and qos2_state field to PersistedInflightMessage
- Add PersistedInboundQos2Message type for inbound QoS=2 messages
- Update Storage trait: save_session now includes inbound_qos2 parameter
- Add load_inbound_qos2_messages method to Storage trait
- Update InMemoryStorage and SqliteStorage implementations
- Add inbound_qos2_messages table to SQLite schema
- Update session save/restore to handle QoS=2 state

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
- Add 5 test cases for QoS=2 functionality:
  - test_qos2_publish_full_handshake: Complete four-step handshake
  - test_qos2_subscriber_receives_message: End-to-end message delivery
  - test_qos2_grants_qos2_subscription: Subscription granting QoS=2
  - test_qos2_downgrade_to_qos1: QoS downgrade when subscriber has lower QoS
  - test_qos2_duplicate_publish_handling: Duplicate PUBLISH handling
- Fix sqlite.rs tests to use updated Storage API with inbound_qos2

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
…tion

- Update README.md with QoS=2 features and completion status
- Update CLAUDE.md project status to Milestone 5 completed
- Update docs/roadmap.md with QoS=2 completion details
- Update docs/roadmap.html timeline for v0.5.0 completion
- Update docs/features.html with QoS=2 feature section
- Update docs/index.html to v0.5.0 release
- Update docs/documentation.html with QoS=2 packet types and message flow

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
- Remove unused `received_at` field from ReceivedQos2Message struct
- Collapse nested if statements in handle_pubrec function

https://claude.ai/code/session_01DTujjLzKvpKqxytbTwTVpc
@lileding lileding merged commit 36eec21 into main Feb 27, 2026
2 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.

2 participants