Repository navigation
fix(action): late Action/Task/protocol registrations are refused out loud - #27
Merged
Merged
Conversation
…loud c.Action and c.Task dropped Registry.Set's refusal after a locked conclave sealed: the returned *Action still ran its handler although nothing could reach it by name. Their signatures stay (callers chain .Description), so a refused registration now logs an error and returns a value that can't run: Exists is false and Run returns the refusal. API.RegisterProtocol returns its Result; every caller uses it as a statement, so none breaks. Co-Authored-By: Virgil <virgil@lethean.io>
Contributor
|
Caution Review failedThe pull request is closed.
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Follow-up to #26, which fixed
Command,DataandDrive. These three drop the sameRegistry.Setrefusal after a locked conclave seals, but couldn't return aResultwithout breaking callers:c.Action(name, h): callers chain.Description = …onto the result, so the signature stays. A refused registration now logs an error and returns an Action that can't run:Exists()is false andRunreturns the refusal. Before, the returned Action ran its handler even though nothing could reach it by name. The new test caught exactly that on the old code.c.Task(name, t): same treatment.Runreturns the refusal.API.RegisterProtocolnow returns theResult. It's only ever called as a statement (core/go only, estate-wide), so no caller breaks.Checked:
go test -race,go vet,gofmtand all three drift guards are clean.🤖 Generated with Claude Code
Co-Authored-By: Virgil virgil@lethean.io