Skip to content

fix: unblock the host build and deploy paths, and assert only owned behaviour - #95

Merged
Shrub24 merged 7 commits into
mainfrom
fix/deploy-unblock-and-pins
Nov 13, 2026
Merged

Shrub24 merged 7 commits into
mainfrom
fix/deploy-unblock-and-pins

Conversation

@Shrub24

@Shrub24 Shrub24 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Unblocks the two rolled-back deploys, then takes the paperless pin out now that its premise is gone.

The peer role was created without LOGIN

nixbot registers as services.postgres.consumers.nixbot = { auth = "peer"; … }, and ensureRole granted LOGIN only to consumers that carried a credential. Peer replaces the password, not the privilege, so the role was created NOLOGIN and refused every connection:

asyncpg.exceptions.InvalidAuthorizationSpecificationError: role "nixbot" is not permitted to log in

It also never matched provisionable, so a peer consumer produced no provisioning pass at all — which is why the module carried a setupSQL = "SELECT 1;" placeholder to force one. Both are fixed: every consumer role gets LOGIN, peer consumers are provisionable, and the placeholder is deleted.

tests/postgres-consumer-roles.nix now boots a peerapp consumer that logs in over the socket. The negative control reproduces the live error exactly:

machine # psql: FATAL:  role "peerapp" is not permitted to log in
!!! RequestedAssertionFailed: command `sudo -u peerapp … psql -d peerdb -tAc 'SELECT current_user'` failed

Deploy path

  • inbox-zero addresses itself by container name — containerName, probe and INTERNAL_API_URL on http://inbox-zero:3000 — instead of pinning HOSTNAME=0.0.0.0. The standalone server binds process.env.HOSTNAME, which podman sets to the container id resolving to the bridge address, so the probe dialled a socket that never listened. Measured on the pinned image: ready at 126 s, probe passes, well inside the 180 s start budget.
  • niks3-cache derives its jwksUrl instead of running OIDC discovery against nixbot at startup, so the cache no longer refuses to boot while the coordinator is down. tests/cache-retain-contract.nix asserts it derives from the trusted issuer; the negative control fails with the named message.
  • deploy sets activationTimeout = 900; the 240 s default is shorter than a switch on these hosts on its own.

Pins

paperless-ngx 3.3.4 substitutes from cache.nixos.org on both x86_64-linux and aarch64-linux, so nixpkgs-paperless and its overlay are gone and paperless follows the fleet's nixpkgs again (closing D-117). Measured against public caches only, oci-melb-1 goes from 370 built / 2551 fetched to 351 built / 1789 fetched — the duplicate Python/Django closure disappears.

nixbot's input tracks github:Mic92/nixbot rather than a commit. authentik-nix was measured and deliberately left unfollowed: following our nixpkgs takes the host that runs Authentik from 351 built / 1742 fetched to 551 built / 2139 fetched, because nix-community's cache holds it against its own pin.

nix flake update moves nixpkgs to f4a03c00 — the current nixos-unstable revision — via nix-fleet 4c431da5.

Docs

docs/plan.md is now open intent only: resolved debt entries dropped, completed strategy and narrative removed, each with its rationale recorded in the decision that closed it (D-133 for the test-suite rule, D-134 for the pin posture).

Not proven here

No build has run on this tree — CI and nixbot are the first. paperless 3.3.4 is confirmed present on the public cache for both architectures, not built locally.


Also: the build that failed was main's, not this branch's

nixbot's first run evaluated in 4m21s, dispatched to both builders, and built for
24 minutes before one derivation failed on every host-* attribute:

sops-install-secrets: manifest is not valid: secret bifrost_command_code_api_key
in …/bifrost.yaml is not valid: the key 'bifrost/command_code_api_key' cannot be found

modules/ai/bifrost.nix declares that key; secrets/services/bifrost.yaml on
main did not carry it, so no host could build from this tree. The second commit
supplies it and retires the unused OPENCODE_API_KEY_2 provider with its secret.

