carlos / platform Public

census: re-pin linkedPolicies for the label door

c958a182 adds POST .../instances/{host}/label to var linkedPolicies as
linkedRefuse, beside retry. A pattern table only; key-site, kinds
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev af3949829d6361e1d67506d213186df54dc2fe3d parent c958a18
1 file changed, +6 −0
  • internal/provision/fleet_record_labels_census_test.go +6 −0

CI failed — run details

Intent

Human

<task-notification> <task-id>abcc8a62b33103a8e</task-id> <tool-use-id>toolu_01Cbe1hwaBzv3ATxnqF58hHy</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ac77363b-5830-422c-9f38-d7f2540dd398/tasks/abcc8a62b33103a8e.output</output-file> <status>completed</status> <summary>Agent "Register label route in console invariants" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>The label route is now registered in every console route inventory that was failing, and all the named tests pass. Commit `c958a182` is on fleet-record-labels-m2 and has not been pushed. No handler changed. The one non-test edit is `linkedpolicy.go`: the entry I added there is the same as what an unlisted route already gets, so behaviour is unchanged. **Tests:** the `-run` line you gave passes (`ok ./internal/console 421.9s`). I ran it unsandboxed because the sandbox made the Go build cache read-only; GOCACHE stayed at its default. **Linked-app classification:** `linkedRefuse`, the same as the CLI `retry` door and every other `instances/{host}` door. The handler calls `refuseLinkedJSON` right after the app-exists check, so a linked app gets the 409 "managed at home" answer. A linked app's instances live on its home deployment, so refusing is the only safe choice. There is no CLI `set-upstreams` door to compare against; `retry` and the move doors are the comparable ones. **What I changed for each failure:** - **Empty role set:** added the route to `closedDoors`, right after the fleet doors. - **Claim fixtures:** the door already answers 409 C33 on a claim console, so I gave it a refusal fixture rather than a door fixture. It is set up with an existing instance and posts `{"box":"box-1"}`. I added a reason for C33 to `claimUnsupported`, which the fixture checker requires. - **Copy-since inventory:** pinned the label writer's in-memory copy of the record as read, which writes no copy field. I also raised `handleAPIInstanceCreate` literals from 7 to 8 for D1's new probe at apiinstances.go:2200, which creates nothing. **Other inventories:** one more failed. `TestEveryClosedDoorRefusesAServiceCredential` walks the closed-door list and checks a fixed count, so I raised it from 102 to 103 and named the label door in its message; it now passes. These also pass with `-run`: TestParityTableCoversConsoleRoutes, TestRouteDeclsMatchRegistrations, TestClaimConsoleMuxHasOneRegistrar, TestNoBucketAppPostsRefuse, TestTeamRoleReach, TestCLIRouteRefusesATeamSet, the linked-app route and body tests, TestPerfInventoryOfTheRealConsole, TestEveryOperatorPageRendersInTheShell, TestClaimMovesEntriesAreCovered, the deploy door tests, and the service-role tests in `svcroutes_test.go` and `apiservices_test.go`.</result> <usage><subagent_tokens>113043</subagent_tokens><tool_uses>33</tool_uses><duration_ms>998404</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bk7paa48v</task-id> <tool-use-id>toolu_01VSBoZM5wpapigPoWETzNPA</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ac77363b-5830-422c-9f38-d7f2540dd398/tasks/bk7paa48v.output</output-file> <status>completed</status> <summary>Background command "Push and wait for CI" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 6.99 g CO₂e (918,759 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on fleet-record-labels-m2, 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/provision/fleet_record_labels_census_test.go b/internal/provision/fleet_record_labels_census_test.go
index 4473a7f32..abaa87751 100644
--- a/internal/provision/fleet_record_labels_census_test.go
+++ b/internal/provision/fleet_record_labels_census_test.go
@@ -69,11 +69,17 @@ package provision
// once more: an exhausted CAS conflict is no longer "changed" and falls to
// the unknown outcome (502, C38); ErrRecordMigrating stays "changed" (C35).
// Refusal mapping only; record-writer, kinds as before.
+//
+// c958a182 re-digests var linkedPolicies: one more pattern, POST
+// /api/cli/apps/{account}/{app}/instances/{host}/label, as linkedRefuse,
+// beside retry. A map literal of patterns, no record path built from it.
+// key-site / lit:instances,lit:sidecars, as before.
func fleetRecordLabelsM2WriteCensusInventory() []censusEntry {
entries := append([]censusEntry(nil), g6PoolWriteCensusInventory()...)
repins := []censusEntry{
{"cli.go", "instancesCommand", "key-site", "lit:instances", "9a8fa5c9006089fdb9216af4ccc3479120c42078f8ec2dcd44bbd9fdd41b008f"},
{"internal/console/routedecls.go", "var routeDecls", "key-site", "lit:instances,lit:sidecars", "8b1dc68670eeea9f6ec35b48be89b1053e7f1e891da300146094b3d9f3fdf0dc"},
+ {"internal/console/linkedpolicy.go", "var linkedPolicies", "key-site", "lit:instances,lit:sidecars", "80d47792933c4974f143722437d8e40d729d72b798db5191d7a101aa4e6773d2"},
}
for _, r := range repins {
found := false