Repository navigation
atlas(python): enforce disclosure-context ceilings in atlas_search.py (#12623) - #12633
Conversation
…#12623) The legacy Python CLI applied only the caller --max-sensitivity ceiling, so output through it bypassed the #12404 boundary enforcement: add a --context flag (design section 4 table, default local-owner) and apply the context/caller-ceiling intersection at render for search results, neighbor expansion, full-message payloads, and get-chunk. The excluded_personal_life disposition is never served and unknown/missing labels fail closed. Tests mirror crates/atlas-core/tests/disclosure.rs.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72db26db5e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed both findings in 1ce40db: chunk/neighbor output authorization now uses the raw chunk classification (missing classifications cannot inherit session labels), and disclosure context × caller × classification is checked exhaustively against an independent rank-based oracle. Laptop verification: py_compile passed; unittest discover 13/13 passed; git diff --check passed. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Follow-up to #12404: the legacy Python CLI applied only the caller
--max-sensitivityceiling, so output through it bypassed the boundary enforcement #12404 landed for the Rust paths.Change
--contextflag on bothsearchandget-chunkwith the design §4 table (fleet-internal → local-only, hosted-per-user → personal, public-surface → shareable, local-owner → secret-bearing; defaultlocal-owner, matching the Rustget-chunkdefault). Unknown contexts fail closed to the public-surface ceiling.where(), vector branch, Turso allowed-ids/index post-filter — all driven byFilters.allowed_sens), neighbor expansion, full-message payloads (withheld as a whole when any chunk in the message exceeds the boundary), andget-chunk(withheld as not-found).excluded_personal_lifeis never served in any context; unknown/missing labels fail closed.searchstill defaults to apersonalcaller ceiling,get-chunktosecret-bearing, both underlocal-owner, so existing local-owner invocations behave as before for classified content.pkgs/atlas-search/tools/tests/test_disclosure.pymirrorcrates/atlas-core/tests/disclosure.rs(context table, intersection, fail-closed, neighbor filtering, message withholding).One deliberate divergence from atlas-core:
chunk_classificationresolves an unknown label to secret-bearing (servable at local-owner), while this CLI never serves unclassified content — matching its search ceiling filter, which already excluded NULL sensitivity before this slice. The test documents the choice.Verification
On the laptop worktree (base main f026268, the merged #12404 Rust slice):
python3 -m py_compile pkgs/atlas-search/atlas_search.py pkgs/atlas-search/tools/tests/test_disclosure.py— OKpython3 -I -m unittest discover -s pkgs/atlas-search/tools/tests -v— 11 tests, OK (6 new disclosure tests + 5 pre-existing sweep tests)atlas_search.py search --help/get-chunk --help—--context/--max-sensitivitypresent with the documented defaultsNo Rust changes; no whole-suite run (narrowest verification per the slice).
Refs #12623
<a href="
https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1797958657&installation_model_id=443529&pr_number=12633&ref=codesmith_pr_footer&repository=developing-today%2Fcode&return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fpull%2F12633&variant=run_proof_on_this_pr&signature=1e96c0d09200ab615e60d5c938e1f154a548a3516c34d8e8446a327d49e2fbef"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-light.svg"><img alt="Run Proof on this PR" src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-dark-3x.png" width="168" height="28">Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Generated by Claude Code