Skip to content

Push workspace syncs without announcing them to open tabs - #6915

Merged
habdelra merged 4 commits into
mainfrom
cs-14191-sync-workspace-no-realm-events
Oct 22, 2026
Merged

habdelra merged 4 commits into
mainfrom
cs-14191-sync-workspace-no-realm-events

Conversation

@habdelra

@habdelra habdelra commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Merge order: #6901 has merged; this PR targets main.

What this changes

The reusable sync-workspace.yml (boxel-skills and boxel-home call it on every push and release) pushes with boxel realm push --no-realm-events when the installed boxel-cli lists that flag. The realm then indexes the pushed content without announcing it to the workspace's subscribers. A sync is system-initiated, so open tabs pick the new content up on their next load instead of resetting their loader mid-session.

The detection follows the --changed-since pattern in the same step: it greps realm push --help. A CLI without the flag keeps announcing, exactly as today, so this is safe to merge before a CLI release that has it.

Follow-ups

  • CS-14254 — pass --no-realm-events in preview-realm-actions-integration.yml's re-push once the flag is on main.

Test plan

  • Prettier on the workflow.
  • The next skills or homepage sync on staging, once latest has the flag: the push log shows --no-realm-events in effect, and the workspace indexes the new files with no realm events in its event room.

🤖 Generated with Claude Code

The skills and homepage syncs pass `realm push --no-realm-events` when
the installed boxel-cli supports it, so a deploy indexes the new content
without resetting the open tabs of everyone using the workspace. An
older CLI keeps announcing, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T13:07:45.733498Z 7d64d3b PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@habdelra habdelra left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[Claude Code 🤖] This review covers the flag detection and the push invocations in both sync steps, run under the runner's bash -eo pipefail, plus the other boxel realm push call sites under .github/workflows. It does not cover how the realm server handles the header.

No blocking issues.

  1. Log whether the push uses the flag, which also makes the test plan checkable. See the comment on the staging realm_events block; the production step needs the same change.
  2. Update the boxel-cli-version input description. See the file-level comment.

Follow-up, not this PR: the re-push step in preview-realm-actions-integration.yml says it mirrors this workflow's push invocation, but it doesn't pass --no-realm-events. So no PR-time run sends X-Boxel-Realm-Events: none. Once the CLI that defines the flag is in the tree, add the flag to that re-push. That job builds the CLI from source, so it needs no help-text detection.

Comment on lines +293 to +296
realm_events=()
if grep -q -- '--no-realm-events' <<< "$push_help"; then
realm_events+=(--no-realm-events)
fi

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[Claude Code 🤖] The run log never shows whether the flag was used. If the CLI doesn't have the flag, the step falls back without saying so. If it does have it, nothing in the log says that either: boxel realm push doesn't print anything about realm events, and the step doesn't echo the push command line. So a caller pinned to an older boxel-cli-version keeps resetting open tabs and leaves no trace of it. The test plan's "push log shows --no-realm-events in effect" also has nothing in the log to check. Mirror the --changed-since notice:

Suggested change
realm_events=()
if grep -q -- '--no-realm-events' <<< "$push_help"; then
realm_events+=(--no-realm-events)
fi
realm_events=()
if grep -q -- '--no-realm-events' <<< "$push_help"; then
realm_events+=(--no-realm-events)
else
echo "::notice::This boxel-cli has no --no-realm-events, so the push is announced to open tabs."
fi

Make the same change to the realm_events block in "Sync to production workspace". Introduced by this change. Non-blocking.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[Claude Code 🤖] Fixed in acd72df. Both sync steps now log 'Pushing with --no-realm-events…' when the CLI lists the flag, and print a ::notice:: saying the push is announced when it doesn't.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[Claude Code 🤖] Please update the boxel-cli-version input description, since a caller pinning the CLI reads it to learn what the sync needs from the CLI. It doesn't mention --no-realm-events. A version without the flag still pushes fine, but it announces every pushed file to open tabs. The description also says the version "has to support" --changed-since, but both sync steps fall back when it doesn't. Suggested text:

          Version spec for `npm install -g @cardstack/boxel-cli`.
          Default `latest` follows the most recent published version.
          Staging and production syncs pass `realm push --changed-since`
          and `--no-realm-events` when the version lists them. Without
          them, every file goes up and the push is announced to open tabs.

Non-blocking. The --no-realm-events half is introduced by this change; the --changed-since half is pre-existing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[Claude Code 🤖] Fixed in acd72df. The boxel-cli-version description now says the syncs pass --changed-since and --no-realm-events only when the version lists them, and that an older version sends every file and announces the push.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@habdelra

Copy link
Copy Markdown
Contributor Author

[Claude Code 🤖] On the follow-up for preview-realm-actions-integration.yml: this branch doesn't have the CLI that defines --no-realm-events yet (it comes from #6903), so that job's source-built CLI would reject the flag here. I'll add it there once #6903 and #6901 are both on main.

@habdelra
habdelra requested a review from a team October 22, 2026 13:07
…and-homepage-syncs-re-upload-the' into cs-14191-sync-workspace-no-realm-events
@habdelra
habdelra changed the base branch from cs-14225-staging-catalog-skills-and-homepage-syncs-re-upload-the to main October 22, 2026 14:39
@lukemelia lukemelia closed this Oct 22, 2026
@habdelra habdelra reopened this Oct 22, 2026
@habdelra

Copy link
Copy Markdown
Contributor Author

[Claude Code 🤖] Reopening. This PR doesn't depend on the shared realm event room that #6906 proposed, which was closed under ADR 011 (#6921). It only makes system-initiated indexing (public-realm deploys and syncs, the post-deploy boxel-ui reindex, Grafana reindexes, the OpenRouter sync) run without realm events, so open tabs aren't reset by indexing their users didn't ask for. That holds whichever way public-realm events are delivered, and it cuts the load on Synapse under any of the alternatives. Hassan wants it to land, and it was already approved. Reducing fan-out for public realms is being redesigned separately.

@habdelra
habdelra merged commit 5dc959a into main Oct 22, 2026
82 of 85 checks passed
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.

2 participants