GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: deployment architecture — a services layer outside the system switch by dezren39 · Pull Request #5764 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 5, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Design proposal from the WS-E pass (Drew, 2026-11-04): get services out of the system switch's blast radius.

Core of the design

  • Everything stays Nix-built; what we lack is a deployment layer. A single flake-built deploy binary gives every service its own generations: deploy <target> builds + activates just that service, deploy <target> rollback repoints to the previous generation, deploy <target> status is the audit surface. No system switch, no home-manager activation, no reboot.
  • Services are declared once (option set: package, args, env/secrets by name, ports, health check) and rendered to systemd, launchd, Cloudflare, or a container pin — generalizing the pattern pkgs/mcpx/modules/ and the forks' openchamber→opencode→mcpx cascade already prove in-tree.
  • The Cloudflare half adopts the 2026-10-31 deploy standard and extends it from 3 workers to all of them; deploy absorbs the existing <name>-deploy flake apps rather than replacing them.
  • Home-manager shrinks to its proper role (user environment, dotfiles) and defines no services.
  • Containers: from scratch via Nix (dockerTools/nix2container) for software we own — the lab-ops-hub crawler is the working precedent; third-party images stay digest-pinned. amd-crd currently has no definition in any repo and gets a definition-or-waiver decision.
  • VMs: declarative guests (nixvirt / microvm.nix, both seeded in the flake already) with a named, finite mutable carve-out class.

Grounded in a fresh inventory of the laptop, sandbox, and Cloudflare estate. Headline receipts: the hand-placed route-proxy unit is broken right now (ExecMainStatus 127, its start script missing); the laptop-agent's Nix module exists but a hand unit is what runs; darwin-nix's fleet-brokers module is enabled by no machine while the code flake re-declares the same brokers; pm-stack runs out of the primary checkout; sandbox quota-recorder has no installer and is hand-restored after every recycle.

Migration order: M1 route-proxy → M2 fleet three (laptop-agent + brokers) → M3 sandbox quota-recorder → M4 pm-stack off the checkout, with a parallel Cloudflare track. Each step reversible; the only system-flake change in the whole program is additive (the deploy package + deployTargets output).

Design + filings only — no migration is executed by this PR.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
doc: deployment architecture — a services layer outside the system sw…
37f62be
…itch

Design proposal (WS-E): a flake-built `deploy` tool and per-service
generations so services deploy without a system switch or home-manager
activation; generalizes the 2026-10-31 Cloudflare deploy standard;
containers from scratch via Nix; declarative libvirt/microVM guests
with a named mutable carve-out class. Grounded in a 2026-11-04
inventory of the laptop, sandbox, and Cloudflare estate.
@dezren39
dezren39 requested a review from a team as a code owner November 5, 2026 01:35
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5fdac06c-df72-4998-bda4-f9071f89a76c
Commits

Reviewing files that changed from the base of the PR and between c2bf5fc and 37f62be.

Files selected for processing: 1

  • doc/2026-11-04_deployment-architecture-services-layer.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T01:40:12.555912Z 37f62be PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 5, 2026
Epic: deployment architecture — services layer + deploy tool (tracking) #5765
Open
deploy tool v1: target registry (deployTargets) + systemd generation activation #5766
Closed
deploy tool: Cloudflare target class — generalize the <name>-deploy apps to all Workers #5767
Closed
Migration M1: route-proxy from hand unit to services-layer deploy target #5768
Closed
Migration M2: one declaration for the fleet three (laptop-agent, secrets-broker, queue-broker) #5769
Closed
Migration M3: sandbox quota-recorder as first sandbox deploy target + generic unit restorer #5770
Closed
Containers: Nix-build audit — mcpx Containerfile, duplicate lab-ops Dockerfile, amd-crd definition-or-waiver #5771
Closed
VMs: declarative guest definitions (nixvirt / microvm.nix) + mutable carve-out list #5772
Open
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 5, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37f62be9c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/2026-11-04_deployment-architecture-services-layer.md
Comment on lines +345 to +347
removed in the same change that proves it), and **none requires a system
switch to land** — the only system-flake change in the whole program is
adding the `deploy` package and the `deployTargets` output.

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 5, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Define an explicit handoff of Home Manager unit ownership

For the M2 and M4 migrations, replacing the live unit files does not relinquish Home Manager's ownership: home/common/default.nix:876-904 declares both brokers, and nixos/services/pm-stack/default.nix:106 onward declares the PM units. The broker comment at home/common/default.nix:873-875 explicitly confirms that HM replaces hand-installed units on activation. Under this additive-only migration, a subsequent ordinary system switch can therefore restore the old broker binaries and checkout-backed PM services over the independently deployed generations. Include an ownership-removal activation, or specify a durable override strategy, and verify that migrated services survive a subsequent HM/system activation.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/2026-11-04_deployment-architecture-services-layer.md
Comment on lines +199 to +201
Failure at any step: the profile flips back and the unit restarts on the
previous generation — deploy-rs's magic-rollback idea, with nix profiles
as the mechanism instead of a bespoke one. `rollback` is the same flip

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 5, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the previous unit configuration during rollback

When a deployment changes rendered unit arguments or environment and then fails its health check, the prescribed profile flip and restart leave systemd using the failed generation's loaded unit configuration. The previous executable can therefore restart with incompatible new arguments or environment instead of recovering the working generation. Forward activation explicitly writes the unit and reloads systemd, but the rollback recipe omits those corresponding steps; systemctl --help describes daemon-reload as “Reload systemd manager configuration.” Specify that rollback also restores or relinks the previous generation's rendered unit and performs daemon-reload before restarting.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/2026-11-04_deployment-architecture-services-layer.md
user = "user"; # or a systemd DynamicUser where suitable
ports = [ 4801 ];
restart = "on-failure";
healthCheck = "http://100.99.113.103:4801/health";

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 5, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the queue broker's unauthenticated health endpoint

For the fleet serve queue-broker target shown here, /health is not an ordinary HTTP health probe: pkgs/fleet/crates/fleet-queue/src/queue_broker.rs:640-645 permits unauthenticated GET requests only to /healthz, while other paths require authentication and POST. A GET to the configured URL therefore returns 401 without credentials or 405 with credentials, causing a healthy deployment to fail its activation check and roll back. Use http://100.99.113.103:4801/healthz, which is also the endpoint exercised by the broker smoke test.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
dezren39 merged commit 5219942 into main Nov 5, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the design/deployment-architecture-services-layer branch November 5, 2026 01:48
This was referenced Nov 5, 2026
design: versioning for a monorepo whose apps deploy individually — derived versions, per-app tags + repo date tag, survey of schemes (WS-H) #5790
Closed
audit: stranded fixes & regression mechanisms — merge drive record (WS-G 2026-11-04) #5880
Closed
Quota gatherer ticks fail at import: lib dir resolves to stale openchamber checkout parked on a queue branch #5721
Closed
deployment design: queue-broker healthCheck example uses authenticated POST-only /health instead of unauthenticated GET /healthz #6250
Closed
deployment design: M2/M4 migrations lack a Home Manager unit-ownership handoff — a later switch can restore the old services #6251
Closed
@developing-today developing-today Bot mentioned this pull request Nov 5, 2026
doc(deploy): specify HM unit-ownership handoff in M2/M4 acceptance (#6251) #6338
Merged
This was referenced Nov 14, 2026
Retroactive home for PR #5764: doc: deployment architecture — a services layer outside the system switch #9949
Closed
watchdog: reopen issues the bot wrongly closes on merges #10105
Closed
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 27, 2026
Migration M4: pm-stack off the checkout #15827
Open
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.