Skip to content

searchable codemod: add republish tool#5368

Merged
habdelra merged 1 commit into
mainfrom
searchable-codemod-deployed-tooling
Jun 30, 2026
Merged

searchable codemod: add republish tool#5368
habdelra merged 1 commit into
mainfrom
searchable-codemod-deployed-tooling

Conversation

@habdelra

@habdelra habdelra commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Adds republish.mjs, the publish-side tool for the searchable migration: it republishes each published realm copy from its (now-annotated) source realm so the published snapshot picks up the source's searchable annotations, then reads a known module back from the published realm to assert the annotation landed. realm publish waits for the published realm to finish indexing before that read.

Args: <pairs.json> <staging|prod> <out.jsonl> [--limit N].

  • Each boxel-cli call sources its own seed, so the seed never enters the driver process; the env argument is allow-listed to staging|prod before it is interpolated into that shell command.
  • The run exits nonzero on a real failure or a missing-searchable assertion, while a realm the server refuses to publish ("not publishable") is recorded as an expected skip and does not fail the run.
  • The boxel-cli path is derived relative to the script — no machine-specific paths.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 510138ffb0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/realm-server/scripts/codemod/searchable/republish.mjs
Comment thread packages/realm-server/scripts/codemod/searchable/republish.mjs
Comment thread packages/realm-server/scripts/codemod/searchable/apply-deployed.ts Outdated

Copilot AI 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.

Pull request overview

Adds follow-up tooling for the deployed-realm “searchable” migration: a republish driver to refresh published snapshots, and enhanced tolerance/reporting when realm pull returns non-zero due to stray forbidden objects.

Changes:

  • Added republish.mjs to republish each (source → published) pair and verify searchable annotations landed by reading back a known module.
  • Updated apply-deployed.ts to continue crawling when realm pull exits non-zero but the pulled realm still contains realm.json, recording a pullWarning in the output report.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/realm-server/scripts/codemod/searchable/republish.mjs New script to republish published realm copies from their sources and assert searchable annotations appear post-indexing.
packages/realm-server/scripts/codemod/searchable/apply-deployed.ts Makes deployed crawl “pull-tolerant” by proceeding on partial pulls (when realm.json exists) and surfacing a pullWarning in the report/output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/realm-server/scripts/codemod/searchable/republish.mjs
Comment thread packages/realm-server/scripts/codemod/searchable/republish.mjs Outdated
Comment thread packages/realm-server/scripts/codemod/searchable/apply-deployed.ts Outdated
@habdelra habdelra force-pushed the searchable-codemod-deployed-tooling branch from 510138f to ec2b385 Compare June 30, 2026 14:42
republish.mjs republishes each published realm copy from its source
realm so the published snapshot picks up the source's searchable
annotations, then reads a known module back from the published realm to
assert the annotation landed. The env argument is checked against a
staging|prod allow-list before it is interpolated into the bash command
that sources the seed file. The run exits nonzero on a real failure or a
missing-searchable assertion, while a realm the server refuses to publish
("not publishable") is recorded as an expected skip and does not fail it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182qehwDYbwBmyYcAhMoij1
@habdelra habdelra force-pushed the searchable-codemod-deployed-tooling branch from ec2b385 to 0c41b87 Compare June 30, 2026 14:43
@habdelra habdelra changed the title searchable codemod: republish tool + pull-tolerant deployed crawl searchable codemod: add republish tool Jun 30, 2026
@habdelra habdelra requested a review from a team June 30, 2026 14:46
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Host Test Results

132 tests   132 ✅  3m 9s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 0c41b87.

Realm Server Test Results

    1 files      1 suites   10m 53s ⏱️
1 681 tests 1 681 ✅ 0 💤 0 ❌
1 760 runs  1 760 ✅ 0 💤 0 ❌

Results for commit 0c41b87.

@habdelra habdelra merged commit 71a0217 into main Jun 30, 2026
92 of 93 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.

3 participants