Repository navigation
Closed
Labels
area/infraInfrastructure, deployment, and operationsInfrastructure, deployment, and operationseffort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)status/needs-triageNot yet triaged; needs a first lookNot yet triaged; needs a first look
Description
Part of epic #5412. Design of record: #5425 (§1, §6, §7 step 2 — "Pilot: queue"). Predecessor: step 1 (workspace skeleton, variant builds, smoke suites). Gate for step 3: all three flips below verified with round-trip evidence, and the standalone artifacts proven as rollback.
Scope
- Move the three broker crates from the sandbox
~/tools/fleet-brokerstree intopkgs/fleet/crates/as the queue domain (fleet-queue): the repo-queue client surface plus the queue-broker and secrets-broker server roles, refactored onto the platform crates — one secrets-by-name path (fleet-secrets), one structured logging facility with the domain as a field. The sandbox tree is archived in place, never bulk-deleted; the other copies are marked superseded the day this lands (§8 drift risk). - Broker daemons become
fleet serve <role>subcommands, one systemd user unit per role (not one combined daemon). The home-manager module that launches them is ported from dezren39/nix PR ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459's pattern into code's home tree, consuming the code flake's packages (D1; ops(dashboard): daily backups of dashboard/orchestration logs + stores — laptop, Google Drive, R2 #1459 is closed as superseded). - Close the census gap: repo-queue today has no
--helpand no--version(both return "unknown command"). The queue client gains the standard surface — help that renders from the registry, and version parity through the argv0 route. - Standalone
repo-queue/queue-broker/secrets-brokerartifacts keep building from the workspace for the whole migration — they are the standing rollback inventory (§7 depth-b rollback). When they retire is an epic-close decision, not a step decision.
Migration — one flip at a time (additive-first)
Each flip is a single unit/symlink re-point, verified by health plus a real enqueue→claim→complete round-trip before the next flip starts. Any flip rolls back by re-pointing at the kept standalone artifact:
- secrets-broker unit →
fleet serve secrets-broker - queue-broker unit →
fleet serve queue-broker - sandbox
~/tools/bin/repo-queuesymlink → the fleet artifact (argv0 multicall routes it to the queue client)
Gate
- All three flips live, each with health + round-trip evidence recorded on this issue.
- The rollback path is exercised, not assumed: a kept standalone artifact passes the same round-trip against a scratch queue.
- This pilot carries the epic's highest verification bar (§8): the queue assigns all repo work — a botched flip stalls every lane.
Acceptance criteria
- queue domain pilot: brokers live in pkgs/fleet with the one-flip-at-a-time migration completed for this step.
- No regression: existing tests/checks for the touched area remain green, and the change lands via PR referencing this issue.
- Evidence (PR link, test/CI output, or verification note) is posted on this issue before it is closed.
Metadata
Metadata
Assignees
Labels
area/infraInfrastructure, deployment, and operationsInfrastructure, deployment, and operationseffort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)status/needs-triageNot yet triaged; needs a first lookNot yet triaged; needs a first look
Activity
dezren39 commentedon Nov 4, 2026
Intake review
🤖 Agent note · state: filed
Related: epic #5412 and steps #5429-#5433 form one set; #5413 is a sibling absorption task. Native sub-issue attachment per protocol §11 is recommended for the epic if not already done.
Risks: Sequencing: the fleet steps are gated in order (notably #5433 on the #5350 step 6 cutover); starting out of order risks rework.
Suggested approach: Triage through the queue in dependency order, verifying each step's acceptance evidence before closing.
Merge pull request #5478 from developing-today/fleet-step2-queue
dezren39 commentedon Nov 4, 2026
Step 2 complete — queue domain landed and live
PR #5478, merged as
cefda118e0d4143867b73c80ef72eec09a78e370(merge commit on main; the merged tree is byte-identical to the build verified below —git diffacross every step-2 file: 0 lines). Because main had moved (fleet-secrets hardening #5472 among others), the branch was rebased onto current main and everything was rebuilt and re-verified on the rebased tree before merge: nix builds green, smoke 42/42 again, and a fresh scratch-stack round-trip (task 9555). After the merge, the live units and the sandbox binary were converged to the merged build's artifacts (same procedure, health + round-trip re-verified: task 9559). Final live artifacts: units ExecStart/nix/store/mhjkhyw8d8pmvd39awm6z05h81r00g29-fleet-0.1.0/bin/fleet serve <role>; sandbox binary from/nix/store/qby1k3d00w1dkz8f40k9a9bxq46prrj5-fleet-static-static-x86_64-unknown-linux-musl-0.1.0, sha256278f9f760140cf5b1c12caead6a7692b3244128bcd15a9fce033018c6b4e095b. The flip-by-flip record below cites the artifacts in force at each flip. The broker family now lives atpkgs/fleet/crates/fleet-queue/; the laptop's queue stack runs onfleet serve <role>; the sandboxrepo-queueresolves to the fleet artifact. All three flips were performed one at a time on 2026-11-04, each gated on health plus a real enqueue → claim → complete round-trip through the flipped component before the next began. Flips waited out the fleet-switch window (attempt 4's activation had finished — SWITCH_EXIT=4, a libvirtd failure unrelated to the queue — before flip 1).The port
validate.rs(verbatim) moved from the sandbox workspace intocrates/fleet-queue, refactored onto the platform crates: queue-broker credentials resolve through afleet_secrets::Resolverwhose source speaks the secrets-broker HTTP API; the secrets-broker refresh runsbwsthrough theCommandRunnerseam; one logging facility (src/log.rs,{domain}: {msg}— byte-identical to the ad-hoc prefixes). Wire behavior preserved (envelopes, framing, exit codes;serde_json/preserve_orderwhere consumers read key order).--help(rendered from the registry) and--version(argv0 route) — the census gap.fleet queue …is identical.SecretValue::from_resolved— step 1 shipped the newtype with no constructor usable by sources outside the crate.bwsstderr excerpt (theCommandRunnercontract carries exit status only). Errors carry names/status, never values.Flip evidence
Scratch queue
fleet-step2-pilotthroughout; synthetic packets (issue numbers 999999001–999999008) so no production queue was touched. Baseline on the untouched stack first: task 9537 round-tripped. Pre-flip proofs: fleet brokers on scratch ports against live services (114 secrets refreshed; full round-trip, task 9544).~/.config/systemd/user/secrets-broker.service: ExecStart%h/fleet-brokers/bin/secrets-broker→/nix/store/y2g8ddkwsqx3xi8f0c64aisf2c4jvs6s-fleet-0.1.0/bin/fleet serve secrets-broker(pre-rebase build; converged to the merged build afterwards — see the header). Process exe read back from /proc; journal:listening on 100.99.113.103:4800,refreshed 114 secrets. Verified:/health(114 secrets),/secret/supabase.muse-dev2.project-urlshape (200, key match, non-empty value — never printed), and a round-trip whose queue-broker credentials were served by the flipped broker (task 9546 → done).…/bin/fleet serve queue-broker. Journal:listening on 100.99.113.103:4801;/healthzok. Verified: full round-trip from the sandbox consumer client via the session proxy (task 9547 → done); the laptop claimant's read path (rich list onrepo-health-code-pilot, queued + claimed) served by the flipped broker; queue counters kept churning post-flip (claimed 220→212, parked 50→57 in the first minutes).~/tools/bin/repo-queue:/home/hatch/tools/repo-queue→/home/hatch/tools/fleet, a copy of thefleet-staticartifact (full profile, musl static — a glibc-dynamic laptop build names store paths the sandbox lacks; linkage per context is refinement B), sha256 verified both sides on transfer (pre-rebase build488c20db…; converged to the merged build278f9f76…afterwards). Verified:repo-queue --version→repo-queue 0.1.0,--helprenders,healthanswers, round-trip task 9548 → done.Rollback — exercised, not assumed
fleet-brokerspackage: repo-queue 510,344 B / queue-broker 1,980,960 B / secrets-broker 616,944 B) ran a complete scratch stack and passed the same round-trip (task 9549 → done).~/.config/systemd/user/{secrets,queue}-broker.service.pre-fleet-step2(pre-flip files), original binaries untouched in~/fleet-brokers/bin/, sandbox original at~/tools/repo-queue(flip = oneln -sfnback). The original client still reads the flipped broker fine.SUPERSEDED.md; laptop~/fleet-brokers/SUPERSEDED.mdmarks the binaries as rollback inventory.Home module
home/common/default.nixnow defines both units asfleet serve <role>from this flake'spkgs/fleet(PR #1459's pattern, per D1) plus thefleetPkgsbinding (atlas-search toolchain pattern). The live hand-written files were re-pointed in place; home-manager converges them on the next activation.What the census/design got wrong about the live queue
tasks.worker_idhas an FK to aworkerstable: claiming with an unregistered worker id fails with PostgREST 409 (23503). The pilot round-trips claim as the registered default workerrepo-worker-code./healthis intermittently unavailable platform-wide: therepo_queue_healthview query hits PostgREST statement timeouts (57014) under load — reproduced identically on the pre-fleet broker minutes before flip 2, so it is a Supabase-side condition, not a port defect. The broker envelope behavior matches byte-for-byte; the load-bearing paths (enqueue/claim/complete/list) were unaffected throughout.fleet-static, added here) — the step-1 variant set had static linkage only on the connect profile.