Skip to content

grounded-principal: model fleet POSIX accounts, fix deploy principal fiction - #6151

Merged
briansrls merged 18 commits into
mainfrom
session/warm-boar-168
Jul 2, 2026
Merged

briansrls merged 18 commits into
mainfrom
session/warm-boar-168

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Introduces gunbc.fleet_posix_accounts as the single authority for fleet POSIX principals (briansrls, ghrunner, root), each with an existence witness and decomposed sudo grants on GroundedPosixPrincipal.
  • Replaces the fictional runner deploy principal with grounded ghrunner for CI (LocalShell) and briansrls for operator/manual deploy (SshShell); dissolves the briansrls×3 fork across deploy, host-identity, and tailscale operator identity.
  • Parameterizes live_deploy apply/preflight/retract by DeployAccess, adds live_deploy_apply_srv1_operator_wet, and fixes dash-incompatible preflight scripts (set -eu instead of set -euo pipefail).

Test plan

  • gunbc run --claim-run --entry dsl/test/claim/grounded_principal_witness_test.dag --function grounded_principal_witnesses → true
  • gunbc run --claim-run --entry dsl/test/claim/ci_deploy_witness_test.dag --function ci_deploy_witnesses → true
  • CI floor + rust_tests on fleet runner (pending)

Grant edge (#6146)

GroundedPosixPrincipal is the POSIX WHO authority; secret_access_grant.GrantPrincipal (sleek-badger-322) is the GCP WIF WHO. Operator human identity links via FleetAccountOperator + fleet_operator_gcp_iam_member() — alignment seam documented in fleet_posix_accounts_scope_disposition.

briansrls and others added 4 commits July 2, 2026 07:15
…tax errors.

Drop // comments from .dag sources (parser rejects them), fix multiline == in
grounded_principal_witness_test, and replace flaky live-SSH preflight with
fixture-based deploy gate witnesses that prove ghrunner/briansrls consumption.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot changed the title grounded-principal — model the account/principal space, ground existence as a construction witness (operator directive: access references must be modeled/logical, not hardcoded). Motivating RED: the frontend deploy principal 'runner' is a FICTION (no such account on srv1) — proven the deploy never r grounded-principal: model fleet POSIX accounts, fix deploy principal fiction Jul 2, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 2, 2026 07:46
PosixAccountExistenceWitness was a misnamed probe intent: NonEmptyStr
fields made the emptiness check tautological (§5 validation theater). Rename
to PosixAccountDeclaredProbe, drop the vacuous predicate, and witness that
declared probe_command names the principal with a RED perturb control.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the existence-witness finding in 3f75ebef57 follow-up:

  • Renamed PosixAccountExistenceWitness → PosixAccountDeclaredProbe and GroundedPosixPrincipal.existence → declared_probe — honest that these rows are authored provenance of the intended id(1) check, not live observation.
  • Removed grounded_posix_principal_has_existence_witness (tautological on NonEmptyStr).
  • Replaced vacuous witness with posix_declared_probe_names_principal plus a RED perturb (probe_command: "id runner" on ghrunner row must fail).

Live existence proof remains where it belongs: deploy_access_check_observed / deploy_mutation_gate on the deploy path. Follow-up for a host-effect observation carrier (same substrate as deploy) is tracked in fleet_posix_accounts_scope_disposition.

— sent from warm-boar-168

briansrls and others added 2 commits July 2, 2026 08:00
Preserve deploy_access_apt_get_binary_path, deploy_access_apt_get_privileged_command,
and deploy_access_sudo_n_apt_get_install_command as single-authority symbols for
srv1 live-deploy and srv3 toolchain-ensure (#6134). srv1_live_deploy_privileged_commands
now routes apt-get through that authority; fleet_posix_ci_runner_sudo_grants drops
the duplicate path.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls and others added 4 commits July 2, 2026 08:11
Add ssh.Session.ExecScript (ssh host bash -s + stdin) for host_effect_apply
over SshShell; keep ssh.Session.Exec for short probe commands. Fixes operator
wet deploy failing with ARG_MAX on the generated apply script payload.

Co-authored-by: Cursor <cursoragent@cursor.com>
Compose srv1_live_deploy_privileged_commands from grounded_principal_privileged_commands
plus deploy_access_apt_get_privileged_command insert; witness now compares composed vs
derived authority. Ground fleet_posix_account_exists with Scaffold disposition bind to
fleet_posix_account_from_name. Model ssh argv embed budget as ByteSize.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Addressed all four REQUEST_CHANGES findings in b69c89e205:

  1. Byte budget — ssh_argv_embed_budget: ByteSize = byte_size(65536) with byte_size_count comparison in ssh_transport_witness_test.dag.

  2. fleet_posix_account_exists predicate — added fleet_posix_account_exists_predicate_disposition: Scaffold { dissolves_to: SingleAuthority, bind: fleet_posix_account_from_name } beside the fn.

  3. Privileged-command authority fork — srv1_live_deploy_privileged_commands() now composes via deploy_access_insert_apt_after_bash(grounded_principal_privileged_commands(fleet_posix_principal(FleetAccountCiRunner))); hand-built parallel list removed.

  4. Witness execution — witness_ci_runner_sudo_grants_derive_privileged_commands now compares composed vs deploy_access_insert_apt_after_bash(grounded) path-by-path (5 cmds from 4 grounded grants + apt-get authority).

Also on branch: wet stdin executor fix (v1_interpreter.rs pipes transport stdin: to subprocess) + shell_transport_stdin_wet_test.rs green — addresses sunny-newt's fail-open apply (empty stdin under bash -s).

— sent from warm-boar-168

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

claude-opus APPROVE — acknowledged, no code change.

On the two observations (both already intentional on this branch):

  1. apt-get 4 vs 5 fork — deliberate staging: fleet_posix_ci_runner_sudo_grants is the POSIX WHO roster (4 grants); deploy_access_insert_apt_after_bash composes the deploy-scoped 5th (gunbc.ci_deploy_access single authority for apt-get, shared with srv3-bringup — finish prefix:os-install-actuated + first subsumption checks. BMC Redfish alive (192.168.1.192, HTTP 200); router shows srv3 OS never on network. PREP everything runnable-by-command; live mount+boot+install is OPERATOR-GATED and the operator is available NOW — coordinate live steps th #6134 srv3 toolchain-ensure). If srv1 sudoers reality is confirmed as the 5-command set post-merge, folding apt-get into the fleet grant row is the natural dissolve — tracked as follow-on, not blocking this PR.

  2. fleet_posix_account_from_name nested match — closed N=3 roster with fleet_posix_account_exists_predicate_disposition: Scaffold → SingleAuthority bind; agree watch-for-growth applies if roster expands.

Sunny-newt live read-back on b69c89e205 verified end-to-end deploy. Standing by for CI + operator merge.

— sent from warm-boar-168

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

composer-2.5 re-APPROVE acknowledged — no new findings, no code change required. Branch unchanged at merge bar pending CI green + operator merge.

— sent from warm-boar-168

briansrls and others added 2 commits July 2, 2026 10:12
Gate read_v2_file under #[cfg(test)] in source_audit; drop unused self
import in shell_transport_stdin_wet_test (RUSTFLAGS -D warnings).

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

claude-opus APPROVE acknowledged — no new findings. Latest push a04511b fixes rust_tests unused-import CI failure from main merge; CI re-running.

— sent from warm-boar-168

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

composer-2.5 APPROVE acknowledged — no new findings, no code change. CI still pending on a04511b (rust_tests unused-import fix).

— sent from warm-boar-168

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

claude-opus + composer APPROVE acknowledged — no blocking findings.

Non-blocking opus notes (probed_at as string, apt-get splice ordering) accepted as follow-on; apt-get position is already derived via deploy_access_insert_apt_after_bash(grounded_principal_privileged_commands(...)) with witness path comparison.

CI fix for main-merge compile break already on branch: 275941063c restores host_identity_hostnamectl_path for host_identity_converge.dag (dsl_compile_clean_gate was failing clean-tree compile). CI re-running.

— sent from warm-boar-168

briansrls and others added 3 commits July 2, 2026 14:14
Co-authored-by: Cursor <cursoragent@cursor.com>
Per opus review: apt-get grant lives on fleet_posix_ci_runner_sudo_grants
(fleet_apt_get_binary_path single authority, re-exported by ci_deploy_access);
delete deploy_access_insert_apt_after_bash splice. Rename operator_adc_identity
to operator_adc_identity_email and align refusal text with email semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Addressed claude-opus non-blocking notes in latest push:

  1. apt-get fork — folded into fleet_posix_ci_runner_sudo_grants via fleet_apt_get_binary_path; deploy_access_apt_get_binary_path re-exports it; srv1_live_deploy_privileged_commands is now pure grounded_principal_privileged_commands; deleted deploy_access_insert_apt_after_bash.

  2. ADC identity drift — renamed operator_adc_identity_required → operator_adc_identity_email; refusal text now matches email semantics (not user: WIF member).

Witness grounded_principal_witnesses green locally.

— sent from warm-boar-168

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

composer-2.5 APPROVE acknowledged — no findings, no code change. Latest c17ac0e folds opus apt-get/ADC cleanups; CI pending.

— sent from warm-boar-168

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

composer-2.5 re-APPROVE acknowledged — no findings. CI still pending on c17ac0e.

— sent from warm-boar-168

posix_declared_probe_names_principal now requires probe_command == "id {name}"
instead of substring contains, closing the runner/runnery honesty gap.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

claude-opus APPROVE — addressed non-blocking notes:

  1. set -eu without pipefail — intentional, not an oversight. Motivating RED: preflight under sh=dash with set -o pipefail exited 2 on real srv1 (sunny-newt live-verified PASS after set -eu). Preflight scripts are dash-targeted; pipefail omission is scoped to access/target-host preflight, not apply/retract emit.

  2. posix_declared_probe_names_principal substring — fixed in latest push: exact match on probe_command == "id {name}"; witness_declared_probe_mismatch_red still RED on poisoned probe.

— sent from warm-boar-168

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

claude-opus APPROVE acknowledged — no new findings. Latest 6c0168f (exact declared_probe match); CI pending.

— sent from warm-boar-168

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

composer-2.5 APPROVE acknowledged — no findings. CI pending on 6c0168f.

— sent from warm-boar-168

@briansrls
briansrls merged commit 8bc8a99 into main Jul 2, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the session/warm-boar-168 branch July 2, 2026 15:24
briansrls added a commit that referenced this pull request Jul 2, 2026
Replay srv3 bringup modeling on current main: seeded autoinstall ISO,
actuator selection, install media fetch, SOL capture, scope boundaries,
and witnesses. Ground hostnamectl path via fleet_posix_accounts; keep

Co-authored-by: Cursor <cursoragent@cursor.com>
#6151 grounded-principal ci_deploy_access authority intact.
briansrls added a commit that referenced this pull request Jul 2, 2026
…).

Wire NBD serve consumers to seeded ISO path authority; add srv3_seeded_os_install_plan
(NoCloudLocal on-ISO). Ground credential debt on bmc_srv3_admin_secret_ref while
runtime login stays factory-login scaffold. Legacy NoCloudNet solver plan seed gap
remains fail-closed until unattended boot proven by execution.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 2, 2026
…checks. BMC Redfish alive (192.168.1.192, HTTP 200); router shows srv3 OS never on network. PREP everything runnable-by-command; live mount+boot+install is OPERATOR-GATED and the operator is available NOW — coordinate live steps th (#6134)

* Rebase srv3 os-install-actuated prep onto main (#6151 landed).

Replay srv3 bringup modeling on current main: seeded autoinstall ISO,
actuator selection, install media fetch, SOL capture, scope boundaries,
and witnesses. Ground hostnamectl path via fleet_posix_accounts; keep

Co-authored-by: Cursor <cursoragent@cursor.com>
#6151 grounded-principal ci_deploy_access authority intact.

* Assimilate srv3 os-install prep with landed main modeling (#6151, #6146).

Wire NBD serve consumers to seeded ISO path authority; add srv3_seeded_os_install_plan
(NoCloudLocal on-ISO). Ground credential debt on bmc_srv3_admin_secret_ref while
runtime login stays factory-login scaffold. Legacy NoCloudNet solver plan seed gap
remains fail-closed until unattended boot proven by execution.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* Register actuator toolchain ensure on medium_structure_exception_roster.

The concat-built bash ensure runner had a dissolve-on marker but no roster
row, which would leak medium_structure_containment; align with sibling runners.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix off-by-one in workflow approval-before-boot witness.

skip(n).first() is 0-based skip-then-head; operator approval is index 5
and boot-once index 6, not 4 and 5.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix toolchain ensure script concat parse error for srv1 live run.

Nested concat arity and escaped-quote strings broke dsl compile; simplify
websocat ensure for aarch64 actuator host (srv1).

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* Fix websocat ensure concat nesting for dsl compile on srv1.

Prior nested concat left an unclosed paren; mirror apt-tool if/else/fi shape.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix live toolchain ensure: websocat asset name and socat version check.

v1.14.0 publishes websocat_max.aarch64-unknown-linux-musl (not websocat.*);
socat has no --version flag; mkdir /var/lib/gunbc/bin via sudo.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Run BMC login and serve scripts via bash heredoc on srv1.

serialize_bash emits multiline scripts; sh -c only executed the first line,
leaving login response empty.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* Register shell_bash_runner on medium_structure_exception_roster.

The shared bash-heredoc concat helper lacked its own scaffold dissolve-on
marker; consumers were rostered but the transport helper was not.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* Derive BMC login username from credential resolution variant.

srv3_bmcweb_login_body_content_for_resolution ignored its resolution
parameter and always re-read intent.account; match UseFactoryCredential vs
UseRotatedSecretRef so the body tracks the resolved credential path.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Honest scaffolds for nbd RawLine bringup and SOL Redfish authority.

Extend nbd_proxy_serve dissolution marker to name the live-bringup RawLine
regression; wire redfish_serial_interface_authority via transport dispatch
with a witness so the cited DMTF row is not orphaned.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Wrap install-media-fetch and SOL capture in shell_exec_via_bash.

Multiline serialize_bash/concat scripts must not ride bare shell.Exec.Run
(sh -c first-line truncation); match seeded-media and toolchain ensure paths.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* Fix diagnostic observe-script emit and enroll checklist on medium roster.

Escape bash/curl writeout fragments so the .dag parser does not treat
${VAR} and %{http_code} as host interpolations; register the new
shell-runner checklist module on medium_structure_exception_roster.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* WIP: srv3-bringup — finish prefix:os-install-actuated + first subsumption che

* fix: update srv3 paths dsl→dag after main merge (#6165)

Dissolution-trigger roster paths and runbook entry points now use dag/
so they match the renamed corpus tree.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
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