wifi-densepose/v2/crates/wifi-densepose-bfld/src
ruv a3d26a4fad feat(adr-118/p1.7): reserved-flag-bits forward-compat (243/243 GREEN)
Iter 36. Locks down the ADR-119 §2.1 forward-compat promise that
reserved flag bits round-trip unchanged through the parser. A future
protocol revision may light up bits 2 or 4..=15; today's parser
preserves them so a node running iter N can forward unknown bits to
a peer running iter N+M without losing information.

Added (in src/frame.rs::flags):
- pub const KNOWN_FLAGS_MASK = HAS_CSI_DELTA | PRIVACY_MODE | SELF_ONLY
    (the three currently-named flags, occupying bits 0, 1, 3)
- pub const RESERVED_FLAGS_MASK = !KNOWN_FLAGS_MASK
    (bit 2 + bits 4..=15 — every position not currently assigned)
- Docstrings reference ADR-119 §2.1 verbatim so a future reviewer
  understands why the constants exist.

tests/reserved_flags.rs (8 named tests, all green, no_std-compatible
so they run in BOTH feature configs):
  known_flags_mask_covers_exactly_three_named_flags
    (count_ones() == 3 catches accidental flag additions that should
     also update KNOWN_FLAGS_MASK)
  reserved_and_known_masks_are_complementary
    (mask | reserved == u16::MAX; mask & reserved == 0)
  known_flags_do_not_overlap_with_each_other
    (HAS_CSI_DELTA, PRIVACY_MODE, SELF_ONLY all on distinct bits)
  header_preserves_reserved_flag_bits_through_round_trip
    *** Headline test: set RESERVED_FLAGS_MASK on a header, serialize,
        parse, verify the bits survived. ***
  header_preserves_mixed_known_and_reserved_bits
    (HAS_CSI_DELTA | PRIVACY_MODE | (1<<7) | (1<<14) — mixed case)
  reserved_bits_do_not_collide_with_self_only_bit_3
    (bit 2 is reserved but bit 3 is named — pins the asymmetry)
  all_zero_flags_round_trip_cleanly
  all_one_flags_round_trip_cleanly (stress: every bit set)

The new tests are no_std-compatible (no Vec / no serde) so they run
in both `cargo test --no-default-features` and default feature
configs. The no_default test count therefore jumps from 72 to 80.

ADR-124 status (iter step 0 sibling check):
- docs/adr/ADR-124-rvagent-mcp-ruvector-npm-integration.md unchanged
  at 431 lines. SENSE-BRIDGE scope remains orthogonal.

ACs progressed:
- ADR-119 §2.1 "Reserved flag bits 2-15 lock in future-extension
  order; any new bit assignment is a version bump." — the test now
  enforces the OTHER half of this contract: a peer running the
  future version can set a reserved bit and our parser will preserve
  it through the round-trip rather than masking it off.

Test config:
- cargo test --no-default-features → 80 passed (72 + 8 no_std-compat)
- cargo test                       → 243 passed (235 + 8)

Out of scope (next iter target):
- PR-readiness pivot: witness bundle regeneration, CHANGELOG batch
  across iters 1-36, AC closeout table for the PR description.
  All in-crate ACs are now covered; remaining work is either
  external-resource-gated (KIT BFId, Pi5/Nexmon) or PR-prep.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-24 18:55:04 -04:00
..
availability.rs feat(adr-118/p5.8): availability topic + LWT integration (203/203 GREEN) 2026-05-24 17:57:55 -04:00
coherence_gate.rs feat(adr-118/p3.4): SoulMatchOracle + Recalibrate exemption (93/93 GREEN) 2026-05-24 15:17:24 -04:00
embedding.rs feat(adr-118/p2.1): IdentityEmbedding newtype + zeroizing Drop — 44/44 GREEN 2026-05-24 14:27:28 -04:00
embedding_ring.rs feat(adr-118/p2.2): EmbeddingRing 64-entry FIFO buffer — 53/53 GREEN 2026-05-24 14:37:03 -04:00
emitter.rs feat(adr-118/p3.6): IdentityFeatures canonical-bytes encoder (137/137 GREEN) 2026-05-24 16:18:33 -04:00
event.rs feat(adr-118/p4.4): rf_signature_hash JSON as "blake3:<hex>" (128/128 GREEN) 2026-05-24 16:08:29 -04:00
frame.rs feat(adr-118/p1.7): reserved-flag-bits forward-compat (243/243 GREEN) 2026-05-24 18:55:04 -04:00
ha_discovery.rs feat(adr-118/p5.8): availability topic + LWT integration (203/203 GREEN) 2026-05-24 17:57:55 -04:00
identity_features.rs feat(adr-118/p3.6): IdentityFeatures canonical-bytes encoder (137/137 GREEN) 2026-05-24 16:18:33 -04:00
identity_risk.rs feat(adr-118/p3.2): identity_risk score + GateAction enum — 72/72 GREEN 2026-05-24 14:57:08 -04:00
lib.rs feat(adr-118/p5.9): RumqttPublisher::connect_with_lwt — broker auto-publishes "offline" (220/220 GREEN with mqtt) 2026-05-24 18:08:59 -04:00
mqtt_topics.rs feat(adr-118/p5.5): BfldPipelineHandle worker thread (177/177 GREEN) 2026-05-24 17:27:48 -04:00
payload.rs feat(adr-118/p1.5): payload section parser (BfldPayload) — 32/32 GREEN 2026-05-24 14:07:14 -04:00
pipeline.rs feat(adr-118/p6.4): spawn_with_oracle for Soul Signature deployments (227/227 GREEN) 2026-05-24 18:45:54 -04:00
pipeline_handle.rs feat(adr-118/p6.4): spawn_with_oracle for Soul Signature deployments (227/227 GREEN) 2026-05-24 18:45:54 -04:00
privacy_gate.rs feat(adr-118/p3.1): PrivacyGate::demote monotonic class transformer (60/60 GREEN) 2026-05-24 14:48:01 -04:00
rumqttc_publisher.rs feat(adr-118/p5.9): RumqttPublisher::connect_with_lwt — broker auto-publishes "offline" (220/220 GREEN with mqtt) 2026-05-24 18:08:59 -04:00
signature_hasher.rs feat(adr-118/p3.5): SignatureHasher (BLAKE3-keyed) — 117/117 GREEN 2026-05-24 15:47:21 -04:00
sink.rs feat(adr-118/p1.3): Sink marker traits + PrivacyClass::try_from (17/17 GREEN) 2026-05-24 13:43:05 -04:00