Skip to content

fix(script): biome format wrap#4541

Merged
icecrasher321 merged 1 commit intostagingfrom
fix/biome-wrap-script
May 9, 2026
Merged

fix(script): biome format wrap#4541
icecrasher321 merged 1 commit intostagingfrom
fix/biome-wrap-script

Conversation

@icecrasher321
Copy link
Copy Markdown
Collaborator

Summary

Format helper call missing

@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

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

Project Deployment Actions Updated (UTC)
docs Building Building Preview, Comment May 9, 2026 11:14pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 9, 2026

PR Summary

Low Risk
Low risk: only adjusts code-generation formatting so the runtime schema output is consistently Biome-formatted and check mode comparisons are stable.

Overview
Fixes scripts/sync-tool-catalog.ts so the generated runtime schema module (tool-schemas-v1.ts) is passed through formatGeneratedSource (Biome) using RUNTIME_SCHEMA_OUTPUT_PATH, matching the formatting behavior of the main tool catalog output.

This ensures --check compares against the properly formatted runtime schema output and avoids stale-generation failures due to missing formatting.

Reviewed by Cursor Bugbot for commit 1612b80. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 9, 2026

Greptile Summary

This PR fixes a missing formatGeneratedSource call around renderRuntimeSchemaModule(catalog) in the sync-tool-catalog script. Previously, the runtime schema output (tool-schemas-v1.ts) was written to disk without Biome formatting, causing stale-check mismatches and inconsistently formatted generated files.

  • Bug fix: runtimeSchemaRendered now passes through formatGeneratedSource with RUNTIME_SCHEMA_OUTPUT_PATH and ROOT, exactly mirroring how the main rendered output is handled on the line above.
  • Impact on --check mode: Without this fix, comparing the formatted on-disk file against an unformatted in-memory string would produce spurious staleness errors (or mask real drift). The fix makes both branches consistent.

Confidence Score: 5/5

Safe to merge — the change is a one-liner that aligns the runtime schema output path with the already-correct main catalog path.

The fix is minimal and symmetric: it adds the same formatGeneratedSource wrapper to runtimeSchemaRendered that already existed for rendered. Both write paths and the --check comparison now use consistently formatted strings. No logic changes, no new dependencies, and the helper function is well-understood.

No files require special attention.

Important Files Changed

Filename Overview
scripts/sync-tool-catalog.ts Wraps renderRuntimeSchemaModule output in formatGeneratedSource so the runtime schema file is Biome-formatted before being written to disk or compared in --check mode, consistent with how rendered is already handled.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Read tool-catalog-v1.json] --> B[generateInterface + build lines]
    B --> C[formatGeneratedSource\ntool-catalog-v1.ts]
    A --> D[renderRuntimeSchemaModule]
    D --> E["formatGeneratedSource\ntool-schemas-v1.ts\n✅ (added by this PR)"]
    C --> F{--check?}
    E --> F
    F -- yes --> G[Compare with existing files\nthrow if stale]
    F -- no --> H[Write tool-catalog-v1.ts]
    F -- no --> I[Write tool-schemas-v1.ts]
Loading

Reviews (1): Last reviewed commit: "fix(script): biome format wrap" | Re-trigger Greptile

@icecrasher321 icecrasher321 merged commit a170255 into staging May 9, 2026
13 of 14 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/biome-wrap-script branch May 9, 2026 23:48
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