Skip to content

feat(hosting): default self-hosted realtime streams to v2 (s2-lite)#4185

Open
matt-aitken wants to merge 1 commit into
mainfrom
feat/self-host-realtime-streams-v2
Open

feat(hosting): default self-hosted realtime streams to v2 (s2-lite)#4185
matt-aitken wants to merge 1 commit into
mainfrom
feat/self-host-realtime-streams-v2

Conversation

@matt-aitken

Copy link
Copy Markdown
Member

Summary

Realtime streams (AI-agent token streaming and run streams) now default to v2 for self-hosters, backed by a bundled s2-lite service. Self-hosting previously shipped no S2 configuration, so streams ran on the Redis-backed v1 path and there were no docs for wiring up v2. Both the Docker Compose stack and the Helm chart now provision s2-lite with persistent storage and set the stream env vars out of the box.

What's included

  • Docker Compose: a persistent s2 service (s2-lite), a basin init spec, and the REALTIME_STREAMS_S2_* plus REALTIME_STREAMS_DEFAULT_VERSION=v2 env on the webapp. .env.example documents the v1 fallback and hosted-S2 options.
  • Helm: an s2 StatefulSet, PVC, Service and ConfigMap (runs as the non-root image user via fsGroup), an s2 values block, and webapp env wiring with an existing-secret path for hosted S2.
  • Docs: the REALTIME_STREAMS_S2_* and REALTIME_STREAMS_DEFAULT_VERSION vars in the webapp env reference, plus a "Realtime streams" section in the Docker and Kubernetes self-hosting guides.

Notes

  • The OSS code default stays v1; v2 becomes the default purely through the self-hosting artifacts, so non-self-host deployments are unaffected. Disabling s2, or setting the version back to v1, cleanly reverts to Redis-backed v1.
  • With v2 enabled, the bundled s2 service is a required dependency for streaming: if it is down, streams error while the task itself still runs. That is the intended trade for the better v2 path.
  • You can point at a hosted S2 at s2.dev instead of the bundled server.

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c83588e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8d121144-9b0b-46c9-96d4-2bb2598c4b15

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This pull request adds realtime streams v2 support backed by S2 across Docker Compose and Helm. It introduces bundled S2 deployment, external S2 configuration, and validation for conflicting settings. Webapp configuration is updated to select the default stream version and pass S2 connection settings. Documentation and example environment files are updated to describe the new realtime streams options.

Related Issues: None specified

Related PRs: None specified

Suggested labels: documentation, infrastructure, helm, docker

Suggested reviewers: None specified

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning It omits required template sections like Closes #issue, Testing, Changelog, Screenshots, and the checklist. Add the missing template sections, include the linked issue number, testing steps, changelog, and screenshots if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main self-hosted realtime streams v2 change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/self-host-realtime-streams-v2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧭 Helm Chart Prerelease Published

Version: 4.5.1-pr4185.c83588e

Install:

helm upgrade --install trigger \
  oci://ghcr.io/triggerdotdev/charts/trigger \
  --version "4.5.1-pr4185.c83588e"

⚠️ This is a prerelease for testing. Do not use in production.

@matt-aitken matt-aitken force-pushed the feat/self-host-realtime-streams-v2 branch from 4fc2c74 to b2af677 Compare July 7, 2026 15:53
coderabbitai[bot]

This comment was marked as resolved.

@matt-aitken matt-aitken force-pushed the feat/self-host-realtime-streams-v2 branch from b2af677 to cc6d043 Compare July 7, 2026 16:07

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
docs/self-hosting/env/webapp.mdx (1)

146-146: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Basin naming constraints are incomplete.

Only the minimum length is documented. S2 basin names have additional constraints: max 48 characters, lowercase letters/numbers/hyphens only, and no leading/trailing hyphen.

📝 Proposed doc fix
-| `REALTIME_STREAMS_S2_BASIN`                       | No       | —                     | S2 basin that holds v2 realtime streams. Required for `v2`. Must be at least 8 characters.                          |
+| `REALTIME_STREAMS_S2_BASIN`                       | No       | —                     | S2 basin that holds v2 realtime streams. Required for `v2`. Must be 8-48 characters, lowercase letters/numbers/hyphens, and cannot start or end with a hyphen. |
hosting/k8s/helm/templates/s2.yaml (1)

40-40: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Checksum only tracks basin, not the full spec.

If the ConfigMap template gains more values-driven fields later, this checksum won't catch them and pods won't roll. Consider checksumming the full rendered ConfigMap content instead of a single field for future-proofing.

