Skip to content

Fix CI races in workspace saves, login, and storage failover - #65

Open
ernestrc wants to merge 3 commits into
mainfrom
fix/ci-flakes
Open

Fix CI races in workspace saves, login, and storage failover#65
ernestrc wants to merge 3 commits into
mainfrom
fix/ci-flakes

Conversation

@ernestrc

@ernestrc ernestrc commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes four underlying CI failures reported on #57 (without changing that fork PR):

  • Defer filesystem conflict checks through save/reload UI completion, then recheck disk rather than dropping external changes. Release deferred callbacks if scheduling is rejected.
  • Preserve external writes between save rename and reopen: only adopt a changed timestamp when the reopened content matches the actual saved bytes. Cover concurrent buffer edits and stale-save protection.
  • Use the shared queued test scheduler so workspace installation cannot race IDE initialization.
  • Reconnect idle gRPC storage followers and close abandoned connections; prove failover still works when the leader goodbye is lost.
  • Pin the OAuth callback flush fix from Flush OAuth callback responses before publishing the code blue#3 and force the callback/shutdown ordering in the Rune regression.

Validation

  • Deterministic regressions failed before each fix.
  • Full make test and make lint pass; zero lint issues.
  • Combined affected-test stress suite passes 50 repetitions under -race.
  • Added rename/reopen regressions pass another 30 repetitions under -race.
  • Serial CI-style make test also passed before the final rename/reopen follow-up; an uncached repeat is running on the complete patch.
  • make generate succeeds; unrelated generated copyright-header drift excluded.
  • Hosted Linux/macOS checks are running on the latest commit.

Dependency

Blue PR unstablebuild/blue#3 is the companion upstream fix and its complete CI matrix passes. Rune pins its immutable commit as a Go pseudo-version; no local replace or release publication is required.

Defer watcher conflict checks until file operations settle, and keep test UI
callbacks queued until IDE startup finishes. Reconnect idle storage followers
so a lost goodbye cannot prevent leader election.

Pin the Blue callback-flush fix to prevent OAuth server shutdown from
truncating the response. Add deterministic regressions for the failures
observed in PR #57.

Signed-off-by: ernestrc <ernest@unstable.build>
Reopening the saved path can observe a concurrent external write. Verify
changed timestamps against the saved bytes before adopting them, so watcher
rechecks and later saves do not mistake that external edit for our own save.

Track the swap digest separately from mutable editor content and avoid an
extra read when rename preserves the saved timestamp.

Signed-off-by: ernestrc <ernest@unstable.build>
A fast expander could hold the descriptor hand-off mutex in StartCommand
before Init reached SetDefaultAttributes, deadlocking construction against
a parked executor. Finish synchronous initialization before launching the
spawn worker while retaining Close serialization.

Signed-off-by: ernestrc <ernest@unstable.build>
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 73bcf7da-8bc8-4810-a682-e20a617e84bf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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