Skip to content

refactor(fmt): prepare runner for multiple execution paths - #131

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/refactor-fmt-runner-execution-paths
Aug 1, 2026
Merged

refactor(fmt): prepare runner for multiple execution paths#131
chenjiahan merged 1 commit into
mainfrom
chenjiahan/refactor-fmt-runner-execution-paths

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

  • extract shared per-file formatting and result conversion
  • separate serial scheduling from exit-code aggregation
  • preserve the current serial behavior while preparing the runner for another execution path

Testing

  • pnpm --filter rstack build
  • pnpm --filter rstack test
  • pnpm lint
  • pnpm check:format

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The formatting runner now separates per-file execution, sequential file processing, and exit-code calculation. It records per-file duration, maps results to written, different, unchanged, or error states, and preserves input order. Exit-code calculation returns 2 for errors, 1 for differing files, and 0 otherwise. runFmtFiles delegates to the new helpers while retaining write-mode behavior and aggregate timing.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the formatting runner refactor and its preparation for multiple execution paths.
Description check ✅ Passed The description directly explains the formatting runner refactor and lists relevant validation commands.
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 chenjiahan/refactor-fmt-runner-execution-paths

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/rstack/src/fmt/runner.ts`:
- Around line 69-79: Export the runFmtFiles function so it can be invoked by
other modules; preserve its existing parameters, serial execution, result
construction, and timing behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 10ef89d1-eb93-4ee7-8b1d-ef9cca73a6fb

📥 Commits

Reviewing files that changed from the base of the PR and between fefc003 and 9411ada.

📒 Files selected for processing (1)
  • packages/rstack/src/fmt/runner.ts

Comment thread packages/rstack/src/fmt/runner.ts
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9411ada
Status: ✅  Deploy successful!
Preview URL: https://bec3815b.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-refactor-fmt-runn.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit f594ea8 into main Aug 1, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/refactor-fmt-runner-execution-paths branch August 1, 2026 03:59
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