Repository navigation
[codex] optimize provisioning metadata and output - #187
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR trims avoidable work and noisy transcript entries from environment provisioning.
HostWorkspace.getDefaultBranch()path so provisioning no longer calls full workspace status just to return default branch metadata.git worktree add ...andenv bash .bb-env-setup.shcommand echo lines into provisioning transcripts while preserving real git/setup output and status steps.Why
Provisioning command result assembly used
getStatus()only to readbranch.defaultBranch. That status path scans working-tree state and can be unnecessarily expensive on large or dirty repositories. The transcript also repeated command invocations that did not add much diagnostic value next to the surrounding status and real process output.Impact
Locally, the branch metadata step dropped from about 248ms to 101ms on this checkout. End-to-end provisioning improvement depends on setup-script cost, but this avoids a full status scan on the hot path and makes the provisioning row easier to read.
In the dev bb app managed-worktree smoke, full provisioning took about 14.8s. The setup script reported
pnpm installtaking 13.3s, so most of that smoke timing was dependency setup rather than branch metadata/result assembly.Validation
pnpm exec turbo run typecheck --filter=@bb/host-workspace --filter=@bb/host-daemon --filter=@bb/app --output-logs=new-onlypnpm exec turbo run test --filter=@bb/host-workspace --filter=@bb/host-daemon --output-logs=new-onlypnpm exec turbo run test --filter=@bb/host-workspace --force --output-logs=new-onlyafter trimming the over-specific transcript absence testpnpm exec turbo run typecheck --filter=@bb/app --output-logs=new-onlypnpm exec turbo run smoke:tarball --filter=bb-app --force --output-logs=new-onlythr_5crsarstpkreturnedokthr_3qshhskv95returnedok, created ready envenv_ks64ct45xf, and DB event inspection found nogit-worktree-command/setup-commandentries or synthetic command echo textgit diff --check