Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

nix2cf: goal-file schema_version 4 (supervisor input, nixos passthrough host, version pin check) (S4) - #2

Merged
djbclark merged 2 commits into
masterfrom
s4-schema-v4
Nov 1, 2026
Merged

djbclark merged 2 commits into
masterfrom
s4-schema-v4

Conversation

@djbclark

@djbclark djbclark commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Slice S4 of tendcf docs/architecture/schema-v4-reconciliation-2026-10-31.md §6.2 (https://github.com/frdminc/tendcf/blob/master/docs/architecture/schema-v4-reconciliation-2026-10-31.md). nix2cf rendered schema_version 1; tendcf master is at 4 (CI red since tendcf's v2).

  • GOAL_FILE_SCHEMA_VERSION 4; required --supervisor (launchd|systemd|runit|nixos, no default) written as device-trust.entries.supervisor; a supplied device-trust document that disagrees is refused; platform/supervisor pairing checked (macos: launchd; linux: systemd|runit|nixos).
  • nixos host: any selected service refused ("host is nixos-supervised; its units are the Nix configuration's"); otherwise supervision deliberately-unmanaged; refused below v4.
  • systemd/runit hosts with selected services refused until the step 6 renderer exists (nix2cf still renders no systemd units; v2 restart/wanted_by not applicable yet).
  • Goldens regenerated (diff: version + supervisor only); new nixos-get golden; tests now also run tendcf's goal cross-file checks; CI step checks GOAL_FILE_SCHEMA_VERSION equals tendcf's schema const.

Local (TENDCF_DIR=tendcf master): 43 passed, 1 skipped (nix-instantiate absent). 7 mutants killed. nixos host projects to exactly {"vars":{}} via tendcf's projector.

Author: Claude Sonnet 5.5 high (bigteam slice); lead: Opus 5.5 high.
Review: Fable 5.1 high (acp-dispatch claude --model fable --kind frontier, read-only); astra short (codex below the 60% estimate floor). Verdict: approve with changes, all Low. Fixed in 0d79883: F1 render_goal_file re-checks host errors itself; F2 supported versions derived; F3 v3-with-schema test; F4 nixos golden byte-equal to tendcf deploy/linux/passthrough/goal-file.json; F5 DESIGN wording; F6 (lead) --platform required, android not offered; F7 per-row messages. Local: 47 passed, 1 skipped.


Note

Medium Risk
Breaking CLI and goal-file contract changes (schema v4, new required flags) affect what consent binds to; behavior is heavily tested and pinned to tendcf's schema const in CI.

Overview
Aligns nix2cf with tendcf goal-file schema v4: GOAL_FILE_SCHEMA_VERSION is 4, goldens pick up device-trust.entries.supervisor and the new version, and CI runs scripts/check_schema_version.py so a tendcf schema bump fails with one clear message instead of many test diffs.

CLI / host input: buildfile now requires --platform (macos|linux; android removed) and --supervisor (launchd|systemd|runit|nixos, no defaults). The compiler writes the supervisor into the goal file and refuses a --device-trust file whose existing supervisor entry disagrees. Platform↔supervisor pairings are enforced (e.g. macos→launchd, linux→systemd|runit|nixos).

Compile behavior: Only launchd still renders units; systemd/runit hosts with selected services are refused until the step‑6 renderer exists. nixos hosts with no selected services emit supervision: {"coverage": "deliberately-unmanaged"} (projector → {"vars":{}}); any selected service is refused. The library can render schema v3 via compile_host(..., schema_version=3) (drops the supervisor entry); nixos is refused below v4.

Tests add tendcf cross-file lint, nixos golden/oracle checks, and broad supervisor/schema-version coverage; docs and the example device-trust.json are updated to match.

Reviewed by Cursor Bugbot for commit 0d79883. Bugbot is set up for automated code reviews on this repo. Configure here.

… passthrough host, version CI check)

supervisor is a required host input (CLI --supervisor, no default) written into
device-trust.entries.supervisor; a disagreeing supplied document is refused. A
nixos host refuses any selected service and renders supervision
deliberately-unmanaged (projects to {"vars":{}}); nixos is refused below v4.
Goldens regenerated, nixos golden added, tendcf cross-file checks run in the
tests, scripts/check_schema_version.py runs in CI before the tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 4d92017e-fa17-4e16-ae56-dcf9475d7a36)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

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-01T04:02:47.029525Z b6cfd45 PR opened
🔒 Security Review ✅ Completed 2026-11-01T04:03:55.096097Z b6cfd45 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.

render_goal_file re-checks host_errors and supervisor_refusals; SUPPORTED_SCHEMA_VERSIONS
derives the current version; v3-with-schemas test; nixos golden pinned to tendcf's
passthrough fixture; DESIGN.md Termux wording; --platform required, android dropped
from choices; per-row expected messages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 797867fd-578d-485c-8d90-56ddac65e490)

@djbclark
djbclark merged commit a43889b into master Nov 1, 2026
2 checks passed
@djbclark
djbclark deleted the s4-schema-v4 branch November 1, 2026 04:12
@linear-code

linear-code Bot commented Nov 1, 2026

Copy link
Copy Markdown

VIB-267

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant