Skip to content

Commit 0b74bac

Browse files
ualtinokalfonso-aft
andcommitted
chore(subc): bump subc-protocol 0.5 + subc-transport 0.2.2
Paired re-pin to the live wire (single subc-protocol 0.5.0 in the tree, no diamond split). Wire-proven against a real 0.5.0 daemon: auth, ModuleHello with launch_nonce echo, HelloAck/storage tolerance, RouteBind reconcile, status + read tool dispatch, and config_divergence reject. - Echo SUBC_LAUNCH_NONCE in ModuleHelloBody so a reserved module_id's HELLO is accepted (absent for non-reserved/self-connect). - Drop the construct-only, never-read ConfigBinding from the manifest (removed from the 0.5 manifest; Bindings is now storage/vault_grants/ identity). - Test harness: ModuleHelloAckBody.storage (added in 0.5) and drop the RouteBind.config tier (removed in 0.5; already a no-op for AFT, which reads config from disk, not the wire). Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
1 parent 5da4e8c commit 0b74bac

4 files changed

Lines changed: 13 additions & 28 deletions

File tree

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/aft/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ htmd = "0.5.4"
114114
# codec (Frame + read_frame/write_frame) lands via subc-protocol/subc-transport
115115
# bumps when the Hello-onward control loop is wired. tokio runs ONLY at the
116116
# --subc transport edge; AFT's command core stays synchronous.
117-
subc-protocol = "0.4.0"
118-
subc-transport = "0.2.1"
117+
subc-protocol = "0.5"
118+
subc-transport = "0.2.2"
119119
tokio = { version = "1", features = ["rt", "net", "io-util", "time", "sync", "macros"] }
120120

121121
[target.'cfg(unix)'.dependencies]

crates/aft/src/subc.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ use crate::protocol::{ProgressKind, PushFrame, RawRequest, Response};
3131
use crate::runtime_drain;
3232

3333
use subc_protocol::manifest::{
34-
Bindings, Concurrency, ConfigBinding, ConfigSource, ExecutionMode, IdentityBinding,
35-
IdentityScope, ModuleManifest, ProviderRole, StorageBinding, StorageKind, StorageScope, Tool,
36-
TrustTier,
34+
Bindings, Concurrency, ExecutionMode, IdentityBinding, IdentityScope, ModuleManifest,
35+
ProviderRole, StorageBinding, StorageKind, StorageScope, Tool, TrustTier,
3736
};
3837
use subc_protocol::session::{ModuleControlRequest, ModuleControlResponse};
3938
use subc_protocol::{
@@ -898,10 +897,13 @@ where
898897
W: AsyncWrite + Unpin + Send + 'static,
899898
{
900899
// ModuleHello: register as a tool provider. control_ops:None = full baseline.
900+
// Echo the one-time launch nonce the daemon injected via SUBC_LAUNCH_NONCE so a
901+
// reserved module_id's HELLO is accepted; absent for non-reserved/self-connect.
901902
let hello = ModuleHelloBody {
902903
manifest: build_manifest(),
903904
protocol_ver: PROTOCOL_VERSION,
904905
control_ops: None,
906+
launch_nonce: std::env::var("SUBC_LAUNCH_NONCE").ok(),
905907
};
906908
let hello_frame = Frame::build(
907909
FrameType::Hello,
@@ -2322,11 +2324,6 @@ fn build_manifest() -> ModuleManifest {
23222324
scope: StorageScope::Project,
23232325
owns_schema: true,
23242326
},
2325-
config: ConfigBinding {
2326-
source: ConfigSource::SubcMediated,
2327-
tiers: vec!["user".to_string(), "project".to_string()],
2328-
expansion: std::collections::BTreeMap::new(),
2329-
},
23302327
vault_grants: Vec::new(),
23312328
identity: IdentityBinding {
23322329
requires: vec![IdentityScope::Project],

crates/aft/tests/integration/subc_bridge_test.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,7 @@ async fn drive_s1_rejection_daemon(
14361436
negotiated_ver: PROTOCOL_VERSION,
14371437
subc_ops: Vec::new(),
14381438
subc_capabilities: Vec::new(),
1439+
storage: None,
14391440
})
14401441
.expect("hello ack body"),
14411442
)
@@ -1454,11 +1455,6 @@ async fn drive_s1_rejection_daemon(
14541455
harness: "mcp:generic".to_string(),
14551456
session: "s1-session".to_string(),
14561457
},
1457-
config: vec![user_config_tier(json!({
1458-
"callgraph_store": false,
1459-
"search_index": false,
1460-
"semantic_search": false,
1461-
}))],
14621458
};
14631459
send_frame(
14641460
&mut stream,
@@ -1558,6 +1554,7 @@ async fn open_fake_daemon_session(input: FakeDaemonInput) -> FakeDaemonSession {
15581554
negotiated_ver: PROTOCOL_VERSION,
15591555
subc_ops: Vec::new(),
15601556
subc_capabilities: Vec::new(),
1557+
storage: None,
15611558
})
15621559
.expect("hello ack body"),
15631560
)
@@ -2798,7 +2795,6 @@ async fn send_route_bind_with_session_and_doc(
27982795
harness: "opencode".to_string(),
27992796
session: session.to_string(),
28002797
},
2801-
config: vec![user_config_tier(doc)],
28022798
};
28032799
send_frame(
28042800
stream,
@@ -3895,14 +3891,6 @@ fn is_callgraph_building(response: &Value) -> bool {
38953891
response.get("code").and_then(Value::as_str) == Some("callgraph_building")
38963892
}
38973893

3898-
fn user_config_tier(doc: Value) -> subc_protocol::session::ConfigTier {
3899-
subc_protocol::session::ConfigTier {
3900-
tier: "user".to_string(),
3901-
source: "/tmp/aft-subc-bridge-test-user.jsonc".to_string(),
3902-
doc: doc.to_string(),
3903-
}
3904-
}
3905-
39063894
fn control_flags() -> Flags {
39073895
Flags::new(false, Priority::Passive, false)
39083896
}

0 commit comments

Comments
 (0)