census: plan 3 Task 3's rank tiebreak re-pins the internal/edge envelope; no unit moves and the seal is unchanged
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2 files changed,
+6
−1
docs/superpowers/notes/census-proposal-self-serve-moves-3.md+4 −0internal/provision/testdata/plan14-root-reads-self-serve-moves-3.tsv+2 −1
CI failed — run details
CI log
=== gate === sigwho: pid 2 ppid 1 pgid 0 sid 0; child pid 3 .amadan/test-gate.sh gate: 2026-10-24T04:32:05Z on aarch64, 32 cpus, 61412 MB available, go1.26.8 linux/arm64 gate: +0s start launchctx gate: +0s start vet gate: +0s start gofmt gate: +1s start rest gate: +10s start internal_console@0 gate: +10s start internal_console@1 gate: +10s start internal_console@2 gate: +10s start internal_console@3 gate: +10s start internal_console@4 gate: +10s start internal_console@5 gate: +10s start internal_console@6 gate: +10s start internal_console@7 gate: +10s waiting for internal_console's shards before the next split package gate: +178s start root@0 gate: +178s start root@1 gate: +178s start root@2 gate: +178s waiting for root's shards before the next split package amadan: step gate failed: signal: terminated amadan: job failed at step gate — its output is above, not at the tail of this log
diff --git a/docs/superpowers/notes/census-proposal-self-serve-moves-3.md b/docs/superpowers/notes/census-proposal-self-serve-moves-3.md| index 53260c4b9..8fde6168f 100644 |
| --- a/docs/superpowers/notes/census-proposal-self-serve-moves-3.md |
| +++ b/docs/superpowers/notes/census-proposal-self-serve-moves-3.md |
| @@ -93,3 +93,7 @@ The record-write census is unchanged by this task. The edge writes no record, an |
| ### Task 2 fix round 1 |
| The import gate now judges the front row in the table the request's decision was resolved in: `importGateAdmit` takes `local.table`, not the live table. `edge/edge.go:Edge.ServeHTTP` is re-pinned in place. `edge/importgate.go:Edge.importGateAdmit`, accepted legacy since census-ruling-seeded-instances, takes a new frozen fingerprint under `rev3=PROPOSED-self-serve-moves-3`. Its read sites are unchanged; offsets moved. The `internal/edge` envelope is re-pinned and the seal moves to `6ae10fd1…`. No root read, class or task is added, and the record-write census is unchanged. |
| + |
| +## Task 3: the ranking's witnesses |
| + |
| +Task 3 is tests, apart from one tiebreak in `edge/rank.go`. rank's sort now breaks a tie between two candidates of one file by target (`strings.Compare(targetHost)`, after real before alias). So one file's two holds of different targets for one alias are ranked the same whatever order they were collected in (invariant (n)). `rank` reads no row and is not a census unit. No unit's fingerprint moves, and the seal stays `6ae10fd1…`. The `internal/edge` envelope is re-pinned. No root read, class or task is added, and the record-write census is unchanged. |
diff --git a/internal/provision/testdata/plan14-root-reads-self-serve-moves-3.tsv b/internal/provision/testdata/plan14-root-reads-self-serve-moves-3.tsv| index 662ebf790..f7853ffd0 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-self-serve-moves-3.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-self-serve-moves-3.tsv |
| @@ -3,6 +3,7 @@ |
| # Task 1 fix round 1, rev3=PROPOSED-self-serve-moves-3: a moves pass's listing failure fails only the offline view's holds (failHolds), the snapshot keep and elsewhere read staying the last good listing's; the edges file loop loads the view's snapshot once per tick. edgesFileLoop re-pinned in place (its read site unchanged), which moves the seal; the internal/host envelope re-pinned in place. No root read, class or task is added. |
| # Task 2 (candidates, the ranking, the holding page, the local edge and the agent wiring), rev3=PROPOSED-self-serve-moves-3: no record envelope changes and no root read, record read or task is added. The edge's serving reads move: Edge.Reload (hands its listed rows to the local hold rebuild), Edge.ServeHTTP (one decision per request, resolve and selectUpstream) and Edge.currentHosts (the box's platform holds) are re-pinned as accepted legacy, and two new edge units are frozen as accepted legacy (localReady, a table entry as a candidate; localHolds, the local holds from the rows Reload listed). runAgent (B,C,D,F: edge.WithBoxID, subscribeEdgeHolds) and armMovesPass (B,C: subscribeArmedHolds) are re-pinned as authority. Envelopes re-pinned: internal/edge (rank.go, holding.go, homemap.go, edge.go, certwarm.go) and internal/host (agent.go, movespass.go, movesoffline.go). |
| # Task 2 fix round 1, rev3=PROPOSED-self-serve-moves-3: the import gate judges the front row in the request decision's table (importGateAdmit takes local.table). Edge.ServeHTTP is re-pinned in place and Edge.importGateAdmit (accepted legacy since census-ruling-seeded-instances) takes a new frozen fingerprint, which moves the seal; the internal/edge envelope is re-pinned. No root read, class or task is added. |
| +# Task 3 (the ranking's witnesses), rev3=PROPOSED-self-serve-moves-3: rank's sort breaks a tie within one file by target, so one file's two holds of different targets for one alias are ranked the same in every collection order (rank.go reads no row and is no census unit). Only the internal/edge envelope is re-pinned; no unit moves, so the seal is unchanged. No root read, class or task is added. |
| @legacy 652c416a0cd27a153fa259d76ab20538480e2c3afd98cbec6af083902b17f5ff internal/domains/aliases.go ReconcileAliases legacy accepted-legacy accepted-legacy;rev3=PROPOSED-self-serve-moves-3;basis=root-route; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its fast-converge and instances loops: self-serve moves 1's body (rev3=J1, the catch-all's labels counted through domains.InstanceLabelCountsJudged), which now writes each alias row's provenance: an exact claim on the row's own name upserts it explicit (every pass, so a legacy row is upgraded on the first), and the synthetic "*.<host>" catch-all row not explicit; registry read sites unchanged, offsets moved; a report the edges file lists holding aliases by, not a decision registry:Account@15605,registry:Account@15618,registry:Alias@15220,registry:Alias@15260,registry:Alias@15330,registry:App@12165,registry:App@12365,registry:App@12521,registry:App@12722,registry:App@15631,registry:App@15640,registry:App@2026,registry:App@2222,registry:App@6036,registry:App@6235,registry:Host@15590,registry:Host@15879,registry:Host@15932,registry:Host@16004,registry:Host@16516,registry:Host@16608,registry:Host@16667,registry:Host@16748,registry:Host@406,registry:Prefix@16524,registry:Prefix@16622,registry:Prefix@16675,registry:Prefix@16756,registry:Status@8899,whole:Route@12134,whole:Route@12209,whole:Route@12356,whole:Route@12418,whole:Route@12561,whole:Route@12717,whole:Route@13613,whole:Route@1369,whole:Route@14825,whole:Route@14833,whole:Route@2066,whole:Route@2217,whole:Route@2273,whole:Route@359,whole:Route@388,whole:Route@399,whole:Route@417,whole:Route@5382,whole:Route@6080,whole:Route@6226,whole:Route@8229,whole:Route@8681,whole:Route@8843,whole:RouteAlias@14841,whole:RouteAlias@15195,whole:RoutePath@10426,whole:RoutePath@16409,whole:RoutePath@16451,whole:RoutePath@16565,whole:RoutePath@16595,whole:WildcardDomain@12933,whole:WildcardDomain@15520,whole:WildcardDomain@15569,whole:WildcardDomain@15732,whole:WildcardDomain@15838,whole:WildcardDomain@15867 edef8a1bf06cab5666a52ec19840c54f02913ddc67a32da7f6197db1606556a4 |
| internal/domains/aliases.go ReconcileAliases legacy accepted-legacy accepted-legacy;rev3=PROPOSED-self-serve-moves-3;basis=root-route; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its fast-converge and instances loops: self-serve moves 1's body (rev3=J1, the catch-all's labels counted through domains.InstanceLabelCountsJudged), which now writes each alias row's provenance: an exact claim on the row's own name upserts it explicit (every pass, so a legacy row is upgraded on the first), and the synthetic "*.<host>" catch-all row not explicit; registry read sites unchanged, offsets moved; a report the edges file lists holding aliases by, not a decision registry:Account@15605,registry:Account@15618,registry:Alias@15220,registry:Alias@15260,registry:Alias@15330,registry:App@12165,registry:App@12365,registry:App@12521,registry:App@12722,registry:App@15631,registry:App@15640,registry:App@2026,registry:App@2222,registry:App@6036,registry:App@6235,registry:Host@15590,registry:Host@15879,registry:Host@15932,registry:Host@16004,registry:Host@16516,registry:Host@16608,registry:Host@16667,registry:Host@16748,registry:Host@406,registry:Prefix@16524,registry:Prefix@16622,registry:Prefix@16675,registry:Prefix@16756,registry:Status@8899,whole:Route@12134,whole:Route@12209,whole:Route@12356,whole:Route@12418,whole:Route@12561,whole:Route@12717,whole:Route@13613,whole:Route@1369,whole:Route@14825,whole:Route@14833,whole:Route@2066,whole:Route@2217,whole:Route@2273,whole:Route@359,whole:Route@388,whole:Route@399,whole:Route@417,whole:Route@5382,whole:Route@6080,whole:Route@6226,whole:Route@8229,whole:Route@8681,whole:Route@8843,whole:RouteAlias@14841,whole:RouteAlias@15195,whole:RoutePath@10426,whole:RoutePath@16409,whole:RoutePath@16451,whole:RoutePath@16565,whole:RoutePath@16595,whole:WildcardDomain@12933,whole:WildcardDomain@15520,whole:WildcardDomain@15569,whole:WildcardDomain@15732,whole:WildcardDomain@15838,whole:WildcardDomain@15867 edef8a1bf06cab5666a52ec19840c54f02913ddc67a32da7f6197db1606556a4 |
| @legacy 887eab39c9584891268b9afedcd81c995849a97545258b3eacc506b5c0165b23 internal/domains/aliases.go deriveInstanceAliases legacy accepted-legacy accepted-legacy;rev3=PROPOSED-self-serve-moves-3;basis=root-route; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): self-serve moves 1's body, whose already-the-row-we-want skip now also compares the existing row's provenance (registry:Explicit, one new site): a derived name left explicit by a detached exact claim on the same target and owner is rewritten not explicit, and both keep-as-it-is paths (a listing failure, an unjudged label) hand the kept row to keepDerived; the other registry read sites unchanged, offsets moved; no new route registry:Account@2163,registry:Account@3516,registry:Account@4587,registry:Alias@2225,registry:Alias@2293,registry:Alias@2337,registry:Alias@557,registry:App@1686,registry:App@2189,registry:App@3542,registry:App@4613,registry:Explicit@4632,registry:Host@1843,registry:Host@4566,registry:Host@4576,registry:Host@4787,registry:Provisioned@1636,registry:Replica@1672,registry:Slug@1775,whole:Route@1620,whole:Route@1726,whole:Route@3058,whole:RouteAlias@2143,whole:RouteAlias@2377,whole:RouteAlias@3498,whole:RouteAlias@3867,whole:RouteAlias@4548,whole:RouteAlias@509,whole:RouteAlias@539,whole:RouteAlias@552,whole:RouteAlias@568 42d5a40cccb38c31f306b49c00fde7482e4ee0b3cbf6a6a2dfbaac06592ef883 |
| @@ -39,7 +40,7 @@ internal/host/edgesfile.go edgesFileWriteClaims authority F,J1 rev3=PROPOSED-sel |
| internal/host/edgesfile.go holdingEntries authority F,J1 rev3=PROPOSED-self-serve-moves-3;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, the writer's holding entries: reads the registry rows edgesFileWriteClaims listed (Status, HoldOp, Host, Platform, Provisioned and the lifetime pair), their path prefixes (the owner projection, servedOwners) and their explicit alias rows through edgesfile.AliasPublishable, and the offline view's move for each held host; a held row whose hold op is the move id the view knows publishes one entry; a report, not a decision; no file, record, release or claim read registry:Alias@744,registry:Alias@799,registry:Explicit@663,registry:HoldOp@307,registry:HoldOp@404,registry:Host@1242,registry:Host@1279,registry:Host@375,registry:Host@438,registry:Host@467,registry:Host@646,registry:Host@766,registry:Host@790,registry:Host@886,registry:Host@931,registry:Host@992,registry:Incarnation@1070,registry:Platform@1010,registry:Provisioned@1024,registry:ServingSeq@1097,registry:Status@294,whole:Route@263,whole:Route@544,whole:Route@858,whole:RouteAlias@617,whole:RouteAlias@724,whole:RoutePath@558 da790578cea389cb43b649dea6b374236bed972f94d382ac85837de512625b2c |
| @fields A,Account,Accounts,AddedAt,Addr,Addrs,Alias,Aliases,Alive,AllowAbsent,App,Archives,Args,At,Attempts,B,Backing,Bucket,BuildState,Callback,CallbackError,CallbackFailed,Canary,Caps,CertExpiresAt,Changed,Channel,CheckedAt,ClaimIncarnation,ClaimOwner,ClaimOwnership,ClaimRowID,ClaimStamp,Class,Contents,CreatedAt,DBPath,DNSCheckedAt,DNSStatus,Deadline,Demand,Digest,DoneBefore,Due,DueAt,Env,EnvBefore,Environment,Error,ErrorKind,ExcludeHosts,ExpectGood,ExpectOp,ExpectPair,Expected,Explicit,F,Failed,FenceGen,Fleet,FleetBox,FleetBoxes,Fleets,From,FromDB,FromOp,FromSock,Gate,GoodDemand,GoodDigest,GoodVersion,Hash,Health,Held,Hibernate,HoldOp,Host,Hosts,ID,Id,IdValue,Idle,IdleSeconds,ImportGate,Incarnation,Journal,Keep,Kind,Label,LastAt,LastError,LastMs,LastStatus,Limit,MaxRun,MaxRunSeconds,Method,Ms,Name,Next,NextAt,NextDue,NextGood,NextValue,Now,Number,Number64,Observed,ObservedValue,Old,On,Op,Original,Owner,Ownership,P,Pair,Path,Paths,Platform,Pool,Prefix,Prev,PrevVersion,Provisioned,RecordKey,Region,Registration,Replica,Replicas,Replication,Retirement,Route,Routes,Row,Rows,Seed,SeedID,SeedSource,ServingSeq,ServingVersion,Slug,Socket,Spec,Sqid,State,Status,StatusNamed,Steering,StringMap,T,TValue,Tags,Target,Targets,Text,Timer,Timers,Times,To,ToDB,ToOp,ToSock,TokenHash,Tunnel,Unit,UpdateSettings,Ver,Version,W,WakeIncarnation,Wildcards,closed,conn,connect,ctx,d,dec,done,enc,full,input,mu,output,path,remote,sql,wait |
| @coverage internal/domains 0cf7748c97e4caa7d0daa73e251fdd2f2f03e425321599bf046292b0a86ebde8 |
| -@coverage internal/edge 71e950c8159f277e3f5bf8af888057a088dec6d48f0f15e80a726bf78280d551 |
| +@coverage internal/edge 56d3a0ac1f5505cdb567164822be5b5eb2187c31dce89c7df02020bbfaee258e |
| @coverage internal/edgesfile ee82e43c7d6363297f63abcde9c3e828a53d377573649f0d26a9853056aad4be |
| @coverage internal/host 27d077c9f63838516ad29fb69ea48ebbf85a7c17ade258a3b8ce2d57eb3cc21d |
| @coverage internal/registry ae19eaec5c4dde2c400fcb2fc6afd23c6b129e77306d6916fe55b2091b0fb5ed |