Skip to content

fix(#461): release configuration write lock around locator.configure()#466

Merged
eleanorjboyd merged 5 commits into
mainfrom
copilot/fix-issue-461
May 27, 2026
Merged

fix(#461): release configuration write lock around locator.configure()#466
eleanorjboyd merged 5 commits into
mainfrom
copilot/fix-issue-461

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 27, 2026

Fixes #461

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Performance Report (Linux) ✅

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 53ms 177ms 56ms -3ms 0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 100ms 505ms 93ms 7ms
Full Refresh 167ms 31546ms 179ms -12ms

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Performance Report (Windows) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 8ms 16ms 8ms 0ms 0%
Full Refresh 127ms 331ms 117ms 10ms 8.5%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@eleanorjboyd eleanorjboyd changed the title Developing plan for fixing issue #461 undo refresh block by configuration May 27, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Test Coverage Report (Linux)

Metric Value
Current Coverage 79.6%
Base Branch Coverage 79.5%
Delta .1% ✅

Coverage increased! Great work!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Test Coverage Report (Windows)

Metric Value
Current Coverage 76.72%
Base Branch Coverage 76.51%
Delta 0.21% ✅

Coverage increased! Great work!

@eleanorjboyd eleanorjboyd changed the title undo refresh block by configuration fix(#461): release configuration write lock around locator.configure() May 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a performance regression where configure held the configuration RwLock write guard across potentially slow locator.configure() I/O, which could block refresh-side configuration.read() calls and inflate pet.refresh latency (Fixes #461). The change restores the pre-#416 concurrency behavior while preserving the “publish new generation only after all locators are configured” invariant.

Changes:

  • Add a configure_in_progress mutex to serialize overlapping configure RPCs without using the configuration RwLock as the serialization mechanism.
  • Refactor apply_configure_options into “prepare (snapshot) → configure locators (no config lock) → publish (short write lock)” phases.
  • Update existing configure test expectations and add new tests for refresh non-blocking behavior, configure serialization, and panic rollback behavior.
Show a summary per file
File Description
crates/pet/src/jsonrpc.rs Introduces configure_in_progress and restructures apply_configure_options to avoid holding configuration.write() during locator configuration; adds/updates concurrency regression tests for #461.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 3

Comment thread crates/pet/src/jsonrpc.rs Outdated
Comment thread crates/pet/src/jsonrpc.rs Outdated
Comment thread crates/pet/src/jsonrpc.rs Outdated
@eleanorjboyd eleanorjboyd requested a review from rchiodo May 27, 2026 17:52
Comment thread docs/may25-regression-response.md Outdated
@@ -0,0 +1,569 @@
# PET Regression Investigation — Response to May 25 Report
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot -569

[Architect] This 569-line dated investigation document references specific insider build versions (1.33.2026051401, etc.), SQM IDs, and time-sensitive action items ("Target: end of week"). It will become stale quickly. Consider moving this to a GitHub issue, wiki page, or discussion thread where it can be updated/closed — checked-in docs/ files tend to remain as outdated artifacts.

[verified]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the dated investigation document from docs/ in commit ebf4dfa.

Copilot AI requested a review from rchiodo May 27, 2026 18:11
Copy link
Copy Markdown

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@eleanorjboyd eleanorjboyd marked this pull request as ready for review May 27, 2026 18:46
@eleanorjboyd eleanorjboyd enabled auto-merge (squash) May 27, 2026 18:46
eleanorjboyd added a commit that referenced this pull request May 27, 2026
## Summary

Run the Homebrew setup commands in the `homebrew/brew` container as the
`linuxbrew` user instead of root, while discovering the `brew`
executable from the container PATH at runtime.

The container job still runs as root so GitHub Actions checkout/tooling
can write to the mounted workspace, but recent `homebrew/brew` images
have been brittle when `brew install` itself runs as root. PR #466 is
currently failing before Rust setup/tests with Homebrew crashing while
pouring the `ca-certificates` bottle:

```text
undefined method '[]' for nil
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/bottles.rb:127:in 'Utils::Bottles.load_tab'
```

This PR keeps the existing container shape but switches the install step
to:

```bash
brew_bin="$(command -v brew)"
su linuxbrew -c "${brew_bin} update || true"
su linuxbrew -c "${brew_bin} install python@3.12 python@3.11"
```

That avoids hardcoding the Linuxbrew prefix while still avoiding
root-owned Homebrew install behavior.

## Validation

This is a CI-only workaround. The useful validation is the
`ci-homebrew-container` Actions job on this PR.
@eleanorjboyd eleanorjboyd merged commit 7f57b52 into main May 27, 2026
53 checks passed
@eleanorjboyd eleanorjboyd deleted the copilot/fix-issue-461 branch May 27, 2026 20:52
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.

Refresh blocked by configure: configuration write lock held during all locator.configure() calls

5 participants