♻️ Suggested improvement
-        checksum/spec: {{ .Values.s2.basin | sha256sum }}
+        checksum/spec: {{ include "trigger-v4.fullname" . | printf "%s-s2-spec" | sha256sum }}

Or better, checksum the rendered ConfigMap data block directly if the template structure allows referencing it.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8e8ef05f-2996-4d8c-82ac-dc2c559f2b04

📥 Commits

Reviewing files that changed from the base of the PR and between 4fc2c74 and b2af677.

📒 Files selected for processing (9)
  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
  • docs/self-hosting/kubernetes.mdx
  • hosting/docker/.env.example
  • hosting/docker/webapp/docker-compose.yml
  • hosting/k8s/helm/templates/_helpers.tpl
  • hosting/k8s/helm/templates/s2.yaml
  • hosting/k8s/helm/templates/webapp.yaml
  • hosting/k8s/helm/values.yaml
✅ Files skipped from review due to trivial changes (2)
  • docs/self-hosting/kubernetes.mdx
  • hosting/docker/.env.example
🚧 Files skipped from review as they are similar to previous changes (3)
  • hosting/k8s/helm/templates/webapp.yaml
  • hosting/k8s/helm/templates/_helpers.tpl
  • hosting/k8s/helm/values.yaml
📜 Review details
⚠️ CI failures not shown inline (4)

GitHub Actions: 📝 Agent Instructions Audit / audit: feat(hosting): default self-hosted realtime streams to v2 (s2-lite)

Conclusion: failure

View job details

##[group]Run anthropics/claude-code-action@428971d2ecd6e3a7cb0ee0da2a3a8b33fdb3678d
 with:
   anthropic_***REDACTED***
   use_sticky_comment: true
   allowed_bots: devin-ai-integration[bot]
   claude_args: --max-turns 25
--model claude-opus-4-8
--allowedTools "Read,Glob,Grep,Bash(git diff:*)"
   prompt: You are reviewing a PR to check whether any agent instruction files need updating.
In this repo:
- Root shared agent guidance lives in `AGENTS.md`.
- Root `CLAUDE.md` is only a Claude Code adapter that imports `AGENTS.md`.
- Subdirectories may still have scoped `CLAUDE.md` files.
- `.claude/rules/` contains additional Claude Code guidance.
## Your task
1. Run `git diff origin/main...HEAD --name-only` to see which files changed in this PR.
2. For each changed directory, check the applicable instruction files: root `AGENTS.md`, any `CLAUDE.md` in that directory or a parent directory, and relevant `.claude/rules/` files.
3. Determine if any instruction file should be updated based on the changes. Consider:
   - New files/directories that aren't covered by existing documentation
   - Changed architecture or patterns that contradict current agent guidance
   - New dependencies, services, or infrastructure that agents should know about
   - Renamed or moved files that are referenced in an instruction file
   - Changes to build commands, test patterns, or development workflows
## Response format
If NO updates are needed, respond with exactly:
✅ Agent instruction files look current for this PR.
If updates ARE needed, respond with a short list:
📝 **Agent instruction updates suggested:**
- `AGENTS.md`: [what should be added/changed]
- `path/to/CLAUDE.md`: [what should be added/changed]
- `.claude/rules/file.md`: [what should be added/changed]
Keep suggestions specific and brief. Only flag things that would actually mislead agents in future sessions.
Do NOT suggest updates for trivial changes (bug fixes, small refactors within existing patterns).
Do NOT suggest creating new...

GitHub Actions: 📝 Agent Instructions Audit / 0_audit.txt: feat(hosting): default self-hosted realtime streams to v2 (s2-lite)

Conclusion: failure

View job details

