Uh oh!
There was an error while loading. Please reload this page.
feat(mesh): MeshTransfer schema + fail-closed admit (E3 first code) - #36
Merged
Conversation
…ow bites Closes a register item: capability-ledger.deny() writes a blocked_by_policy receipt into the ledger, but the sole production caller (the pdf-viewer demo) used isEnabled() at the use-gate. isEnabled reports 'blocked_by_policy' as false and drops silently — a policy refusal indistinguishable from a not-yet-declared capability, which is the entire failure mode the register item names. - Inline CapabilityLedger drifted from the packaged version: it lacked assertEnabled and let enable() take a null policyDecisionRef. Both fixed; the packaged behaviour (enable requires a non-empty pdr, assertEnabled throws on any non-enabled state naming the reason) is now mirrored. - Click handlers use assertEnabled via a gatedClick wrapper; the diagnostic surfaces in feature-output so the refusal is visible instead of dropped. - Buttons stay clickable even when not enabled: the enforcement is at the click site, and letting the click fire is what surfaces the diagnostic. - Added pdf-export capability that is denied by policy, so the deny path is now demonstrated end-to-end alongside pdf-sign (missing_plugin) and pdf-viewer (enabled). Package tests unchanged, 38/38 pass on origin/main head. This PR only touches the demo — the surface most likely to drift because it's a manual copy of the module.
Every cross-device transfer (Handoff/drop/cast/message/sync) is an egress act; admit() grants only on an explicit policy decision + hash-sealed receipt, else refuses fail-closed (data-namespace egress additionally needs a region toleration). Spec: sourceos-spec e3-mesh-transport.md. 9 tests.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
First code for E3 personal mesh transport (campaign gap #3, sourceos-spec#267), spec:
e3-mesh-transport.md.schemas/mesh-transfer.schema.json— theMeshTransfercontract (2020-12): kind ∈ {handoff,drop,cast,message,sync}, purpose fixed toegress, requiredconsent.policyDecisionRef+ hash-sealedreceipt.tools/mesh_transfer.py—admit(), pure/stdlib, fail-closed: grants only on an explicit policy decision + valid receipt; denies missing consent, missing/garbage receipt, non-egress purpose, unknown kind, same-device, non-device endpoints, and data-namespace egress without a region toleration (GDPR Ch. V). Mirrors the shell's Require a policy decision to grant, and give callers a gate that fails closed #31 'gate that bites' convention.tests/test_mesh_transfer.py— 9 tests (allow + every deny path), green.Moves the census Continuity/Handoff/AirDrop + AirPlay rows spec→partial. Next: a
meshdservice that forms the WireGuard fabric and moves a real file drop E2E.