refactor(injectappmodel): EnsureServiceEntry + unify claim semantics - #251
Conversation
- Replace ForeignClaimOnOwnerReinject with fixed owner-reinject claim rules for all Specs. - Add EnsureServiceEntry and NeedEnsureServiceEntry Decide stub (virtual entry materialize deferred to P2). - Keep FieldDefault/AppSetting skipping inject when ServiceEntryPoint is empty. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe injection model replaces ChangesService-entry planning
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…flag - Derive ensure-needed from Spec.EnsureServiceEntry plus empty ServiceEntryPoint at Materialize time. - Keep Decide allowing NeedInject when EnsureServiceEntry is set without a separate Plan bit. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9768c9e. Configure here.
User description
Summary
ForeignClaimOnOwnerReinject; owner reinject never steals a foreign process claim (NeedInjectwithoutScheduledApp).EnsureServiceEntry+ PlanNeedEnsureServiceEntryDecide stub (no virtual service Effects yet — that is PR-P2).EnsureServiceEntry=false(emptyServiceEntryPointstill skips).Test plan
go test ./internal/module/artifact/build/injectappmodel/ -count=1go test ./internal/module/artifact/build/... ./internal/module/lifecycle/ -count=1.gitignore/.dev/docschanges in this PRMade with Cursor
PR Type
Enhancement, Tests
Description
Unify owner-reinject claim semantics across all Specs in Go core.
Introduce
EnsureServiceEntrySpec field andNeedEnsureServiceEntryPlan flag stub.Maintain empty service entry skip behavior for built-in FieldDefault and AppSetting models.
Expand Go unit tests for unified claims and service entry flag handling.
File Walkthrough
coverage_test.go
Update coverage test for unified registry claim logicinternal/module/artifact/build/injectappmodel/coverage_test.go
ForeignClaimOnOwnerReinjectfield.injectappmodel_test.go
Add test coverage for EnsureServiceEntry and claim behaviorinternal/module/artifact/build/injectappmodel/injectappmodel_test.go
and AppSetting.
EnsureServiceEntryflag behavior.inject.go
Implement EnsureServiceEntry plan handling and unified claim rulesinternal/module/artifact/build/injectappmodel/inject.go
EnsureServiceEntryonSpecduring plan decision.NeedEnsureServiceEntryonPlanwhen service entry point ismissing.
claimNeedInjectto prevent claim stealing across allSpecs.
NeedEnsureServiceEntryis set.plan.go
Add NeedEnsureServiceEntry field to Plan structinternal/module/artifact/build/injectappmodel/plan.go
NeedEnsureServiceEntryboolean field to thePlanstruct.spec.go
Replace ForeignClaimOnOwnerReinject with EnsureServiceEntry in Specinternal/module/artifact/build/injectappmodel/spec.go
ForeignClaimOnOwnerReinjectfield withEnsureServiceEntryonSpec.registry.go
Remove ForeignClaimOnOwnerReinject from AppSetting default specinternal/module/artifact/build/injectappmodel/registry.go
ForeignClaimOnOwnerReinjectfrom defaultAppSettingmodelspec.
Summary by CodeRabbit