0-beta.51 -> `@trigger.dev/yalt`@3.0.0-beta.51
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.52 -> `@trigger.dev/yalt`@3.0.0-beta.52
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.53 -> `@trigger.dev/yalt`@3.0.0-beta.53
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.55 -> `@trigger.dev/yalt`@3.0.0-beta.55
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.6 -> `@trigger.dev/yalt`@3.0.0-beta.6
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.7 -> `@trigger.dev/yalt`@3.0.0-beta.7
  * [new tag]             build-alert-hotfix.rc1      -> build-alert-hotfix.rc1
  * [new tag]             build-alert-hotfix.rc2      -> build-alert-hotfix.rc2
  * [new tag]             build-arm-builds-rc.1       -> build-arm-builds-rc.1
  * [new tag]             build-arm-builds-rc.2       -> build-arm-builds-rc.2
  * [new tag]             build-arm-builds-rc.3       -> build-arm-builds-rc.3
  * [new tag]             build-batchid-carryover-rc.0 -> build-batchid-carryover-rc.0
  * [new tag]             build-batching-rc.1         -> build-batching-rc.1
  * [new tag]             build-batching-rc.2         -> build-batching-rc.2
  * [new tag]             build-billing-0.0.1         -> build-billing-0.0.1
  * [new tag]             build-billing-0.0.2         -> build-billing-0.0.2
  * [new tag]             build-billing-0.0.3         -> build-billing-0.0.3
  * [new tag]             build-buildinfo-rc.0        -> build-buildinfo-rc.0
  * [new tag]             build-buildinfo-rc.1        -> build-buildinfo-rc.1
  * [new tag]             build-checkpoint-failover-rc.1 -> build-checkpoint-failover-rc.1
  * [new tag]             build-checkpoint-race-condition-1 -> build-checkpoint-race-condition-1
  * [new tag]             build-checkpoint-race-condition-2 -> build-checkpoint-race-condition-2
  * [new tag]             build-checkpoint-race-condition-3 -> build-checkpoint-race-condition-3
  * [new tag]             build-chris-test-blacksmith -> build-chris-test-blacksmith...

GitHub Actions: 🔎 REVIEW.md Drift Audit / audit: feat(hosting): default self-hosted realtime streams to v2 (s2-lite)

Conclusion: failure

View job details

##[group]Run anthropics/claude-code-action@428971d2ecd6e3a7cb0ee0da2a3a8b33fdb3678d
 with:
   anthropic_***REDACTED***
   use_sticky_comment: true
   allowed_bots: devin-ai-integration[bot]
   claude_args: --max-turns 30
--allowedTools "Read,Glob,Grep,Bash(git diff:*)"
   prompt: You are auditing this PR for drift against `.claude/REVIEW.md`.
