Repository navigation
fix(projects): decline the settings write when a project update is refused - #86
Merged
Merged
Conversation
…settings.json Checkpoint before the fix; --no-verify because the tests are red by design. Refs #46 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…fused A refused update, or one naming a missing project, returned nil from the declinable callback, so settings.json was rewritten with identical content. The callback now returns the refusal and the store declines. Refs #46 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Merged by the coordinator under the owner's delegation: CI test and race green on 707d8b3, review round 1 clean. |
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.
Closes #46
A refused
PUT /api/projects/{id}(for example an unknownmode), or one naming a missing project, returned nil from theWithDeclinablecallback. Sosettings.jsonwas rewritten with identical content, and the watcher and fan-out fired for no change.ApplyUpdaterefusal, or an unexported not-found sentinel, so the store declines the write.Updatestill returns(_, true, err)for a refusal (unwrapped) and(_, false, nil)for a missing project. The HTTP 400/404 and IPC results are unchanged.Tests (red first,
cmd/relay/project_update_declined_test.go):settings.jsonuntouched, bytes and file identity;Break-and-restore on the decline. Review round 1 clean. Full
go test ./...passed locally with Relay stopped. A pre-existing race the reviewer found is #85.🤖 Generated with Claude Code