Skip to content

fix(scheduler): preserve public dispatch visibility - #1182

Merged
dcramer merged 11 commits into
mainfrom
codex/fix-scheduled-task-visibility
Aug 2, 2026
Merged

fix(scheduler): preserve public dispatch visibility#1182
dcramer merged 11 commits into
mainfrom
codex/fix-scheduled-task-visibility

Conversation

@dcramer

@dcramer dcramer commented Aug 1, 2026

Copy link
Copy Markdown
Member

Scheduled task dispatches now preserve the destination conversation's stored visibility through execution and transcript reporting, so tasks delivered to public Slack channels remain public instead of being redacted as private.

The conversation store is the single durable owner of destination visibility. Scheduler metadata and live Slack event metadata update that canonical record, and the agent-run boundary reads it when a resumed run has no live value. Conversation and channel ID prefixes are never inspected.

If visibility is unavailable, privacy-sensitive consumers warn and fail closed without persisting a private default. A task's source conversation never determines the destination conversation's visibility.

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 2, 2026 2:09am

Request Review

Comment thread packages/junior/src/api/conversations/access.ts Outdated
Comment thread packages/junior/src/chat/agent/index.ts
Comment thread packages/junior/src/chat/pi/client.ts Outdated
Comment thread packages/junior/src/chat/runtime/reply-executor.ts
Comment thread packages/junior/src/chat/services/turn-session-record.ts
Comment thread packages/junior/src/chat/conversations/destination-visibility.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e0a3028. Configure here.

Comment thread packages/junior/src/chat/slack/conversation-context.ts
@dcramer
dcramer marked this pull request as ready for review August 2, 2026 02:27
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Aug 2, 2026
@dcramer
dcramer merged commit 6fa2946 into main Aug 2, 2026
32 checks passed
@dcramer
dcramer deleted the codex/fix-scheduled-task-visibility branch August 2, 2026 02:34
dcramer added a commit that referenced this pull request Aug 2, 2026
## Summary

- replace `Source.type: "pub" | "priv"` with `Source.visibility:
"public" | "private"`
- hard-cut runtime, plugin, scheduler, memory, test, and eval consumers
to the canonical vocabulary
- migrate persisted conversation `source_json` records to the new field
and values

This PR is stacked on #1182 and should be retargeted to `main` after
that PR merges.

## Breaking change

Plugin authors must update source construction and reads from
`type`/`pub`/`priv` to `visibility`/`public`/`private`. There is no
compatibility reader; durable conversation records are upgraded by the
included SQL migration.

## Testing

- `pnpm typecheck`
- `pnpm --filter @sentry/junior exec vitest run
tests/unit/plugin-api-source.test.ts tests/unit/runtime/source.test.ts
tests/unit/plugins/agent-hooks.test.ts
tests/integration/heartbeat.test.ts
tests/integration/slack-schedule-tools.test.ts
tests/integration/conversation-sql.test.ts` (118 tests)
- `pnpm --filter @sentry/junior-memory test` (89 tests)
- `pnpm --filter @sentry/junior-github exec vitest run
tests/github-plugin.test.ts` (73 tests)
- `pnpm --filter @sentry/junior-plugin-api build`
- `pnpm --filter @sentry/junior-scheduler build`
- `pnpm lint` passed all source and architecture checks; the final
`publint` packaging step failed locally because it could not find pnpm's
tarball despite `pnpm pack` exiting successfully
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant