fix(bindings): close the three open issues (#368, #471, #472) - #502
Merged
Merged
Conversation
…ution centrally Python held no copy of the relay-answer exemption list, so the rule that a relay answer reaches the core with no transport identity was enforced at each call site rather than once. relay_answer_prefixes.py now holds the list, _inject_group_frame forces every answer unattributed, and a literal pin fails the Python suite the next time the registry moves. The docs that counted three copies now count four. Closes #368
…ads every emitter DiagnosticEvent.level omitted debug, which both native platforms emit, and Android's GATT server emitted a fifth spelling, warn, that nothing declared. The union now names the four levels the bridges emit, the four warn sites are warning, and react_native_diagnostic_levels_match_every_bridge reads the union and every level literal handed to a diagnostic sink in Swift, Kotlin and Python, failing in both directions. Closes #471
… apply it before the engine starts The engine's start-up exchange offers every held space with the interest in force at that moment, and a narrowing never deletes what a wider exchange pulled in. React Native's start() opens storage and starts the engine in one call, and the setInterest JSDoc said to call it before start(), where both native modules rejected it. DataStore.setInterest now holds a declaration made before start(), and start() applies it after MLS initialization and before the native start; a refused pattern rejects start() without starting the engine, and a data layer that is off drops it with a warning. Both native destroy() paths now release the data store, which holds a strong reference to the engine and otherwise answered data calls after destroy(). Closes #472
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #368, closes #471, closes #472. One commit per issue, each independently revertable.
#368: Python relay-answer prefixes
0.27.0 (#453) already corrected the prefix names and attribution at each call site. What was left is the issue's third item: Python held no copy of the relay-answer list and no pin.
relay_answer_prefixes.pyholds the six prefixes._inject_group_framepasses every actor throughattributable_actor, so an answer reaches the core with no transport identity whatever the call site passes. This matches the central rule the Swift and Kotlin bridges already have.test_relay_answer_prefixes.pypins the six literals. A new injection test proves an attributed answer is still stripped.prefixes.rs, the control-messages chapter, ADR 0004, C5, K7, S7, and the bridge headers. New contract P12 indocs/bridges/python.md.Deployed apps: no behaviour change for a correct caller.
#471:
DiagnosticEvent.level'debug' | 'info' | 'warning' | 'error'intypes.tsand the RN README. Both platforms emitdebug, at about 70 Swift and Kotlin sites.PeripheralGattServeremitted four diagnostics aswarn, a spelling nothing declared. They arewarningnow.react_native_diagnostic_levels_match_every_bridgereads the union and every level literal handed to a diagnostic sink in Swift, Kotlin and Python. It fails in both directions. It has floors on files and literals, so a scan that stops matching cannot pass on nothing.Deployed apps: the type now matches what already arrives at runtime, but this is not automatically source-compatible. An exhaustive
switchor aRecordkeyed by the level needs adebugentry. A filter comparing against'warn'for the four GATT diagnostics should compare against'warning'.#472:
setInterestbeforestart()on React NativeThe engine's start-up exchange offers every held space with the interest in force at that moment, and narrowing never deletes what a wider exchange pulled in. React Native's
start()opens storage and starts the engine in one call. So the documented "beforestart()" was rejected natively, and "afterstart()" let the first exchange ask for everything.DataStore.setInterestholds a declaration made beforestart().start()applies it after MLS initialization and before the native start. After that, calls go straight to native.start()with an error naming the space and carrying the nativecode. The engine is not started, because starting would replicate the space whole.start()proceeds. This is checked with a probe, because the engine validates the space name before it checks the layer.destroy()discards the hold. It does so only for an instance that created an engine, since the state is module-wide.destroy()paths now release the data store. It holds a strong reference to the engine, so data calls afterdestroy()reached the stopped engine instead of rejecting, and on Android the engine stayed alive until garbage collection.data.md, the API reference, the RN integration guide, UPGRADING section 23, and a C7 row. A note indocs/bridges/python.mdsays thatProtocolManagerstill runs its first exchange under the default interest. That follow-up is not fixed here.Deployed apps: an invalid pattern declared before
start()used to reject that call and now rejectsstart(). A call afterstart()is unchanged. An app that worked around 0.27.0 by calling afterstart()can move the call back.Validation
cargo clippy --workspace -- -D warnings,cargo test --workspace --lib,RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps,cargo fmt --all -- --check: all clean.npm run test:js: all 11 harness files pass. The newdata-interest-order.test.jshas 12 cases.swiftc -typecheckstep, which includesOfflineProtocolModule.swift, passes locally. A negative control proved the run was not vacuous.PeerStreamFramingTestfailures there come from the copy living outside the repository, where the test cannot find its vector file.