| index d30967b97..7da58ee54 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-member-backups-2a.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-member-backups-2a.tsv |
| @@ -1,36 +1,43 @@ |
| # Census overlay member-backups-2a, written by census-propose (#369). census-ruling-member-backups-2a, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-member-backups-2a.md. |
| -# 2 body, 1 sites, 14 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| -# 16 new dispositions: 1 reads re-frozen at their disposition with the claim, 13 new units frozen accepted-legacy, 2 quiet units retired while they read nothing, 0 other. |
| +# 5 body, 1 sites, 16 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 18 new dispositions: 1 reads re-frozen at their disposition with the claim, 15 new units frozen accepted-legacy, 2 quiet units retired while they read nothing, 0 other. |
| @legacy da6959baf82f9b6423665b204b41cb853d8d8af62dabcc137a00716a8462bcf1 internal/host/units/carlos-hibernate-verify.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-member-backups-2a;basis=comment lines only: the header now describes the per-box record control/verify/<ref>.json, the on-disk scratch dir, the drill reading <data>/monitor/self.json and (group box) <data>/monitor/verify-assign.json, and that bootstrap arms the timer on every box. Every directive is byte-for-byte unchanged (User=carlos, EnvironmentFile=-/etc/carlos/host.env, ExecStart=/opt/carlos/carlos ops hibernate-verify, CacheDirectory/TMPDIR, ReadWritePaths=/data, the sandboxing and MemoryMax). The arming itself is bootstrap.go (enabledUnits gains carlos-hibernate-verify.timer, inertUnits drops it), in the internal/host envelope. file:external@0 da1688e959f8c33a57cdcf0baec1796fdb1d403dfe9679df25b7d3424a4e241f |
| @legacy 8d2e9b0b0fbbd33fe43e15ac375d9a6c79e483f805957aac04d579e73149cfe3 internal/boxself/boxself.go Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new package boxself, called only by the drill (ops hibernateRun.run through ReadFresh, user carlos): reads <data>/monitor/self.json through readStrict with a 64 KiB cap (boxself.ReadFile: no symlink followed in any component, a regular file with one link only, a FIFO or directory refused before it is opened). It checks version 1 and a ref ValidRef accepts (one key segment) and returns the ref and group flag. Not called by root code, and safe if it were. file:Read@5 ef840852070607d6c2cca1c999adeac1f723716e23c89c030d3a3a5541ff67dd |
| @legacy f1d32703aac97cdbcf62b807256f32fc38c054cb52dd1323c9da70e5338ca3c7 internal/boxself/boxself.go ReadFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the one read of the three monitor files (self.json and verify-assign.json by the drill, verify.json by the agent through metrics.ReadVerify): readFile on Linux, ErrUnsupported elsewhere. A missing file wraps os.ErrNotExist, anything unsafe or over max is ErrUnsafe. file:ReadFile@5 8d494eeacc5af3802121ca0780357093905911fe2e6d4368d92a6541ffcc5031 |
| @legacy cef1c8dded47138d0f994e33ac071de2beb081e560623a2aac9732be3be7fcbe internal/boxself/boxself.go ReadFresh legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill only (user carlos): Read plus a refusal (ErrStale) of a record older than maxAge (the drill passes 15 minutes), more than a minute in the future, or with no time, so a stopped agent's record names no box and the drill does not run. Adds no file read beyond Read's. file:Read@95 2a84bea3f8f3ac6bd5632cad358e6b5e4acd2821a492cfe9c787356143005d9e |
| @legacy 8b5c2bb82f569765e191438d77a0d32e048c73797b1e18a5998b2b20fba8cea1 internal/boxself/boxself.go readStrict legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill only: boxself.ReadFile(path, max) (self.json 64 KiB, verify-assign.json 1 MiB) then a strict JSON decode (unknown fields and trailing values refused). No file I/O of its own now. The paths are fixed under the data dir. Its contents only name the box ref the drill publishes under and narrow which HA hosts it drills, never a path, a command or a query. file:ReadFile@67 372020ecc73fde7a1b17c925ddff10ca95b85e52855c91c2d1e0fd61c03460b7 |
| @legacy 98dd837231c210d35b5ca6aaa95c21472b56f58b59404ff117034c2525ceb13e internal/boxself/io_linux.go readFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, Linux only: safefile.OpenFile(path, O_RDONLY), which walks every directory from / with O_NOFOLLOW|O_DIRECTORY and opens the last component only after an O_PATH|O_NOFOLLOW handle fstats as a regular file with one link (so a symlink, FIFO, socket, device, directory or hard link is never opened for reading), then io.ReadAll over io.LimitReader(max+1) and a refusal over max. Safe for root and for carlos: nothing the carlos user plants redirects it. file:OpenFile@65,file:ReadAll@278 bd278a499e88fedfd0706554b758fd1d062bee0116b9d58360865cdbf1561de1 |
| -@legacy 02d9d843532e045e7e92755053ab15949cfe0801f109ac8440b39799d7cad8fc internal/boxself/io_linux.go writeFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, Linux only, the one write of the three monitor files (self.json by the agent every 5 minutes, verify-assign.json by the agent on group boxes every 5 minutes, verify.json by the drill through ops writeLocalVerify, which now does no file I/O of its own): safefile.MkdirAll and safefile.OpenDir of the directory (no symlink followed in any component), fstatat(name, AT_SYMLINK_NOFOLLOW) refusing an existing target that is not a regular file, then safefile.WriteAt on that open directory: a fresh 0700 staging directory under a random name, the file created in it with O_CREAT|O_EXCL|O_NOFOLLOW, written, chmod 0644 (explicit, so the other process reads it), fsynced, renameat onto the target relative to the open directory, directory fsynced. No fixed scratch name, nothing opened by a name the carlos user can pre-plant, a rename that replaces a name and never follows it. Replaces the earlier writeAtomic, which used a fixed <path>.tmp and O_TRUNC. file:Fstatat@324 c1ce965eb341c69b92d97b8884335fda106660d7659ed7c44579a87d8852c8a8 |
| +@legacy 15e92745cb45106f4d0785c1fcd3ed79d5bb4dc521339761949339788c2f8a41 internal/boxself/io_linux.go writeFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, Linux only, the one write of the three monitor files (self.json by the agent every 5 minutes, verify-assign.json by the agent on group boxes every 5 minutes, verify.json by the drill through ops writeLocalVerify, which now does no file I/O of its own): safefile.MkdirAll and safefile.OpenDir of the directory (no symlink followed in any component), fstatat(name, AT_SYMLINK_NOFOLLOW) refusing an existing target that is not a regular file, then safefile.WriteAt on that open directory: a fresh 0700 staging directory under a random name, the file created in it with O_CREAT|O_EXCL|O_NOFOLLOW, written, chmod 0644 (explicit, so the other process reads it), fsynced, renameat onto the target relative to the open directory, directory fsynced. No fixed scratch name, nothing opened by a name the carlos user can pre-plant, a rename that replaces a name and never follows it. Before staging it calls safefile.ReapStages on that directory with a 10-minute age (best effort, errors ignored), removing this euid's crashed writes' stages there only. Replaces the earlier writeAtomic, which used a fixed <path>.tmp and O_TRUNC. file:Fstatat@495 542009670d5e82131bbbab7653c4bcf056932eed2cebce3356a550fe6c9bf997 |
| @legacy 40152be15d7b2c8918eef4c637811fddb6dee91ed1290f595acc98ec3681f1e5 internal/host/agent.go dataDirFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent: dataDir's body taking getenv as a parameter (CARLOS_DATA_DIR, else the /data literal) so agentEntry can compute the data dir from the getenv it is given. Same two data literals dataDir held, moved. Reads nothing else. data-literal@122,data-literal@70 db4cb2d4a068006be7fb509beca9ab0b2aa04d912b4674e914875fe27b4a9d57 |
| @legacy 8967a17ebb888c5d306204f28ea457773444c6735b3cb7c5d87f59487b42148b internal/host/verifyassign.go computeAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent (user carlos), group boxes only: for each registry route with HA set, takes the serving box refs from the duty view (the same view the HA duties use) and picks boxchoice.HRW(host, refs), the hash the duties already used (moved from activator dutyHRW). Reads rt.HA and rt.Host and passes the whole Route to the view. Its result is only the assignment the drill reads. No file, bucket or command. registry:HA@206,registry:Host@388,registry:Host@460,registry:Host@495,whole:Route@191,whole:Route@242 8837552094468b1add2d14e304753b9db34d2d23c26f12cbd75e646c5a5a6160 |
| @legacy cea6dd19c63338c8980c88318884d505aa06b395ccf20a1747f9e2205afe35eb internal/host/verifyassign.go dutyView legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent: the HA duty-view closure moved verbatim out of runAgent (a sidecar's projection by its lifetime placement, a sidecar the index does not know denied, DutySnapshot for any other route). Same reads the closure had in runAgent, no new ones. registry:Host@191,whole:Route@302,whole:Route@358 23d23f2ea5eb0385614d8264cc07be61d0199764f74ef21b730133d54fec80ad |
| @legacy 658a406e2ad0139dea9f748c5c63a0b52ab58c7870ef054be791a46b0a166b71 internal/host/verifyassign.go runVerifyAssign legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent, group boxes only: lists the agent's own registry routes, writes computeAssignment's result with boxself.WriteAssignment, and on a list or write error logs and leaves the last file in place. One whole Route use (the listed routes handed on). Reads nothing else. whole:Route@365 29dbc06dfaa3846891cbf4a1bce8082c9bc3759a4ce47e67e29ac3717adb9a57 |
| +@legacy e0f969e4415730cae78db1c72d30f47d9b131f20bf1feef6dca613482ac71df3 internal/hostbox/empty_census.go censusStageCheck legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, root's claim census and migration census: for an entry directly in a CensusStages directory whose name is exactly safefile's stage name, accepts only a real directory (WalkDir type not symlink) that safefile.OpenDir opens without following any component, and whose first three entries are none, or one regular file named data. ReadDir of names and types only, no file opened or read, nothing below walked (SkipDir). Anything else is ErrTypedInventory. Narrow by design: it lets a crashed boxself write's leftover pass the census instead of wedging it. file:ReadDir@250 2176126eaed2df6249d4a1c6577956dba79be08656d21f5d8307b6115b47a241 |
| @legacy 0c34c62e5ed733a5c659f355caecf60f93c8b8e4feece78bfb1875b13ae6244f internal/metrics/verify.go ReadVerify legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent's metrics loop, every alert tick: reads <data>/monitor/verify.json (dbverify.LocalPath), the drill's local copy of this box's record, through boxself.ReadFile with a 1 MiB cap (dbverify.LocalMax): no symlink followed, a regular single-link file only, refused over the cap. A missing file is no reading. Parsed as a dbverify.Record (version 2 required) into alert readings only (host names, streaks, reasons, behind). Never opens, runs or queries anything named in it. Safe for a root-run agent too. file:ReadFile@226 53321f5997500d7831775aad96f6a3d8c7ed45529efe55a08466b8922e7262eb |
| @legacy 825bc146e1d948b4c2fd62f3a853d5bbc07892be197ef03c6119bd26a3ab3c43 internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. Its +file:Open is registry.Open(RegPath), the same registry the old body opened (<data>/registry.db or -registry), now closed right after HibernatingHosts. New before it: boxself.ReadFresh of self.json (refuses to run without a fresh record from the agent) and dbreads.ValidRegion(CARLOS_REGION from host.env). After it: dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (reads verify-assign.json on a group box), MkdirTemp under TMPDIR (the unit's on-disk CacheDirectory), the drill, and publishes via dbverify.Publish to control/verify/<ref>.json only. The deployment store is openDeployStore as before. file:Open@847 8304062bfa85e5fbe40209554a9529ab1bee31ffc4aa94564dbc44ebc6c77c3a |
| @legacy 3621456d5f69fbe0b9d3776cef4aba9715ffbca70c494fe032a0697c31f902b3 internal/ops/ops.go parseHibernateVerifyFlagsTo legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill: flag parsing moved out of runHibernateVerify (-registry, -data, -budget, -max, hidden -publish-every). Its data literal is defaultDataDir in the -data usage text, the same literal the old flag set held. Reads nothing. data-literal@332 c3bab95458f6316836cffe04127a4280dba975ae456c64d5bbe1942a133ec61e |
| +@legacy 4188beb78e1cd204b7fcdb9cf24318a391da4bc2939cdd80cad57a89079eecff internal/safefile/reap_linux.go ReapStages legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, called by boxself (agent and drill, user carlos) on <data>/monitor before each write and once at agent start: Reap's checks applied to dir's own entries only, descending into nothing. openDir no-follow from /, ReadDir of that directory, and for an entry whose name is exactly .carlos-write-<32 lowercase hex> openat2 with RESOLVE_BENEATH|RESOLVE_NO_SYMLINKS|RESOLVE_NO_XDEV and O_NOFOLLOW, then the existing reapStage: owned by this euid, mode 0700, older than olderThan, holding at most one regular single-link data file of this euid, the entry re-checked by dev/ino before each unlinkat. Removes nothing else and follows nothing. Missing dir is nil. file:ReadDir@327 1a0fb8b22c43d7352bacc0d39b394a991ace5505afb34546eb119d5f70368a1e |
| @legacy ee1f24d6b48c5d4207a6481fdc5d9ceb2bb738c44570108520abae679f34eefd internal/ops/hibernate_verify.go HibernatingHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the same expression as FleetDBsWithSkipped's exclusion, Route.ActivatorLeased instead of Hibernate, so a resident rootfs row is drilled here;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Exclude projected stateless routes from per-host database freshness verification. Box-wide Litestream exclusion remains 3b-owned.;rev3=census-ruling-member-backups-2a;basis=the drill: the same reg.List filter (not BackingUnit, not stateless, ActivatorLeased, DBPath set), now also copying each route's Account (through registry.EffectiveAccount) and App into HibernatingRoute, which the drill uses to bind a verdict to the instance (dbreads.CaptureIdentity / ConfirmIdentity over the instance's record in the deployment bucket). Reads the same listed routes, no new source. registry:Account@756,registry:App@773,registry:Backing@397,registry:DBPath@626,registry:DBPath@707,registry:Host@691,registry:Stateless@588,whole:Route@190 6ef18400668a71a4ee424ed9093e0ccd02e5e6f48a59bc5639893630c826853d |
| internal/host/movespass.go armPhase1 authority B2,C rev3=census-ruling-seeded-instances;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the S1 probe hook refusing a row whose import gate is set; main's B2,C authority retained;rev3=census-ruling-member-backups-2a;basis=the agent (user carlos): RemoveVerifyEntry is now a closure calling dbverify.RemoveHost(ctx, s, cfg.Box, h), so a landing move clears the host only from this box's own drill record control/verify/<cfg.Box>.json in the deployment bucket instead of the one shared control/restore-verify.json. cfg.Box is metricsBoxLabel, the same label haself.go gives lease.SetSelf and so the same ref the agent writes to self.json. KeyFor refuses a ref boxself.ValidRef refuses (one key segment, no slash), and then nothing is read or written. No read site added, the same five sites, B2,C authority retained. registry:ImportGate@8372,whole:Route@8359,whole:Route@8501,whole:Route@8850,whole:Route@8991 d5b2844c24949741aaf1c444215e46a9359af17d084f8c5dd6840789322d8ffb |
| internal/host/units/carlos-hibernate-verify.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-member-backups-2a;basis=comment lines only: the header now describes the per-box record control/verify/<ref>.json, the on-disk scratch dir, the drill reading <data>/monitor/self.json and (group box) <data>/monitor/verify-assign.json, and that bootstrap arms the timer on every box. Every directive is byte-for-byte unchanged (User=carlos, EnvironmentFile=-/etc/carlos/host.env, ExecStart=/opt/carlos/carlos ops hibernate-verify, CacheDirectory/TMPDIR, ReadWritePaths=/data, the sandboxing and MemoryMax). The arming itself is bootstrap.go (enabledUnits gains carlos-hibernate-verify.timer, inertUnits drops it), in the internal/host envelope. file:external@0 da1688e959f8c33a57cdcf0baec1796fdb1d403dfe9679df25b7d3424a4e241f |
| +internal/hostbox/empty_census.go EmptyInstallationCensus.checkLocal authority C,G rev3=PROPOSED-p3;run=25;identity=root instance-control uid 0; agent fallback uid carlos remains strict;basis=new-host empty census classifies sibling state only by exact root installation and payload revision with persistent identity, and sibling live links only by matching root generation reservation; unknown and selected-host artifacts refuse;rev3=census-ruling-member-backups-2a;basis=body: one more branch in the shared-path walk after the exact-rule lookup: an entry censusIsStage names (a stage-named entry directly in a CensusStages directory) goes to censusStageCheck. No other rule, refusal or read changes. The same nine sites. file:Exec@1153,file:Lstat@2914,file:WalkDir@3161,registry:ClaimOwnership@2173,registry:Host@2120,whole:ClaimOwnership@2177,whole:ClaimOwnership@2195,whole:Route@2108,whole:Timer@2337 43a8de527e6e1e326141b45b05c6e06e5b1827247be5650a2be420d3f32972cb |
| +internal/hostbox/empty_census.go censusRule.check authority C,J2,J4 root-input;rev3=census-ruling-member-backups-2a;basis=body: the new stage: rule kind checks its own directory the way tree: does (a real directory, not a symlink), and classifies nothing below it. No read added. file:Readlink@530 c83bb13c054e4fc9205378bda804c1985c584a9625253238987b325643d62ca1 |
| +internal/hostbox/migration_census_linux.go CheckMigrationRoots authority G,J4 rev3=census-ruling-claim-step8-readiness;run=18;identity=offline root migration uid 0;basis=accounts for trusted vendor systemd links separately from retained installation artifacts without exempting unknown files or CARLOS unit aliases; a refusal now names the root and path it could not classify;rev3=census-ruling-member-backups-2a;basis=body: the same censusIsStage branch as checkLocal, after the exact-rule lookup and before the vendor-unit and tree checks, reporting a refusal through migrationRefusal. No other change. The same two sites. file:Lstat@932,file:WalkDir@1202 84ef8e13be8649dcaf1c0b535ac44fde11b53c855478535103005bcc45f121c5 |
| internal/boxself/boxself.go Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new package boxself, called only by the drill (ops hibernateRun.run through ReadFresh, user carlos): reads <data>/monitor/self.json through readStrict with a 64 KiB cap (boxself.ReadFile: no symlink followed in any component, a regular file with one link only, a FIFO or directory refused before it is opened). It checks version 1 and a ref ValidRef accepts (one key segment) and returns the ref and group flag. Not called by root code, and safe if it were. file:Read@5 ef840852070607d6c2cca1c999adeac1f723716e23c89c030d3a3a5541ff67dd |
| internal/boxself/boxself.go ReadFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the one read of the three monitor files (self.json and verify-assign.json by the drill, verify.json by the agent through metrics.ReadVerify): readFile on Linux, ErrUnsupported elsewhere. A missing file wraps os.ErrNotExist, anything unsafe or over max is ErrUnsafe. file:ReadFile@5 8d494eeacc5af3802121ca0780357093905911fe2e6d4368d92a6541ffcc5031 |
| internal/boxself/boxself.go ReadFresh legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill only (user carlos): Read plus a refusal (ErrStale) of a record older than maxAge (the drill passes 15 minutes), more than a minute in the future, or with no time, so a stopped agent's record names no box and the drill does not run. Adds no file read beyond Read's. file:Read@95 2a84bea3f8f3ac6bd5632cad358e6b5e4acd2821a492cfe9c787356143005d9e |
| internal/boxself/boxself.go readStrict legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill only: boxself.ReadFile(path, max) (self.json 64 KiB, verify-assign.json 1 MiB) then a strict JSON decode (unknown fields and trailing values refused). No file I/O of its own now. The paths are fixed under the data dir. Its contents only name the box ref the drill publishes under and narrow which HA hosts it drills, never a path, a command or a query. file:ReadFile@67 372020ecc73fde7a1b17c925ddff10ca95b85e52855c91c2d1e0fd61c03460b7 |
| internal/boxself/io_linux.go readFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, Linux only: safefile.OpenFile(path, O_RDONLY), which walks every directory from / with O_NOFOLLOW|O_DIRECTORY and opens the last component only after an O_PATH|O_NOFOLLOW handle fstats as a regular file with one link (so a symlink, FIFO, socket, device, directory or hard link is never opened for reading), then io.ReadAll over io.LimitReader(max+1) and a refusal over max. Safe for root and for carlos: nothing the carlos user plants redirects it. file:OpenFile@65,file:ReadAll@278 bd278a499e88fedfd0706554b758fd1d062bee0116b9d58360865cdbf1561de1 |
| -internal/boxself/io_linux.go writeFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, Linux only, the one write of the three monitor files (self.json by the agent every 5 minutes, verify-assign.json by the agent on group boxes every 5 minutes, verify.json by the drill through ops writeLocalVerify, which now does no file I/O of its own): safefile.MkdirAll and safefile.OpenDir of the directory (no symlink followed in any component), fstatat(name, AT_SYMLINK_NOFOLLOW) refusing an existing target that is not a regular file, then safefile.WriteAt on that open directory: a fresh 0700 staging directory under a random name, the file created in it with O_CREAT|O_EXCL|O_NOFOLLOW, written, chmod 0644 (explicit, so the other process reads it), fsynced, renameat onto the target relative to the open directory, directory fsynced. No fixed scratch name, nothing opened by a name the carlos user can pre-plant, a rename that replaces a name and never follows it. Replaces the earlier writeAtomic, which used a fixed <path>.tmp and O_TRUNC. file:Fstatat@324 c1ce965eb341c69b92d97b8884335fda106660d7659ed7c44579a87d8852c8a8 |
| +internal/boxself/io_linux.go writeFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, Linux only, the one write of the three monitor files (self.json by the agent every 5 minutes, verify-assign.json by the agent on group boxes every 5 minutes, verify.json by the drill through ops writeLocalVerify, which now does no file I/O of its own): safefile.MkdirAll and safefile.OpenDir of the directory (no symlink followed in any component), fstatat(name, AT_SYMLINK_NOFOLLOW) refusing an existing target that is not a regular file, then safefile.WriteAt on that open directory: a fresh 0700 staging directory under a random name, the file created in it with O_CREAT|O_EXCL|O_NOFOLLOW, written, chmod 0644 (explicit, so the other process reads it), fsynced, renameat onto the target relative to the open directory, directory fsynced. No fixed scratch name, nothing opened by a name the carlos user can pre-plant, a rename that replaces a name and never follows it. Before staging it calls safefile.ReapStages on that directory with a 10-minute age (best effort, errors ignored), removing this euid's crashed writes' stages there only. Replaces the earlier writeAtomic, which used a fixed <path>.tmp and O_TRUNC. file:Fstatat@495 542009670d5e82131bbbab7653c4bcf056932eed2cebce3356a550fe6c9bf997 |
| internal/host/agent.go dataDirFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent: dataDir's body taking getenv as a parameter (CARLOS_DATA_DIR, else the /data literal) so agentEntry can compute the data dir from the getenv it is given. Same two data literals dataDir held, moved. Reads nothing else. data-literal@122,data-literal@70 db4cb2d4a068006be7fb509beca9ab0b2aa04d912b4674e914875fe27b4a9d57 |
| internal/host/verifyassign.go computeAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent (user carlos), group boxes only: for each registry route with HA set, takes the serving box refs from the duty view (the same view the HA duties use) and picks boxchoice.HRW(host, refs), the hash the duties already used (moved from activator dutyHRW). Reads rt.HA and rt.Host and passes the whole Route to the view. Its result is only the assignment the drill reads. No file, bucket or command. registry:HA@206,registry:Host@388,registry:Host@460,registry:Host@495,whole:Route@191,whole:Route@242 8837552094468b1add2d14e304753b9db34d2d23c26f12cbd75e646c5a5a6160 |
| internal/host/verifyassign.go dutyView legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent: the HA duty-view closure moved verbatim out of runAgent (a sidecar's projection by its lifetime placement, a sidecar the index does not know denied, DutySnapshot for any other route). Same reads the closure had in runAgent, no new ones. registry:Host@191,whole:Route@302,whole:Route@358 23d23f2ea5eb0385614d8264cc07be61d0199764f74ef21b730133d54fec80ad |
| internal/host/verifyassign.go runVerifyAssign legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent, group boxes only: lists the agent's own registry routes, writes computeAssignment's result with boxself.WriteAssignment, and on a list or write error logs and leaves the last file in place. One whole Route use (the listed routes handed on). Reads nothing else. whole:Route@365 29dbc06dfaa3846891cbf4a1bce8082c9bc3759a4ce47e67e29ac3717adb9a57 |
| +internal/hostbox/empty_census.go censusStageCheck legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, root's claim census and migration census: for an entry directly in a CensusStages directory whose name is exactly safefile's stage name, accepts only a real directory (WalkDir type not symlink) that safefile.OpenDir opens without following any component, and whose first three entries are none, or one regular file named data. ReadDir of names and types only, no file opened or read, nothing below walked (SkipDir). Anything else is ErrTypedInventory. Narrow by design: it lets a crashed boxself write's leftover pass the census instead of wedging it. file:ReadDir@250 2176126eaed2df6249d4a1c6577956dba79be08656d21f5d8307b6115b47a241 |
| internal/metrics/verify.go ReadVerify legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the agent's metrics loop, every alert tick: reads <data>/monitor/verify.json (dbverify.LocalPath), the drill's local copy of this box's record, through boxself.ReadFile with a 1 MiB cap (dbverify.LocalMax): no symlink followed, a regular single-link file only, refused over the cap. A missing file is no reading. Parsed as a dbverify.Record (version 2 required) into alert readings only (host names, streaks, reasons, behind). Never opens, runs or queries anything named in it. Safe for a root-run agent too. file:ReadFile@226 53321f5997500d7831775aad96f6a3d8c7ed45529efe55a08466b8922e7262eb |
| internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. Its +file:Open is registry.Open(RegPath), the same registry the old body opened (<data>/registry.db or -registry), now closed right after HibernatingHosts. New before it: boxself.ReadFresh of self.json (refuses to run without a fresh record from the agent) and dbreads.ValidRegion(CARLOS_REGION from host.env). After it: dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (reads verify-assign.json on a group box), MkdirTemp under TMPDIR (the unit's on-disk CacheDirectory), the drill, and publishes via dbverify.Publish to control/verify/<ref>.json only. The deployment store is openDeployStore as before. file:Open@847 8304062bfa85e5fbe40209554a9529ab1bee31ffc4aa94564dbc44ebc6c77c3a |
| internal/ops/ops.go parseHibernateVerifyFlagsTo legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill: flag parsing moved out of runHibernateVerify (-registry, -data, -budget, -max, hidden -publish-every). Its data literal is defaultDataDir in the -data usage text, the same literal the old flag set held. Reads nothing. data-literal@332 c3bab95458f6316836cffe04127a4280dba975ae456c64d5bbe1942a133ec61e |
| +internal/safefile/reap_linux.go ReapStages legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, called by boxself (agent and drill, user carlos) on <data>/monitor before each write and once at agent start: Reap's checks applied to dir's own entries only, descending into nothing. openDir no-follow from /, ReadDir of that directory, and for an entry whose name is exactly .carlos-write-<32 lowercase hex> openat2 with RESOLVE_BENEATH|RESOLVE_NO_SYMLINKS|RESOLVE_NO_XDEV and O_NOFOLLOW, then the existing reapStage: owned by this euid, mode 0700, older than olderThan, holding at most one regular single-link data file of this euid, the entry re-checked by dev/ino before each unlinkat. Removes nothing else and follows nothing. Missing dir is nil. file:ReadDir@327 1a0fb8b22c43d7352bacc0d39b394a991ace5505afb34546eb119d5f70368a1e |
| internal/ops/hibernate_verify.go HibernatingHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the same expression as FleetDBsWithSkipped's exclusion, Route.ActivatorLeased instead of Hibernate, so a resident rootfs row is drilled here;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Exclude projected stateless routes from per-host database freshness verification. Box-wide Litestream exclusion remains 3b-owned.;rev3=census-ruling-member-backups-2a;basis=the drill: the same reg.List filter (not BackingUnit, not stateless, ActivatorLeased, DBPath set), now also copying each route's Account (through registry.EffectiveAccount) and App into HibernatingRoute, which the drill uses to bind a verdict to the instance (dbreads.CaptureIdentity / ConfirmIdentity over the instance's record in the deployment bucket). Reads the same listed routes, no new source. registry:Account@756,registry:App@773,registry:Backing@397,registry:DBPath@626,registry:DBPath@707,registry:Host@691,registry:Stateless@588,whole:Route@190 6ef18400668a71a4ee424ed9093e0ccd02e5e6f48a59bc5639893630c826853d |
| internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: starts linkLoop(e, reg, linkBoxLabel(...)) beside tunnelLoop: the home link loop over the agent's own registry handle (HomeLink, HomeLinkApps, HomeLinkAppByName, ClaimHomeLink, SetHomeLinkState), dialing the link's hub with tunnelclient.Loop; read sites unchanged;rev3=census-ruling-member-backups-2a;basis=the agent (user carlos): the HA duty-view closure moved out to dutyView (verifyassign.go) with the same body, which is why runAgent loses -registry:Host and -whole:Route x2 and dutyView gains exactly those. runAgent now hands svc.SetDutyView to armDutyView, which sets the same view on the duties as before and, on a group box only (groupReferenced, CARLOS_BOX_REFERENCE=group from host.env), starts verifyAssignLoop over reg.List (the agent's own registry handle) and the data dir dd it already uses. No new read source, no new credential. file:Exec@20408,file:Open@2191,file:Statfs@54441,registry:App@13287,whole:Route@13279,whole:Route@48095 411d3f27597bcb0aa6482c1418c2d5e84f540500d8ed2e19c658fd1f2f586f22 |
| @remove internal/host/agent.go dataDir |
| @@ -40,14 +47,16 @@ internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve- |
| @coverage internal/activator 6b77746e88cea431a2431ceed309b2dd1f93d30ae106466b7ad206d20c158b19 |
| @coverage internal/alerting f6e549908a84dd337258672702c99911929bd8ef5f587dee752672ca034fb7e2 |
| @coverage internal/boxchoice ece558d52bbfea1fddb62a1cf72923277d15ae703a9252af70e0aa65be71f5e1 |
| -@coverage internal/boxself 8ebc95ac4d85a30701aad6aea7ece7def181db5302c7a9d7d6c8047c226d9290 |
| +@coverage internal/boxself 3ee63283d5b2ff250248b9e8207848178f873384100d85cc3def7fa28a097e6e |
| @coverage internal/dbreads f72b24e2fee6abbd121dec290f64e3db084986d3f52b9246b083b95dd23dbb1e |
| @coverage internal/dbverify 86c7a3e2d489d8b2f1492ce540094dabd0fcd543a6a50ebf33e14dbcc82fc435 |
| -@coverage internal/host 6cdc7c0fa78d0939066f08edd032984074a229682c784f3f1c71e017bcd9bd52 |
| +@coverage internal/host 5043a7b9cba9ba6bd8ceae0ed11d028197b6974ba282cc385042e5ccdb62fa9a |
| @coverage internal/host/units 8a4e5748de16e76d530d2a82f4a8554cd728e523b82b7dadf233ad95e16f8555 |
| +@coverage internal/hostbox 7b06ed9912b0a8bb9ddb0590dfe5d28f3a758947e39383fd45114dc73ae3af25 |
| @coverage internal/hostops 19db0dd625c5fce18062fed5af958c1714f10c9be489869530f86581ad036436 |
| @coverage internal/lease 08fa56059b42517b1a875a4ae15a4b62ed7e7ead4548caaa0e854d1ca0cc686b |
| @coverage internal/metrics 77a33a529198f08a8463bbd2457d1115eddd8e0aa3578856110f675f2d6cd491 |
| @coverage internal/moves 3895687f7e68200bad063865c140aaf2d54450a50f4685e59753cae98ae6f17a |
| -@coverage internal/ops 48f446e72ff6be624df59b3f770a26093aa777efbd41bdce9f5a4d475eee4f2e |
| +@coverage internal/ops f21da8dabc10782a903406dfed2c908452b7b85c044086ff09361e61c9eb4b33 |
| @coverage internal/release e0a8fb001daa384d3ef4d4ccac8c59b9af52a5cca91218ecb64110a48768fe6a |
| +@coverage internal/safefile b91f35e83de69d9227930559950fdb086a020d72ca6ec55d50d596fb7a0b3556 |