Skip to content

test(host-service): reduce git subprocesses when preparing fixtures - #9666

Open
PresentJay wants to merge 1 commit into
ParadevAI:mainfrom
PresentJay:test/git-fixture-setup
Open

PresentJay wants to merge 1 commit into
ParadevAI:mainfrom
PresentJay:test/git-fixture-setup

Conversation

@PresentJay

@PresentJay PresentJay commented Nov 12, 2026 •

Copy link
Copy Markdown

What & why

Each temporary repository spawned three git config processes before its initial commit. Write the same repository-local identity and signing settings in one append, then stage the files for each fixture commit in one git add invocation. The tests still exercise real repositories and commits.

How I tested it

  • On this branch, macOS arm64 with Bun 1.4.3 and TERM=dumb: from packages/host-service, bun test test/integration/project-setup.integration.test.ts test/integration/sparse-checkout.integration.test.ts — 13 pass, 0 fail.
  • This patch was also part of the combined macOS verification for fix(desktop): let IME users confirm text without submitting a chat answer #9625: all 30 repository test tasks passed in one uncached run, with default workers and timeouts. Repo-wide lint and typecheck passed on that combined checkout.

Checklist

  • Conventional PR title
  • Lint and typecheck passed on the combined verification checkout
  • Allow maintainer edits
  • Signed CLA

Summary by cubic

Reduces the number of git subprocesses spawned while preparing test fixtures in packages/host-service.

  • Replaces three separate git config calls with a single append to the repository's config file.
  • Stages all files for a fixture commit in one git add invocation instead of one per file.

Written for commit 0493e10. Summary will update on new commits.

View guided diff

Summary by CodeRabbit

  • Tests
    • Improved test Git fixture setup and file staging reliability.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Git test fixture now appends identity and disabled GPG-signing settings to .git/config. Its commit helper writes files before staging all paths in one Git command, and skips staging when there are no paths.

Changes: Git fixture setup and staging

Layer / File(s) Summary
Configure and stage fixture commits
packages/host-service/test/helpers/git-fixture.ts
The fixture appends identity and disabled GPG-signing settings to .git/config. The commit helper writes files before staging their paths in one command, and skips staging when the path list is empty.

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

Change: Other

Suggested reviewers: saddlepaddle

Merge Risk: Minimal · up to 0493e

This change only affects test fixture setup and reduces the number of Git subprocesses. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: fewer git subprocesses when preparing test fixtures in host-service. It uses conventional commit format with the test type and host-service scope. The raw summary conf…
Description check Passed The description covers the required sections: What & why, How I tested it, and the checklist. It explains the change (three git config processes replaced by one append, and one git add per fixture com…
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.
Full details: Title check

Explanation

The title names the main change: fewer git subprocesses when preparing test fixtures in host-service. It uses conventional commit format with the test type and host-service scope. The raw summary confirms the change: git config settings are written in one append and files are staged in one git add call.

Full details: Description check

Explanation

The description covers the required sections: What & why, How I tested it, and the checklist. It explains the change (three git config processes replaced by one append, and one git add per fixture commit) and gives concrete test commands and results. It does not link an issue, but the template only asks for one when one exists. The How I tested it section has no screenshots, which the template prefers only for user-visible changes; this change is test-only.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cf763005-c602-43a7-82a7-4ab8c141d00b
Commits

Reviewing files that changed from the base of the PR and between e9dc091 and 0493e10.

Files selected for processing: 1

  • packages/host-service/test/helpers/git-fixture.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

This branch has not been deployed

No deployments
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