Enable async mirror creation by default - #2246
Conversation
Default merged settings to the asynchronous request route while preserving explicit false overrides for the synchronous path. Document the route default and the mode-specific wait timeout semantics in command help. Entire-Checkpoint: 01M1FSQK3B70FDR8PNTVG8NRV8
…enable-async-mirror-creation-by-default
|
Bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d6990ae. Configure here.
There was a problem hiding this comment.
🔵 Needs a closer look
It changes the default control-plane route used for mirror creation and is explicitly gated on external production validation/dependencies.
Pull request overview
This PR flips entire repo mirror create to use the async mirror-request API route by default (while preserving an explicit layered opt-out via async_mirror_requests: false), and updates command/help text plus tests to match.
Changes:
- Default
async_mirror_requeststotrueat merged settings load time (not per-file parsing) while still honoring explicitfalsein either settings layer. - Document the new default and clarify
--wait-timeoutsemantics for async vs synchronous mode. - Add/adjust unit tests to cover async-by-default and synchronous opt-out behavior.
File summaries
| File | Description |
|---|---|
| cmd/entire/cli/settings/settings.go | Defaults AsyncMirrorRequests to true when merging layers via a new loadFromFileWithDefaults helper. |
| cmd/entire/cli/settings/settings_test.go | Updates layered-settings tests to assert async is true when unset and false when explicitly disabled. |
| cmd/entire/cli/repo_mirror.go | Updates mirror create help text and expands --wait-timeout usage to describe mode-specific behavior. |
| cmd/entire/cli/repo_mirror_test.go | Adds a test that validates the updated --wait-timeout help text. |
| cmd/entire/cli/repo_mirror_request_test.go | Renames/updates tests to cover async-by-default and adds a synchronous opt-out test. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Represent the layered setting as an optional boolean so an absent value can resolve to async without losing an explicit false during settings rewrites.\n\nRoute mirror creation through a default-resolving accessor and cover all three serialized states. Entire-Checkpoint: 01M1J2T50K1SZ7J7MGTEZDXSVS
|
Bugbot run |
There was a problem hiding this comment.
🟡 Changes recommended
Mirror creation can still default to the synchronous route when settings fail to load because mirrorCreateOptions.async is initialized as false.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ec294a2. Configure here.
Initialize mirror creation with the shipped asynchronous default before applying a successfully loaded setting. This prevents malformed settings from silently selecting the synchronous route while preserving explicit opt-out behavior. Entire-Checkpoint: 01M1J4N2NYA0KCD7TSFQHJNWS5
|
Bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 551735f. Configure here.
https://entire.io/gh/entireio/cli/trails/1225
Why
COR-1185 (CLI: submit mirror creates through the async mirror-request routes) added asynchronous mirror creation behind a default-off layered setting. This draft prepares the separate default flip so normal CLI mirror creation uses that route once the production merge gates are complete.
What changed
Merged settings now default
async_mirror_requeststotrue, while an explicitfalsein either settings layer still selects the synchronous route. Command help describes the default, opt-out, and the existing mode-specific--wait-timeoutbehavior.Usage examples
entire repo mirror create github.com/example/repositoryThe command uses the asynchronous request route by default. To opt out in a settings layer:
{ "async_mirror_requests": false }Decisions made during development
Technical tradeoffs
The layered value is tri-state: an absent value uses the asynchronous route by default, while explicit
trueandfalsevalues remain serializable overrides. This keeps unrelated settings writes from materializing an override or erasing a synchronous opt-out.Reviewer notes
This PR must remain a draft and must not merge until both dependencies are complete:
Recording the released CLI version and updating the changelog are release-time work and intentionally remain outside this PR.
Note
Medium Risk
Changes default mirror-creation API behavior for all users without an explicit sync opt-out; incorrect defaults could route production traffic to async endpoints before backend gates are ready (per PR merge dependencies).
Overview
entire repo mirror createnow uses the asynchronous mirror-request API by default. Layered settings can still opt out with"async_mirror_requests": false; unset ortruekeeps async behavior.The
async_mirror_requestssetting is tri-state (*bool): missing keys no longer imply sync, and save/merge preserves whether the key was explicitly set so unrelated writes do not clobber overrides.IsAsyncMirrorRequestsEnabled()encodes the default-on rule.Help and
--wait-timeoutusage document the default route and that async mode applies one deadline across submission, placement, and clone readiness (sync mode only to clone polling).Tests cover async when settings fail to load, explicit sync opt-out, layered load/save, and flag help text.
Reviewed by Cursor Bugbot for commit 551735f. Configure here.