Skip to content

chore: resync sync-brand-numbers.mjs with the source copy - #222

Merged
VickyXAI merged 1 commit into
mainfrom
chore/resync-brand-script
Jul 27, 2026
Merged

chore: resync sync-brand-numbers.mjs with the source copy#222
VickyXAI merged 1 commit into
mainfrom
chore/resync-brand-script

Conversation

@VickyXAI

@VickyXAI VickyXAI commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The script is vendored byte-for-byte from BlockRunAI/blockrun:brand/sync-brand-numbers.mjs. This copy had fallen 24 lines behind it.

Three fixes landed upstream after the initial distribution and never reached here:

Fix Why it matters
Skip nested repos Walking into a submodule rewrites its markers from the wrong repo's snapshot, and reports drift that belongs to that repo's CI
Do not follow symlinked directories blockrun/docs -> awesome-blockrun/docs is the live case — it edited a submodule behind the nested-repo skip. A link pointing at an ancestor would also recurse forever
Scan .txt llms.txt is the file agents read to learn what BlockRun serves, and could not be bound at all before

Why nobody noticed

Nothing compared the copies. A file described as byte-for-byte identical across five repos had no check that it actually was — which is the same failure mode the whole brand-numbers system exists to prevent, reproduced in the mechanism itself.

blockrun CI gains a job that diffs every vendored copy against the source, in the same shape as its existing clawrouter-install-sync guard. That job lands after these four PRs, so it starts green.

--check still passes here with the new script.

Summary by CodeRabbit

  • Bug Fixes
    • Improved brand-number synchronization when traversing directories.
    • Prevented processing of symbolic links and nested repositories.
    • Added support for updating eligible .txt files alongside Markdown files.

The script is vendored byte-for-byte from BlockRunAI/blockrun:brand/, and this
copy had fallen 24 lines behind it. Three fixes landed upstream after the
initial distribution and never reached here:

- skip nested repos. Walking into a submodule rewrites its markers from the
  WRONG repo's snapshot and reports drift that belongs to its CI.
- do not follow symlinked directories. blockrun's docs/ -> awesome-blockrun/docs
  is the live case; a link pointing at an ancestor would also recurse forever.
- scan .txt, for llms.txt — the file agents read to learn what BlockRun serves,
  which could not be bound at all before.

None of this was detectable: nothing compared the copies. blockrun CI gains a
job that does, in the same shape as its existing clawrouter-install-sync guard.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f44eeff1-9d8f-4597-9834-354eaedd63b8

📥 Commits

Reviewing files that changed from the base of the PR and between c6587c1 and 853f518.

📒 Files selected for processing (1)
  • scripts/sync-brand-numbers.mjs

📝 Walkthrough

Walkthrough

The brand-number synchronization script now rewrites .txt files and uses non-following filesystem checks to skip symbolic links and nested repositories during directory traversal.

Changes

Brand number synchronization

Layer / File(s) Summary
Traversal safeguards and writable file coverage
scripts/sync-brand-numbers.mjs
Adds .txt to writable text extensions, replaces statSync with existsSync and lstatSync, skips symbolic links, and avoids descending into directories containing a .git entry.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: resyncing the vendored sync-brand-numbers.mjs script with its source copy.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/resync-brand-script

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.

@VickyXAI
VickyXAI merged commit 1ec082d into main Jul 27, 2026
4 checks passed
@VickyXAI
VickyXAI deleted the chore/resync-brand-script branch July 27, 2026 06:50
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