carlos / platform Public

edge, console: pin fleet-corner ack delete; drop unread kick field

Final review (Fable P3s).

- storedoor_test: the door ACL matrix pins opDelete on the fleet-corner
  config-ack key (allowed for the own fleet, refused for another), which
  root's blind ack write depends on.
- replicaplacement: replicaKickState.running was set and never read;
  the state exists only while a run is in flight.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 9b61fc3eee1a714f91b7e9ec07cebc6b245d5054 parent dd49a06
2 files changed, +7 −4
  • internal/console/replicaplacement.go +5 −4
  • internal/edge/storedoor_test.go +2 −0

Intent

Attributed to this commit: 2.30 g CO₂e (305,893 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on sr-followups, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/internal/console/replicaplacement.go b/internal/console/replicaplacement.go
index 6ed6abd79..700a52a9d 100644
--- a/internal/console/replicaplacement.go
+++ b/internal/console/replicaplacement.go
@@ -440,10 +440,11 @@ const replicaKickTimeout = 2 * time.Minute
// replicaKickRetry is how often a kick run retries a busy fleet lock.
const replicaKickRetry = 100 * time.Millisecond
-// replicaKickState is one fleet's kick: at most one run in flight, and at
-// most one rerun owed by kicks that arrived after the run read its view.
+// replicaKickState is one fleet's kick: at most one run in flight (the
+// state exists only while it is), and at most one rerun owed by kicks that
+// arrived after the run read its view.
type replicaKickState struct {
- running, dirty bool
+ dirty bool
}
// kickReplicaPlacement places a fleet's copies now rather than at the
@@ -477,7 +478,7 @@ func (s *Server) kickReplicaPlacement(fleet string) {
s.replicaKickMu.Unlock()
return
}
- st = &replicaKickState{running: true}
+ st = &replicaKickState{}
s.replicaKickFleets[fleet] = st
s.replicaKicks.Add(1)
s.replicaKickMu.Unlock()
diff --git a/internal/edge/storedoor_test.go b/internal/edge/storedoor_test.go
index 1597deb5a..9190f209b 100644
--- a/internal/edge/storedoor_test.go
+++ b/internal/edge/storedoor_test.go
@@ -234,6 +234,8 @@ func TestStoreDoorACLMatrix(t *testing.T) {
// fleet credential there could forge another tenant's ack).
{"fleets/pi/control/config-ack/box-a/app.example.com.json", opWrite, true, "own config ack, in the fleet corner"},
{"fleets/pi/control/config-ack/box-a/app.example.com.json", opRead, true, "the ack writer reads before it CASes"},
+ {"fleets/pi/control/config-ack/box-a/app.example.com.json", opDelete, true, "root's blind ack write deletes, then creates"},
+ {"fleets/other/control/config-ack/box-a/app.example.com.json", opDelete, false, "nor deletes another fleet's ack"},
{"control/config-ack/box-a/app.example.com.json", opWrite, false, "#966: never the platform-root ack"},
{"control/config-ack/box-a/app.example.com.json", opRead, false, "#966: nor read one"},
{"fleets/other/control/config-ack/box-a/app.example.com.json", opWrite, false, "nor another fleet's ack"},