Summary
Three Tauri commands are wired into the plugin's tauri::generate_handler![...] but are missing from the build.rs command list, so Tauri never generates an allow-* permission for them. They cannot be granted by any capability and fail at runtime with:
iroh-http.start_transport_events not allowed. Command not found
Affected commands:
| Command |
Breaks |
start_transport_events |
All transport / path-change observability (fires on every createNode) |
session_accept |
Accepting incoming QUIC sessions (server side of iroh-http:connect) |
try_next_chunk |
Fast-path body reads used by fetch and serve streaming |
Evidence
packages/iroh-http-tauri/src/lib.rs registers all three in invoke_handler, but packages/iroh-http-tauri/build.rs Builder::new(&[...]) omits them. Tauri's permission generation is driven by build.rs, so no allow-start-transport-events, allow-try-next-chunk permission existed, and allow-session-accept only resolved via a stale autogenerated file (a clean rebuild would have removed it).
Additionally, even once generated, try_next_chunk and start_transport_events were not referenced by any permission set, so a capability could not enable them.
Impact
node observability (path changes / diagnostics) is dead in the Tauri plugin — every createNode() logs start_transport_events not allowed. Command not found.
- Incoming session acceptance is fragile (works only by stale-file accident).
- Fast-path body streaming is unreachable.
This is the same "ACL drift invisible to the build" class as #246 (permission sets declared as [[permission]]). The build stays green because Tauri fails open / silently, and no test exercised command↔permission parity.
Remediation
- Add
try_next_chunk, session_accept, start_transport_events to build.rs so leaf permissions are generated.
- Add
allow-try-next-chunk to the fetch and serve sets; add allow-start-transport-events to [default] (it fires on createNode). allow-session-accept is already in the connect set.
- Regenerate
permissions/autogenerated/ and permissions/schemas/schema.json.
- Add a regression guard (extends
tests/permissions.rs) asserting parity between generate_handler!, build.rs, and the permission sets — so a registered command without a generated, granted permission fails CI.
Acceptance criteria
Summary
Three Tauri commands are wired into the plugin's
tauri::generate_handler![...]but are missing from thebuild.rscommand list, so Tauri never generates anallow-*permission for them. They cannot be granted by any capability and fail at runtime with:Affected commands:
start_transport_eventscreateNode)session_acceptiroh-http:connect)try_next_chunkEvidence
packages/iroh-http-tauri/src/lib.rsregisters all three ininvoke_handler, butpackages/iroh-http-tauri/build.rsBuilder::new(&[...])omits them. Tauri's permission generation is driven bybuild.rs, so noallow-start-transport-events,allow-try-next-chunkpermission existed, andallow-session-acceptonly resolved via a stale autogenerated file (a clean rebuild would have removed it).Additionally, even once generated,
try_next_chunkandstart_transport_eventswere not referenced by any permission set, so a capability could not enable them.Impact
nodeobservability (path changes / diagnostics) is dead in the Tauri plugin — everycreateNode()logsstart_transport_events not allowed. Command not found.This is the same "ACL drift invisible to the build" class as #246 (permission sets declared as
[[permission]]). The build stays green because Tauri fails open / silently, and no test exercised command↔permission parity.Remediation
try_next_chunk,session_accept,start_transport_eventstobuild.rsso leaf permissions are generated.allow-try-next-chunkto thefetchandservesets; addallow-start-transport-eventsto[default](it fires oncreateNode).allow-session-acceptis already in theconnectset.permissions/autogenerated/andpermissions/schemas/schema.json.tests/permissions.rs) asserting parity betweengenerate_handler!,build.rs, and the permission sets — so a registered command without a generated, granted permission fails CI.Acceptance criteria
generate_handler!,build.rs, and the permission sets list the identical command set (asserted by a test).[[set]]or[default](asserted by a test).cargo test -p tauri-plugin-iroh-http --test permissionspasses;cargo clippy -- -D warningsclean.