Skip to main content

reject_ambient_home_dir_binding

Function reject_ambient_home_dir_binding 

Source
fn reject_ambient_home_dir_binding(
    account: &IdentityAccount,
) -> Result<(), String>
Expand description

Refuses to persist an OAuth account bound directly to its provider’s ambient home dir (e.g. ~/.claude) — nothing downstream validates secret_ref.dir, and a real, currently-live account configured exactly this way was found in this repo’s own data (docs/status/STATUS_IDENTITY_ISOLATION_GATE_NOT_ENFORCING_2026_08_20.md §8). Split out of the upsertidentityaccount handler closure so it’s directly unit-testable without spinning up the RPC engine. See docs/specs/SPEC_BLOCK_AMBIENT_HOME_DIR_IDENTITY_BINDING_2026_08_25.md.