Repository navigation
ariadne: .ari channels: declaration + lint: policy + mount grant (§12, PR-B) - #464
Merged
Merged
Conversation
…, PR-B) The authoring surface for chroot-scoped channels (PR-A #463 is the core resolver this builds on). Loader-side only; enforcement (PR-C) consumes it. - Top-level `channels:` — declares a document's own channels (a sequence of bare names or {channel, shared, global} maps). `global: true` adds a channel to the default-deny globals allowlist ('/'-refs permitted only for declared globals). LoadResult.channels + has_channels_block (the enforcement gate: a doc with no channels: block is never channel-linted). - Doc-level `lint:` block (part of a broader lint effort) — `channels: strict|warn|off` (default strict) + `quiet` -> LoadResult.lint. Parsed now; the enforcement layer (PR-C) consumes it. - Mount `channels:` grant — the messaging analogue of link:. Each entry (`local: parent` rw, or `local: {to: parent, mode: ro|rw}`) LOWERS into the existing Widget::links/LinkHole under the reserved channels. subtree, so wire_holes plants it and PR-A's resolve_channel follows it (a granted channel resolves to the parent's key). Fail-closed rw/ro; rejects a leading '/'. - is_builtin_block += channels/lint; parse_channels + parse_lint mirror parse_customs. - 6 AriadneChannels loader tests (declaration incl. shared/global, no-block gate, dup drop, lint parse + default, mount grant -> LinkHole). Full loader suite green (151), no regressions. Follow-up PR-C: enforcement — the load-time lint (A, scan static msg-* refs) and the runtime policy (B, dynamic), both driven by lint.channels.
This was referenced Sep 29, 2026
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 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.
PR-B of the channel-scoping work — the
.ariauthoring surface on top of the core resolver merged in #463. Loader-side only; the enforcement engine (PR-C) consumes what this parses.What lands
channels:— a document declares its own channels: a sequence of bare names (- nav.done) or{channel, shared, global}maps.global: trueputs a channel at app-root and adds it to the default-deny globals allowlist (a/-prefixed reference is permitted only for a declared global — a chrooted sub-doc can't blanket-escape). →LoadResult.channels+has_channels_block(the enforcement gate: a doc with nochannels:block is never channel-linted, so existing docs keep working).lint:block (part of a broader lint/correctness effort, not buried inchannels:) —channels: strict|warn|off(default strict) +quiet→LoadResult.lint. Parsed now; PR-C's enforcement consumes it.channels:grant — the messaging analogue oflink:. Each entry (local: parentrw, orlocal: {to: parent, mode: ro|rw}) lowers into the existingWidget::links/LinkHoleunder the reservedchannels.subtree, sowire_holesplants it and state_exec: chroot-scope message channels (§12 core) #463'sresolve_channelfollows it — a granted channel resolves to the parent's key, end to end, with no new runtime plumbing. Fail-closed rw/ro; rejects a leading/.is_builtin_block += channels/lint;parse_channels/parse_lintmirrorparse_customs.Tests
6
AriadneChannelsloader tests (declaration incl.shared/global; the no-block gate; duplicate-drop;lint:parse + default-strict; mount grant → the rightLinkHolewith fail-closed mode). Full loader suite green (151), no regressions.Follow-up — PR-C (enforcement)
Both layers, driven by
lint.channels: (A) load-time lint (fail-fast — parse each script, scan static(msg-* "literal")refs, validate vs declared/granted/globals → error/warn/off) and (B) runtime policy (the backstop for dynamic(msg-recv (expr))names — a channel policy on the actionictx, checked inresolve_channel). Thelint:block is inert until PR-C wires it.