feat(zendesk): article and ticket access for permission sync #18701
All Vouch review confidence checks passed
Residual risk 0.43 = Change Risk (0.75) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #18701"
general
weight: 0.35
evan-onyx
Description
Second PR for Zendesk permission sync, on top of #18699. It adds who may read each article and ticket, sets that access when indexing with permissions and in the perm-sync slim walk, and adds the doc-sync capability checks. The sync is not registered yet; the next PR adds group sync and the registration.
Articles (
ee/onyx/external_permissions/zendesk/access.py)<subdomain>:all_users). Public only when Zendesk serves the article to a request without credentials, checked once per run (is_article_public; a redirect or a non-article answer is not public).<subdomain>:segment:<id>for each, plus<subdomain>:guide_managers.Tickets
group:<id>), agents whose role adds every public group (public_groups), and agents restricted to the ticket's organization (org_agents:<id>).include=userssideload, so no extra lookups).grant_end_usersconnector option, and only for tickets without an internal note. The option is off by default: finding internal notes reads every such ticket's comments on each sync, since the ticket events export leaves out some private comments. The form warns that it slows syncing a lot. A user with no known role counts as an end user, and a ticket whose comments return 404 counts as having an internal note.Connector
CheckpointedConnectorWithPermSync: indexing with permissions reuses the comments it already reads.retrieve_all_slim_docs(pruning) reads no access;retrieve_all_slim_docs_perm_syncsets it.submitter, but the field issubmitter_id, so tickets never had an owner.Checks (DOC_PERMISSION_SYNC):
zendesk_perm_sync_admin(the token's user is an admin),zendesk_article_access,zendesk_ticket_access(users' emails and comments are readable).How Has This Been Tested?
onyx_ps_fixtures on the CI Zendesk account: indexing and the perm-sync slim walk give the same access for every document, and it matches what each fixture user can open in Zendesk (requester, CC, org peer, follower, private-group member, assignee, restricted segments).tests/daily/connectors/zendesk, the source-operation coverage and import fence tests, and the web connector tests pass.Docs
documentation/for the page's reader and task, at the level of detail of the whole page.Permission sync is not registered until the next PR, which updates the Zendesk docs page.
Additional Options
🤖 Generated with Claude Code
<!-- This is an auto-generated description by cubic. -->
---
Summary by cubic
Adds who may read each Zendesk article and ticket, sets that access when indexing with permission sync and in the permission-sync slim walk, and adds the permission-sync capability checks. Fixes tickets never having an owner because the submitter was read from
submitterinstead ofsubmitter_id.grant_end_usersconnector option (off by default) is on, since finding internal notes reads every such ticket's comments and slows syncing a lot.<sup>Written for commit fb7bd9ac4977946768343e783fe587b7eff82c81. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/onyx-dot-app/onyx/pull/18701?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/onyx-dot-app/onyx/18701?returnTo=https%3A%2F%2Fgithub.com%2Fonyx-dot-app%2Fonyx%2Fpull%2F18701&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Zendesk ticket connectors can grant eligible end users, including requesters and CCs, access to tickets without internal notes. This option is available for ticket sources and is off by default; enabling it may increase sync time.
Permission syncing reflects Zendesk article visibility, ticket groups, organizations, and user roles.
Bug Fixes
Ticket listings exclude deleted tickets, and article listings omit drafts, skipped articles, and articles without a body.
Stop requests no longer return partial listings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->