Repository navigation
set_visibility purges the edge cache - #34
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Visibility update and cache purge crates/outer/src/mcp/tools/apps.rs, crates/outer/src/mcp/tests.rs |
After the visibility update succeeds, set_visibility calls purge_host_cache for the app host. The purge result is not propagated. The test checks that the fake endpoint receives one request for that host. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- ryuzcorp/outer#20: Adds the shared cache-purge configuration and function used by this change.
- ryuzcorp/outer#19: Adds host-cache purging after app deletion, using the same app host and purge client.
- ryuzcorp/outer#14: Adds the
set_visibilitytool that this change extends.
Merge Risk: 
Minimal · up to 503c2
-
The visibility purge change is mergeable with no identified actionable risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "set_visibility purges the edge cache" matches the main change. The PR adds a best-effort, awaited purge of the app host when set_visibility changes an app's visibility, which addresses cached /robots.txt responses persisting after switching between public and unlisted. The title names the function and the behavior, and it is short and specific. It does not mention the robots.txt motivation, but that detail is not required.
-
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
) * App secrets: AES-256-GCM module, OUTER_SECRET config, key wiring New crate::secrets: HKDF-SHA256 key derivation from OUTER_SECRET (label 'outer app-secret v1'), AES-256-GCM values with per-value random nonce and AAD binding app_id+name, name/reserved validation, 50-cap with a race-safe guarded INSERT, decrypt_all failing closed. OUTER_SECRET parsed in config (dev default, refused off localhost, redacted in Debug) and derived once at boot into McpState and DeploySettings. * MCP secret tools: list_secrets, set_secret, unset_secret Owner-scoped via owned_app; name shape + reserved-name + 4KiB checks; values never in output, summaries carry names only (LOGGED_TOOLS). Hints: list READ, set WRITE, unset DESTRUCTIVE. Registry/tests counts updated (30 tools). Tests: roundtrip without values, refusals, foreign app not_found, 50-cap, value absent from agent_action rows. * Deploy: inject secrets as Worker vars, scrub after upload deploy_step decrypts after the gate, merges secrets over code-defined vars (overwrite journaled by name), writes the config 0600, uploads, then restores byte-identically. Builds never see secrets (env: &[]). Fake-celld saves the deployed config, fake-bun records build env; test pins decrypted vars in the upload, absence in build env, scrubbed worktree. * Docs: Secrets section in celld guide, regenerate tools.md * Fix the merged test file after rebasing onto #34 * Secrets hardening: symlink-pinned inject, RAII scrub, strict names F1: find_deploy_config/read/inject/restore refuse symlinks (symlink_metadata, O_NOFOLLOW, temp+rename atomic replace 0600). F2: InjectedSecrets restores on Drop; sidecar stash under {data}/secret-sidecars replayed by scrub_interrupted_injections at boot next to fail_interrupted. F3: check_name enforces ^[A-Z_][A-Z0-9_]{0,63}$ exactly. F4: check_reserved refuses all BUN_*; sink skips reserved or misshapen rows with a warning. F5: SetSecretInput Debug redacts. * Secrets injection keeps the config's owner (celld deploy runs as the app uid; found live)
Found by the M1 acceptance script: after
set_visibility public,/robots.txtstill disallowed everything — Cloudflare had cached the unlisted answer (cf-cache-status: HIT,max-age=14400), so a public flip could keep crawlers out for hours (and an unlisted flip could keep serving an indexable robots.txt).set_visibilitynow purges<slug>.<apps_domain>like deploys and deletes do (best-effort, awaited).Test
set_visibility_purges_the_app_host(fails before the change). 413 tests pass.Live (
outer:503c2db):scripts/m1-acceptance.sh --only visibilityon pwa-check → 5/5 PASS (unlisted header + robots, public header + robots passes through, restore).Summary by CodeRabbit