Skip to content

Commit f0d40a7

Browse files
ualtinokalfonso-aft
andcommitted
refactor(subc): ignore RouteBind config via .. for protocol forward-compat
AFT already reads config from CortexKit files and discards any wire-relayed config tiers, but the RouteBind match arm still bound the `config` field by name (then dropped it). When subc-protocol removes the now-dead `config` field from RouteOpen/RouteBind, that named binding would stop compiling. Switching the destructure to `..` ignores the field whether the protocol version still carries it or has dropped it, so the upstream field removal can land in either order without breaking AFT's build. Behavior is unchanged — the field was already ignored. Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
1 parent 81e63fe commit f0d40a7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

crates/aft/src/subc.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,11 @@ async fn handle_control_request(
14611461
route_channel,
14621462
target: _,
14631463
identity,
1464-
config,
1464+
// Any wire-relayed `config` field is ignored via `..`: AFT reads config
1465+
// from CortexKit files, never the wire. `..` keeps this tolerant whether
1466+
// the protocol version still carries the field or has dropped it, so a
1467+
// protocol field-removal cannot break this destructure either way.
1468+
..
14651469
} => {
14661470
let route_id = route_key(route_channel);
14671471
if pending_binds.contains_key(&route_id) {
@@ -1502,10 +1506,9 @@ async fn handle_control_request(
15021506
// harness binding a project gets the identical on-disk config, so two
15031507
// trust domains sharing the per-root actor can never diverge or
15041508
// inherit each other's capabilities (the cross-bind escalation class).
1505-
// The `config` field on the wire is accepted by the protocol but no
1506-
// longer consulted; the per-tier trust boundary (user trusted, project
1509+
// Wire-relayed config tiers (if the protocol still carries them) are
1510+
// ignored entirely; the per-tier trust boundary (user trusted, project
15071511
// privileged-dropped) is applied to the FILE tiers in handle_configure.
1508-
let _ = &config; // wire config intentionally ignored — see above.
15091512
let local_tiers = crate::subc_config::read_local_cortexkit_config_tiers(
15101513
user_config_path,
15111514
Path::new(&bind_project_root),

0 commit comments

Comments
 (0)