Skip to content

revert: remove --keep-lane from bit ci pr (reverts #10586) - #10615

Merged
zkochan merged 1 commit into
masterfrom
copilot/revert-commit-10586
Aug 13, 2026
Merged

zkochan merged 1 commit into
masterfrom
copilot/revert-commit-10586

Conversation

Copilot AI commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

--keep-lane causes deterministic failures from the second push onward on PRs that snap core components: the reuse flow serves stale artifacts from older commits, mixing @teambit package generations across capsules and breaking cross-copy instanceof checks.

Changes

  • .circleci/config.yml: removes --keep-lane from bit ci pr --build --skip-cleanup, restoring the temp-lane flow that rebuilds from a single commit on every push

Copilot AI changed the title revert: revert PR #10586 - remove --keep-lane flag from bit ci pr command revert: remove --keep-lane from bit ci pr (reverts #10586) Aug 13, 2026
Copilot AI requested a review from GiladShoham August 13, 2026 17:31
@GiladShoham
GiladShoham marked this pull request as ready for review August 13, 2026 17:33
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Revert Bit PR CI to drop --keep-lane to avoid stale-artifact reuse failures

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Remove --keep-lane from bit ci pr in CircleCI PR builds to prevent stale artifact reuse.
• Restore temp-lane behavior so each push rebuilds from a single commit for correctness.
• Update inline CI comments to document the deterministic failure mode and rationale.
Diagram

graph TD
  A["GitHub PR push"] --> B["CircleCI job: bit_pr"] --> C["bit ci pr --build"] --> D[("Bit Cloud temp lane")]
  C --> E["Capsules build & specs"] --> F["CI result"]

  subgraph Legend
    direction LR
    _evt["Event"] ~~~ _job["CI job"] ~~~ _cmd["CLI command"] ~~~ _db[("Remote service")] ~~~ _run["Execution"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Conditional --keep-lane (opt-in via commit token)
  • ➕ Preserves performance benefits when safe (non-core component PRs)
  • ➕ Allows teams to selectively enable reuse per PR
  • ➖ Adds policy/logic complexity in CI parsing
  • ➖ Risk of reintroducing flaky failures if misclassified
2. Auto-disable reuse when core/@teambit components change
  • ➕ Keeps fast path for most PRs while protecting known hazardous cases
  • ➕ Aligns behavior with the documented failure trigger (snapping core components)
  • ➖ Requires reliable detection of “core” scope changes
  • ➖ Edge cases may still mix artifacts if detection is incomplete
3. Fix root cause in reuse/artifact invalidation upstream
  • ➕ Restores lane reuse performance without correctness trade-off
  • ➕ Eliminates need for CI-specific workarounds
  • ➖ Larger, riskier change; longer lead time
  • ➖ May require Bit Cloud/CI protocol changes beyond this repo

Recommendation: This revert is the right immediate fix: correctness of PR CI is more important than the speed benefits of lane reuse, especially given deterministic second-push failures. If performance becomes an issue, consider reintroducing --keep-lane behind an explicit opt-in token or an automatic “safe PR” detector, while pursuing an upstream artifact invalidation fix in parallel.

Files changed (1) +7 / -8

Other (1) +7 / -8
config.ymlDrop '--keep-lane' from 'bit ci pr' in PR builds and document failure mode +7/-8

Drop '--keep-lane' from 'bit ci pr' in PR builds and document failure mode

• Removes the '--keep-lane' flag from the 'bit ci pr --build --skip-cleanup' command used in CircleCI PR builds. Rewrites the surrounding comment to explain the deterministic stale-artifact reuse issue and why the temp-lane rebuild flow is preferred for correctness.

.circleci/config.yml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@zkochan
zkochan enabled auto-merge (squash) August 13, 2026 17:52
@github-actions github-actions Bot mentioned this pull request Aug 13, 2026
@zkochan
zkochan merged commit 071b568 into master Aug 13, 2026
17 checks passed
@zkochan
zkochan deleted the copilot/revert-commit-10586 branch August 13, 2026 18:07
zkochan added a commit that referenced this pull request Aug 14, 2026
Conflict resolutions:
- .circleci/config.yml: master's revert of --keep-lane (#10615) applied inside
  this branch's memory-sampler wrapper for the `bit ci pr` step.
- scopes/react/react/react.env.ts, react.main.runtime.ts: stay deleted - this
  branch removes the core env sources from the workspace, so #10610's edits to
  them are moot.
- scopes/preview/preview/rspack/rspack.config.ts: keep the mdxOptions parameter.
  The import master re-adds is what this branch removed on purpose:
  @teambit/mdx.modules.mdx-v3-options is ESM-only and has to reach the config
  through a native import() done by the caller.
- scopes/preview/preview/pre-bundle.ts: keep master's closeRspackCompiler, which
  logs a close failure instead of swallowing it (#10612), and drop this branch's
  earlier copy.
- workspace.jsonc: both sides - master's webpack-bundler/webpack-dev-server
  entries plus this branch's exclude-node-modules-js.
- pnpm-lock.yaml: regenerated from master's lockfile with `bit install`, so the
  full-re-resolution lockfile this branch carried is gone. @teambit/react is now
  the only added package (1.0.1099, consumed from the registry); everything else
  is importers and duplicate versions dropping out with the core env sources.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.

3 participants