## Context
`.claude/REVIEW.md` is the repo's source of truth for what AI / agent code reviewers should treat as critical findings (rolling-deploy safety, hot-table indexes, recovery-path queries, testcontainers usage, Lua versioning, etc.). It is consumed by review agents to calibrate severity. If REVIEW.md goes stale, every future agent review degrades.
## Strategy — read this first
You have a hard turn budget. Spend it on signal, not coverage. The audit is allowed to miss things; it is NOT allowed to time out.
1. Read `.claude/REVIEW.md` once, in full.
2. Run `git diff origin/main...HEAD --name-only` to get the list of changed files. Do NOT read the diff content yet.
3. Scan the file-list for relevance to REVIEW.md scope. Relevance signals: changes to Prisma schema, Redis / queue / Lua code, hot tables, recovery / restart loops, new packages, deletions of paths REVIEW.md cites. Skim everything else.
4. Open at most **5 files** total — only the ones most likely to surface a real signal. If nothing in the file-list looks relevant to any REVIEW.md rule, do NOT read any files; go straight to the verdict.
5. Form a verdict and stop. Do not exhaust the turn budget exploring.
Large PRs (>50 files changed) are a strong signal to be MORE selective, not more thorough. Pick 3-5 files at most.
## What to look for
- **Stale references** — does any REVIEW.md rule cite a file, directory, function, table, Prisma model, or package name that has been removed or renamed in this PR (or is already gone from `main`)?
- **Contradictions** — does code in this PR clearly violate a current REVIEW.md rule? (Don't re-review the PR. Only flag if REVIE...

GitHub Actions: 🔎 REVIEW.md Drift Audit / 0_audit.txt: feat(hosting): default self-hosted realtime streams to v2 (s2-lite)

Conclusion: failure

View job details

.rc1
  * [new tag]             build-hotfix-unflatten.rc1  -> build-hotfix-unflatten.rc1
  * [new tag]             build-hotfix-wq-len         -> build-hotfix-wq-len
  * [new tag]             build-lazy-attempts-rc.1    -> build-lazy-attempts-rc.1
  * [new tag]             build-lazy-attempts-rc.2    -> build-lazy-attempts-rc.2
  * [new tag]             build-lazy-attempts-rc.3    -> build-lazy-attempts-rc.3
  * [new tag]             build-lazy-attempts-rc.4    -> build-lazy-attempts-rc.4
  * [new tag]             build-lazy-attempts-rc.5    -> build-lazy-attempts-rc.5
  * [new tag]             build-legacy-run-engine.fix1 -> build-legacy-run-engine.fix1
  * [new tag]             build-legacy-run-engine.fix2 -> build-legacy-run-engine.fix2
  * [new tag]             build-legacy-run-engine.fix3 -> build-legacy-run-engine.fix3
  * [new tag]             build-manual-checkpoints.rc1 -> build-manual-checkpoints.rc1
  * [new tag]             build-metadata-upgrade-logging.rc1 -> build-metadata-upgrade-logging.rc1
  * [new tag]             build-metadata-upgrade-logging.rc2 -> build-metadata-upgrade-logging.rc2
  * [new tag]             build-metadata-upgrade-logging.rc3 -> build-metadata-upgrade-logging.rc3
  * [new tag]             build-new-build-system.rc.1 -> build-new-build-system.rc.1
  * [new tag]             build-otel-upgrade-rc.0     -> build-otel-upgrade-rc.0
  * [new tag]             build-otel-upgrade-rc.1     -> build-otel-upgrade-rc.1
  * [new tag]             build-pre-pull-deployments-rc.1 -> build-pre-pull-deployments-rc.1
  * [new tag]             build-prod-rescue-rc.1      -> build-prod-rescue-rc.1
  * [new tag]             build-rate-limiter-fix-rc.1 -> build-rate-limiter-fix-rc.1
  * [new tag]             build-re2.rc0               -> build-re2.rc0
  * [new tag]             build-realtime-v2-stream-fix -> build-realtime-v2-stream-fix
  * [new tag]             build-realtime-v2-stream-fix-2 -> build-realtime-v2-stream-fix-2
  * [new tag]         ...
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
🧠 Learnings (2)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.

Applied to files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
🪛 LanguageTool
docs/self-hosting/docker.mdx

[grammar] ~359-~359: Ensure spelling is correct
Context: ...tent volume and is preconfigured in the webapp compose file, so no setup is required. ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~361-~361: Ensure spelling is correct
Context: ...Redis-backed v1 streams, set on the webapp in your .env: ```bash REALTIME_STREA...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/self-hosting/env/webapp.mdx

[grammar] ~145-~145: Ensure spelling is correct
Context: ... | Server-side default the webapp uses when a stream request doesn't pin ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 YAMLlint (1.37.1)
hosting/k8s/helm/templates/s2.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🔇 Additional comments (9)
hosting/docker/webapp/docker-compose.yml (5)

17-21: 🩺 Stability & Availability | ⚡ Quick win

Verify s2 startup ordering doesn't race the webapp.

depends_on: - s2 only waits for the container to start, not for readiness. The s2 service intentionally has no healthcheck (per the comment at lines 267-268 in this file), so there's no condition: service_healthy gate available like there likely is for other deps. If s2 isn't done initializing its SlateDB local-root when webapp starts, early realtime-stream calls could fail until the client's retry/backoff kicks in.

This is likely mitigated by the S2 client's maxRetries/flushIntervalMs options, but worth confirming the startup sequence is tolerant of this gap.


48-56: LGTM! The env defaults are internally consistent: REALTIME_STREAMS_S2_ENDPOINT omits a port, which matches s2-lite's documented default of listening on container port 80, and REALTIME_STREAMS_S2_SKIP_ACCESS_TOKENS defaulting to true matches s2-lite not implementing /access-tokens.


238-265: 🗄️ Data Integrity & Integration | ⚡ Quick win

Verify s2 lite --init-file flag exists and behaves as expected.

The s2-init container generates a basin spec and the s2 service is invoked with --init-file /config/s2-spec.json (line 278). I could not independently confirm from public S2 documentation that lite --init-file is a supported flag (only --bucket, --path, --local-root, and --port are documented in the examples I found), though a recent S2 release note mentions "Support creating resources from spec," which is consistent with this feature existing. Please confirm the flag name/behavior against the pinned image version.

Also worth double-checking: REALTIME_STREAMS_S2_BASIN default (trigger-realtime) is duplicated here and in the webapp environment block (line 53). If one is changed without the other, the webapp and the bundled s2-lite basin spec will drift out of sync.


266-285: LGTM! The distroless/no-healthcheck rationale is clearly documented, depends_on: s2-init: condition: service_completed_successfully correctly gates s2 on the generated spec being written first, and --local-root /data backed by a named volume matches the "persist SlateDB data" comment.


286-293: LGTM!

docs/self-hosting/docker.mdx (1)

357-377: LGTM!

docs/self-hosting/env/webapp.mdx (1)

142-149: LGTM!

hosting/k8s/helm/templates/s2.yaml (2)

1-142: LGTM!


59-66: 🎯 Functional Correctness

The lite subcommand supports --init-file, --local-root, and --port, so this command line looks correct.

devin-ai-integration[bot]

This comment was marked as resolved.

Realtime streams (AI-agent token streaming and run streams) now default
to v2 for self-hosters, backed by a bundled s2-lite service with
persistent storage. The Docker Compose stack and Helm chart provision it
and set the S2 env vars; the stream settings are documented in the
self-hosting reference and guides.

Falls back to Redis-backed v1 via REALTIME_STREAMS_DEFAULT_VERSION=v1
(Docker) or s2.defaultStreamVersion=v1 (Helm), and can point at a hosted
S2 instead of the bundled server.
@matt-aitken matt-aitken force-pushed the feat/self-host-realtime-streams-v2 branch from cc6d043 to c83588e Compare July 7, 2026 16:13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
docs/self-hosting/env/webapp.mdx (1)

146-146: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Basin naming constraint description is incomplete.

S2 basin names must be between 8 and 48 characters and may only contain lowercase letters, numbers, and hyphens (not starting/ending with a hyphen). The doc only states the 8-character minimum, which could let users pick invalid names (too long, uppercase, etc.) that fail basin creation.

📝 Proposed doc fix
-| `REALTIME_STREAMS_S2_BASIN`                       | No       | —                     | S2 basin that holds v2 realtime streams. Required for `v2`. Must be at least 8 characters.                          |
+| `REALTIME_STREAMS_S2_BASIN`                       | No       | —                     | S2 basin that holds v2 realtime streams. Required for `v2`. Must be 8–48 characters, lowercase letters/numbers/hyphens only, and cannot start or end with a hyphen. |
hosting/k8s/helm/templates/s2.yaml (2)

40-40: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Checksum only covers basin, not the full ConfigMap content.

This restart-trigger checksum is scoped to .Values.s2.basin alone. It happens to work today since that's the only templated field in the spec JSON, but if the s2 spec gains more configurable fields later, changes to them won't trigger a pod restart. Consider hashing the rendered ConfigMap data instead for robustness.

♻️ More robust checksum
-        checksum/spec: {{ .Values.s2.basin | sha256sum }}
+        checksum/spec: {{ include (print $.Template.BasePath "/s2.yaml") . | sha256sum }}

33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

StatefulSet's governing service is not headless.

serviceName at line 33 points to a Service (lines 126-141) that lacks clusterIP: None. This works fine at replicas: 1, but deviates from the standard StatefulSet pattern requiring a headless governing service for stable per-pod DNS; if replicas ever increase this could cause confusion around pod addressability.

Also applies to: 126-141


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0182912d-c1a4-48a7-8c4a-351852276fe2

📥 Commits

Reviewing files that changed from the base of the PR and between b2af677 and cc6d043.

📒 Files selected for processing (10)
  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
  • docs/self-hosting/kubernetes.mdx
  • hosting/docker/.env.example
  • hosting/docker/webapp/docker-compose.yml
  • hosting/k8s/helm/templates/_helpers.tpl
  • hosting/k8s/helm/templates/s2.yaml
  • hosting/k8s/helm/templates/validate-external-config.yaml
  • hosting/k8s/helm/templates/webapp.yaml
  • hosting/k8s/helm/values.yaml
✅ Files skipped from review due to trivial changes (1)
  • docs/self-hosting/kubernetes.mdx
🚧 Files skipped from review as they are similar to previous changes (5)
  • hosting/k8s/helm/templates/webapp.yaml
  • hosting/docker/.env.example
  • hosting/k8s/helm/values.yaml
  • hosting/k8s/helm/templates/_helpers.tpl
  • hosting/docker/webapp/docker-compose.yml
📜 Review details
⚠️ CI failures not shown inline (4)

GitHub Actions: 🔎 REVIEW.md Drift Audit / audit: feat(hosting): default self-hosted realtime streams to v2 (s2-lite)

Conclusion: failure

View job details

##[group]Run anthropics/claude-code-action@428971d2ecd6e3a7cb0ee0da2a3a8b33fdb3678d
 with:
   anthropic_***REDACTED***
   use_sticky_comment: true
   allowed_bots: devin-ai-integration[bot]
   claude_args: --max-turns 30
--allowedTools "Read,Glob,Grep,Bash(git diff:*)"
   prompt: You are auditing this PR for drift against `.claude/REVIEW.md`.
## Context
`.claude/REVIEW.md` is the repo's source of truth for what AI / agent code reviewers should treat as critical findings (rolling-deploy safety, hot-table indexes, recovery-path queries, testcontainers usage, Lua versioning, etc.). It is consumed by review agents to calibrate severity. If REVIEW.md goes stale, every future agent review degrades.
## Strategy — read this first
You have a hard turn budget. Spend it on signal, not coverage. The audit is allowed to miss things; it is NOT allowed to time out.
1. Read `.claude/REVIEW.md` once, in full.
2. Run `git diff origin/main...HEAD --name-only` to get the list of changed files. Do NOT read the diff content yet.
3. Scan the file-list for relevance to REVIEW.md scope. Relevance signals: changes to Prisma schema, Redis / queue / Lua code, hot tables, recovery / restart loops, new packages, deletions of paths REVIEW.md cites. Skim everything else.
4. Open at most **5 files** total — only the ones most likely to surface a real signal. If nothing in the file-list looks relevant to any REVIEW.md rule, do NOT read any files; go straight to the verdict.
5. Form a verdict and stop. Do not exhaust the turn budget exploring.
Large PRs (>50 files changed) are a strong signal to be MORE selective, not more thorough. Pick 3-5 files at most.
## What to look for
- **Stale references** — does any REVIEW.md rule cite a file, directory, function, table, Prisma model, or package name that has been removed or renamed in this PR (or is already gone from `main`)?
- **Contradictions** — does code in this PR clearly violate a current REVIEW.md rule? (Don't re-review the PR. Only flag if REVIE...

GitHub Actions: 🔎 REVIEW.md Drift Audit / 0_audit.txt: feat(hosting): default self-hosted realtime streams to v2 (s2-lite)

Conclusion: failure

View job details

ate   -> build-hotfix-dequeue-gate
  * [new tag]             build-hotfix-queue-contention.rc1 -> build-hotfix-queue-contention.rc1
  * [new tag]             build-hotfix-unflatten.rc1  -> build-hotfix-unflatten.rc1
  * [new tag]             build-hotfix-wq-len         -> build-hotfix-wq-len
  * [new tag]             build-lazy-attempts-rc.1    -> build-lazy-attempts-rc.1
  * [new tag]             build-lazy-attempts-rc.2    -> build-lazy-attempts-rc.2
  * [new tag]             build-lazy-attempts-rc.3    -> build-lazy-attempts-rc.3
  * [new tag]             build-lazy-attempts-rc.4    -> build-lazy-attempts-rc.4
  * [new tag]             build-lazy-attempts-rc.5    -> build-lazy-attempts-rc.5
  * [new tag]             build-legacy-run-engine.fix1 -> build-legacy-run-engine.fix1
  * [new tag]             build-legacy-run-engine.fix2 -> build-legacy-run-engine.fix2
  * [new tag]             build-legacy-run-engine.fix3 -> build-legacy-run-engine.fix3
  * [new tag]             build-manual-checkpoints.rc1 -> build-manual-checkpoints.rc1
  * [new tag]             build-metadata-upgrade-logging.rc1 -> build-metadata-upgrade-logging.rc1
  * [new tag]             build-metadata-upgrade-logging.rc2 -> build-metadata-upgrade-logging.rc2
  * [new tag]             build-metadata-upgrade-logging.rc3 -> build-metadata-upgrade-logging.rc3
  * [new tag]             build-new-build-system.rc.1 -> build-new-build-system.rc.1
  * [new tag]             build-otel-upgrade-rc.0     -> build-otel-upgrade-rc.0
  * [new tag]             build-otel-upgrade-rc.1     -> build-otel-upgrade-rc.1
  * [new tag]             build-pre-pull-deployments-rc.1 -> build-pre-pull-deployments-rc.1
  * [new tag]             build-prod-rescue-rc.1      -> build-prod-rescue-rc.1
  * [new tag]             build-rate-limiter-fix-rc.1 -> build-rate-limiter-fix-rc.1
  * [new tag]             build-re2.rc0               -> build-re2.rc0
  * [new tag]             build-realtime-v2-stream-fix -> build-realtime-...

GitHub Actions: 📝 Agent Instructions Audit / audit: feat(hosting): default self-hosted realtime streams to v2 (s2-lite)

Conclusion: failure

View job details

##[group]Run anthropics/claude-code-action@428971d2ecd6e3a7cb0ee0da2a3a8b33fdb3678d
 with:
   anthropic_***REDACTED***
   use_sticky_comment: true
   allowed_bots: devin-ai-integration[bot]
   claude_args: --max-turns 25
--model claude-opus-4-8
--allowedTools "Read,Glob,Grep,Bash(git diff:*)"
   prompt: You are reviewing a PR to check whether any agent instruction files need updating.
In this repo:
- Root shared agent guidance lives in `AGENTS.md`.
- Root `CLAUDE.md` is only a Claude Code adapter that imports `AGENTS.md`.
- Subdirectories may still have scoped `CLAUDE.md` files.
- `.claude/rules/` contains additional Claude Code guidance.
## Your task
1. Run `git diff origin/main...HEAD --name-only` to see which files changed in this PR.
2. For each changed directory, check the applicable instruction files: root `AGENTS.md`, any `CLAUDE.md` in that directory or a parent directory, and relevant `.claude/rules/` files.
3. Determine if any instruction file should be updated based on the changes. Consider:
   - New files/directories that aren't covered by existing documentation
   - Changed architecture or patterns that contradict current agent guidance
   - New dependencies, services, or infrastructure that agents should know about
   - Renamed or moved files that are referenced in an instruction file
   - Changes to build commands, test patterns, or development workflows
## Response format
If NO updates are needed, respond with exactly:
✅ Agent instruction files look current for this PR.
If updates ARE needed, respond with a short list:
📝 **Agent instruction updates suggested:**
- `AGENTS.md`: [what should be added/changed]
- `path/to/CLAUDE.md`: [what should be added/changed]
- `.claude/rules/file.md`: [what should be added/changed]
Keep suggestions specific and brief. Only flag things that would actually mislead agents in future sessions.
Do NOT suggest updates for trivial changes (bug fixes, small refactors within existing patterns).
Do NOT suggest creating new...

GitHub Actions: 📝 Agent Instructions Audit / 0_audit.txt: feat(hosting): default self-hosted realtime streams to v2 (s2-lite)

Conclusion: failure

View job details

        `@trigger.dev/yalt`@3.0.0-beta.55 -> `@trigger.dev/yalt`@3.0.0-beta.55
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.6 -> `@trigger.dev/yalt`@3.0.0-beta.6
  * [new tag]             `@trigger.dev/yalt`@3.0.0-beta.7 -> `@trigger.dev/yalt`@3.0.0-beta.7
  * [new tag]             build-alert-hotfix.rc1      -> build-alert-hotfix.rc1
  * [new tag]             build-alert-hotfix.rc2      -> build-alert-hotfix.rc2
  * [new tag]             build-arm-builds-rc.1       -> build-arm-builds-rc.1
  * [new tag]             build-arm-builds-rc.2       -> build-arm-builds-rc.2
  * [new tag]             build-arm-builds-rc.3       -> build-arm-builds-rc.3
  * [new tag]             build-batchid-carryover-rc.0 -> build-batchid-carryover-rc.0
  * [new tag]             build-batching-rc.1         -> build-batching-rc.1
  * [new tag]             build-batching-rc.2         -> build-batching-rc.2
  * [new tag]             build-billing-0.0.1         -> build-billing-0.0.1
  * [new tag]             build-billing-0.0.2         -> build-billing-0.0.2
  * [new tag]             build-billing-0.0.3         -> build-billing-0.0.3
  * [new tag]             build-buildinfo-rc.0        -> build-buildinfo-rc.0
  * [new tag]             build-buildinfo-rc.1        -> build-buildinfo-rc.1
  * [new tag]             build-checkpoint-failover-rc.1 -> build-checkpoint-failover-rc.1
  * [new tag]             build-checkpoint-race-condition-1 -> build-checkpoint-race-condition-1
  * [new tag]             build-checkpoint-race-condition-2 -> build-checkpoint-race-condition-2
  * [new tag]             build-checkpoint-race-condition-3 -> build-checkpoint-race-condition-3
  * [new tag]             build-chris-test-blacksmith -> build-chris-test-blacksmith
  * [new tag]             build-chris-test-blacksmith-2 -> build-chris-test-blacksmith-2
  * [new tag]             build-cli-build-upgrade-rc.1 -> build-cli-build-upgrade-rc.1
  * [new tag]             build-clickhouse-reads-rc0  -> build-clickhous...
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
🧠 Learnings (2)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.

Applied to files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
🪛 LanguageTool
docs/self-hosting/docker.mdx

[grammar] ~359-~359: Ensure spelling is correct
Context: ...tent volume and is preconfigured in the webapp compose file, so no setup is required. ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~361-~361: Ensure spelling is correct
Context: ...Redis-backed v1 streams, set on the webapp in your .env: ```bash REALTIME_STREA...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/self-hosting/env/webapp.mdx

[grammar] ~145-~145: Ensure spelling is correct
Context: ... | Server-side default the webapp uses when a stream request doesn't pin ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 YAMLlint (1.37.1)
hosting/k8s/helm/templates/s2.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🔇 Additional comments (4)
hosting/k8s/helm/templates/validate-external-config.yaml (1)

42-45: LGTM!

hosting/k8s/helm/templates/s2.yaml (2)

1-22: LGTM!


93-124: LGTM!

docs/self-hosting/docker.mdx (1)

367-374: 🗄️ Data Integrity & Integration

No change needed for the hosted S2 example. The Docker compose defaults to bundled s2-lite (REALTIME_STREAMS_S2_ENDPOINT=http://s2/v1), so setting REALTIME_STREAMS_S2_ENDPOINT here is the correct override to switch to hosted S2.

			> Likely an incorrect or invalid review comment.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
docs/self-hosting/env/webapp.mdx (1)

146-146: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Basin naming constraints understated.

S2 basin names must be between 8 and 48 characters, comprising lowercase letters, numbers and hyphens, and cannot begin or end with a hyphen. The doc only mentions the 8-character minimum, omitting the max length and character-set restrictions, which could lead to confusing errors if users pick names with uppercase/invalid characters.

📝 Suggested doc update
-| `REALTIME_STREAMS_S2_BASIN`                       | No       | —                     | S2 basin that holds v2 realtime streams. Required for `v2`. Must be at least 8 characters.                          |
+| `REALTIME_STREAMS_S2_BASIN`                       | No       | —                     | S2 basin that holds v2 realtime streams. Required for `v2`. Must be 8–48 characters, lowercase letters/numbers/hyphens, and cannot start or end with a hyphen. |
hosting/k8s/helm/templates/s2.yaml (1)

11-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Basin creation flags are hardcoded.

create_stream_on_append and create_stream_on_read are always true with no values.yaml override, unlike the bundled behavior described in the docs. This is fine for the bundled s2-lite default but slightly reduces flexibility for advanced self-hosters who might want stricter stream creation semantics.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0182912d-c1a4-48a7-8c4a-351852276fe2

📥 Commits

Reviewing files that changed from the base of the PR and between cc6d043 and c83588e.

📒 Files selected for processing (10)
  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
  • docs/self-hosting/kubernetes.mdx
  • hosting/docker/.env.example
  • hosting/docker/webapp/docker-compose.yml
  • hosting/k8s/helm/templates/_helpers.tpl
  • hosting/k8s/helm/templates/s2.yaml
  • hosting/k8s/helm/templates/validate-external-config.yaml
  • hosting/k8s/helm/templates/webapp.yaml
  • hosting/k8s/helm/values.yaml
✅ Files skipped from review due to trivial changes (2)
  • hosting/docker/.env.example
  • docs/self-hosting/kubernetes.mdx
🚧 Files skipped from review as they are similar to previous changes (5)
  • hosting/k8s/helm/templates/validate-external-config.yaml
  • hosting/k8s/helm/templates/webapp.yaml
  • hosting/k8s/helm/templates/_helpers.tpl
  • hosting/k8s/helm/values.yaml
  • hosting/docker/webapp/docker-compose.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: prerelease
  • GitHub Check: code-quality / code-quality
  • GitHub Check: audit
  • GitHub Check: audit
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
🧠 Learnings (2)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.

Applied to files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/self-hosting/docker.mdx
  • docs/self-hosting/env/webapp.mdx
🪛 LanguageTool
docs/self-hosting/docker.mdx

[grammar] ~359-~359: Ensure spelling is correct
Context: ...tent volume and is preconfigured in the webapp compose file, so no setup is required. ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~361-~361: Ensure spelling is correct
Context: ...Redis-backed v1 streams, set on the webapp in your .env: ```bash REALTIME_STREA...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/self-hosting/env/webapp.mdx

[grammar] ~145-~145: Ensure spelling is correct
Context: ... | Server-side default the webapp uses when a stream request doesn't pin ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 YAMLlint (1.37.1)
hosting/k8s/helm/templates/s2.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🔇 Additional comments (4)
docs/self-hosting/docker.mdx (1)

357-377: LGTM!

docs/self-hosting/env/webapp.mdx (1)

142-149: LGTM!

hosting/k8s/helm/templates/s2.yaml (2)

1-22: ConfigMap and its checksum annotation are equivalent to only .Values.s2.basin.

The generated s2-spec.json is entirely derived from .Values.s2.basin (the other fields are hardcoded), so the checksum/spec annotation at line 40 correctly triggers a rollout on basin changes. No issue here.


99-124: Persistence toggling behavior looks correct.

data volume falls back to emptyDir when persistence is disabled, and volumeClaimTemplates is only added when enabled, with retain correctly gated behind the helm.sh/resource-policy: keep annotation.

@matt-aitken

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant