fix(seal-policy): extend dbus_disabled marker to coderabbit bundle + add us.i.posthog.com to coderabbit network grants (SEA-769)#484
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (16)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR generalizes the DBus-disable mechanism from GitHub-only to support both GitHub and Coderabbit bundles. The ChangesDBus disable field generalization and coderabbit bundle support
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Docs preview: https://870662e9.seal-docs.pages.dev |
Greptile SummaryThis PR extends the
Confidence Score: 5/5Safe to merge — the changes are a focused rename plus a well-tested extension of an existing mechanism to a second bundle. The rename from gh_dbus_disabled to dbus_disabled is applied consistently across all 16 changed files with no missed sites. The addition of coderabbit to resolve_dbus_disabled mirrors the existing gh path exactly, and is covered by four new unit tests including positive, negative, and hash-flip cases. The us.i.posthog.com domain grant is low-risk — it unblocks outbound telemetry that was already occurring (and 403ing) rather than opening a new egress path. The one pre-existing dead-code line (is_direnv_wrap_target) was already flagged in a previous review and does not affect correctness. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["spawn request\n(matched_pattern)"] --> B{"gh_credential_helper\nactive?"}
B -- yes --> E["dbus_disabled = true"]
B -- no --> C{"loop: entry in\ncommand_tools"}
C --> D{"entry.name ==\n'gh' OR 'coderabbit'?"}
D -- no --> C
D -- yes --> F{"bundle_applies\n(entry, pattern)?"}
F -- no --> C
F -- yes --> E
C -- exhausted --> G["dbus_disabled = false"]
E --> H["dispatcher injects\nDBUS_SESSION_BUS_ADDRESS=disabled:"]
G --> I["no DBus env injected"]
H --> J["libsecret fails-fast\n→ falls back to --api-key / file token"]
Reviews (3): Last reviewed commit: "fix(seal-policy, seal-sandbox): coderabb..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/seal-policy/src/manifest/sandbox.rs`:
- Around line 1709-1722: Update the explanatory comment around the
"us.i.posthog.com" entry to explicitly state this is PostHog's US
ingestion/capture host (used for capture/ingest API paths like /i/v0/e/) and
clarify that it is distinct from the PostHog app domain (e.g., us.posthog.com);
reference the string "us.i.posthog.com" in the comment and replace or append the
existing text so readers understand this is the ingestion endpoint used for
telemetry requests.
In `@schemas/seal.toml.json`:
- Line 260: The ExpandedTool entry for "coderabbit" still has the old
default-network text; update the coderabbit description string in the
ExpandedTool (the "coderabbit" / "cr" docblock) so its default network list
includes "cli.coderabbit.ai" and "us.i.posthog.com" to match the shorter/schema
description—ensure the same phrasing used earlier (including "*.coderabbit.ai",
"cli.coderabbit.ai", "us.i.posthog.com", and GitHub) and keep the rest of the
env-var and API-key explanation unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 51e05d6c-c1b2-450c-807e-e0d278de36f3
📒 Files selected for processing (16)
crates/seal-policy/src/manifest/sandbox.rscrates/seal-policy/src/manifest/tests/grant_synthesis.rscrates/seal-runtime/src/scope/sandbox_spawn/linux.rscrates/seal-runtime/src/scope/sandbox_spawn/macos.rscrates/seal-runtime/src/scope/sandbox_spawn/mod.rscrates/seal-runtime/src/scope/tool_scope.rscrates/seal-runtime/tests/bwrap_dispatcher_integration.rscrates/seal-runtime/tests/integration/e2e/sandbox_command_run.rscrates/seal-sandbox/src/compile.rscrates/seal-sandbox/src/kernel_params.rscrates/seal-sandbox/src/linux.rscrates/seal-sandbox/src/macos.rscrates/seal-sandbox/tests/bwrap_integration.rscrates/seal-sandbox/tests/sandbox_exec_integration.rsdocs/site/src/content/docs/reference/manifest/sandbox/command-tools.mdxschemas/seal.toml.json
a750d89 to
8be9f83
Compare
…N_BUS_ADDRESS=disabled: + grants us.i.posthog.com so cr review --api-key doesn't hang on libsecret probe or 403 on telemetry + rename gh_dbus_disabled -> dbus_disabled (SEA-769)
8be9f83 to
61f0d6f
Compare

Pull request
Summary
The
coderabbitbundle now injectsDBUS_SESSION_BUS_ADDRESS=disabled:into the spawn environment (the same fix already applied togh) so thatcr's unconditional libsecret startup probe fails fast instead of blocking indefinitely inside the bwrap namespace. The bundle's allowed network list also gainsus.i.posthog.comso the CLI's PostHog telemetry calls succeed and don't surface 403 errors into the structured agent-mode review report.Related issues
Refs SEA-769
Changes
resolve_gh_dbus_disabledrenamed toresolve_dbus_disabled; thecoderabbitbundle name is added alongsideghas a trigger so anycoderabbit:*orcr:*spawn sets thedbus_disabledmarker.KernelParams.gh_dbus_disabledfield renamed todbus_disabledwith updated doc-comment covering both theghandcoderabbitcases.us.i.posthog.comadded to thecoderabbitbundle's allowed domain list so telemetry flushes on startup and review completion don't 403 at the proxy and pollute the review report.dbus_disabled.coderabbit_alone_on_coderabbit_pattern_sets_dbus_disabled,coderabbit_alone_on_cr_pattern_sets_dbus_disabled,coderabbit_granted_on_unrelated_pattern_omits_dbus_disabled, andkernel_params_hash_flips_with_coderabbit_dbus_disabled.Test plan
seal-sandbox/src/compile.rscover thecoderabbit:*andcr:*pattern cases, the negative case (coderabbit bundle granted but unrelated pattern), and the kernel-params hash flip.gh_dbus_disabledtests (nowdbus_disabled) continue to pass unchanged in behavior.coderabbit_bundle_curated_domainsassertion updated to includeus.i.posthog.comand verified against the bundle definition.us.i.posthog.comis in the synthesized domain allowlist for acoderabbitcommand-tools entry.Notes for reviewers
The
dbus_disabledmarker is intentionally shared betweenghandcoderabbitrather than introducing a second per-bundle flag — both cases are "libsecret-using binary in the bwrap namespace, needs the same env-var short-circuit." Theresolve_dbus_disableddoc-comment enumerates all triggers explicitly so the full set is discoverable from a single grep.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.