Repository navigation
Allow DI scopes to opt out of resolved object ownership - #7633
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Merge Risk:
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ReviewSmall, focused change. The Non-blocking notes:
LGTM, pending the CI legs for the non-net10 snapshots. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryAdds
|
|
@codex review Addressed Greptile’s partial-resolution leak in b025dd0 and resolved its thread. Validation: 8 focused unit tests pass; generated and reflection _7375 runs each report 3 passes and 1 intentional resolution failure, with the cleanup observer passing. Added Issue7375Tests for CI; Engine.Tests was not run locally per repository instructions. Claude’s non-blocking notes: added the cheap/side-effect-free guidance to XML remarks. The new failing scenario keeps its scope records separate from the successful-row count. Retained the per-scope virtual method for flexibility. Keeping the existing short prose documentation is reasonable for this single override; a snippet is optional and does not block this change. |
ReviewThe change looks correct and well scoped.
Optional points:
I found no blocking issues. Approving in spirit. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b025dd0c19
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ReviewThe PR adds a protected virtual What looks good
Suggestions (non-blocking)
No blocking issues. Nice, focused fix. I'd merge once the CI snapshot legs (net8/net9/.NET Framework) pass. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ef3624788
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Fixed self-resolving scope double disposal in cb1d5de and resolved the thread. Generated and reflection net10.0 _7375 runs each have 5 passes and the expected missing-registration failure; the new observer reproduced double disposal before the fix. Engine.Tests remains for CI per repository rules. Disposition of Claude’s optional notes: kept the single cached ownership-hook call and added the failed-row reference-deduplication comment. Failed factories never produce a TestContext, so RetainForRowCleanup intentionally uses the global disposer and null-context shared-object diagnostics (see its existing comment and RowCleanupReference); no per-test diagnostic context is available on that path. |
Review: Allow DI scopes to opt out of resolved object ownershipI reviewed the diff and found no blocking issues. The change looks good. What I checked
Non-blocking suggestions
The 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb1d5de473
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Both initializer-ownership findings are fixed in 9ad8fb0; details and validation are in the resolved threads. Engine.Tests awaits CI. Disposition of Claude’s optional notes: retained the existing global-disposer capture and nested conditional; neither needs a behavior change for this fix. A per-object public hook would expand the API beyond #7375; retained the per-scope hook. |
Review of #7633:
|
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Reviewed all review surfaces for head 9ad8fb0. Claude and Codex both report no blockers; all six threads have fix dispositions and no newer replies. Disposition of the latest optional Claude suggestions: retain the separate graph and scope identity marks, whose distinct semantics are explicit at the discovery call sites; consolidating them is optional refactoring. Keep the short failure cleanup loop inline so the retained-reference lifetime remains visible beside resolution. A throwing-hook regression is optional: cleanup.Register(scope) precedes the single hook invocation, preserving scope cleanup if it throws. The failure-only HashSet needs no change. Promoting this reviewed head to ready. CI and the ready-for-review Claude run must complete before auto-merge can be armed. |
Disposable custom DI scopes can resolve services without owning their disposal. Add the protected virtual
ScopeOwnsCreatedObjectshook so these scopes can return false and let TUnit dispose resolved services, while the scope itself still receives cleanup. The default remains ownership by disposable scopes.Failed factories retain resolved services and their trackable initializer graphs through the tracker’s global reference counts, so shared services remain alive until their final owner finishes. Cleanup references stay outside session accounting and release once across row clones. A separate weak identity mark protects self-resolving scopes from double disposal without transferring ownership of their initializer properties;
UntrackObjectCoreshares the retirement path between normal tracking and failed-row cleanup.Document the hook and update all public API snapshots. Add EngineTest-tagged regression tests that verify a disposable, untracking scope and its service are each disposed exactly once.
Validation:
Closes #7375
Summary by CodeRabbit