Skip to content

Commit 0fee25f

Browse files
committed
fix: accept the prefrontal module id as first-party ahead of the rename
Module renames are flag-days (the daemon registry refuses duplicate active ids), and this allowlist is dialled rather than dialling, so it must accept the new name in a released binary before the module starts using it. Documented why transitional pairs live here: a missing entry silently downgrades a first-party module to Untrusted and revokes bash.
1 parent 42190c8 commit 0fee25f

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

crates/aft/src/subc/mod.rs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,22 @@ impl BindTrust {
269269
pub(super) fn trust_for_principal(principal: &Option<Principal>) -> BindTrust {
270270
match principal {
271271
Some(Principal::Direct) => BindTrust::FirstParty,
272+
// Module renames are flag-days: the daemon registry refuses duplicate
273+
// active ids, so a renaming module cannot advertise both names during
274+
// its transition. This allowlist is DIALLED, not dialling — it must
275+
// accept a module's NEW name in a released binary before the module
276+
// starts using it, and the old name stays until the flip has settled.
277+
// That is why transitional pairs appear here: llm-runner/broca was the
278+
// previous rename, alfonso-core/prefrontal is the current one. When
279+
// retiring an old name, confirm the fleet no longer spawns it — a
280+
// stale entry here is inert, but a missing one silently downgrades a
281+
// first-party module to Untrusted and revokes its bash access.
272282
Some(Principal::Reserved { module_id })
273283
if module_id == "llm-runner"
274284
|| module_id == "aft"
275285
|| module_id == "broca"
276-
|| module_id == "alfonso-core" =>
286+
|| module_id == "alfonso-core"
287+
|| module_id == "prefrontal" =>
277288
{
278289
BindTrust::FirstParty
279290
}
@@ -6260,6 +6271,20 @@ mod tests {
62606271
})),
62616272
BindTrust::FirstParty
62626273
);
6274+
// Both halves of each transitional rename pair stay first-party
6275+
// until the flip settles (see the allowlist comment).
6276+
assert_eq!(
6277+
trust_for_principal(&Some(Principal::Reserved {
6278+
module_id: "alfonso-core".to_string(),
6279+
})),
6280+
BindTrust::FirstParty
6281+
);
6282+
assert_eq!(
6283+
trust_for_principal(&Some(Principal::Reserved {
6284+
module_id: "prefrontal".to_string(),
6285+
})),
6286+
BindTrust::FirstParty
6287+
);
62636288
assert_eq!(
62646289
trust_for_principal(&Some(Principal::Reserved {
62656290
module_id: "subc-mcp".to_string(),

0 commit comments

Comments
 (0)