Also: the test suite asserts only behaviour this repository owns

Two inherited checks leave the published surface — fleet-render (upstream's
fixture, plus nixpkgs' machines-file/option equivalence) and ci-tailscale
(upstream's workflow), the same way packages.fixture already did. The degoog
generated-expression check is deleted: an added dependency fails on its
fixed-output hash without it. Restatements go from nixbot-contract,
cache-retain, bifrost and geopulse; check-identity-contract-directionality
splits into the intrinsic client contract and the rendered Authentik document.

checks.<system> is 17 → 14 attributes; the contract driver is 20/20 PASS and
nix flake check --no-build passes.

A peer consumer holds no password, and the substrate granted LOGIN only to
consumers that had one, so the role was created NOLOGIN and refused peer
authentication outright. The registry now makes every consumer role a login,
and a peer consumer is provisionable at all (it previously matched no
provisioning branch).

Also: inbox-zero addresses itself by container name so its readiness probe and
INTERNAL_API_URL reach a socket the standalone server actually binds; the cache
derives its JWKS URL instead of running OIDC discovery at startup; the deploy
activation timeout covers a switch on these hosts. The paperless nixpkgs pin is
removed (3.3.4 substitutes on both architectures) and nixbot tracks upstream
main; docs/plan.md is now open intent only, with resolved debt dropped and its
rationale recorded in the decisions that closed it.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

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: 3b1a3e1f-9043-40e2-aead-2640588a05cc
  • 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

…encode provider

sops-install-secrets rejected the host builds because the Command Code
provider's key was absent from the encrypted file, so no host could build from
this tree. The key is added, and the unused OPENCODE_API_KEY_2 provider and its
secret go with it.
@Shrub24 Shrub24 changed the title fix: log peer postgres roles in and settle the deploy path fix: unblock the host build and deploy paths, and assert only owned behaviour Nov 10, 2026
1.1.1 changes the Bun lockfile, so pkgs/degoog/bun.nix is regenerated from it —
without that the build resolves the new versions over the network and fails
offline.
@Shrub24
Shrub24 force-pushed the fix/deploy-unblock-and-pins branch from 8ed9ed1 to a8b8a90 Compare November 10, 2026 11:09
Two checks arrived from nix-fleet rather than from this repository: fleet-render
asserts an upstream fixture and nixpkgs' own machines-file/option equivalence,
and ci-tailscale validates upstream's workflow. Both leave the published
surface, the same way packages.fixture already did.

The degoog generated-expression check is deleted: an added dependency fails on
its fixed-output hash without it, a removed one leaves an unused store path, and
the regeneration hint already sits next to the pin.

Restatements go: nixbot's contract keeps the cross-aspect joins and drops the
values our own module sets, the effect-library serialization, and the
module-system case where an unselected aspect contributes nothing;
cache-retain keeps its trust rule and push/pin/verify control flow; bifrost and
geopulse stop comparing a rendered document with the policy it is built from.

check-identity-contract-directionality splits into the intrinsic client
contract and the rendered Authentik document, so each file carries one claim
set. The source-tracking guard loses its scratch-jj self-test; the predicate
stays and still fails rather than skips.
@Shrub24
Shrub24 force-pushed the fix/deploy-unblock-and-pins branch from a8b8a90 to dd85928 Compare November 10, 2026 11:20
Effects, pin names, schedule and credential boundary are unchanged. One
repository list (policy/ci-repositories.nix) drives the cache's nixbot rule and
the controller allowlist; nixbot is followed from nix-fleet.
@Shrub24
Shrub24 force-pushed the fix/deploy-unblock-and-pins branch from dd85928 to 7b805fb Compare November 13, 2026 09:11
@Shrub24
Shrub24 force-pushed the fix/deploy-unblock-and-pins branch from 882f14d to efc098e Compare November 13, 2026 11:04
@Shrub24
Shrub24 merged commit bc0988b into main Nov 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant