docs: correct the execution_mode and custom-path scoping rationale

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-08-07 11:49:39 +02:00
parent dd0c4d2e59
commit a452cf2c61
2 changed files with 4 additions and 4 deletions
@@ -6409,8 +6409,8 @@ fn downgrade_cloned_app_policy(policy: &mut serde_json::Value, authed: &ApiAuthe
"on_behalf_of_email".to_string(),
serde_json::Value::String(authed.email.clone()),
);
// A policy missing `execution_mode` counts as anonymous: the safe reading, since no
// reader here decides what it would have meant.
// A policy without `execution_mode` gets one too: `Policy` declares no serde default
// for the field, so such a row does not read back as a policy until something writes it.
let anonymous = obj
.get("execution_mode")
.and_then(|m| m.as_str())
+2 -2
View File
@@ -19,8 +19,8 @@ lazy_static::lazy_static! {
}
/// Whether an app's custom path names it within its workspace rather than instance-wide.
/// Every site that stores or resolves one must agree: a path stored under a narrower scope
/// than the resolver's makes two apps answer the same public URL.
/// A path stored under a narrower scope than the one its resolver applies leaves two apps
/// answering the same public URL, so storage and resolution must decide it the same way.
pub fn custom_path_is_workspace_scoped() -> bool {
*crate::worker::CLOUD_HOSTED || APP_WORKSPACED_ROUTE.load(std::sync::atomic::Ordering::Relaxed)
}