Revert "[9.5](backport #7794) refactor: clone ParsedPolicy in process… - #7804
Merged
Conversation
…processPolicy to prevent shared-state races (elastic#7801)" This reverts commit 14ae085.
ebeahan
requested review from
blakerouse and
ycombinator
and
a lite review from Copilot
September 11, 2026 13:16
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A critical nested-map aliasing issue and a moderate monitor-locking issue remain unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Reverts the ParsedPolicy cloning refactor while retaining local policy-data copies during check-in processing.
Changes:
- Removes
ParsedPolicy.Clone()and its isolation test. - Restores shared policy dispatch and broader monitor locking.
- Simplifies policy-data cloning while preserving per-request processing copies.
File summaries
| File | Summary |
|---|---|
internal/pkg/policy/parsed_policy.go |
Removes parsed-policy cloning. |
internal/pkg/policy/parsed_policy_test.go |
Removes clone isolation coverage. |
internal/pkg/policy/monitor.go |
Restores shared dispatch; moderate (3 votes): global mutex is held during rate limiting and queue delivery. |
internal/pkg/model/ext.go |
Reverts deep cloning; critical (3 votes): nested exporter maps remain shared and can race. |
internal/pkg/api/handleCheckin.go |
Uses local policy-data and secret-key copies; nit (1 vote): comment wording is unclear. |
internal/pkg/api/handleCheckin_test.go |
Updates concurrent processing coverage. |
Review details
Suppressed comments (1)
internal/pkg/api/handleCheckin.go:1161
- The new comment is grammatically incorrect and unclear; it should describe replacing the inputs, not “add replace” them.
// Add replace inputs with agent prepared version.
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
samuelvl
approved these changes
Sep 11, 2026
ebeahan
enabled auto-merge (squash)
September 11, 2026 13:52
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.
…Policy to prevent shared-state races (#7801)"
This reverts commit 14ae085.