Repository navigation
Expose trusted broker caller context without changing legacy dispatch - #46
Conversation
… native SDK Co-authored-by: Medulla <medulla@tinyhumans.ai>
…lippy Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewTiny Sweeper completed its review; deterministic results follow. State: Incomplete Review snapshot
Completeness: Incomplete What changedIncremental change exposing trusted broker caller context without changing legacy dispatch: confidential calls may now target an admitted module's fixed unique peer; a CallContext with transport-authenticated sender flows through Interface::call_with_context; the memory transport and module ABI carry private broker provenance; CI fixture, docs, and style/rust-version updates accompany it. Features
Tests
Findings
Lower-confidence notes
Resolved this pass
Could not review: crates/tinybus-module/src/lib.rs, crates/tinybus/src/attest.rs, crates/tinybus/src/module/abi.rs, crates/tinybus/src/module/host.rs, crates/tinybus/src/service/mod.rs, crates/tinybus/src/service/tree.rs, tinysweeper/description, tinysweeper/tests Before merge
How this fits togetherflowchart LR
n0["HostCalls<br/>changed"]:::changed
n1["ModuleTransport<br/>changed"]:::changed
n1 -->|uses| n0
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: Cargo.toml, crates/tinybus-macros/src/lib.rs, crates/tinybus-module/Cargo.toml, crates/tinybus-module/src/lib.rs, crates/tinybus-module/src/lib_tests.rs, crates/tinybus/Cargo.toml, crates/tinybus/examples/module_context.rs, crates/tinybus/examples/module_context_eager.rs and 22 more.
$0.0098 · 203,739 in / 16,584 out · 7,112 cached (3%) · flash, gpt-5.6-luna, glm-5.3-flash
critique: $0.0044 · 54,072 in / 1,723 out · 2,494 cached (5%) · gpt-5.6-luna
security: $0.0036 · 45,353 in / 1,267 out · 2,250 cached (5%) · gpt-5.6-luna
tests: $0.0003 · 34,398 in / 3,219 out · 64 cached (0%) · glm-5.3-flash
description: $0.0004 · 33,831 in / 6,029 out · 1,856 cached (5%) · glm-5.3-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
Requesting changes: 1 lane(s) blocking, worst finding is high.
Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.
$0.0178 · 295,579 in / 9,795 out · 7,270 cached (2%) · ladder/vectors-oai3, gpt-5.6-luna, , glm-5.3-flash · 760 embedded
critique: $0.0085 · 103,975 in / 2,854 out · 2,494 cached (2%) · gpt-5.6-luna,
security: $0.0085 · 111,456 in / 1,624 out · 4,584 cached (4%) · gpt-5.6-luna,
description: $0.0004 · 40,306 in / 2,578 out · 64 cached (0%) · glm-5.3-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: tinysweeper/tests.
$0.0053 · 145,965 in / 3,134 out · 9,222 cached (6%) · ladder/vectors-oai3, gpt-5.6-luna, glm-5.3-flash · 762 embedded
critique: $0.0032 · 44,549 in / 628 out · 4,988 cached (11%) · gpt-5.6-luna
security: $0.0015 · 19,660 in / 570 out · 2,250 cached (11%) · gpt-5.6-luna
description: $0.0003 · 40,738 in / 431 out · 1,856 cached (5%) · glm-5.3-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: tinysweeper/tests.
$0.0141 · 265,731 in / 4,194 out · 12,448 cached (5%) · flash, ladder/vectors-oai3, gpt-5.6-luna, glm-5.3-flash · 762 embedded
critique: $0.0067 · 89,997 in / 982 out · 5,156 cached (6%) · gpt-5.6-luna
security: $0.0067 · 89,302 in / 1,058 out · 4,668 cached (5%) · gpt-5.6-luna
description: $0.0003 · 41,766 in / 357 out · 64 cached (0%) · glm-5.3-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
Requesting changes: 1 lane(s) blocking, worst finding is high.
Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.
$0.1330 · 540,663 in / 15,078 out · 74,015 cached (14%) · ladder/vectors-oai3, openai/gpt-5.6-luna, z-ai/glm-5.3-flash, , deep · 774 embedded
critique: $0.0671 · 254,807 in / 7,649 out · 21,371 cached (8%) · openai/gpt-5.6-luna, z-ai/glm-5.3-flash, , deep
security: $0.0648 · 240,754 in / 6,214 out · 9,346 cached (4%) · openai/gpt-5.6-luna, deep
Security modules currently cannot verify which broker connection sent a call: dispatch drops the sender before invoking an interface. Add
CallContextand a compatibleInterface::call_with_contextextension so handlers can bind privileged calls and callbacks to a trusted peer.Broker delivery provenance stays separate from raw sender headers. Public sends, retained transport handles, custom transports and old native host prefixes cannot mint authenticated context. Native delivery captures provenance per frame, including eager initialization and messages queued before admission. Existing handwritten and macro interfaces retain their signatures and behavior; the native vtable keeps its frozen ABI-v1 prefix with a size-checked optional extension. A connection identity does not establish a human or tenant identity.
Release the object-tree read lock before awaiting a handler so callbacks can register interfaces without deadlocking. Preserve Rust 1.85 compatibility with equivalent syntax rewrites and explicit workspace MSRV inheritance.
Validation at 5770f0c: independent specification and code-quality review passed; format, strict Clippy, default/all-feature workspace tests, slim builds, Rust 1.85, warning-denying docs, actual native fixtures and the 90% per-file coverage gate passed (94.04% aggregate lines). Native fixtures cover eager/lazy startup and reentrant callbacks. Behavioral RED→GREEN regressions cover retained-endpoint forgery, queued pre-admission provenance, registration deadlock and wrong-peer stream writes. Platform CI runs on this PR.
Prerequisite for the native TinySecurity audit and approval migration in tinyhumansai/openhuman#7328 and tinyhumansai/tinysecurity#5.
Admitted native modules also expose their unchanged artifact attestation through their fixed unique connection name. Confidential routing resolves and verifies that exact peer atomically; unrelated aliases and successor peers inherit no admission. Stopped or faulted modules reject fixed-peer calls before transport detachment. This lets security callbacks combine a pinned recipient with artifact verification. Actual hashed clock and eager/lazy callback fixtures cover the behavior.
Summary by CodeRabbit