Complete the approved SSH bootstrap and self-install paths #72

Open
opened 2026-10-04 17:55:43 +00:00 by kayg · 43 comments
Owner

Problem and evidence

crates/server/src/install.rs:162-175 rejects root-mode installs and installs through an enrolled infraternal agent before reserving a job. docs/DESIGN.md:194-200 records root mode, relay mode and MCP completion as missing. The current binary has hosts ... install commands, but AgentCommand in crates/infraternal/src/main.rs:176+ has no self-install command for an infraternal agent, and the server command has no server install lifecycle subcommand.

Recommendation

Complete the owner-approved flow: add infraternal agent install and infraternal server install for hardened root/system and user/rootless services; have SSH bootstrap upload and verify the configured binary then invoke its self-install path; support both server-held bootstrap SSH and a selected enrolled infraternal agent; finish API/CLI/MCP parity and installed-host SSH settings. Preserve fingerprint Trust, durable retry, path ownership, enrollment consumption and audit behavior.

Payoff and estimate

Completes the approved host onboarding path and makes root/rootless and remote installation behave consistently. Estimate: 5–10 engineering days including tests and security review. The 24 install-core commits across 33 files in the report show lifecycle breadth, not person-hours.

Priority: Next milestone.

2026-10-04 owner decisions: Direct match to DECISIONS §30 and the owner's 2026-10-04 decision to add self-install commands and make SSH bootstrap call them. The report's suggestion to reopen a manual-enrollment-first release cut is already superseded by that approval. Install is a security surface and needs Sol-tier implementation/review.

Report: arch-review report
Source: arch-review 2026-10-04

## Problem and evidence `crates/server/src/install.rs:162-175` rejects root-mode installs and installs through an enrolled infraternal agent before reserving a job. `docs/DESIGN.md:194-200` records root mode, relay mode and MCP completion as missing. The current binary has `hosts ... install` commands, but `AgentCommand` in `crates/infraternal/src/main.rs:176+` has no self-install command for an infraternal agent, and the server command has no `server install` lifecycle subcommand. ## Recommendation Complete the owner-approved flow: add `infraternal agent install` and `infraternal server install` for hardened root/system and user/rootless services; have SSH bootstrap upload and verify the configured binary then invoke its self-install path; support both server-held bootstrap SSH and a selected enrolled infraternal agent; finish API/CLI/MCP parity and installed-host SSH settings. Preserve fingerprint Trust, durable retry, path ownership, enrollment consumption and audit behavior. ## Payoff and estimate Completes the approved host onboarding path and makes root/rootless and remote installation behave consistently. Estimate: 5–10 engineering days including tests and security review. The 24 install-core commits across 33 files in the report show lifecycle breadth, not person-hours. **Priority:** Next milestone. **2026-10-04 owner decisions:** Direct match to DECISIONS §30 and the owner's 2026-10-04 decision to add self-install commands and make SSH bootstrap call them. The report's suggestion to reopen a manual-enrollment-first release cut is already superseded by that approval. Install is a security surface and needs Sol-tier implementation/review. **Report:** [arch-review report](/mnt/hdd/infraternal/jobs/arch-review/report.md) **Source: arch-review 2026-10-04**
Author
Owner

Starting self-install-merge on self-install at 5b5cf987fc; merging dev 87bb5bd2b7. Retain network/key SSH auth and pins with delegated infraternal agent install/uninstall. Requested checks only; no push.

Starting self-install-merge on self-install at 5b5cf987fc4d3aac23d0505617256eca6cc0bea8; merging dev 87bb5bd2b7410d3a571a903f6cf6a53d1112ca6f. Retain network/key SSH auth and pins with delegated infraternal agent install/uninstall. Requested checks only; no push.
Author
Owner

Conflict reconciliation: kept dev decisions §§31–43 and renumbered self-install to §44. Retained banner detection, none-auth admission, explicit trust, auth override and exact pin checks. InstallRemote now combines the fixed per-job auth with delegated install token delivery; start only confirms readiness; removal delegates uninstall using the same auth. Worker fake records auth through every remote operation. Replaced the obsolete dummy-binary linger regression with real compiled-CLI reenrollment checks in the full integration scenario, and run that scenario against both real OpenSSH key auth and a loopback russh none-auth server executing as sshtarget. The loopback server records offered methods, so the complete network installation asserts no public key was offered. Updated stale install/start documentation after the textual auto-merge. No new hot path.

Conflict reconciliation: kept dev decisions §§31–43 and renumbered self-install to §44. Retained banner detection, none-auth admission, explicit trust, auth override and exact pin checks. InstallRemote now combines the fixed per-job auth with delegated install token delivery; start only confirms readiness; removal delegates uninstall using the same auth. Worker fake records auth through every remote operation. Replaced the obsolete dummy-binary linger regression with real compiled-CLI reenrollment checks in the full integration scenario, and run that scenario against both real OpenSSH key auth and a loopback russh none-auth server executing as sshtarget. The loopback server records offered methods, so the complete network installation asserts no public key was offered. Updated stale install/start documentation after the textual auto-merge. No new hot path.
Author
Owner

Conflict reconciliation: kept dev decisions §§31–43 and renumbered self-install to §44. Retained banner detection, none-auth admission, explicit trust, auth override and exact pin checks. InstallRemote now combines the fixed per-job auth with delegated install token delivery; start only confirms readiness; removal delegates uninstall using the same auth. Worker fake records auth through every remote operation. Replaced the obsolete dummy-binary linger regression with real compiled-CLI reinstall checks in the full integration scenario, and run that scenario against both real OpenSSH key auth and a loopback russh none-auth server executing as sshtarget. The loopback server records offered methods, so the complete network installation asserts no public key was offered. Updated stale install/start documentation after the textual auto-merge. No new hot path.

Network SSH can omit pam_systemd and XDG_RUNTIME_DIR. Install, readiness and removal now preserve an existing runtime path or use /run/user/; the loopback fixture intentionally has no PAM session or runtime environment, so it tests that fallback. Source: https://www.freedesktop.org/software/systemd/man/latest/pam_systemd.html . Initial clippy found items_after_statements in the new test import; fixed by moving it to module imports. Install suite passed: cargo test: 56 passed, 4 ignored, 295 filtered out (15 suites, 8.34s).

Conflict reconciliation: kept dev decisions §§31–43 and renumbered self-install to §44. Retained banner detection, none-auth admission, explicit trust, auth override and exact pin checks. InstallRemote now combines the fixed per-job auth with delegated install token delivery; start only confirms readiness; removal delegates uninstall using the same auth. Worker fake records auth through every remote operation. Replaced the obsolete dummy-binary linger regression with real compiled-CLI reinstall checks in the full integration scenario, and run that scenario against both real OpenSSH key auth and a loopback russh none-auth server executing as sshtarget. The loopback server records offered methods, so the complete network installation asserts no public key was offered. Updated stale install/start documentation after the textual auto-merge. No new hot path. Network SSH can omit pam_systemd and XDG_RUNTIME_DIR. Install, readiness and removal now preserve an existing runtime path or use /run/user/<SSH uid>; the loopback fixture intentionally has no PAM session or runtime environment, so it tests that fallback. Source: https://www.freedesktop.org/software/systemd/man/latest/pam_systemd.html . Initial clippy found items_after_statements in the new test import; fixed by moving it to module imports. Install suite passed: cargo test: 56 passed, 4 ignored, 295 filtered out (15 suites, 8.34s).
Author
Owner

Real network installation exposed two PAM-less startup issues in delegated self-install: show-user fails when no logind user object exists, and enable-linger starts its manager asynchronously. Self-install now confirms absent users through a successful live list-users query (malformed listing or failed bus queries fail closed), then waits up to ten seconds for a real user-manager bus reply before daemon-reload. Environment replies are discarded without logging. The same readiness helper serves server and infraternal agent installation. Sources: https://github.com/systemd/systemd/blob/main/src/login/loginctl.c and https://github.com/systemd/systemd/blob/main/man/loginctl.xml .

The expanded ignored compiled-binary test now passes both OpenSSH key mode and loopback network none mode, each with real sshtarget systemd service, enrollment, mTLS tunnel, inventory and delegated uninstall. Network mode authorizes no install key and asserts no publickey attempt. Linger ownership failure/reinstall/removal coverage was moved here from the obsolete dummy-binary bootstrap test. Latest output:

test rootless_install_trust_inventory_and_remove_over_real_sshd ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 29.40s

sshtarget authorized_keys restored using sudo -n cp -a; sudo -n cmp returned exit 0. Final-source clippy and verify fast are running. No merge gate or push.

Real network installation exposed two PAM-less startup issues in delegated self-install: show-user fails when no logind user object exists, and enable-linger starts its manager asynchronously. Self-install now confirms absent users through a successful live list-users query (malformed listing or failed bus queries fail closed), then waits up to ten seconds for a real user-manager bus reply before daemon-reload. Environment replies are discarded without logging. The same readiness helper serves server and infraternal agent installation. Sources: https://github.com/systemd/systemd/blob/main/src/login/loginctl.c and https://github.com/systemd/systemd/blob/main/man/loginctl.xml . The expanded ignored compiled-binary test now passes both OpenSSH key mode and loopback network none mode, each with real sshtarget systemd service, enrollment, mTLS tunnel, inventory and delegated uninstall. Network mode authorizes no install key and asserts no publickey attempt. Linger ownership failure/reinstall/removal coverage was moved here from the obsolete dummy-binary bootstrap test. Latest output: ``` test rootless_install_trust_inventory_and_remove_over_real_sshd ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 29.40s ``` sshtarget authorized_keys restored using sudo -n cp -a; sudo -n cmp returned exit 0. Final-source clippy and verify fast are running. No merge gate or push.
Author
Owner

Final-source fast gate failed in unchanged crates/server/src/stream.rs timing coverage; the initial run passed. The final run warned load5 above the 8 online CPUs. No test changes made. Rerunning the same required gate. Exact failure excerpt:

---- stream::tests::contended_native_close_fence_preserves_original_watcher_deadline stdout ----
742-
743:thread 'stream::tests::contended_native_close_fence_preserves_original_watcher_deadline' (2108935) panicked at crates/server/src/stream.rs:4633:14:
744-native dispatch did not reach the database barrier by C+650: Elapsed(())
745-
746-
747:failures:
748-    stream::tests::contended_native_close_fence_preserves_original_watcher_deadline
749-
750:test result: FAILED. 228 passed; 1 failed; 5 ignored; 0 measured; 0 filtered out; finished in 26.38s
751-
752:error: test failed, to rerun pass `-p infraternal-server --lib`
test stream::tests::forced_close_survives_full_queues_and_already_marked_local_close ... ok
test stream::sweep_tests::additional_remote_ssh_target_survives_sweeps_until_its_grant_is_withdrawn ... ok
test stream::tests::full_priority_queue_forces_connection_shutdown_after_retry_bound ... ok
test stream::tests::interactive_data_does_not_wait_to_fill_a_batch ... ok
test stream::tests::infraternal_agent_grant_rejection_is_audited_before_relay ... ok
test stream::sweep_tests::remote_exec_follows_refresh_lineage_and_never_skips_termination ... ok
test stream::tests::forced_close_audit_failure_shuts_down_without_waiting_for_full_queue ... ok
test stream::tests::out_of_range_resize_closes_only_its_channel_with_invalid_value ... ok
test stream::tests::queued_client_data_is_discarded_when_revoked_before_capacity_returns ... ok
test stream::tests::ready_batch_preserves_control_other_channel_and_invalid_input ... ok
test stream::sweep_tests::remote_ssh_follows_refresh_lineage_and_never_skips_termination ... ok
test stream::tests::rejects_malformed_hop_control_payloads ... ok
test stream::tests::pair_released_after_agent_close_is_still_audited_and_closed ... ok
test stream::tests::native_close_backpressure_preserves_forbidden_watcher_deadline ... ok
test storage::prelogin_bounds_tests::prelogin_admission_caps_and_indexed_expiry_converge ... ok
test stream::tests::stalled_close_drops_tcp_while_connection_operation_is_pending ... ok
test stream::tests::late_registration_after_observed_withdrawal_retires_within_one_second ... ok
test stream::tests::ready_batch_spends_each_frames_original_credit ... ok
test stream::tests::revocation_while_batch_waits_for_capacity_rejects_every_frame ... ok
test stream::tests::permitted_native_close_preserves_status_and_reason ... ok
test stream::tests::replaced_tunnel_force_closes_relayed_client_channels_within_one_second ... ok
test stream::tests::stopped_agent_identity_force_closes_relayed_client_channels_within_one_second ... ok
test stream::tests::writer_discards_queued_control_and_data_after_forbidden_close ... ok
test stream::tests::relay_forwards_empty_eof_then_close_to_the_public_client ... ok
test stream::tests::tunnel_stop_during_native_close_read_keeps_watcher_ownership ... ok
test stream::tests::stalled_forced_close_audit_is_bounded_and_does_not_hold_agent_close ... ok
test stream::tests::unconfirmable_native_close_fails_closed_without_forwarding_its_reason ... ok
test stream::watcher::tests::back_to_back_passes_close_the_client_inside_one_second ... ok
test stream::watcher::tests::coalesced_identity_stops_do_not_reset_route_deadlines ... ok
test stream::watcher::tests::coalesced_stops_audit_oldest_deadline_before_newer_routes ... ok
test stream::watcher::tests::identity_stop_during_a_slow_pass_closes_relayed_channels_host_offline ... ok
test stream::watcher::tests::identity_stop_during_failed_host_read_keeps_host_offline ... ok
test stream::watcher::tests::delayed_stop_observation_fails_closed_at_original_deadline ... ok
test stream::watcher::tests::identity_stop_during_failed_read_keeps_host_offline ... ok
test stream::watcher::tests::repeated_withdrawal_waits_for_the_first_attachment_audits ... ok
test stream::watcher::tests::late_registration_on_stopped_route_does_not_reset_deadline ... ok
test stream::watcher::tests::scheduler_recovery_after_a_long_stall_closes_nothing ... ok
test stream::watcher::tests::slow_reads_with_wakeups_and_new_channels_close_nothing ... ok
test tests::api_success_defaults_to_no_store_and_spa_fallback_stays_available ... ok
test stream::watcher::tests::teardown_stops_processes_and_joins_the_writer_before_bounded_concurrent_detaches ... ok
test tests::join_token_name_limit_counts_utf8_characters ... ok
test stream::watcher::tests::stopped_route_retirement_overrides_authorization_cause_and_deadline ... ok
test tests::lowercase_idempotency_ulids_share_the_canonical_row ... ok
test stream::watcher::tests::unconfirmed_worst_case_closes_the_client_inside_one_second ... ok
test tests::device_poll_admission_precedes_failed_response_actor_authentication ... ok
test tests::unknown_api_route_returns_json_error_and_never_spa_html ... ok
test tests::unmatched_api_errors_keep_no_store ... ok
test tests::wrong_api_method_returns_error_and_allow_header ... ok
test tests::openapi_documents_idempotency_headers_and_bearer_security ... ok
test tests::openapi_documents_refresh_and_rate_limit_transports ... ok
test tunnel::tests::agent_opened_channels_are_refused_and_unknown_ids_are_protocol_errors ... ok
test tunnel::tests::benchmark_tunnel_credit_accounting ... ignored, benchmark only on the perf-test VM
test tunnel::provider_rpc_tests::slow_remote_actions_confirm_success_within_the_action_deadline ... ok
test tunnel::tests::failed_opens_release_slots_and_tunnel_budget_across_clients ... ok
test tests::openapi_documents_shared_error_responses ... ok
test stream::tests::withdrawal_during_successful_native_confirmation_keeps_watcher_ownership ... ok
test tunnel::tests::tunnel_ping_carries_the_current_unix_time ... ok
test tunnel::tests::websocket_reads_map_to_contract_close_codes ... ok
test stream::watcher::tests::shared_rechecks_do_not_grow_with_connections_and_keep_the_bound ... ok
test tunnel::tests::identity_stop_during_reconnect_marks_pinned_old_routes ... ok
test tunnel::tests::shutdown_marks_pinned_routes_before_releasing_the_tunnel ... ok
test tunnel::tests::session_termination_requires_confirmation_and_releases_reply_slots ... ok
test stream::tests::stream_data_fence_cost ... ok
test stream::tests::native_termination_and_watcher_both_deliver_one_audited_forbidden_close ... ok
test tunnel::provider_rpc_tests::remote_inspect_and_actions_use_signed_provider_rpc_with_typed_errors ... ok

failures:

---- stream::tests::contended_native_close_fence_preserves_original_watcher_deadline stdout ----

thread 'stream::tests::contended_native_close_fence_preserves_original_watcher_deadline' (2108935) panicked at crates/server/src/stream.rs:4633:14:
native dispatch did not reach the database barrier by C+650: Elapsed(())


failures:
    stream::tests::contended_native_close_fence_preserves_original_watcher_deadline

test result: FAILED. 228 passed; 1 failed; 5 ignored; 0 measured; 0 filtered out; finished in 26.38s

error: test failed, to rerun pass `-p infraternal-server --lib`
Final-source fast gate failed in unchanged crates/server/src/stream.rs timing coverage; the initial run passed. The final run warned load5 above the 8 online CPUs. No test changes made. Rerunning the same required gate. Exact failure excerpt: ```text ---- stream::tests::contended_native_close_fence_preserves_original_watcher_deadline stdout ---- 742- 743:thread 'stream::tests::contended_native_close_fence_preserves_original_watcher_deadline' (2108935) panicked at crates/server/src/stream.rs:4633:14: 744-native dispatch did not reach the database barrier by C+650: Elapsed(()) 745- 746- 747:failures: 748- stream::tests::contended_native_close_fence_preserves_original_watcher_deadline 749- 750:test result: FAILED. 228 passed; 1 failed; 5 ignored; 0 measured; 0 filtered out; finished in 26.38s 751- 752:error: test failed, to rerun pass `-p infraternal-server --lib` test stream::tests::forced_close_survives_full_queues_and_already_marked_local_close ... ok test stream::sweep_tests::additional_remote_ssh_target_survives_sweeps_until_its_grant_is_withdrawn ... ok test stream::tests::full_priority_queue_forces_connection_shutdown_after_retry_bound ... ok test stream::tests::interactive_data_does_not_wait_to_fill_a_batch ... ok test stream::tests::infraternal_agent_grant_rejection_is_audited_before_relay ... ok test stream::sweep_tests::remote_exec_follows_refresh_lineage_and_never_skips_termination ... ok test stream::tests::forced_close_audit_failure_shuts_down_without_waiting_for_full_queue ... ok test stream::tests::out_of_range_resize_closes_only_its_channel_with_invalid_value ... ok test stream::tests::queued_client_data_is_discarded_when_revoked_before_capacity_returns ... ok test stream::tests::ready_batch_preserves_control_other_channel_and_invalid_input ... ok test stream::sweep_tests::remote_ssh_follows_refresh_lineage_and_never_skips_termination ... ok test stream::tests::rejects_malformed_hop_control_payloads ... ok test stream::tests::pair_released_after_agent_close_is_still_audited_and_closed ... ok test stream::tests::native_close_backpressure_preserves_forbidden_watcher_deadline ... ok test storage::prelogin_bounds_tests::prelogin_admission_caps_and_indexed_expiry_converge ... ok test stream::tests::stalled_close_drops_tcp_while_connection_operation_is_pending ... ok test stream::tests::late_registration_after_observed_withdrawal_retires_within_one_second ... ok test stream::tests::ready_batch_spends_each_frames_original_credit ... ok test stream::tests::revocation_while_batch_waits_for_capacity_rejects_every_frame ... ok test stream::tests::permitted_native_close_preserves_status_and_reason ... ok test stream::tests::replaced_tunnel_force_closes_relayed_client_channels_within_one_second ... ok test stream::tests::stopped_agent_identity_force_closes_relayed_client_channels_within_one_second ... ok test stream::tests::writer_discards_queued_control_and_data_after_forbidden_close ... ok test stream::tests::relay_forwards_empty_eof_then_close_to_the_public_client ... ok test stream::tests::tunnel_stop_during_native_close_read_keeps_watcher_ownership ... ok test stream::tests::stalled_forced_close_audit_is_bounded_and_does_not_hold_agent_close ... ok test stream::tests::unconfirmable_native_close_fails_closed_without_forwarding_its_reason ... ok test stream::watcher::tests::back_to_back_passes_close_the_client_inside_one_second ... ok test stream::watcher::tests::coalesced_identity_stops_do_not_reset_route_deadlines ... ok test stream::watcher::tests::coalesced_stops_audit_oldest_deadline_before_newer_routes ... ok test stream::watcher::tests::identity_stop_during_a_slow_pass_closes_relayed_channels_host_offline ... ok test stream::watcher::tests::identity_stop_during_failed_host_read_keeps_host_offline ... ok test stream::watcher::tests::delayed_stop_observation_fails_closed_at_original_deadline ... ok test stream::watcher::tests::identity_stop_during_failed_read_keeps_host_offline ... ok test stream::watcher::tests::repeated_withdrawal_waits_for_the_first_attachment_audits ... ok test stream::watcher::tests::late_registration_on_stopped_route_does_not_reset_deadline ... ok test stream::watcher::tests::scheduler_recovery_after_a_long_stall_closes_nothing ... ok test stream::watcher::tests::slow_reads_with_wakeups_and_new_channels_close_nothing ... ok test tests::api_success_defaults_to_no_store_and_spa_fallback_stays_available ... ok test stream::watcher::tests::teardown_stops_processes_and_joins_the_writer_before_bounded_concurrent_detaches ... ok test tests::join_token_name_limit_counts_utf8_characters ... ok test stream::watcher::tests::stopped_route_retirement_overrides_authorization_cause_and_deadline ... ok test tests::lowercase_idempotency_ulids_share_the_canonical_row ... ok test stream::watcher::tests::unconfirmed_worst_case_closes_the_client_inside_one_second ... ok test tests::device_poll_admission_precedes_failed_response_actor_authentication ... ok test tests::unknown_api_route_returns_json_error_and_never_spa_html ... ok test tests::unmatched_api_errors_keep_no_store ... ok test tests::wrong_api_method_returns_error_and_allow_header ... ok test tests::openapi_documents_idempotency_headers_and_bearer_security ... ok test tests::openapi_documents_refresh_and_rate_limit_transports ... ok test tunnel::tests::agent_opened_channels_are_refused_and_unknown_ids_are_protocol_errors ... ok test tunnel::tests::benchmark_tunnel_credit_accounting ... ignored, benchmark only on the perf-test VM test tunnel::provider_rpc_tests::slow_remote_actions_confirm_success_within_the_action_deadline ... ok test tunnel::tests::failed_opens_release_slots_and_tunnel_budget_across_clients ... ok test tests::openapi_documents_shared_error_responses ... ok test stream::tests::withdrawal_during_successful_native_confirmation_keeps_watcher_ownership ... ok test tunnel::tests::tunnel_ping_carries_the_current_unix_time ... ok test tunnel::tests::websocket_reads_map_to_contract_close_codes ... ok test stream::watcher::tests::shared_rechecks_do_not_grow_with_connections_and_keep_the_bound ... ok test tunnel::tests::identity_stop_during_reconnect_marks_pinned_old_routes ... ok test tunnel::tests::shutdown_marks_pinned_routes_before_releasing_the_tunnel ... ok test tunnel::tests::session_termination_requires_confirmation_and_releases_reply_slots ... ok test stream::tests::stream_data_fence_cost ... ok test stream::tests::native_termination_and_watcher_both_deliver_one_audited_forbidden_close ... ok test tunnel::provider_rpc_tests::remote_inspect_and_actions_use_signed_provider_rpc_with_typed_errors ... ok failures: ---- stream::tests::contended_native_close_fence_preserves_original_watcher_deadline stdout ---- thread 'stream::tests::contended_native_close_fence_preserves_original_watcher_deadline' (2108935) panicked at crates/server/src/stream.rs:4633:14: native dispatch did not reach the database barrier by C+650: Elapsed(()) failures: stream::tests::contended_native_close_fence_preserves_original_watcher_deadline test result: FAILED. 228 passed; 1 failed; 5 ignored; 0 measured; 0 filtered out; finished in 26.38s error: test failed, to rerun pass `-p infraternal-server --lib` ```
Author
Owner

Merged dev (87bb5bd2b7) into self-install (base 5b5cf987fc). Head: bc828c8b3cde57c2f7f3533131039d22f6cf1eb1. Nothing pushed.

Conflict resolutions:

  • DECISIONS.md: retained dev §§31–43 and appended the self-install decision as §44.
  • crates/server/src/install.rs: retained dev's connect/banner/auth/host-key flow and self-install's token mint/delivery/enrollment during Install. Start confirms service readiness. Pass job.auth through all delegated operations and retries.
  • crates/server/src/install_bootstrap.rs: combined auth selection/error classification with delegated agent install/agent uninstall, preserving exact pins and ownership checks. The obsolete dummy-binary linger test was moved into the compiled CLI integration scenario. Network loopback upload/refusal coverage remains.
  • crates/server/src/install_worker_tests.rs: token-delivery/enrollment hooks remain on Install; the fake records auth on install, start, upload, observe, probe and remove. Existing network/key override, retry, authorization-loss and host-key tests retained.

Fresh PAM-less network SSH needed three setup fixes: runtime-directory fallback before delegated service operations; successful live logind listing to distinguish an absent user object from bus errors; bounded user-manager readiness after enabling linger. The shared CLI readiness helper serves both server and infraternal agent installation. No new hot path. Sources: pam_systemd, loginctl source, loginctl manual source. DESIGN and contracts now describe delegated step ordering and auth behavior.

Tests:

  • Workspace clippy cargo clippy --workspace --all-targets -- -D warnings: passed.
  • cargo test -p infraternal-server install: cargo test: 56 passed, 4 ignored, 295 filtered out (15 suites, 8.34s).
  • cargo test -p infraternal-server install -- --ignored: four real OpenSSH tests passed (trust, atomic upload, ownership fencing and convergent cleanup).
  • cargo test -p infraternal-server real_network_auth -- --nocapture: two loopback tests passed (none-auth upload/removal, refusal and key-mode auth exclusivity).
  • cargo test -p infraternal --test agent_install -- --ignored: passed, running the full installation scenario sequentially in both key and network modes. Both install a real sshtarget user service, enroll, establish mTLS, expose inventory, exercise linger ownership failure/reinstall and delegate uninstall. Network mode adds no install key and records no publickey attempt.
  • Logind listing parser regression passed; malformed output fails closed.
  • External sudo -n cp -a authorized_keys backup restored with sudo -n cp -a; sudo -n cmp passed (exit 0).

Gate: final-source INFRATERNAL_VERIFY_RUN_ID=self-install-merge scripts/verify fast passed all 19 stages in 380.861s (exit 0). No verify merge was run.

Exact targeted test outputs:

install-ignored:

test install_bootstrap::tests::real_test_sshd_requires_explicit_trust_before_authentication ... ok
test install_bootstrap::tests::real_removal_reports_incomplete_cleanup_and_converges ... ok
test install_bootstrap::tests::real_remote_paths_are_fenced_by_installation_ownership ... ok
test install_bootstrap::tests::real_rootless_upload_requires_pin_and_atomically_installs_verified_binary ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 230 filtered out; finished in 32.26s

network:

test install_bootstrap::tests::real_network_auth_refusal_is_actionable_and_key_mode_never_tries_none ... ok
test install_bootstrap::tests::real_network_auth_uploads_and_removes_without_offering_a_key ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 0.84s

real-install:

test rootless_install_trust_inventory_and_remove_over_real_sshd ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 29.40s

clippy:

    Finished `dev` profile [unoptimized] target(s) in 7.58s

An earlier final-source fast run failed in the unchanged stream::tests::contended_native_close_fence_preserves_original_watcher_deadline test (native dispatch did not reach the database barrier by C+650: Elapsed(())) under a load warning. The same gate passed on rerun without changing any test or source. The existing cookie@0.6.0 low-severity advisory remains report-only. No new benchmark or performance claim: all additions are setup work.

Exact final gate output:

WARN load5=20.29 exceeds online CPU count=8; timing-sensitive checks may be delayed
PASS fast: migrations are append-only (0.323s)
PASS fast: workspace package dependencies (0.622s)
PASS fast: gate target-directory and launch diagnostics tests (0.314s)
PASS fast: JavaScript dependencies (0.021s)
PASS fast: advisory review policy tests (0.183s)
SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows
SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2
SUPPLY_CHAIN_NOTICES generated THIRD_PARTY_NOTICES.md from 81 frontend packages
SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files
SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review
advisories ok
SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data
licenses ok
SUPPLY_CHAIN_RUST_LICENSES passed
bun audit v1.4.2 (744846f84)

cookie@0.6.0
  workspace:@infraternal/web > @sveltejs/kit > cookie
  low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x

1 vulnerability (1 low)

  bun audit fix           upgrade the vulnerable packages within their ranges
  bun audit fix --latest  also cross major versions
SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (4.866s)
PASS fast: build web app (14.371s)
PASS fast: cargo fmt --check (2.015s)
PASS fast: cargo clippy (29.414s)
PASS fast: cargo test (213.000s)
PASS fast: svelte-check (23.066s)
PASS fast: UI package svelte-check (10.299s)
PASS fast: stream package typecheck (15.669s)
PASS fast: Vitest (16.194s)
PASS fast: UI package Vitest (12.504s)
PASS fast: stream package Vitest (3.379s)
PASS fast: OpenAPI and TypeScript client drift (25.022s)
PASS fast: terminal TypeScript (7.068s)
PASS fast: terminal Vitest (2.531s)

Exact gate summary:

Gate: fast
Stages: 19
Elapsed  Stage
0.323s   fast: migrations are append-only
0.622s   fast: workspace package dependencies
0.314s   fast: gate target-directory and launch diagnostics tests
0.021s   fast: JavaScript dependencies
0.183s   fast: advisory review policy tests
4.866s   fast: supply-chain checks
14.371s  fast: build web app
2.015s   fast: cargo fmt --check
29.414s  fast: cargo clippy
213.000s fast: cargo test
23.066s  fast: svelte-check
10.299s  fast: UI package svelte-check
15.669s  fast: stream package typecheck
16.194s  fast: Vitest
12.504s  fast: UI package Vitest
3.379s   fast: stream package Vitest
25.022s  fast: OpenAPI and TypeScript client drift
7.068s   fast: terminal TypeScript
2.531s   fast: terminal Vitest
Total: 380.861s
Merged `dev` (87bb5bd2b7410d3a571a903f6cf6a53d1112ca6f) into `self-install` (base 5b5cf987fc4d3aac23d0505617256eca6cc0bea8). Head: `bc828c8b3cde57c2f7f3533131039d22f6cf1eb1`. Nothing pushed. Conflict resolutions: - `DECISIONS.md`: retained dev §§31–43 and appended the self-install decision as §44. - `crates/server/src/install.rs`: retained dev's connect/banner/auth/host-key flow and self-install's token mint/delivery/enrollment during Install. Start confirms service readiness. Pass job.auth through all delegated operations and retries. - `crates/server/src/install_bootstrap.rs`: combined auth selection/error classification with delegated `agent install`/`agent uninstall`, preserving exact pins and ownership checks. The obsolete dummy-binary linger test was moved into the compiled CLI integration scenario. Network loopback upload/refusal coverage remains. - `crates/server/src/install_worker_tests.rs`: token-delivery/enrollment hooks remain on Install; the fake records auth on install, start, upload, observe, probe and remove. Existing network/key override, retry, authorization-loss and host-key tests retained. Fresh PAM-less network SSH needed three setup fixes: runtime-directory fallback before delegated service operations; successful live logind listing to distinguish an absent user object from bus errors; bounded user-manager readiness after enabling linger. The shared CLI readiness helper serves both server and infraternal agent installation. No new hot path. Sources: [pam_systemd](https://www.freedesktop.org/software/systemd/man/latest/pam_systemd.html), [loginctl source](https://github.com/systemd/systemd/blob/main/src/login/loginctl.c), [loginctl manual source](https://github.com/systemd/systemd/blob/main/man/loginctl.xml). DESIGN and contracts now describe delegated step ordering and auth behavior. Tests: - Workspace clippy `cargo clippy --workspace --all-targets -- -D warnings`: passed. - `cargo test -p infraternal-server install`: `cargo test: 56 passed, 4 ignored, 295 filtered out (15 suites, 8.34s)`. - `cargo test -p infraternal-server install -- --ignored`: four real OpenSSH tests passed (trust, atomic upload, ownership fencing and convergent cleanup). - `cargo test -p infraternal-server real_network_auth -- --nocapture`: two loopback tests passed (none-auth upload/removal, refusal and key-mode auth exclusivity). - `cargo test -p infraternal --test agent_install -- --ignored`: passed, running the full installation scenario sequentially in both key and network modes. Both install a real sshtarget user service, enroll, establish mTLS, expose inventory, exercise linger ownership failure/reinstall and delegate uninstall. Network mode adds no install key and records no publickey attempt. - Logind listing parser regression passed; malformed output fails closed. - External `sudo -n cp -a` authorized_keys backup restored with `sudo -n cp -a`; `sudo -n cmp` passed (exit 0). Gate: final-source `INFRATERNAL_VERIFY_RUN_ID=self-install-merge scripts/verify fast` passed all 19 stages in 380.861s (exit 0). No verify merge was run. Exact targeted test outputs: `install-ignored`: ```text test install_bootstrap::tests::real_test_sshd_requires_explicit_trust_before_authentication ... ok test install_bootstrap::tests::real_removal_reports_incomplete_cleanup_and_converges ... ok test install_bootstrap::tests::real_remote_paths_are_fenced_by_installation_ownership ... ok test install_bootstrap::tests::real_rootless_upload_requires_pin_and_atomically_installs_verified_binary ... ok test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 230 filtered out; finished in 32.26s ``` `network`: ```text test install_bootstrap::tests::real_network_auth_refusal_is_actionable_and_key_mode_never_tries_none ... ok test install_bootstrap::tests::real_network_auth_uploads_and_removes_without_offering_a_key ... ok test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 0.84s ``` `real-install`: ```text test rootless_install_trust_inventory_and_remove_over_real_sshd ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 29.40s ``` `clippy`: ```text Finished `dev` profile [unoptimized] target(s) in 7.58s ``` An earlier final-source fast run failed in the unchanged `stream::tests::contended_native_close_fence_preserves_original_watcher_deadline` test (`native dispatch did not reach the database barrier by C+650: Elapsed(())`) under a load warning. The same gate passed on rerun without changing any test or source. The existing cookie@0.6.0 low-severity advisory remains report-only. No new benchmark or performance claim: all additions are setup work. Exact final gate output: ```text WARN load5=20.29 exceeds online CPU count=8; timing-sensitive checks may be delayed PASS fast: migrations are append-only (0.323s) PASS fast: workspace package dependencies (0.622s) PASS fast: gate target-directory and launch diagnostics tests (0.314s) PASS fast: JavaScript dependencies (0.021s) PASS fast: advisory review policy tests (0.183s) SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2 SUPPLY_CHAIN_NOTICES generated THIRD_PARTY_NOTICES.md from 81 frontend packages SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review advisories ok SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data licenses ok SUPPLY_CHAIN_RUST_LICENSES passed bun audit v1.4.2 (744846f84) cookie@0.6.0 workspace:@infraternal/web > @sveltejs/kit > cookie low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x 1 vulnerability (1 low) bun audit fix upgrade the vulnerable packages within their ranges bun audit fix --latest also cross major versions SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (4.866s) PASS fast: build web app (14.371s) PASS fast: cargo fmt --check (2.015s) PASS fast: cargo clippy (29.414s) PASS fast: cargo test (213.000s) PASS fast: svelte-check (23.066s) PASS fast: UI package svelte-check (10.299s) PASS fast: stream package typecheck (15.669s) PASS fast: Vitest (16.194s) PASS fast: UI package Vitest (12.504s) PASS fast: stream package Vitest (3.379s) PASS fast: OpenAPI and TypeScript client drift (25.022s) PASS fast: terminal TypeScript (7.068s) PASS fast: terminal Vitest (2.531s) ``` Exact gate summary: ```text Gate: fast Stages: 19 Elapsed Stage 0.323s fast: migrations are append-only 0.622s fast: workspace package dependencies 0.314s fast: gate target-directory and launch diagnostics tests 0.021s fast: JavaScript dependencies 0.183s fast: advisory review policy tests 4.866s fast: supply-chain checks 14.371s fast: build web app 2.015s fast: cargo fmt --check 29.414s fast: cargo clippy 213.000s fast: cargo test 23.066s fast: svelte-check 10.299s fast: UI package svelte-check 15.669s fast: stream package typecheck 16.194s fast: Vitest 12.504s fast: UI package Vitest 3.379s fast: stream package Vitest 25.022s fast: OpenAPI and TypeScript client drift 7.068s fast: terminal TypeScript 2.531s fast: terminal Vitest Total: 380.861s ```
Author
Owner

Final cleanup: the shared authorized_keys file changed again during the later gate run after the earlier successful restoration. No install test process remained active. Restored the job-start backup again with sudo -n cp -a and repeated sudo -n cmp successfully (exit 0). Head bc828c8b3c; worktree clean; no push. Full report: /mnt/hdd/infraternal/jobs/self-install-merge/result.md.

Final cleanup: the shared authorized_keys file changed again during the later gate run after the earlier successful restoration. No install test process remained active. Restored the job-start backup again with sudo -n cp -a and repeated sudo -n cmp successfully (exit 0). Head bc828c8b3cde57c2f7f3533131039d22f6cf1eb1; worktree clean; no push. Full report: /mnt/hdd/infraternal/jobs/self-install-merge/result.md.
Author
Owner

Starting read-only final self-install review, issue #72. Worktree review-self-install; detached HEAD bc828c8b3c (self-install); diff base 87bb5bd. Scope: generated units, context/upgrade/uninstall, SSH bootstrap delegation and auth, server local infraternal agent behavior, OPERATOR docs. Requested debug/sccache install tests and systemd-analyze only; no verify merge, no commits.

Starting read-only final self-install review, issue #72. Worktree review-self-install; detached HEAD bc828c8b3cde57c2f7f3533131039d22f6cf1eb1 (self-install); diff base 87bb5bd. Scope: generated units, context/upgrade/uninstall, SSH bootstrap delegation and auth, server local infraternal agent behavior, OPERATOR docs. Requested debug/sccache install tests and systemd-analyze only; no verify merge, no commits.
Author
Owner

Verdict: do not merge.

Review of 87bb5bd...bc828c8, HEAD bc828c8b3cde57c2f7f3533131039d22f6cf1eb1, detached self-install worktree. Read-only source review; no commits. Verification is in progress; final evidence is appended below.

  1. Major — a server upgrade silently changes the database and configuration instead of reusing the installation. crates/infraternal/src/self_install.rs:903 always calls resolve_database with the newly parsed CLI arguments; absent --database selects the context default at lines 175–182. The saved server.database path is read only by uninstall (line 970), never install. Installation then overwrites the unit and saved database record (lines 935–940). Listener, public origin, tunnel and --no-local-agent also come from newly parsed defaults. Following OPERATOR.md:250–251 (server install again from the new binary) after an installation with a custom database switches to a new database and fresh CA/signing/SSH identities (server/src/lib.rs:445–455, 490–496, 558–563), leaving the actual database stranded and replacing the record needed to purge it. A server-only deployment also silently enables the local infraternal agent. Preserve saved configuration when options are absent, or fail before writes and require explicit complete upgrade settings; correct the upgrade documentation and add regression coverage.

  2. Minor — system database paths containing $ are escaped with the ExecStart rules in ReadWritePaths. crates/infraternal/src/self_install.rs:889 calls systemd_quote for ReadWritePaths, and crates/agent/src/systemd.rs:108 doubles $. For /srv/$cache/db.sqlite3, ExecStart correctly uses /srv/$$cache/db.sqlite3, but the sandbox allow-list incorrectly names /srv/$$cache. systemd only performs the dollar environment expansion for command lines; ReadWritePaths takes literal paths. This can leave the actual database unwritable or make the mount namespace fail. Use directive-specific path quoting. Primary documentation: systemd.service command-line expansion, systemd.exec ReadWritePaths. Normal default paths are unaffected.

  3. Minor — the requested revocation-on-cleanup-failure criterion conflicts with the current contract. crates/server/src/install.rs:575–595 returns ssh_error immediately if remote removal fails; identity revocation and tunnel shutdown at lines 599–621 are skipped. Thus a partially removed host retains a live identity. This is pre-existing behavior, explicitly promised by contracts §8 and OPERATOR.md:186–188 (nothing revoked on cleanup failure), so it is not classified as a new implementation blocker under the instruction that these documents override the review prompt. The requested assertion does not hold. Reconcile the desired safety rule with the contract before claiming it passes. The test removal_revokes_identity_enrolled_before_the_timeline_observed_it covers a failed install followed by successful cleanup, not cleanup failure.

Verdict: **do not merge**. Review of `87bb5bd...bc828c8`, HEAD `bc828c8b3cde57c2f7f3533131039d22f6cf1eb1`, detached self-install worktree. Read-only source review; no commits. Verification is in progress; final evidence is appended below. 1. **Major — a server upgrade silently changes the database and configuration instead of reusing the installation.** `crates/infraternal/src/self_install.rs:903` always calls `resolve_database` with the newly parsed CLI arguments; absent `--database` selects the context default at lines 175–182. The saved `server.database` path is read only by uninstall (line 970), never install. Installation then overwrites the unit and saved database record (lines 935–940). Listener, public origin, tunnel and `--no-local-agent` also come from newly parsed defaults. Following OPERATOR.md:250–251 (`server install` again from the new binary) after an installation with a custom database switches to a new database and fresh CA/signing/SSH identities (server/src/lib.rs:445–455, 490–496, 558–563), leaving the actual database stranded and replacing the record needed to purge it. A server-only deployment also silently enables the local infraternal agent. Preserve saved configuration when options are absent, or fail before writes and require explicit complete upgrade settings; correct the upgrade documentation and add regression coverage. 2. **Minor — system database paths containing `$` are escaped with the ExecStart rules in ReadWritePaths.** `crates/infraternal/src/self_install.rs:889` calls `systemd_quote` for `ReadWritePaths`, and `crates/agent/src/systemd.rs:108` doubles `$`. For `/srv/$cache/db.sqlite3`, ExecStart correctly uses `/srv/$$cache/db.sqlite3`, but the sandbox allow-list incorrectly names `/srv/$$cache`. systemd only performs the dollar environment expansion for command lines; ReadWritePaths takes literal paths. This can leave the actual database unwritable or make the mount namespace fail. Use directive-specific path quoting. Primary documentation: [systemd.service command-line expansion](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.service.xml), [systemd.exec ReadWritePaths](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.exec.xml). Normal default paths are unaffected. 3. **Minor — the requested revocation-on-cleanup-failure criterion conflicts with the current contract.** `crates/server/src/install.rs:575–595` returns `ssh_error` immediately if remote removal fails; identity revocation and tunnel shutdown at lines 599–621 are skipped. Thus a partially removed host retains a live identity. This is pre-existing behavior, explicitly promised by contracts §8 and OPERATOR.md:186–188 (nothing revoked on cleanup failure), so it is not classified as a new implementation blocker under the instruction that these documents override the review prompt. The requested assertion does not hold. Reconcile the desired safety rule with the contract before claiming it passes. The test `removal_revokes_identity_enrolled_before_the_timeline_observed_it` covers a failed install followed by successful cleanup, not cleanup failure.
Author
Owner

Verdict: do not merge.

Review of 87bb5bd...bc828c8, HEAD bc828c8b3cde57c2f7f3533131039d22f6cf1eb1, detached self-install worktree. Read-only source review; no commits. Verification is in progress; final evidence is appended below.

  1. Major — a server upgrade silently changes the database and configuration instead of reusing the installation. crates/infraternal/src/self_install.rs:903 always calls resolve_database with the newly parsed CLI arguments; absent --database selects the context default at lines 175–182. The saved server.database path is read only by uninstall (line 970), never install. Installation then overwrites the unit and saved database record (lines 935–940). Listener, public origin, tunnel and --no-local-agent also come from newly parsed defaults. Following OPERATOR.md:250–251 (server install again from the new binary) after an installation with a custom database switches to a new database and fresh CA/signing/SSH identities (server/src/lib.rs:445–455, 490–496, 558–563), leaving the actual database stranded and replacing the record needed to purge it. A server-only deployment also silently enables the local infraternal agent. Preserve saved configuration when options are absent, or fail before writes and require explicit complete upgrade settings; correct the upgrade documentation and add regression coverage.

  2. Minor — system database paths containing $ are escaped with the ExecStart rules in ReadWritePaths. crates/infraternal/src/self_install.rs:889 calls systemd_quote for ReadWritePaths, and crates/agent/src/systemd.rs:108 doubles $. For /srv/$cache/db.sqlite3, ExecStart correctly uses /srv/$$cache/db.sqlite3, but the sandbox allow-list incorrectly names /srv/$$cache. systemd only performs the dollar environment expansion for command lines; ReadWritePaths takes literal paths. This can leave the actual database unwritable or make the mount namespace fail. Use directive-specific path quoting. Primary documentation: systemd.service command-line expansion, systemd.exec ReadWritePaths. Normal default paths are unaffected.

  3. Minor — the requested revocation-on-cleanup-failure criterion conflicts with the current contract. crates/server/src/install.rs:575–595 returns ssh_error immediately if remote removal fails; identity revocation and tunnel shutdown at lines 599–621 are skipped. Thus a partially removed host retains a live identity. This is pre-existing behavior, explicitly promised by contracts §8 and OPERATOR.md:186–188 (nothing revoked on cleanup failure), so it is not classified as a new implementation blocker under the instruction that these documents override the review prompt. The requested assertion does not hold. Reconcile the desired safety rule with the contract before claiming it passes. The test removal_revokes_identity_enrolled_before_the_timeline_observed_it covers a failed install followed by successful cleanup, not cleanup failure.

  4. Major — SSH removal can delete a binary still required by a co-installed server. Self-uninstall deliberately preserves the shared executable while infraternal-server.service exists (self_install.rs:731–732). In contrast, ROOTLESS_REMOVE_SCRIPT unconditionally requires that binary to disappear (install_bootstrap.rs:708–709). With both services installed, the first removal stops/removes the infraternal agent unit, preserves the executable for the server, and then fails with exit 69 before releasing the bootstrap ownership marker or revoking the identity. A retry now takes the no-unit branch and unconditionally deletes the shared executable (install_bootstrap.rs:701), even though the server unit still exists. The running server loses its restart/upgrade executable. This contradicts the shared-binary and last-service ownership logic introduced in this feature. Apply the server-service ownership check both to fallback deletion and to the post-uninstall absence checks; test coexistence plus retry after partial removal. No systemd unit needs to be launched to establish the fallback deletion in an isolated filesystem fixture.

Verdict: **do not merge**. Review of `87bb5bd...bc828c8`, HEAD `bc828c8b3cde57c2f7f3533131039d22f6cf1eb1`, detached self-install worktree. Read-only source review; no commits. Verification is in progress; final evidence is appended below. 1. **Major — a server upgrade silently changes the database and configuration instead of reusing the installation.** `crates/infraternal/src/self_install.rs:903` always calls `resolve_database` with the newly parsed CLI arguments; absent `--database` selects the context default at lines 175–182. The saved `server.database` path is read only by uninstall (line 970), never install. Installation then overwrites the unit and saved database record (lines 935–940). Listener, public origin, tunnel and `--no-local-agent` also come from newly parsed defaults. Following OPERATOR.md:250–251 (`server install` again from the new binary) after an installation with a custom database switches to a new database and fresh CA/signing/SSH identities (server/src/lib.rs:445–455, 490–496, 558–563), leaving the actual database stranded and replacing the record needed to purge it. A server-only deployment also silently enables the local infraternal agent. Preserve saved configuration when options are absent, or fail before writes and require explicit complete upgrade settings; correct the upgrade documentation and add regression coverage. 2. **Minor — system database paths containing `$` are escaped with the ExecStart rules in ReadWritePaths.** `crates/infraternal/src/self_install.rs:889` calls `systemd_quote` for `ReadWritePaths`, and `crates/agent/src/systemd.rs:108` doubles `$`. For `/srv/$cache/db.sqlite3`, ExecStart correctly uses `/srv/$$cache/db.sqlite3`, but the sandbox allow-list incorrectly names `/srv/$$cache`. systemd only performs the dollar environment expansion for command lines; ReadWritePaths takes literal paths. This can leave the actual database unwritable or make the mount namespace fail. Use directive-specific path quoting. Primary documentation: [systemd.service command-line expansion](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.service.xml), [systemd.exec ReadWritePaths](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.exec.xml). Normal default paths are unaffected. 3. **Minor — the requested revocation-on-cleanup-failure criterion conflicts with the current contract.** `crates/server/src/install.rs:575–595` returns `ssh_error` immediately if remote removal fails; identity revocation and tunnel shutdown at lines 599–621 are skipped. Thus a partially removed host retains a live identity. This is pre-existing behavior, explicitly promised by contracts §8 and OPERATOR.md:186–188 (nothing revoked on cleanup failure), so it is not classified as a new implementation blocker under the instruction that these documents override the review prompt. The requested assertion does not hold. Reconcile the desired safety rule with the contract before claiming it passes. The test `removal_revokes_identity_enrolled_before_the_timeline_observed_it` covers a failed install followed by successful cleanup, not cleanup failure. 4. **Major — SSH removal can delete a binary still required by a co-installed server.** Self-uninstall deliberately preserves the shared executable while `infraternal-server.service` exists (`self_install.rs:731–732`). In contrast, `ROOTLESS_REMOVE_SCRIPT` unconditionally requires that binary to disappear (`install_bootstrap.rs:708–709`). With both services installed, the first removal stops/removes the infraternal agent unit, preserves the executable for the server, and then fails with exit 69 before releasing the bootstrap ownership marker or revoking the identity. A retry now takes the no-unit branch and unconditionally deletes the shared executable (`install_bootstrap.rs:701`), even though the server unit still exists. The running server loses its restart/upgrade executable. This contradicts the shared-binary and last-service ownership logic introduced in this feature. Apply the server-service ownership check both to fallback deletion and to the post-uninstall absence checks; test coexistence plus retry after partial removal. No systemd unit needs to be launched to establish the fallback deletion in an isolated filesystem fixture.
Author
Owner

Verdict: do not merge.

Review of 87bb5bd...bc828c8, HEAD bc828c8b3cde57c2f7f3533131039d22f6cf1eb1, detached self-install worktree. Read-only source review; no commits. Verification completed; final evidence is appended below. Two majors block merge; the two minors do not.

  1. Major — a server upgrade silently changes the database and configuration instead of reusing the installation. crates/infraternal/src/self_install.rs:903 always calls resolve_database with the newly parsed CLI arguments; absent --database selects the context default at lines 175–182. The saved server.database path is read only by uninstall (line 970), never install. Installation then overwrites the unit and saved database record (lines 935–940). Listener, public origin, tunnel and --no-local-agent also come from newly parsed defaults. Following OPERATOR.md:250–251 (server install again from the new binary) after an installation with a custom database switches to a new database and fresh CA/signing/SSH identities (server/src/lib.rs:445–455, 490–496, 558–563), leaving the actual database stranded and replacing the record needed to purge it. A server-only deployment also silently enables the local infraternal agent. Preserve saved configuration when options are absent, or fail before writes and require explicit complete upgrade settings; correct the upgrade documentation and add regression coverage.

  2. Minor — system database paths containing $ are escaped with the ExecStart rules in ReadWritePaths. crates/infraternal/src/self_install.rs:889 calls systemd_quote for ReadWritePaths, and crates/agent/src/systemd.rs:108 doubles $. For /srv/$cache/db.sqlite3, ExecStart correctly uses /srv/$$cache/db.sqlite3, but the sandbox allow-list incorrectly names /srv/$$cache. systemd only performs the dollar environment expansion for command lines; ReadWritePaths takes literal paths. This can leave the actual database unwritable or make the mount namespace fail. Use directive-specific path quoting. Primary documentation: systemd.service command-line expansion, systemd.exec ReadWritePaths. Normal default paths are unaffected.

  3. Minor — the requested revocation-on-cleanup-failure criterion conflicts with the current contract. crates/server/src/install.rs:575–595 returns ssh_error immediately if remote removal fails; identity revocation and tunnel shutdown at lines 599–621 are skipped. Thus a partially removed host retains a live identity. This is pre-existing behavior, explicitly promised by contracts §8 and OPERATOR.md:186–188 (nothing revoked on cleanup failure), so it is not classified as a new implementation blocker under the instruction that these documents override the review prompt. The requested assertion does not hold. Reconcile the desired safety rule with the contract before claiming it passes. The test removal_revokes_identity_enrolled_before_the_timeline_observed_it covers a failed install followed by successful cleanup, not cleanup failure.

  4. Major — SSH removal can delete a binary still required by a co-installed server. Self-uninstall deliberately preserves the shared executable while infraternal-server.service exists (self_install.rs:731–732). In contrast, ROOTLESS_REMOVE_SCRIPT unconditionally requires that binary to disappear (install_bootstrap.rs:708–709). With both services installed, the first removal stops/removes the infraternal agent unit, preserves the executable for the server, and then fails with exit 69 before releasing the bootstrap ownership marker or revoking the identity. A retry now takes the no-unit branch and unconditionally deletes the shared executable (install_bootstrap.rs:701), even though the server unit still exists. The running server loses its restart/upgrade executable. This contradicts the shared-binary and last-service ownership logic introduced in this feature. Apply the server-service ownership check both to fallback deletion and to the post-uninstall absence checks; test coexistence plus retry after partial removal. No systemd unit needs to be launched to establish the fallback deletion in an isolated filesystem fixture.

Independent verification evidence

All final commands exited 0. Builds used the supplied preset: RUSTC_WRAPPER=/home/kayg/.local/bin/sccache, SCCACHE_DIR=/mnt/hdd/infraternal/sccache, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, CARGO_INCREMENTAL=0, dedicated target /home/kayg/.cache/infraternal-targets/review-self-install. Cargo used its unoptimized test/debug profile; no release build and no verify merge.

The first server test attempt exited 101 because this fresh worktree had no embedded web build. Ran bun install --frozen-lockfile and scripts/build-web successfully, then reran the tests. No tracked files changed.

cargo test -p infraternal-server install — exit 0, server-install-rerun.log:

test result: ok. 56 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.84s

cargo test -p infraternal-server install -- --ignored — exit 0, server-install-ignored.log:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 230 filtered out; finished in 33.95s

cargo test -p infraternal --bin infraternal install — exit 0, cli-install.log:

test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 1.56s

cargo test -p infraternal --test self_install — exit 0, cli-self-install.log:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

cargo test -p infraternal --test agent_install -- --ignored — exit 0, agent-install-ignored.log:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 28.79s

cargo test -p infraternal-agent systemd — exit 0, unit-generator.log:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s

The ignored agent_install test runs the complete trust/enrollment/tunnel/inventory/removal scenario twice: OpenSSH key authentication on 127.0.0.1:2222, then a real loopback russh server accepting only SSH none with exec under sshtarget. The network fixture is not a live NetBird/Tailscale peer. Both use the real compiled binary and sshtarget systemd user manager. They exercise linger ownership failure/retry and reinstall with the existing identity, and assert that the join-token file disappears and the confirmed host pin is present. Source delivery uses umask 077 plus a private mktemp token file; the CLI refuses group/other-readable token files. Generated units and SSH argv carry only the token-file path. Server default/--with-agent versus --no-local-agent selection was verified through parsing, generated units and existing runtime wiring; no extra standalone server unit was started.

Explicit unit verification and safe filesystem fixture checks (check-fixtures.py, fixtures.log):

systemd-analyze verify agent-user.service: exit 0
systemd-analyze verify server-user.service: exit 0
systemd-analyze verify agent-system.service: exit 0
systemd-analyze verify server-system.service: exit 0
Upgrade dry-run: ignored saved custom database and server-only settings; chose default database, listener and local infraternal agent.
Co-install cleanup fallback: exit 0; server unit survived; shared real binary deleted.
Dollar database path: generated ReadWritePaths=/srv/$$cache (literal directory differs from /srv/$cache).

The four units were obtained from the actual CLI dry-run in root/user contexts; only their ExecStart binary path was redirected to the built executable for verification, matching the existing unit test. Unit contents are retained under units/. All previous rootless hardening directives remain, and system units render the same canonical deploy/o2/infraternal.service sandbox with service-specific path replacements. The $ sandbox-path result is a rendering/directive-semantics finding; no additional system unit was started to exercise mount setup.

The coexistence fixture executes the actual production removal script against an isolated directory with the real compiled binary and a generated server unit, representing a retry after the infraternal agent unit has gone. It confirms deletion of the shared binary while the server unit survives; it substitutes no systemctl/loginctl implementation and starts no service.

Uninstall's direct shared-binary check and last-user-service linger check are correct; the SSH fallback/check divergence is finding 4. Standalone infraternal agent uninstall preserves identity by default and purges its fixed data directory with --purge. Server purge follows its advertised database-only semantics (database plus SQLite sidecars); auxiliary CA/signing/SSH files are retained. This review added no hot path, and no performance measurements are claimed.

Authorized keys were backed up with sudo -n cp -a before tests and restored with sudo -n cp -a afterward. Actual restoration check:

authorized_keys: restored with cp -a; cmp exit 0

Restored file and backup both have mode 0600 and ownership sshtarget:sshtarget. Key contents were never printed. Final HEAD remains bc828c8b3cde57c2f7f3533131039d22f6cf1eb1; /usr/bin/git status --short is empty. No source edits, commits or pushes. Issue #72 has the start and findings comments; this final report is posted as the finish evidence. The author reports were not used to derive these independent findings.

Verdict: **do not merge**. Review of `87bb5bd...bc828c8`, HEAD `bc828c8b3cde57c2f7f3533131039d22f6cf1eb1`, detached self-install worktree. Read-only source review; no commits. Verification completed; final evidence is appended below. Two majors block merge; the two minors do not. 1. **Major — a server upgrade silently changes the database and configuration instead of reusing the installation.** `crates/infraternal/src/self_install.rs:903` always calls `resolve_database` with the newly parsed CLI arguments; absent `--database` selects the context default at lines 175–182. The saved `server.database` path is read only by uninstall (line 970), never install. Installation then overwrites the unit and saved database record (lines 935–940). Listener, public origin, tunnel and `--no-local-agent` also come from newly parsed defaults. Following OPERATOR.md:250–251 (`server install` again from the new binary) after an installation with a custom database switches to a new database and fresh CA/signing/SSH identities (server/src/lib.rs:445–455, 490–496, 558–563), leaving the actual database stranded and replacing the record needed to purge it. A server-only deployment also silently enables the local infraternal agent. Preserve saved configuration when options are absent, or fail before writes and require explicit complete upgrade settings; correct the upgrade documentation and add regression coverage. 2. **Minor — system database paths containing `$` are escaped with the ExecStart rules in ReadWritePaths.** `crates/infraternal/src/self_install.rs:889` calls `systemd_quote` for `ReadWritePaths`, and `crates/agent/src/systemd.rs:108` doubles `$`. For `/srv/$cache/db.sqlite3`, ExecStart correctly uses `/srv/$$cache/db.sqlite3`, but the sandbox allow-list incorrectly names `/srv/$$cache`. systemd only performs the dollar environment expansion for command lines; ReadWritePaths takes literal paths. This can leave the actual database unwritable or make the mount namespace fail. Use directive-specific path quoting. Primary documentation: [systemd.service command-line expansion](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.service.xml), [systemd.exec ReadWritePaths](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.exec.xml). Normal default paths are unaffected. 3. **Minor — the requested revocation-on-cleanup-failure criterion conflicts with the current contract.** `crates/server/src/install.rs:575–595` returns `ssh_error` immediately if remote removal fails; identity revocation and tunnel shutdown at lines 599–621 are skipped. Thus a partially removed host retains a live identity. This is pre-existing behavior, explicitly promised by contracts §8 and OPERATOR.md:186–188 (nothing revoked on cleanup failure), so it is not classified as a new implementation blocker under the instruction that these documents override the review prompt. The requested assertion does not hold. Reconcile the desired safety rule with the contract before claiming it passes. The test `removal_revokes_identity_enrolled_before_the_timeline_observed_it` covers a failed install followed by successful cleanup, not cleanup failure. 4. **Major — SSH removal can delete a binary still required by a co-installed server.** Self-uninstall deliberately preserves the shared executable while `infraternal-server.service` exists (`self_install.rs:731–732`). In contrast, `ROOTLESS_REMOVE_SCRIPT` unconditionally requires that binary to disappear (`install_bootstrap.rs:708–709`). With both services installed, the first removal stops/removes the infraternal agent unit, preserves the executable for the server, and then fails with exit 69 before releasing the bootstrap ownership marker or revoking the identity. A retry now takes the no-unit branch and unconditionally deletes the shared executable (`install_bootstrap.rs:701`), even though the server unit still exists. The running server loses its restart/upgrade executable. This contradicts the shared-binary and last-service ownership logic introduced in this feature. Apply the server-service ownership check both to fallback deletion and to the post-uninstall absence checks; test coexistence plus retry after partial removal. No systemd unit needs to be launched to establish the fallback deletion in an isolated filesystem fixture. Independent verification evidence All final commands exited 0. Builds used the supplied preset: `RUSTC_WRAPPER=/home/kayg/.local/bin/sccache`, `SCCACHE_DIR=/mnt/hdd/infraternal/sccache`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, `CARGO_INCREMENTAL=0`, dedicated target `/home/kayg/.cache/infraternal-targets/review-self-install`. Cargo used its unoptimized test/debug profile; no release build and no `verify merge`. The first server test attempt exited 101 because this fresh worktree had no embedded web build. Ran `bun install --frozen-lockfile` and `scripts/build-web` successfully, then reran the tests. No tracked files changed. `cargo test -p infraternal-server install` — exit 0, `server-install-rerun.log`: ```text test result: ok. 56 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.84s ``` `cargo test -p infraternal-server install -- --ignored` — exit 0, `server-install-ignored.log`: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 230 filtered out; finished in 33.95s ``` `cargo test -p infraternal --bin infraternal install` — exit 0, `cli-install.log`: ```text test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 1.56s ``` `cargo test -p infraternal --test self_install` — exit 0, `cli-self-install.log`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s ``` `cargo test -p infraternal --test agent_install -- --ignored` — exit 0, `agent-install-ignored.log`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 28.79s ``` `cargo test -p infraternal-agent systemd` — exit 0, `unit-generator.log`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s ``` The ignored `agent_install` test runs the complete trust/enrollment/tunnel/inventory/removal scenario twice: OpenSSH key authentication on 127.0.0.1:2222, then a real loopback russh server accepting only SSH `none` with exec under sshtarget. The network fixture is not a live NetBird/Tailscale peer. Both use the real compiled binary and sshtarget systemd user manager. They exercise linger ownership failure/retry and reinstall with the existing identity, and assert that the join-token file disappears and the confirmed host pin is present. Source delivery uses `umask 077` plus a private `mktemp` token file; the CLI refuses group/other-readable token files. Generated units and SSH argv carry only the token-file path. Server default/`--with-agent` versus `--no-local-agent` selection was verified through parsing, generated units and existing runtime wiring; no extra standalone server unit was started. Explicit unit verification and safe filesystem fixture checks (`check-fixtures.py`, `fixtures.log`): ```text systemd-analyze verify agent-user.service: exit 0 systemd-analyze verify server-user.service: exit 0 systemd-analyze verify agent-system.service: exit 0 systemd-analyze verify server-system.service: exit 0 Upgrade dry-run: ignored saved custom database and server-only settings; chose default database, listener and local infraternal agent. Co-install cleanup fallback: exit 0; server unit survived; shared real binary deleted. Dollar database path: generated ReadWritePaths=/srv/$$cache (literal directory differs from /srv/$cache). ``` The four units were obtained from the actual CLI dry-run in root/user contexts; only their ExecStart binary path was redirected to the built executable for verification, matching the existing unit test. Unit contents are retained under `units/`. All previous rootless hardening directives remain, and system units render the same canonical `deploy/o2/infraternal.service` sandbox with service-specific path replacements. The `$` sandbox-path result is a rendering/directive-semantics finding; no additional system unit was started to exercise mount setup. The coexistence fixture executes the actual production removal script against an isolated directory with the real compiled binary and a generated server unit, representing a retry after the infraternal agent unit has gone. It confirms deletion of the shared binary while the server unit survives; it substitutes no systemctl/loginctl implementation and starts no service. Uninstall's direct shared-binary check and last-user-service linger check are correct; the SSH fallback/check divergence is finding 4. Standalone infraternal agent uninstall preserves identity by default and purges its fixed data directory with `--purge`. Server purge follows its advertised database-only semantics (database plus SQLite sidecars); auxiliary CA/signing/SSH files are retained. This review added no hot path, and no performance measurements are claimed. Authorized keys were backed up with `sudo -n cp -a` before tests and restored with `sudo -n cp -a` afterward. Actual restoration check: ```text authorized_keys: restored with cp -a; cmp exit 0 ``` Restored file and backup both have mode 0600 and ownership sshtarget:sshtarget. Key contents were never printed. Final HEAD remains `bc828c8b3cde57c2f7f3533131039d22f6cf1eb1`; `/usr/bin/git status --short` is empty. No source edits, commits or pushes. Issue #72 has the start and findings comments; this final report is posted as the finish evidence. The author reports were not used to derive these independent findings.
Author
Owner

Starting self-install-fix on branch self-install, base bc828c8b3cde57c2f7f3533131039d22f6cf1eb1. Read the complete independent review. Scope: preserve server upgrade configuration/unit settings and prevent SSH removal/retry deleting a co-installed server executable; regression tests and the safe directive-quoting minor. Cleanup-failure revocation remains governed by contracts §8. No merge gate or push.

Starting self-install-fix on branch `self-install`, base `bc828c8b3cde57c2f7f3533131039d22f6cf1eb1`. Read the complete independent review. Scope: preserve server upgrade configuration/unit settings and prevent SSH removal/retry deleting a co-installed server executable; regression tests and the safe directive-quoting minor. Cleanup-failure revocation remains governed by contracts §8. No merge gate or push.
Author
Owner

Regression evidence before fixes:

  • cargo test -p infraternal --test self_install against baseline self-install implementation: 1 passed, 3 failed. Tests independently caught custom flags/settings lost, explicit overrides dropping other flags, and unsupported existing flags being silently dropped. Full output: /tmp/self-install-fix-before-cli.log.
  • Executing baseline production SSH cleanup in an isolated home with an existing server unit: exit 0, server unit survived, shared binary deleted (/tmp/self-install-fix-before-removal.log).

Implementation decisions: preserve operator unit directives, merge only clap CommandLine value sources (explicit default values count), reject unsupported stored commands before writes, retain installation database record when reinstalling without a unit. Record binary-owner with install id before upload and retain unknown/shared binaries on retries. $ path quoting follows systemd.service and systemd.exec; clap value source uses official clap docs. Minor revocation-on-failed-cleanup remains unchanged because contracts §8 explicitly requires no revocation on failure.

Regression evidence before fixes: - `cargo test -p infraternal --test self_install` against baseline self-install implementation: 1 passed, 3 failed. Tests independently caught custom flags/settings lost, explicit overrides dropping other flags, and unsupported existing flags being silently dropped. Full output: `/tmp/self-install-fix-before-cli.log`. - Executing baseline production SSH cleanup in an isolated home with an existing server unit: exit 0, server unit survived, shared binary deleted (`/tmp/self-install-fix-before-removal.log`). Implementation decisions: preserve operator unit directives, merge only clap CommandLine value sources (explicit default values count), reject unsupported stored commands before writes, retain installation database record when reinstalling without a unit. Record binary-owner with install id before upload and retain unknown/shared binaries on retries. `$` path quoting follows [systemd.service](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.service.xml) and [systemd.exec](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.exec.xml); clap value source uses [official clap docs](https://docs.rs/clap/latest/clap/struct.ArgMatches.html#method.value_source). Minor revocation-on-failed-cleanup remains unchanged because contracts §8 explicitly requires no revocation on failure.
Author
Owner

Committed fixes on self-install: server configuration/dollar quoting in 3e52408, binary ownership/removal in 498b42c667e5278eb9cf83760474de5097438aec. Both commits carry the requested footers. Worktree clean, nothing pushed.

Final targeted checks:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.37s
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.37s
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
systemd-analyze verify agent-user.service: exit 0
systemd-analyze verify server-user.service: exit 0
systemd-analyze verify agent-system.service: exit 0
systemd-analyze verify server-system.service: exit 0
systemd-analyze verify server-dollar.service: exit 0
authorized_keys final cmp exit 0

Ignored real checks:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 29.65s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 37.63s

The real infraternal-agent install test executes key SSH and network-only SSH; network pass now co-installs an inert server unit and proves successful removal retains the real shared executable and linger while removing ownership records, then uses the product server uninstall for last-service cleanup. Baseline Rust binary-removal regression failed with server lost its executable; fixed regressions include a real permission-denied cleanup followed by retry and no-op repeated removal. Adjacent server drop-ins and unsupported command/relative/global flags fail before writes instead of guessing the effective database. Clippy with -D warnings passed. No new hot path or performance claims.

Final gate currently running: INFRATERNAL_VERIFY_RUN_ID=self-install-fix scripts/verify fast. No merge gate. Evidence retained under /mnt/hdd/infraternal/jobs/self-install-fix/verification.

Committed fixes on `self-install`: server configuration/dollar quoting in `3e52408`, binary ownership/removal in `498b42c667e5278eb9cf83760474de5097438aec`. Both commits carry the requested footers. Worktree clean, nothing pushed. Final targeted checks: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.37s test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.37s test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s systemd-analyze verify agent-user.service: exit 0 systemd-analyze verify server-user.service: exit 0 systemd-analyze verify agent-system.service: exit 0 systemd-analyze verify server-system.service: exit 0 systemd-analyze verify server-dollar.service: exit 0 authorized_keys final cmp exit 0 ``` Ignored real checks: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 29.65s test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 37.63s ``` The real infraternal-agent install test executes key SSH and network-only SSH; network pass now co-installs an inert server unit and proves successful removal retains the real shared executable and linger while removing ownership records, then uses the product server uninstall for last-service cleanup. Baseline Rust binary-removal regression failed with `server lost its executable`; fixed regressions include a real permission-denied cleanup followed by retry and no-op repeated removal. Adjacent server drop-ins and unsupported command/relative/global flags fail before writes instead of guessing the effective database. Clippy with `-D warnings` passed. No new hot path or performance claims. Final gate currently running: `INFRATERNAL_VERIFY_RUN_ID=self-install-fix scripts/verify fast`. No merge gate. Evidence retained under `/mnt/hdd/infraternal/jobs/self-install-fix/verification`.
Author
Owner

Head: 498b42c667e5278eb9cf83760474de5097438aec. Branch self-install; base bc828c8b3cde57c2f7f3533131039d22f6cf1eb1. Two commits, 3e52408 (server configuration and directive quoting) and 498b42c (binary ownership and cleanup), with the requested Co-Authored-By and Claude-Session footers. Nothing pushed; no merge gate.

  1. Major: server upgrades reset the database and settings. The installer reads the existing unit, merges only explicitly supplied CLI values (including explicit default values and --with-agent), preserves other service directives, and reuses the saved database record when the unit is absent. Dry-run shows removed/added command lines and the proposed unit, redacting environment/credential values. Unsupported commands, flags, relative paths, global CLI flags and adjacent drop-ins fail before writes. Database changes retain operator sandbox allowances; no absent flag silently resets the installation. Tests: server_upgrade_preserves_configured_flags_and_service_settings, server_upgrade_changes_only_explicit_flags_including_default_values, server_upgrade_refuses_unsupported_existing_command_before_writes, server_reinstall_reuses_database_record_when_unit_is_absent, and server_upgrade_refuses_adjacent_dropins_before_writes. The first three failed against the original implementation; all pass after the fix. Unit preservation coverage is CLI dry-run in an isolated home, not a live custom-database server upgrade.

  2. Minor: dollar signs were doubled in ReadWritePaths. A shared directive-specific path quoting helper retains literal dollars, while command-line quoting continues to double them. The installer also corrects the old generated dollar directive during reruns without discarding extra operator allowances. Test: server_database_dollar_path_is_literal_in_the_sandbox_directive; all five actual CLI-rendered user/system/dollar fixtures passed systemd-analyze verify. Directive behavior was checked in the primary systemd.service and systemd.exec documentation. Explicit flag provenance uses the official clap ArgMatches docs; adjacent drop-in handling follows systemd.unit.

  3. Minor left unchanged: revocation on cleanup failure conflicts with contracts §8 and the operator guide. Failed remote cleanup still keeps the identity live and the job removable/retryable; successful cleanup revokes it. This report does not claim the conflicting revocation-on-failure criterion passes. Changing it requires an owner decision and corresponding contract change.

  4. Major: SSH removal retries deleted the executable needed by a co-installed server. Bootstrap now records binary ownership per install id before upload. Self-uninstall and fallback cleanup preserve the executable while a server unit exists, including a dangling symlink, and do not delete an executable with missing/mismatched ownership. Delegation to an older executable is refused without a matching ownership record. Partial cleanup retains both ownership records for retries; after verified cleanup, matching records are released even when the shared executable stays for the server. Direct CLI plans/removal and static server logs explain retained binaries without logging remote output. Tests: removal_retry_keeps_a_coinstalled_server_binary (real permission-denied cleanup, then retry and repeated removal), removal_keeps_a_binary_without_matching_installation_ownership (unknown owner plus installed-unit refusal), and standalone_uninstall_requires_binary_ownership_and_preserves_server_symlinks. The baseline Rust retry test failed with server lost its executable; the baseline production filesystem script also deleted the binary while leaving the server unit. The ignored rootless_install_trust_inventory_and_remove_over_real_sshd test runs key authentication and network-only SSH; the network pass now seeds a co-installed inert server unit and proves real delegated uninstall retains the compiled binary and linger, releases bootstrap ownership, and then converges through product server uninstall. No server service is launched by that coexistence fixture.

Final targeted test and fixture output:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.37s
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.37s
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
systemd-analyze verify agent-user.service: exit 0
systemd-analyze verify server-user.service: exit 0
systemd-analyze verify agent-system.service: exit 0
systemd-analyze verify server-system.service: exit 0
systemd-analyze verify server-dollar.service: exit 0
authorized_keys final cmp exit 0

Ignored real checks:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 29.65s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 37.63s

cargo test -p infraternal-agent systemd also passed (1 test). Final targeted clippy with -D warnings passed. authorized_keys was backed up with sudo -n cp -a, restored with sudo -n cp -a, and compared with sudo -n cmp; restoration and final comparison exited 0. Contents were never printed. The first standalone unit verification fixture needed its temporary user install path redirected to the built executable; after that fixture correction every unit verified. No new runtime hot path, benchmark requirement or performance claim is introduced. The fast gate's notices generator removed an unrelated jiti license entry; the original committed notices were retained because this job changes no dependencies, and its generated diff is retained as evidence.

Final gate: INFRATERNAL_VERIFY_RUN_ID=self-install-fix scripts/verify fast — exit 0, all 19 stages passed. Full logs and generated unit fixtures are retained under verification/ beside this report. No verify merge was run. Worktree is clean; final authorized_keys comparison also exited 0. The low-severity cookie@0.6.0 advisory was report-only.

Gate output quoted verbatim:

WARN load5=15.93 exceeds online CPU count=8; timing-sensitive checks may be delayed
PASS fast: migrations are append-only (0.139s)
PASS fast: workspace package dependencies (0.220s)
PASS fast: gate target-directory and launch diagnostics tests (0.291s)
PASS fast: JavaScript dependencies (0.029s)
PASS fast: advisory review policy tests (0.106s)
SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows
SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2
SUPPLY_CHAIN_NOTICES generated THIRD_PARTY_NOTICES.md from 81 frontend packages
SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files
SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review
advisories ok
SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data
licenses ok
SUPPLY_CHAIN_RUST_LICENSES passed
bun audit v1.4.2 (744846f84)

cookie@0.6.0
  workspace:@infraternal/web > @sveltejs/kit > cookie
  low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x

1 vulnerability (1 low)

  bun audit fix           upgrade the vulnerable packages within their ranges
  bun audit fix --latest  also cross major versions
SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (4.082s)
PASS fast: build web app (9.944s)
PASS fast: cargo fmt --check (1.345s)
PASS fast: cargo clippy (18.908s)
PASS fast: cargo test (189.198s)
PASS fast: svelte-check (11.940s)
PASS fast: UI package svelte-check (4.757s)
PASS fast: stream package typecheck (4.353s)
PASS fast: Vitest (3.476s)
PASS fast: UI package Vitest (4.166s)
PASS fast: stream package Vitest (0.773s)
PASS fast: OpenAPI and TypeScript client drift (88.288s)
PASS fast: terminal TypeScript (6.404s)
PASS fast: terminal Vitest (3.528s)
Head: `498b42c667e5278eb9cf83760474de5097438aec`. Branch `self-install`; base `bc828c8b3cde57c2f7f3533131039d22f6cf1eb1`. Two commits, `3e52408` (server configuration and directive quoting) and `498b42c` (binary ownership and cleanup), with the requested Co-Authored-By and Claude-Session footers. Nothing pushed; no merge gate. 1. Major: server upgrades reset the database and settings. The installer reads the existing unit, merges only explicitly supplied CLI values (including explicit default values and `--with-agent`), preserves other service directives, and reuses the saved database record when the unit is absent. Dry-run shows removed/added command lines and the proposed unit, redacting environment/credential values. Unsupported commands, flags, relative paths, global CLI flags and adjacent drop-ins fail before writes. Database changes retain operator sandbox allowances; no absent flag silently resets the installation. Tests: `server_upgrade_preserves_configured_flags_and_service_settings`, `server_upgrade_changes_only_explicit_flags_including_default_values`, `server_upgrade_refuses_unsupported_existing_command_before_writes`, `server_reinstall_reuses_database_record_when_unit_is_absent`, and `server_upgrade_refuses_adjacent_dropins_before_writes`. The first three failed against the original implementation; all pass after the fix. Unit preservation coverage is CLI dry-run in an isolated home, not a live custom-database server upgrade. 2. Minor: dollar signs were doubled in `ReadWritePaths`. A shared directive-specific path quoting helper retains literal dollars, while command-line quoting continues to double them. The installer also corrects the old generated dollar directive during reruns without discarding extra operator allowances. Test: `server_database_dollar_path_is_literal_in_the_sandbox_directive`; all five actual CLI-rendered user/system/dollar fixtures passed `systemd-analyze verify`. Directive behavior was checked in the primary [systemd.service](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.service.xml) and [systemd.exec](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.exec.xml) documentation. Explicit flag provenance uses the official [clap ArgMatches docs](https://docs.rs/clap/latest/clap/struct.ArgMatches.html#method.value_source); adjacent drop-in handling follows [systemd.unit](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.unit.xml). 3. Minor left unchanged: revocation on cleanup failure conflicts with contracts §8 and the operator guide. Failed remote cleanup still keeps the identity live and the job removable/retryable; successful cleanup revokes it. This report does not claim the conflicting revocation-on-failure criterion passes. Changing it requires an owner decision and corresponding contract change. 4. Major: SSH removal retries deleted the executable needed by a co-installed server. Bootstrap now records binary ownership per install id before upload. Self-uninstall and fallback cleanup preserve the executable while a server unit exists, including a dangling symlink, and do not delete an executable with missing/mismatched ownership. Delegation to an older executable is refused without a matching ownership record. Partial cleanup retains both ownership records for retries; after verified cleanup, matching records are released even when the shared executable stays for the server. Direct CLI plans/removal and static server logs explain retained binaries without logging remote output. Tests: `removal_retry_keeps_a_coinstalled_server_binary` (real permission-denied cleanup, then retry and repeated removal), `removal_keeps_a_binary_without_matching_installation_ownership` (unknown owner plus installed-unit refusal), and `standalone_uninstall_requires_binary_ownership_and_preserves_server_symlinks`. The baseline Rust retry test failed with `server lost its executable`; the baseline production filesystem script also deleted the binary while leaving the server unit. The ignored `rootless_install_trust_inventory_and_remove_over_real_sshd` test runs key authentication and network-only SSH; the network pass now seeds a co-installed inert server unit and proves real delegated uninstall retains the compiled binary and linger, releases bootstrap ownership, and then converges through product server uninstall. No server service is launched by that coexistence fixture. Final targeted test and fixture output: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.37s test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.37s test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s systemd-analyze verify agent-user.service: exit 0 systemd-analyze verify server-user.service: exit 0 systemd-analyze verify agent-system.service: exit 0 systemd-analyze verify server-system.service: exit 0 systemd-analyze verify server-dollar.service: exit 0 authorized_keys final cmp exit 0 ``` Ignored real checks: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 29.65s test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 37.63s ``` `cargo test -p infraternal-agent systemd` also passed (1 test). Final targeted clippy with `-D warnings` passed. `authorized_keys` was backed up with `sudo -n cp -a`, restored with `sudo -n cp -a`, and compared with `sudo -n cmp`; restoration and final comparison exited 0. Contents were never printed. The first standalone unit verification fixture needed its temporary user install path redirected to the built executable; after that fixture correction every unit verified. No new runtime hot path, benchmark requirement or performance claim is introduced. The fast gate's notices generator removed an unrelated jiti license entry; the original committed notices were retained because this job changes no dependencies, and its generated diff is retained as evidence. Final gate: `INFRATERNAL_VERIFY_RUN_ID=self-install-fix scripts/verify fast` — exit 0, all 19 stages passed. Full logs and generated unit fixtures are retained under `verification/` beside this report. No `verify merge` was run. Worktree is clean; final authorized_keys comparison also exited 0. The low-severity cookie@0.6.0 advisory was report-only. Gate output quoted verbatim: ```text WARN load5=15.93 exceeds online CPU count=8; timing-sensitive checks may be delayed PASS fast: migrations are append-only (0.139s) PASS fast: workspace package dependencies (0.220s) PASS fast: gate target-directory and launch diagnostics tests (0.291s) PASS fast: JavaScript dependencies (0.029s) PASS fast: advisory review policy tests (0.106s) SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2 SUPPLY_CHAIN_NOTICES generated THIRD_PARTY_NOTICES.md from 81 frontend packages SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review advisories ok SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data licenses ok SUPPLY_CHAIN_RUST_LICENSES passed bun audit v1.4.2 (744846f84) cookie@0.6.0 workspace:@infraternal/web > @sveltejs/kit > cookie low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x 1 vulnerability (1 low) bun audit fix upgrade the vulnerable packages within their ranges bun audit fix --latest also cross major versions SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (4.082s) PASS fast: build web app (9.944s) PASS fast: cargo fmt --check (1.345s) PASS fast: cargo clippy (18.908s) PASS fast: cargo test (189.198s) PASS fast: svelte-check (11.940s) PASS fast: UI package svelte-check (4.757s) PASS fast: stream package typecheck (4.353s) PASS fast: Vitest (3.476s) PASS fast: UI package Vitest (4.166s) PASS fast: stream package Vitest (0.773s) PASS fast: OpenAPI and TypeScript client drift (88.288s) PASS fast: terminal TypeScript (6.404s) PASS fast: terminal Vitest (3.528s) ```
Author
Owner

Starting targeted independent re-review at detached HEAD 498b42c667e5278eb9cf83760474de5097438aec, base bc828c8b3cde57c2f7f3533131039d22f6cf1eb1. Scope: both prior majors, regression tests, install tests including ignored real SSH checks, and systemd-analyze verify. Read-only source review; no commits, pushes, release builds or verify merge. SSH authorized_keys will be backed up and restored with cp -a and compared.

Starting targeted independent re-review at detached HEAD `498b42c667e5278eb9cf83760474de5097438aec`, base `bc828c8b3cde57c2f7f3533131039d22f6cf1eb1`. Scope: both prior majors, regression tests, install tests including ignored real SSH checks, and systemd-analyze verify. Read-only source review; no commits, pushes, release builds or verify merge. SSH authorized_keys will be backed up and restored with cp -a and compared.
Author
Owner

Diff inspection at 498b42c confirms saved server arguments are parsed and merged before writes, and binary ownership/server-unit checks apply to delegated uninstall, fallback cleanup, and post-cleanup verification. Regression tests seed every configured server argument; cleanup retry injects a real permission failure and asserts the marker and shared executable survive, then retries twice. Install verification is still running using debug+sccache; final verdict awaits actual output. No blocker or major identified so far. Cleanup-failure revocation remains the contract-defined deferred owner decision.

Diff inspection at `498b42c` confirms saved server arguments are parsed and merged before writes, and binary ownership/server-unit checks apply to delegated uninstall, fallback cleanup, and post-cleanup verification. Regression tests seed every configured server argument; cleanup retry injects a real permission failure and asserts the marker and shared executable survive, then retries twice. Install verification is still running using debug+sccache; final verdict awaits actual output. No blocker or major identified so far. Cleanup-failure revocation remains the contract-defined deferred owner decision.
Author
Owner

New major found at 498b42c: plan_unit_line (crates/infraternal/src/self_install.rs:1068–1082) redacts only physical lines whose own key is Environment/SetCredential/SetCredentialEncrypted. The dry-run renderer (1233–1253) prints continuation lines unchanged. A systemd-valid multiline Environment directive verified with exit 0, and server install --user --dry-run exited 0 while printing the continuation placeholder. Only inert review placeholders were used; no actual secret was accessed or printed. Evidence: check-redaction.py, redaction-original.service, redaction-plan.txt. Primary systemd documentation explicitly permits continued directives: https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.syntax.xml . Existing secret-valued continued environment/credential directives can therefore enter captured CLI logs during the recommended upgrade dry-run. This is introduced by preserving and printing existing unit contents; it violates CLAUDE.md’s prohibition on printing credentials. Redact complete logical directives including continuations (and their comments), or refuse these directives before rendering; add placeholder regression coverage. Both original majors independently reproduce as fixed in check-fixtures.py; all five generated units verify. Final tests still running. Verdict will be do not merge because of this new major.

New major found at `498b42c`: `plan_unit_line` (`crates/infraternal/src/self_install.rs:1068–1082`) redacts only physical lines whose own key is Environment/SetCredential/SetCredentialEncrypted. The dry-run renderer (1233–1253) prints continuation lines unchanged. A systemd-valid multiline Environment directive verified with exit 0, and `server install --user --dry-run` exited 0 while printing the continuation placeholder. Only inert review placeholders were used; no actual secret was accessed or printed. Evidence: `check-redaction.py`, `redaction-original.service`, `redaction-plan.txt`. Primary systemd documentation explicitly permits continued directives: https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.syntax.xml . Existing secret-valued continued environment/credential directives can therefore enter captured CLI logs during the recommended upgrade dry-run. This is introduced by preserving and printing existing unit contents; it violates CLAUDE.md’s prohibition on printing credentials. Redact complete logical directives including continuations (and their comments), or refuse these directives before rendering; add placeholder regression coverage. Both original majors independently reproduce as fixed in `check-fixtures.py`; all five generated units verify. Final tests still running. Verdict will be do not merge because of this new major.
Author
Owner

Verdict: do not merge.

Targeted independent re-review of bc828c8..498b42c, detached HEAD 498b42c667e5278eb9cf83760474de5097438aec, issue #72. Both original majors are resolved. One new major blocks merge. Source review is read-only; author statements were treated as claims and checked against the diff, tests and independent fixtures.

  1. Major — upgrade dry-run discloses continued environment/credential values. crates/infraternal/src/self_install.rs:1070 redacts only a physical line whose own key is Environment, SetCredential or SetCredentialEncrypted. The new existing-unit renderer at lines 1233–1253 prints every following physical line separately, so a value on a continuation line is printed unchanged. A valid existing server unit containing Environment="REVIEW_PLACEHOLDER=first" \ followed by a second environment assignment with an inert sentinel passed systemd-analyze verify; server install --user --dry-run succeeded and exposed that sentinel in stdout. No actual credentials were used. See check-redaction.py, redaction-original.service and redaction-plan.txt beside this report. This is new behavior: the previous installer printed its generated unit, while the fix prints the operator's existing directives. The documented upgrade dry-run can now copy secret environment/credential values into captured CLI output, violating the operating contract's no-credential-output rule. Redact entire logical directives, including continuations across comment lines, or refuse unsupported sensitive directive syntax before rendering. Add inert-placeholder regression coverage proving that continued values never enter either the proposed unit display or diff. Systemd explicitly joins backslash-continued lines and ignores intervening comment blocks: official systemd.syntax source.

  2. Resolved — server upgrades reset configuration. The existing unit is parsed at self_install.rs:925, explicit CLI provenance controls the merge at line 1016, and configuration resolution finishes at line 1120 before any write at line 1257. Database record fallback covers a missing unit. Unfamiliar saved commands/flags, relative saved paths and adjacent drop-ins refuse the upgrade. Operator directives are preserved. The CLI integration regressions seed a custom database (including escaped dollars/percent and spaces), every saved server flag and custom service settings; omission must retain these, while explicit defaults/--with-agent override only their selected fields. Unsupported-command and adjacent-drop-in cases must fail without changing the fixture. These assertions exercise the original reset: its unconditional default resolution could not produce the expected saved arguments. My independent fixture generated a custom unit through the compiled CLI, then upgraded with no flags and confirmed retained database/listener/origin/local infraternal agent selection and operator directives. Dry-run and installation use the same merged unit and database value. This is rendering/configuration-path coverage, not a live custom-database server restart.

  3. Resolved — SSH removal retries delete the co-installed server binary. install_bootstrap.rs:698–761 preserves the executable for a server unit, including a dangling symlink, in both fallback deletion and post-uninstall checks. It only deletes a matching owned executable and releases matching records after verifying cleanup. Delegated self-uninstall applies the same server and ownership checks (self_install.rs:738–759). removal_retry_keeps_a_coinstalled_server_binary executes the production script with a real permission-denied directory, checks both ownership records and the executable after failure, restores permissions, then repeats removal twice. The ownership regression tests additionally retain unowned/mismatched binaries and refuse unsafe delegation. My independent fixture exercised that failure/retry with the real compiled executable; the current script retained it and released both records. Running the baseline script against the same isolated shared-server retry fixture deleted the executable while leaving the server unit, independently confirming the original failure. The ignored real CLI test also covers delegated uninstall with a co-installed inert server unit, retention of the real executable and linger, and release of bootstrap ownership. No co-installed server service was started.

Non-blocking owner recommendation — cleanup failure and revocation. The retained behavior matches contracts §8: cleanup failure leaves the identity valid, records no terminal removal, and permits convergent cleanup retry. This avoids turning a still-installed infraternal agent into a service repeatedly restarting with a refused identity, but also leaves its authenticated tunnel available until cleanup succeeds. Keep this contract for this change; the owner should decide separately whether explicit emergency revocation should be available while retaining a retryable cleanup job. Bootstrap SSH credentials and certificate identity are separate, so that decision can preserve SSH cleanup retry. This is a deferred policy choice, not a blocker or an asserted revocation-on-failure test pass.

The previous dollar-path minor is also fixed: filesystem directive quoting preserves a literal dollar while ExecStart escapes it. The dedicated regression passes, and the actual CLI-generated dollar-path unit verifies. Official systemd.service expansion rules, filesystem directive documentation, and clap value_source documentation support the reviewed quoting and explicit-override semantics.

Verification evidence follows. No runtime hot path was added; no performance measurements are claimed. No source changes, commits, pushes, release builds or verify merge.

All six targeted test commands exited 0. Debug/test builds used RUSTC_WRAPPER=/home/kayg/.local/bin/sccache, SCCACHE_DIR=/mnt/hdd/infraternal/sccache, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, CARGO_INCREMENTAL=0, and dedicated CARGO_TARGET_DIR=/home/kayg/.cache/infraternal-targets/rereview-self-install. This fresh worktree needed bun install --frozen-lockfile and scripts/build-web to populate embedded assets; both succeeded. The Rust builds used the unoptimized debug/test profiles.

cargo test -p infraternal-server install — exit 0, server-install.log:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.57s

cargo test -p infraternal-server install -- --ignored — exit 0, server-install-ignored.log:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 21.78s

cargo test -p infraternal --bin infraternal install — exit 0, cli-install.log:

test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.36s

cargo test -p infraternal --test self_install — exit 0, cli-self-install.log:

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s

cargo test -p infraternal --test agent_install -- --ignored — exit 0, cli-agent-install-ignored.log:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 32.04s

cargo test -p infraternal-agent systemd — exit 0, unit-generator.log:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s

Independent CLI-generated unit verification and regression fixtures (check-fixtures.py, check-redaction.py, fixtures.log):

systemd-analyze verify agent-user.service: exit 0
systemd-analyze verify server-user.service: exit 0
systemd-analyze verify agent-system.service: exit 0
systemd-analyze verify server-system.service: exit 0
systemd-analyze verify server-dollar.service: exit 0
Upgrade fixture: saved custom database/listener/origin/local infraternal agent selection and operator directives preserved; source files unchanged.
Current cleanup fixture: real permission failure retains ownership and binary; retry and repeated cleanup preserve co-installed server executable and release both records.
Baseline cleanup fixture: identical shared-server retry deletes real executable, confirming the original failure.
Multiline Environment fixture: systemd-analyze verify exit 0; dry-run exit 0; continuation placeholder exposed=True

The ignored CLI test runs both OpenSSH key authentication against 127.0.0.1:2222 and a real loopback russh SSH server accepting network-style SSH none authentication, using the compiled binary and sshtarget user manager. It is not a live NetBird/Tailscale peer. User/system unit fixtures were obtained independently from CLI dry-run; only ExecStart binary paths were redirected to the built executable for verify. No service manager was mocked in the removal fixture.

SSH authorized_keys was backed up before tests with sudo -n cp -a, restored with sudo -n cp -a, and checked with sudo -n cmp. No key contents were printed. Actual final restoration output:

authorized_keys restore exit 0; cmp exit 0

Final HEAD remains 498b42c667e5278eb9cf83760474de5097438aec; /usr/bin/git status --short is empty. No source edits or commits. Issue #72 contains the start, findings and finish evidence; no issue was closed.

Verdict: **do not merge**. Targeted independent re-review of `bc828c8..498b42c`, detached HEAD `498b42c667e5278eb9cf83760474de5097438aec`, issue #72. Both original majors are resolved. One new major blocks merge. Source review is read-only; author statements were treated as claims and checked against the diff, tests and independent fixtures. 1. **Major — upgrade dry-run discloses continued environment/credential values.** `crates/infraternal/src/self_install.rs:1070` redacts only a physical line whose own key is `Environment`, `SetCredential` or `SetCredentialEncrypted`. The new existing-unit renderer at lines 1233–1253 prints every following physical line separately, so a value on a continuation line is printed unchanged. A valid existing server unit containing `Environment="REVIEW_PLACEHOLDER=first" \` followed by a second environment assignment with an inert sentinel passed `systemd-analyze verify`; `server install --user --dry-run` succeeded and exposed that sentinel in stdout. No actual credentials were used. See `check-redaction.py`, `redaction-original.service` and `redaction-plan.txt` beside this report. This is new behavior: the previous installer printed its generated unit, while the fix prints the operator's existing directives. The documented upgrade dry-run can now copy secret environment/credential values into captured CLI output, violating the operating contract's no-credential-output rule. Redact entire logical directives, including continuations across comment lines, or refuse unsupported sensitive directive syntax before rendering. Add inert-placeholder regression coverage proving that continued values never enter either the proposed unit display or diff. Systemd explicitly joins backslash-continued lines and ignores intervening comment blocks: [official systemd.syntax source](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.syntax.xml). 2. **Resolved — server upgrades reset configuration.** The existing unit is parsed at `self_install.rs:925`, explicit CLI provenance controls the merge at line 1016, and configuration resolution finishes at line 1120 before any write at line 1257. Database record fallback covers a missing unit. Unfamiliar saved commands/flags, relative saved paths and adjacent drop-ins refuse the upgrade. Operator directives are preserved. The CLI integration regressions seed a custom database (including escaped dollars/percent and spaces), every saved server flag and custom service settings; omission must retain these, while explicit defaults/`--with-agent` override only their selected fields. Unsupported-command and adjacent-drop-in cases must fail without changing the fixture. These assertions exercise the original reset: its unconditional default resolution could not produce the expected saved arguments. My independent fixture generated a custom unit through the compiled CLI, then upgraded with no flags and confirmed retained database/listener/origin/local infraternal agent selection and operator directives. Dry-run and installation use the same merged unit and database value. This is rendering/configuration-path coverage, not a live custom-database server restart. 3. **Resolved — SSH removal retries delete the co-installed server binary.** `install_bootstrap.rs:698–761` preserves the executable for a server unit, including a dangling symlink, in both fallback deletion and post-uninstall checks. It only deletes a matching owned executable and releases matching records after verifying cleanup. Delegated self-uninstall applies the same server and ownership checks (`self_install.rs:738–759`). `removal_retry_keeps_a_coinstalled_server_binary` executes the production script with a real permission-denied directory, checks both ownership records and the executable after failure, restores permissions, then repeats removal twice. The ownership regression tests additionally retain unowned/mismatched binaries and refuse unsafe delegation. My independent fixture exercised that failure/retry with the real compiled executable; the current script retained it and released both records. Running the baseline script against the same isolated shared-server retry fixture deleted the executable while leaving the server unit, independently confirming the original failure. The ignored real CLI test also covers delegated uninstall with a co-installed inert server unit, retention of the real executable and linger, and release of bootstrap ownership. No co-installed server service was started. **Non-blocking owner recommendation — cleanup failure and revocation.** The retained behavior matches contracts §8: cleanup failure leaves the identity valid, records no terminal removal, and permits convergent cleanup retry. This avoids turning a still-installed infraternal agent into a service repeatedly restarting with a refused identity, but also leaves its authenticated tunnel available until cleanup succeeds. Keep this contract for this change; the owner should decide separately whether explicit emergency revocation should be available while retaining a retryable cleanup job. Bootstrap SSH credentials and certificate identity are separate, so that decision can preserve SSH cleanup retry. This is a deferred policy choice, not a blocker or an asserted revocation-on-failure test pass. The previous dollar-path minor is also fixed: filesystem directive quoting preserves a literal dollar while ExecStart escapes it. The dedicated regression passes, and the actual CLI-generated dollar-path unit verifies. [Official systemd.service expansion rules](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.service.xml), [filesystem directive documentation](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.exec.xml), and [clap value_source documentation](https://docs.rs/clap/latest/clap/struct.ArgMatches.html#method.value_source) support the reviewed quoting and explicit-override semantics. Verification evidence follows. No runtime hot path was added; no performance measurements are claimed. No source changes, commits, pushes, release builds or `verify merge`. All six targeted test commands exited 0. Debug/test builds used `RUSTC_WRAPPER=/home/kayg/.local/bin/sccache`, `SCCACHE_DIR=/mnt/hdd/infraternal/sccache`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, `CARGO_INCREMENTAL=0`, and dedicated `CARGO_TARGET_DIR=/home/kayg/.cache/infraternal-targets/rereview-self-install`. This fresh worktree needed `bun install --frozen-lockfile` and `scripts/build-web` to populate embedded assets; both succeeded. The Rust builds used the unoptimized debug/test profiles. `cargo test -p infraternal-server install` — exit 0, `server-install.log`: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.57s ``` `cargo test -p infraternal-server install -- --ignored` — exit 0, `server-install-ignored.log`: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 21.78s ``` `cargo test -p infraternal --bin infraternal install` — exit 0, `cli-install.log`: ```text test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.36s ``` `cargo test -p infraternal --test self_install` — exit 0, `cli-self-install.log`: ```text test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s ``` `cargo test -p infraternal --test agent_install -- --ignored` — exit 0, `cli-agent-install-ignored.log`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 32.04s ``` `cargo test -p infraternal-agent systemd` — exit 0, `unit-generator.log`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s ``` Independent CLI-generated unit verification and regression fixtures (`check-fixtures.py`, `check-redaction.py`, `fixtures.log`): ```text systemd-analyze verify agent-user.service: exit 0 systemd-analyze verify server-user.service: exit 0 systemd-analyze verify agent-system.service: exit 0 systemd-analyze verify server-system.service: exit 0 systemd-analyze verify server-dollar.service: exit 0 Upgrade fixture: saved custom database/listener/origin/local infraternal agent selection and operator directives preserved; source files unchanged. Current cleanup fixture: real permission failure retains ownership and binary; retry and repeated cleanup preserve co-installed server executable and release both records. Baseline cleanup fixture: identical shared-server retry deletes real executable, confirming the original failure. Multiline Environment fixture: systemd-analyze verify exit 0; dry-run exit 0; continuation placeholder exposed=True ``` The ignored CLI test runs both OpenSSH key authentication against 127.0.0.1:2222 and a real loopback russh SSH server accepting network-style SSH none authentication, using the compiled binary and sshtarget user manager. It is not a live NetBird/Tailscale peer. User/system unit fixtures were obtained independently from CLI dry-run; only ExecStart binary paths were redirected to the built executable for verify. No service manager was mocked in the removal fixture. SSH authorized_keys was backed up before tests with `sudo -n cp -a`, restored with `sudo -n cp -a`, and checked with `sudo -n cmp`. No key contents were printed. Actual final restoration output: ```text authorized_keys restore exit 0; cmp exit 0 ``` Final HEAD remains `498b42c667e5278eb9cf83760474de5097438aec`; `/usr/bin/git status --short` is empty. No source edits or commits. Issue #72 contains the start, findings and finish evidence; no issue was closed.
Author
Owner

Starting self-install-fix2: branch self-install, base HEAD 498b42c667e5278eb9cf83760474de5097438aec. Read the complete re-review. Scope: systemd logical directive parsing and shared value-free upgrade output; preserve raw directives, add regressions, rerun install/real tests with authorized_keys backup/restore, systemd verification, and INFRATERNAL_VERIFY_RUN_ID=self-install-fix2 scripts/verify fast. No merge gate or push.

Starting self-install-fix2: branch `self-install`, base HEAD `498b42c667e5278eb9cf83760474de5097438aec`. Read the complete re-review. Scope: systemd logical directive parsing and shared value-free upgrade output; preserve raw directives, add regressions, rerun install/real tests with authorized_keys backup/restore, systemd verification, and `INFRATERNAL_VERIFY_RUN_ID=self-install-fix2 scripts/verify fast`. No merge gate or push.
Author
Owner

Confirmed the re-review cause: physical-line rendering disclosed continued values. Shared logical-line parsing now joins odd trailing backslashes before quoting, skips comment blocks, retains raw spans, and handles whole-item quoting/C escapes (systemd.syntax(7): https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.syntax.xml; parity/blank-line behavior: https://raw.githubusercontent.com/systemd/systemd/main/src/shared/conf-parser.c). Both unit plan/diff paths emit only sensitive directive keys and status, covering EnvironmentFile and all Credential directives too; no referenced file is read. The managed infraternal agent endpoint output reports presence only. Added preservation/output/error regressions and extended the existing real reinstall test with byte-for-byte continued Environment preservation. No runtime hot path. Review contains no cheap outstanding minors; emergency-revocation policy stays deferred. Tests are in progress.

Confirmed the re-review cause: physical-line rendering disclosed continued values. Shared logical-line parsing now joins odd trailing backslashes before quoting, skips comment blocks, retains raw spans, and handles whole-item quoting/C escapes (systemd.syntax(7): https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.syntax.xml; parity/blank-line behavior: https://raw.githubusercontent.com/systemd/systemd/main/src/shared/conf-parser.c). Both unit plan/diff paths emit only sensitive directive keys and status, covering EnvironmentFile and all Credential directives too; no referenced file is read. The managed infraternal agent endpoint output reports presence only. Added preservation/output/error regressions and extended the existing real reinstall test with byte-for-byte continued Environment preservation. No runtime hot path. Review contains no cheap outstanding minors; emergency-revocation policy stays deferred. Tests are in progress.
Author
Owner

Fix committed: 7083ac9055453e3493a8e351ab8592e6646d3c03. All targeted commands exited 0. Real reinstall retained the entire modified unit byte-for-byte, including the inert multiline Environment directive. Four generated user/system units and the continued sensitive-directive fixture passed systemd-analyze verify (tests invoke the real executable; fixture additionally requires no diagnostic output). Parser/redaction regression coverage includes continuation comment gaps, quoting/C escapes, backslash parity, duplicate/reset changes and continued values resembling ExecStart. No runtime hot path changed.

cargo test -p infraternal-server install:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 7.39s

cargo test -p infraternal-server install -- --ignored:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 23.03s

cargo test -p infraternal --bin infraternal install:

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.31s

cargo test -p infraternal --test self_install:

test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.19s

cargo test -p infraternal --test agent_install -- --ignored:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 37.98s

cargo test -p infraternal-agent systemd:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s
authorized_keys restore exit 0; cmp exit 0

Final INFRATERNAL_VERIFY_RUN_ID=self-install-fix2 scripts/verify fast is running. No merge gate and no push.

Fix committed: `7083ac9055453e3493a8e351ab8592e6646d3c03`. All targeted commands exited 0. Real reinstall retained the entire modified unit byte-for-byte, including the inert multiline Environment directive. Four generated user/system units and the continued sensitive-directive fixture passed systemd-analyze verify (tests invoke the real executable; fixture additionally requires no diagnostic output). Parser/redaction regression coverage includes continuation comment gaps, quoting/C escapes, backslash parity, duplicate/reset changes and continued values resembling ExecStart. No runtime hot path changed. `cargo test -p infraternal-server install`: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 7.39s ``` `cargo test -p infraternal-server install -- --ignored`: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 23.03s ``` `cargo test -p infraternal --bin infraternal install`: ```text test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.31s ``` `cargo test -p infraternal --test self_install`: ```text test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.19s ``` `cargo test -p infraternal --test agent_install -- --ignored`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 37.98s ``` `cargo test -p infraternal-agent systemd`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s ``` ```text authorized_keys restore exit 0; cmp exit 0 ``` Final `INFRATERNAL_VERIFY_RUN_ID=self-install-fix2 scripts/verify fast` is running. No merge gate and no push.
Author
Owner

First fast attempt stopped at Clippy (exit 101): new doc comments needed Markdown formatting, a redundant closure, equality assertions, and the expanded infraternal agent install function crossed the 100-line lint. Fixed these without weakening diagnostics: shared the full unit presentation boundary and existing-unit reader; sensitive-byte assertions use equality methods so failures cannot print fixture contents. The shared reader retains the server's existing dangling-symlink refusal for both installers; a new CLI regression verifies refusal before writes. cargo clippy --workspace --all-targets -- -D warnings now exits 0. Re-running CLI install and real tests before the final fast attempt. Initial failure output preserved in jobs/self-install-fix2/evidence/verify-fast-first.log and clippy-initial.log.

First fast attempt stopped at Clippy (exit 101): new doc comments needed Markdown formatting, a redundant closure, equality assertions, and the expanded infraternal agent install function crossed the 100-line lint. Fixed these without weakening diagnostics: shared the full unit presentation boundary and existing-unit reader; sensitive-byte assertions use equality methods so failures cannot print fixture contents. The shared reader retains the server's existing dangling-symlink refusal for both installers; a new CLI regression verifies refusal before writes. `cargo clippy --workspace --all-targets -- -D warnings` now exits 0. Re-running CLI install and real tests before the final fast attempt. Initial failure output preserved in `jobs/self-install-fix2/evidence/verify-fast-first.log` and `clippy-initial.log`.
Author
Owner

Completed self-install-fix2 (#72) on branch self-install.

HEAD: 1a733e9eb681fa82617c910d8e39a14140b7264a; base: 498b42c667e5278eb9cf83760474de5097438aec. Worktree clean. Two local commits; neither pushed. Both commit messages include the requested co-author and session trailers.

Both install upgrade plans now parse complete logical systemd directives, including odd trailing-backslash continuations across comments, whole-item quoting and C escapes. Source references: systemd.syntax(7) and systemd's configuration parser. Shared presentation emits only sensitive directive keys and added/removed/changed/unchanged status; Environment, EnvironmentFile, UnsetEnvironment and all Credential directives are covered. Referenced EnvironmentFiles are never opened for the diff. The installer's managed infraternal agent endpoints are displayed only by presence. Unit values and subprocess stderr stay out of install logs and fixed errors.

Upgrade writes retain exact raw directive spans, including continued values and intervening comments. Both installers replace service commands by logical span, preventing continuation values beginning with ExecStart from being mistaken for a command. The real enrolled infraternal agent reinstall regression proves the entire modified unit survives byte-for-byte. Shared inspection refuses dangling operator unit symlinks before writes. DESIGN and code comments document the behavior. No runtime hot path changed; no performance measurements claimed.

All six targeted commands exited 0, with 89 tests passed in total (including five ignored real tests). Exact output:

cargo test -p infraternal-server install:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 7.39s

cargo test -p infraternal-server install -- --ignored:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 20.18s

cargo test -p infraternal --bin infraternal install:

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.42s

cargo test -p infraternal --test self_install:

test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.32s

cargo test -p infraternal --test agent_install -- --ignored:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 31.87s

cargo test -p infraternal-agent systemd:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s

The CLI unit test invokes real systemd-analyze verify for all four generated system/user units. The CLI integration regression verifies the continued sensitive-directive fixture and requires zero diagnostics. All passed. CLI regressions capture stdout and stderr with trace logging, including refusal/error paths, and assert no inert private values appear. Diff coverage includes value-only changes, additions, removals and duplicate/reset changes.

The ignored CLI test runs real OpenSSH on 127.0.0.1:2222 plus a loopback network-style SSH-none server, with the real sshtarget user service. This is not a live NetBird/Tailscale peer. Builds use the supplied unoptimized debug/test profiles and dedicated target directory.

authorized_keys was backed up with sudo -n cp -a, restored with sudo -n cp -a, and compared; after a final successful comparison the private backup was removed. No contents printed:

authorized_keys restore exit 0; cmp exit 0
final authorized_keys cmp exit 0

Final gate: INFRATERNAL_VERIFY_RUN_ID=self-install-fix2 scripts/verify fast — exit 0. Actual output follows verbatim. No merge gate was run. The initial Clippy failure and its fixes remain recorded in the issue and evidence logs. Supply-chain generation temporarily omitted jiti from notices; its transient change was restored to the committed file without changing dependencies.

WARN load5=15.33 exceeds online CPU count=8; timing-sensitive checks may be delayed
PASS fast: migrations are append-only (0.183s)
PASS fast: workspace package dependencies (0.233s)
PASS fast: gate target-directory and launch diagnostics tests (0.292s)
PASS fast: JavaScript dependencies (0.015s)
PASS fast: advisory review policy tests (0.174s)
SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows
SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2
SUPPLY_CHAIN_NOTICES generated THIRD_PARTY_NOTICES.md from 81 frontend packages
SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files
SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review
advisories ok
SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data
licenses ok
SUPPLY_CHAIN_RUST_LICENSES passed
bun audit v1.4.2 (744846f84)

cookie@0.6.0
  workspace:@infraternal/web > @sveltejs/kit > cookie
  low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x

1 vulnerability (1 low)

  bun audit fix           upgrade the vulnerable packages within their ranges
  bun audit fix --latest  also cross major versions
SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (4.305s)
PASS fast: build web app (11.655s)
PASS fast: cargo fmt --check (1.894s)
PASS fast: cargo clippy (25.598s)
PASS fast: cargo test (224.741s)
PASS fast: svelte-check (11.501s)
PASS fast: UI package svelte-check (5.550s)
PASS fast: stream package typecheck (6.984s)
PASS fast: Vitest (7.465s)
PASS fast: UI package Vitest (8.052s)
PASS fast: stream package Vitest (1.985s)
PASS fast: OpenAPI and TypeScript client drift (78.931s)
PASS fast: terminal TypeScript (3.259s)
PASS fast: terminal Vitest (1.617s)

The re-review identified no remaining cheap minors; its separate emergency-revocation policy recommendation stays deferred. Issue #72 remains open.

Completed self-install-fix2 (#72) on branch `self-install`. HEAD: `1a733e9eb681fa82617c910d8e39a14140b7264a`; base: `498b42c667e5278eb9cf83760474de5097438aec`. Worktree clean. Two local commits; neither pushed. Both commit messages include the requested co-author and session trailers. Both install upgrade plans now parse complete logical systemd directives, including odd trailing-backslash continuations across comments, whole-item quoting and C escapes. Source references: [systemd.syntax(7)](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.syntax.xml) and [systemd's configuration parser](https://raw.githubusercontent.com/systemd/systemd/main/src/shared/conf-parser.c). Shared presentation emits only sensitive directive keys and added/removed/changed/unchanged status; Environment, EnvironmentFile, UnsetEnvironment and all Credential directives are covered. Referenced EnvironmentFiles are never opened for the diff. The installer's managed infraternal agent endpoints are displayed only by presence. Unit values and subprocess stderr stay out of install logs and fixed errors. Upgrade writes retain exact raw directive spans, including continued values and intervening comments. Both installers replace service commands by logical span, preventing continuation values beginning with ExecStart from being mistaken for a command. The real enrolled infraternal agent reinstall regression proves the entire modified unit survives byte-for-byte. Shared inspection refuses dangling operator unit symlinks before writes. DESIGN and code comments document the behavior. No runtime hot path changed; no performance measurements claimed. All six targeted commands exited 0, with 89 tests passed in total (including five ignored real tests). Exact output: `cargo test -p infraternal-server install`: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 7.39s ``` `cargo test -p infraternal-server install -- --ignored`: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 20.18s ``` `cargo test -p infraternal --bin infraternal install`: ```text test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.42s ``` `cargo test -p infraternal --test self_install`: ```text test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.32s ``` `cargo test -p infraternal --test agent_install -- --ignored`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 31.87s ``` `cargo test -p infraternal-agent systemd`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s ``` The CLI unit test invokes real `systemd-analyze verify` for all four generated system/user units. The CLI integration regression verifies the continued sensitive-directive fixture and requires zero diagnostics. All passed. CLI regressions capture stdout and stderr with trace logging, including refusal/error paths, and assert no inert private values appear. Diff coverage includes value-only changes, additions, removals and duplicate/reset changes. The ignored CLI test runs real OpenSSH on 127.0.0.1:2222 plus a loopback network-style SSH-none server, with the real sshtarget user service. This is not a live NetBird/Tailscale peer. Builds use the supplied unoptimized debug/test profiles and dedicated target directory. authorized_keys was backed up with `sudo -n cp -a`, restored with `sudo -n cp -a`, and compared; after a final successful comparison the private backup was removed. No contents printed: ```text authorized_keys restore exit 0; cmp exit 0 final authorized_keys cmp exit 0 ``` Final gate: `INFRATERNAL_VERIFY_RUN_ID=self-install-fix2 scripts/verify fast` — exit 0. Actual output follows verbatim. No merge gate was run. The initial Clippy failure and its fixes remain recorded in the issue and evidence logs. Supply-chain generation temporarily omitted jiti from notices; its transient change was restored to the committed file without changing dependencies. ```text WARN load5=15.33 exceeds online CPU count=8; timing-sensitive checks may be delayed PASS fast: migrations are append-only (0.183s) PASS fast: workspace package dependencies (0.233s) PASS fast: gate target-directory and launch diagnostics tests (0.292s) PASS fast: JavaScript dependencies (0.015s) PASS fast: advisory review policy tests (0.174s) SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2 SUPPLY_CHAIN_NOTICES generated THIRD_PARTY_NOTICES.md from 81 frontend packages SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review advisories ok SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data licenses ok SUPPLY_CHAIN_RUST_LICENSES passed bun audit v1.4.2 (744846f84) cookie@0.6.0 workspace:@infraternal/web > @sveltejs/kit > cookie low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x 1 vulnerability (1 low) bun audit fix upgrade the vulnerable packages within their ranges bun audit fix --latest also cross major versions SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (4.305s) PASS fast: build web app (11.655s) PASS fast: cargo fmt --check (1.894s) PASS fast: cargo clippy (25.598s) PASS fast: cargo test (224.741s) PASS fast: svelte-check (11.501s) PASS fast: UI package svelte-check (5.550s) PASS fast: stream package typecheck (6.984s) PASS fast: Vitest (7.465s) PASS fast: UI package Vitest (8.052s) PASS fast: stream package Vitest (1.985s) PASS fast: OpenAPI and TypeScript client drift (78.931s) PASS fast: terminal TypeScript (3.259s) PASS fast: terminal Vitest (1.617s) ``` The re-review identified no remaining cheap minors; its separate emergency-revocation policy recommendation stays deferred. Issue #72 remains open.
Author
Owner

Starting targeted read-only review on detached HEAD 1a733e9eb6, base 498b42c667. Scope: diff 498b42c..1a733e9 only, dry-run logical-directive redaction, byte preservation and refactor regressions. Running targeted install tests with sccache/debug profiles and systemd-analyze verify; no commits, pushes or verify merge.

Starting targeted read-only review on detached HEAD 1a733e9eb681fa82617c910d8e39a14140b7264a, base 498b42c667e5278eb9cf83760474de5097438aec. Scope: diff 498b42c..1a733e9 only, dry-run logical-directive redaction, byte preservation and refactor regressions. Running targeted install tests with sccache/debug profiles and systemd-analyze verify; no commits, pushes or verify merge.
Author
Owner

Major: the shared unit_lines parser still permits sensitive-value disclosure for systemd-valid inputs. It splits only LF (self_install.rs:1059) and strips BOM only when start == 0 (1062). Real systemd-analyze verify accepts all independent fixtures without warnings. With a later BOM preceding Environment/EnvironmentFile, or CR/NUL separators after RestartSec, both compiled CLI dry-runs exit 0 and stdout contains the inert placeholder. The new infraternal agent upgrade also combines ExecStart and a following Environment directive separated by CR: its diff exposes the placeholder and the proposed unit drops that Environment directive. This is a regression from displaying only the generated infraternal agent unit, introduced by this diff's existing-unit preservation. Trace stderr did not expose the placeholders. Evidence: /mnt/hdd/infraternal/jobs/rereview2-self-install/check-fixtures.py, fixtures.log and captured plan logs. No actual credentials used.

Fix the shared parser to match systemd's delimiters and BOM handling, or refuse these forms with fixed diagnostics before presentation/writes; add CLI regressions proving redaction and preservation. Systemd primary sources: https://raw.githubusercontent.com/systemd/systemd/main/src/shared/conf-parser.c and https://raw.githubusercontent.com/systemd/systemd/main/src/basic/fileio.c.

Major: the shared unit_lines parser still permits sensitive-value disclosure for systemd-valid inputs. It splits only LF (self_install.rs:1059) and strips BOM only when start == 0 (1062). Real systemd-analyze verify accepts all independent fixtures without warnings. With a later BOM preceding Environment/EnvironmentFile, or CR/NUL separators after RestartSec, both compiled CLI dry-runs exit 0 and stdout contains the inert placeholder. The new infraternal agent upgrade also combines ExecStart and a following Environment directive separated by CR: its diff exposes the placeholder and the proposed unit drops that Environment directive. This is a regression from displaying only the generated infraternal agent unit, introduced by this diff's existing-unit preservation. Trace stderr did not expose the placeholders. Evidence: /mnt/hdd/infraternal/jobs/rereview2-self-install/check-fixtures.py, fixtures.log and captured plan logs. No actual credentials used. Fix the shared parser to match systemd's delimiters and BOM handling, or refuse these forms with fixed diagnostics before presentation/writes; add CLI regressions proving redaction and preservation. Systemd primary sources: https://raw.githubusercontent.com/systemd/systemd/main/src/shared/conf-parser.c and https://raw.githubusercontent.com/systemd/systemd/main/src/basic/fileio.c.
Author
Owner

Verdict: do not merge.

Targeted read-only review of 498b42c..1a733e9, detached HEAD 1a733e9eb681fa82617c910d8e39a14140b7264a, issue #72. One major blocks. No source edits, commits, pushes, release builds, or verify merge.

  1. Major — systemd-valid separators and later BOM bypass redaction; the infraternal agent upgrade can also discard an environment directive. The new unit_lines at crates/infraternal/src/self_install.rs:1059 splits only LF, and at line 1062 strips a UTF-8 BOM only at the start of the file. Systemd accepts CR and NUL separators as well as LF, and its configuration parser removes the first encountered leading BOM even on a later physical line. Consequently plan_unit_lines at line 1202 and the ordinary-line diff at line 1262 misclassify sensitive directives as ordinary text.

    Independent fixtures passed real systemd-analyze verify with exit 0 and empty stderr. Both compiled installers' dry-runs exposed an inert placeholder when a later BOM preceded Environment or EnvironmentFile, and when CR or NUL separated RestartSec from Environment. CR-only units also expose environment and inline credential values in the infraternal agent plan. With CR separating an infraternal agent ExecStart from Environment, the dry-run diff exposes the environment placeholder and the proposed unit contains no Environment directive: update_installed_unit at line 1339 replaces their combined raw span as one command. Applying that proposal would lose the environment setting. The actual install writes this same proposed string at line 538. No unusual-encoding live service was installed; data loss is established by the actual CLI proposal and write-path source review.

    This is within the reviewed change: infraternal agent installation now retains and displays an existing unit, whereas the base displayed only its generated unit. The server redaction fix also remains incomplete for these inputs. The fixture stdout establishes disclosure; trace stderr remained free of placeholders. Source fixtures remained byte-identical after every dry-run. See check-fixtures.py, fixtures.log, and agent-mixed-command-plan.log beside this report. All values were inert placeholders, never real credentials.

    Match systemd's physical-line delimiters and BOM handling in the shared parser, or refuse unsupported forms with a fixed diagnostic before rendering or writing. Add CLI regressions covering both presentation and directive preservation. Primary sources: systemd configuration parser, systemd line reader.

The original LF continuation disclosure is fixed for the exercised forms. The shared renderer groups continued lines, ignores intervening comments, redacts Environment/EnvironmentFile/UnsetEnvironment and credential keys, and privately compares ordered duplicate/reset values. Independent continued/quoted/comment/reset fixtures expose no placeholders in either stdout or trace stderr. Adjacent server drop-ins refuse before presentation; infraternal agent drop-in values are not read or printed. Parser errors remain fixed diagnostics, and service-manager subprocess stderr is captured rather than included in install errors.

For ordinary supported syntax, the shared-renderer unit test preserves sensitive raw spans byte-for-byte through atomic writes, and the real SSH reinstall regression preserves the entire modified infraternal agent unit byte-for-byte. Both pass. Existing server configuration/explicit override, unsupported-command, drop-in, dangling-link and binary-ownership tests also pass. No additional major was found in the remaining refactor. No runtime hot path was changed; no performance measurements are claimed.

All six requested targeted test commands exited 0. Builds used the supplied sccache preset: RUSTC_WRAPPER=/home/kayg/.local/bin/sccache, SCCACHE_DIR=/mnt/hdd/infraternal/sccache, CARGO_TARGET_DIR=/home/kayg/.cache/infraternal-targets/rereview2-self-install, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, CARGO_INCREMENTAL=0. Rust builds used debug/test profiles. bun install --frozen-lockfile and scripts/build-web succeeded to supply real embedded assets. These are targeted tests, not a full verification-tier pass.

cargo test -p infraternal-server install — exit 0, server-install.log:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 9.42s

cargo test -p infraternal-server install -- --ignored — exit 0, server-install-ignored.log:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 24.46s

cargo test -p infraternal --bin infraternal install — exit 0, cli-install.log:

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.61s

cargo test -p infraternal --test self_install — exit 0, cli-self-install.log:

test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.11s

cargo test -p infraternal --test agent_install -- --ignored — exit 0, cli-agent-install-ignored.log:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 26.66s

cargo test -p infraternal-agent systemd — exit 0, unit-generator.log:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s

Real systemd verification ran in the existing generated_agent_and_server_units_pass_systemd_analyze test against raw generated user/system units for both modes, and in continued_environment_fixture_passes_systemd_analyze_verify. Both tests passed. Independent fixtures also invoked the installed systemd-analyze verify directly; each returned 0 with empty stderr. Actual fixture output:

server/continued: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=False; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=True
server/late-bom: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
server/late-bom-file: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
server/mixed-command: verify exit 0; verify stderr empty=True; dry-run exit 1; stdout contains sentinel=False; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
server/mixed-cr: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
server/nul: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
server/cr-only: verify exit 0; verify stderr empty=True; dry-run exit 1; stdout contains sentinel=False; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
server/drop-in: dry-run exit 1; sentinel exposed=False
agent/continued: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=False; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=True
agent/late-bom: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
agent/late-bom-file: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
agent/mixed-command: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
agent/mixed-cr: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
agent/nul: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
agent/cr-only: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False
agent/drop-in: dry-run exit 0; sentinel exposed=False

The ignored CLI test exercised a real OpenSSH service at 127.0.0.1:2222 and a real loopback SSH server accepting network-style none authentication, enrollment, tunnel/provider readiness, reinstall and removal. It is not a live NetBird/Tailscale peer. The outer runner backed up and restored authorized_keys without displaying its contents, then compared the restored file:

authorized_keys restore exit 0; cmp exit 0

Final HEAD remains 1a733e9eb681fa82617c910d8e39a14140b7264a; tracked worktree status is clean. Findings and finish evidence are recorded in issue #72; the issue remains open.

Verdict: **do not merge**. Targeted read-only review of `498b42c..1a733e9`, detached HEAD `1a733e9eb681fa82617c910d8e39a14140b7264a`, issue #72. One major blocks. No source edits, commits, pushes, release builds, or `verify merge`. 1. **Major — systemd-valid separators and later BOM bypass redaction; the infraternal agent upgrade can also discard an environment directive.** The new `unit_lines` at `crates/infraternal/src/self_install.rs:1059` splits only LF, and at line 1062 strips a UTF-8 BOM only at the start of the file. Systemd accepts CR and NUL separators as well as LF, and its configuration parser removes the first encountered leading BOM even on a later physical line. Consequently `plan_unit_lines` at line 1202 and the ordinary-line diff at line 1262 misclassify sensitive directives as ordinary text. Independent fixtures passed real `systemd-analyze verify` with exit 0 and empty stderr. Both compiled installers' dry-runs exposed an inert placeholder when a later BOM preceded `Environment` or `EnvironmentFile`, and when CR or NUL separated `RestartSec` from `Environment`. CR-only units also expose environment and inline credential values in the infraternal agent plan. With CR separating an infraternal agent `ExecStart` from `Environment`, the dry-run diff exposes the environment placeholder and the proposed unit contains no Environment directive: `update_installed_unit` at line 1339 replaces their combined raw span as one command. Applying that proposal would lose the environment setting. The actual install writes this same proposed string at line 538. No unusual-encoding live service was installed; data loss is established by the actual CLI proposal and write-path source review. This is within the reviewed change: infraternal agent installation now retains and displays an existing unit, whereas the base displayed only its generated unit. The server redaction fix also remains incomplete for these inputs. The fixture stdout establishes disclosure; trace stderr remained free of placeholders. Source fixtures remained byte-identical after every dry-run. See `check-fixtures.py`, `fixtures.log`, and `agent-mixed-command-plan.log` beside this report. All values were inert placeholders, never real credentials. Match systemd's physical-line delimiters and BOM handling in the shared parser, or refuse unsupported forms with a fixed diagnostic before rendering or writing. Add CLI regressions covering both presentation and directive preservation. Primary sources: [systemd configuration parser](https://raw.githubusercontent.com/systemd/systemd/main/src/shared/conf-parser.c), [systemd line reader](https://raw.githubusercontent.com/systemd/systemd/main/src/basic/fileio.c). The original LF continuation disclosure is fixed for the exercised forms. The shared renderer groups continued lines, ignores intervening comments, redacts Environment/EnvironmentFile/UnsetEnvironment and credential keys, and privately compares ordered duplicate/reset values. Independent continued/quoted/comment/reset fixtures expose no placeholders in either stdout or trace stderr. Adjacent server drop-ins refuse before presentation; infraternal agent drop-in values are not read or printed. Parser errors remain fixed diagnostics, and service-manager subprocess stderr is captured rather than included in install errors. For ordinary supported syntax, the shared-renderer unit test preserves sensitive raw spans byte-for-byte through atomic writes, and the real SSH reinstall regression preserves the entire modified infraternal agent unit byte-for-byte. Both pass. Existing server configuration/explicit override, unsupported-command, drop-in, dangling-link and binary-ownership tests also pass. No additional major was found in the remaining refactor. No runtime hot path was changed; no performance measurements are claimed. All six requested targeted test commands exited 0. Builds used the supplied sccache preset: `RUSTC_WRAPPER=/home/kayg/.local/bin/sccache`, `SCCACHE_DIR=/mnt/hdd/infraternal/sccache`, `CARGO_TARGET_DIR=/home/kayg/.cache/infraternal-targets/rereview2-self-install`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, `CARGO_INCREMENTAL=0`. Rust builds used debug/test profiles. `bun install --frozen-lockfile` and `scripts/build-web` succeeded to supply real embedded assets. These are targeted tests, not a full verification-tier pass. `cargo test -p infraternal-server install` — exit 0, `server-install.log`: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 9.42s ``` `cargo test -p infraternal-server install -- --ignored` — exit 0, `server-install-ignored.log`: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 24.46s ``` `cargo test -p infraternal --bin infraternal install` — exit 0, `cli-install.log`: ```text test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.61s ``` `cargo test -p infraternal --test self_install` — exit 0, `cli-self-install.log`: ```text test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.11s ``` `cargo test -p infraternal --test agent_install -- --ignored` — exit 0, `cli-agent-install-ignored.log`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 26.66s ``` `cargo test -p infraternal-agent systemd` — exit 0, `unit-generator.log`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s ``` Real systemd verification ran in the existing `generated_agent_and_server_units_pass_systemd_analyze` test against raw generated user/system units for both modes, and in `continued_environment_fixture_passes_systemd_analyze_verify`. Both tests passed. Independent fixtures also invoked the installed `systemd-analyze verify` directly; each returned 0 with empty stderr. Actual fixture output: ```text server/continued: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=False; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=True server/late-bom: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False server/late-bom-file: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False server/mixed-command: verify exit 0; verify stderr empty=True; dry-run exit 1; stdout contains sentinel=False; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False server/mixed-cr: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False server/nul: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False server/cr-only: verify exit 0; verify stderr empty=True; dry-run exit 1; stdout contains sentinel=False; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False server/drop-in: dry-run exit 1; sentinel exposed=False agent/continued: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=False; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=True agent/late-bom: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False agent/late-bom-file: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False agent/mixed-command: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False agent/mixed-cr: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False agent/nul: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False agent/cr-only: verify exit 0; verify stderr empty=True; dry-run exit 0; stdout contains sentinel=True; stderr contains sentinel=False; source unchanged=True; proposed Environment redaction=False agent/drop-in: dry-run exit 0; sentinel exposed=False ``` The ignored CLI test exercised a real OpenSSH service at 127.0.0.1:2222 and a real loopback SSH server accepting network-style none authentication, enrollment, tunnel/provider readiness, reinstall and removal. It is not a live NetBird/Tailscale peer. The outer runner backed up and restored authorized_keys without displaying its contents, then compared the restored file: ```text authorized_keys restore exit 0; cmp exit 0 ``` Final HEAD remains `1a733e9eb681fa82617c910d8e39a14140b7264a`; tracked worktree status is clean. Findings and finish evidence are recorded in issue #72; the issue remains open.
Author
Owner

Starting self-install-fix3 on branch self-install, base 1a733e9eb681fa82617c910d8e39a14140b7264a. Read the full rereview2 report. Implementing canonical versioned/hash-verified units, fail-closed inspection and explicit replacement of foreign units; targeted install tests (including real ignored tests), systemd-analyze and INFRATERNAL_VERIFY_RUN_ID=self-install-fix3 scripts/verify fast. No merge gate or push.

Starting self-install-fix3 on branch `self-install`, base `1a733e9eb681fa82617c910d8e39a14140b7264a`. Read the full rereview2 report. Implementing canonical versioned/hash-verified units, fail-closed inspection and explicit replacement of foreign units; targeted install tests (including real ignored tests), systemd-analyze and `INFRATERNAL_VERIFY_RUN_ID=self-install-fix3 scripts/verify fast`. No merge gate or push.
Author
Owner

Design implemented: shared user/system unit renderers seal an LF-only, BOM-free, continuation-free v1 body with a SHA-256 header. Both installers validate header/hash/canonical form and drop-in absence before value parsing or rendering; foreign bytes are discarded after a physical-line count. Dry-run is a hidden-values summary; actual replacement requires --force-replace plus explicit core settings, with no environment/database-record fallback. Optional settings omitted on replacement are disabled. Drop-ins require explicit removal before replacement; a base-file overwrite cannot neutralize effective overrides. All systemd-reported load paths are inspected for unit, dash-prefix and type-wide drop-in directories without reading contents. Primary references: https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.unit.xml and https://raw.githubusercontent.com/systemd/systemd/main/man/systemd-analyze.xml. No runtime hot path changed.

Initial checks: CLI installer unit tests 13 passed; temporary-HOME CLI regressions 12 passed, including foreign BOM/late-BOM/CR/mixed-CR/NUL/invalid-UTF8/continuation/reset/hash-version/manual-edit fixtures and force/drop-in refusal. Unit files remain byte-identical across refused installs and dry-runs. Canonical managed tests preserve directive order and empty resets. Real tests and fast gate still pending.

Design implemented: shared user/system unit renderers seal an LF-only, BOM-free, continuation-free v1 body with a SHA-256 header. Both installers validate header/hash/canonical form and drop-in absence before value parsing or rendering; foreign bytes are discarded after a physical-line count. Dry-run is a hidden-values summary; actual replacement requires --force-replace plus explicit core settings, with no environment/database-record fallback. Optional settings omitted on replacement are disabled. Drop-ins require explicit removal before replacement; a base-file overwrite cannot neutralize effective overrides. All systemd-reported load paths are inspected for unit, dash-prefix and type-wide drop-in directories without reading contents. Primary references: https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.unit.xml and https://raw.githubusercontent.com/systemd/systemd/main/man/systemd-analyze.xml. No runtime hot path changed. Initial checks: CLI installer unit tests 13 passed; temporary-HOME CLI regressions 12 passed, including foreign BOM/late-BOM/CR/mixed-CR/NUL/invalid-UTF8/continuation/reset/hash-version/manual-edit fixtures and force/drop-in refusal. Unit files remain byte-identical across refused installs and dry-runs. Canonical managed tests preserve directive order and empty resets. Real tests and fast gate still pending.
Author
Owner

cargo test -p infraternal-server install — exit 0:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.78s

cargo test -p infraternal-server install -- --ignored — exit 0:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 18.68s

cargo test -p infraternal --bin infraternal install — exit 0:

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.35s

cargo test -p infraternal --test self_install — exit 0:

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.61s

cargo test -p infraternal --test agent_install -- --ignored — exit 0:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 25.77s

cargo test -p infraternal-agent systemd — exit 0:

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s

Real systemd-analyze verify passed in generated_agent_and_server_units_pass_systemd_analyze (all four generated user/system units) and continued_environment_fixture_passes_systemd_analyze_verify. No simulated systemd result.

The real SSH test exercises OpenSSH on 127.0.0.1:2222 and a loopback SSH server with network-style none authentication; it is not a live NetBird/Tailscale peer. It checks canonical byte preservation, refusal of a hand-edited continued/reset unit without changing it, explicit force replacement, and product removal.

Outer runner backed up with sudo -n cp -a, restored with the same command and compared the file without displaying it:

authorized_keys restore exit 0; cmp exit 0
`cargo test -p infraternal-server install` — exit 0: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.78s ``` `cargo test -p infraternal-server install -- --ignored` — exit 0: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 18.68s ``` `cargo test -p infraternal --bin infraternal install` — exit 0: ```text test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.35s ``` `cargo test -p infraternal --test self_install` — exit 0: ```text test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.61s ``` `cargo test -p infraternal --test agent_install -- --ignored` — exit 0: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 25.77s ``` `cargo test -p infraternal-agent systemd` — exit 0: ```text test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s ``` Real `systemd-analyze verify` passed in `generated_agent_and_server_units_pass_systemd_analyze` (all four generated user/system units) and `continued_environment_fixture_passes_systemd_analyze_verify`. No simulated systemd result. The real SSH test exercises OpenSSH on 127.0.0.1:2222 and a loopback SSH server with network-style none authentication; it is not a live NetBird/Tailscale peer. It checks canonical byte preservation, refusal of a hand-edited continued/reset unit without changing it, explicit force replacement, and product removal. Outer runner backed up with `sudo -n cp -a`, restored with the same command and compared the file without displaying it: ```text authorized_keys restore exit 0; cmp exit 0 ```
Author
Owner

Finished self-install-fix3 on self-install; HEAD 9b67a3a4d2e27e9fadafef69c70fcddf23cec48a. Worktree clean, committed with the requested Claude trailers. No push or merge gate.

Design: every shared user/system unit renderer seals a canonical LF-only UTF-8 body with # infraternal-unit: v1 sha256=<64 lowercase hex digits>. The hash includes all body bytes, comments and final LF. No BOM, control separators or physical continuations. Only a valid header, matching digest, canonical body and absent drop-ins permit value parsing and settings preservation. Unchanged canonical directive spans remain byte-identical, including ordered empty resets; changed bodies are resealed. Foreign bytes are discarded after a physical-line count, with the requested hidden-values diagnostic. Replacement requires --force-replace and explicit core settings, never environment/database-record fallback; omitted optional settings are disabled. Drop-ins must be removed explicitly before replacement because overwriting the base file cannot make its settings effective. Unit-specific, dash-prefix and type-wide directories are checked on systemd-reported load paths without reading contents. The header is an integrity marker, not authentication.

Regressions cover BOM/late BOM, CR-only, mixed CR, NUL, continuation with comments and resets (including a matching header/hash on a noncanonical body), manual edits, invalid UTF-8, unknown header versions, local and load-path drop-ins, refused writes, force with missing settings, explicit replacement plans and canonical round trips. Literal server paths round-trip through our serializer/parser. Comments and durable decision/design/format docs match the implementation. No runtime hot path changed or performance measurement claimed.

cargo test -p infraternal-server install — exit 0:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.87s

cargo test -p infraternal-server install -- --ignored — exit 0:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 23.06s

cargo test -p infraternal --bin infraternal install — exit 0:

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.37s

cargo test -p infraternal --test self_install — exit 0:

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.15s

cargo test -p infraternal --test agent_install -- --ignored — exit 0:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 46.35s

cargo test -p infraternal-agent systemd — exit 0:

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.01s

Real systemd-analyze verify passed in generated_agent_and_server_units_pass_systemd_analyze (all four generated user/system units) and continued_environment_fixture_passes_systemd_analyze_verify. No simulated systemd result.

The real SSH test exercises OpenSSH on 127.0.0.1:2222 and a loopback SSH server with network-style none authentication; it is not a live NetBird/Tailscale peer. It checks canonical byte preservation, refusal of a hand-edited continued/reset unit without changing it, explicit force replacement, and product removal.

Outer runner backed up with sudo -n cp -a, restored with the same command and compared the file without displaying it:

authorized_keys restore exit 0; cmp exit 0

Final gate (same sccache/debug/test preset as targeted tests): INFRATERNAL_VERIFY_RUN_ID=self-install-fix3 scripts/verify fast — exit 0. Lint findings on earlier attempts were fixed by documenting the renderer assertion and sharing installer options/configuration/context checks; no lint suppression was added. The generated unrelated notices change from the gate was restored to the clean base file before commit. Bun audit reports an existing low cookie finding as report-only; Rust advisory/license checks pass.

Verbatim final gate output:

WARN load5=8.96 exceeds online CPU count=8; timing-sensitive checks may be delayed
PASS fast: migrations are append-only (0.254s)
PASS fast: workspace package dependencies (0.278s)
PASS fast: gate target-directory and launch diagnostics tests (0.402s)
PASS fast: JavaScript dependencies (0.010s)
PASS fast: advisory review policy tests (0.156s)
SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows
SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2
SUPPLY_CHAIN_NOTICES generated THIRD_PARTY_NOTICES.md from 81 frontend packages
SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files
SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review
advisories ok
SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data
licenses ok
SUPPLY_CHAIN_RUST_LICENSES passed
bun audit v1.4.2 (744846f84)

cookie@0.6.0
  workspace:@infraternal/web > @sveltejs/kit > cookie
  low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x

1 vulnerability (1 low)

  bun audit fix           upgrade the vulnerable packages within their ranges
  bun audit fix --latest  also cross major versions
SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (4.576s)
PASS fast: build web app (8.846s)
PASS fast: cargo fmt --check (1.981s)
PASS fast: cargo clippy (21.633s)
PASS fast: cargo test (213.024s)
PASS fast: svelte-check (12.410s)
PASS fast: UI package svelte-check (4.865s)
PASS fast: stream package typecheck (5.407s)
PASS fast: Vitest (4.469s)
PASS fast: UI package Vitest (5.254s)
PASS fast: stream package Vitest (1.254s)
PASS fast: OpenAPI and TypeScript client drift (65.476s)
PASS fast: terminal TypeScript (2.043s)
PASS fast: terminal Vitest (1.271s)

Verbatim gate summary:

Gate: fast
Stages: 19
Elapsed  Stage
0.254s   fast: migrations are append-only
0.278s   fast: workspace package dependencies
0.402s   fast: gate target-directory and launch diagnostics tests
0.010s   fast: JavaScript dependencies
0.156s   fast: advisory review policy tests
4.576s   fast: supply-chain checks
8.846s   fast: build web app
1.981s   fast: cargo fmt --check
21.633s  fast: cargo clippy
213.024s fast: cargo test
12.410s  fast: svelte-check
4.865s   fast: UI package svelte-check
5.407s   fast: stream package typecheck
4.469s   fast: Vitest
5.254s   fast: UI package Vitest
1.254s   fast: stream package Vitest
65.476s  fast: OpenAPI and TypeScript client drift
2.043s   fast: terminal TypeScript
1.271s   fast: terminal Vitest
Total: 353.609s
Finished self-install-fix3 on `self-install`; HEAD `9b67a3a4d2e27e9fadafef69c70fcddf23cec48a`. Worktree clean, committed with the requested Claude trailers. No push or merge gate. Design: every shared user/system unit renderer seals a canonical LF-only UTF-8 body with `# infraternal-unit: v1 sha256=<64 lowercase hex digits>`. The hash includes all body bytes, comments and final LF. No BOM, control separators or physical continuations. Only a valid header, matching digest, canonical body and absent drop-ins permit value parsing and settings preservation. Unchanged canonical directive spans remain byte-identical, including ordered empty resets; changed bodies are resealed. Foreign bytes are discarded after a physical-line count, with the requested hidden-values diagnostic. Replacement requires --force-replace and explicit core settings, never environment/database-record fallback; omitted optional settings are disabled. Drop-ins must be removed explicitly before replacement because overwriting the base file cannot make its settings effective. Unit-specific, dash-prefix and type-wide directories are checked on systemd-reported load paths without reading contents. The header is an integrity marker, not authentication. Regressions cover BOM/late BOM, CR-only, mixed CR, NUL, continuation with comments and resets (including a matching header/hash on a noncanonical body), manual edits, invalid UTF-8, unknown header versions, local and load-path drop-ins, refused writes, force with missing settings, explicit replacement plans and canonical round trips. Literal server paths round-trip through our serializer/parser. Comments and durable decision/design/format docs match the implementation. No runtime hot path changed or performance measurement claimed. `cargo test -p infraternal-server install` — exit 0: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.87s ``` `cargo test -p infraternal-server install -- --ignored` — exit 0: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 23.06s ``` `cargo test -p infraternal --bin infraternal install` — exit 0: ```text test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.37s ``` `cargo test -p infraternal --test self_install` — exit 0: ```text test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.15s ``` `cargo test -p infraternal --test agent_install -- --ignored` — exit 0: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 46.35s ``` `cargo test -p infraternal-agent systemd` — exit 0: ```text test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.01s ``` Real `systemd-analyze verify` passed in `generated_agent_and_server_units_pass_systemd_analyze` (all four generated user/system units) and `continued_environment_fixture_passes_systemd_analyze_verify`. No simulated systemd result. The real SSH test exercises OpenSSH on 127.0.0.1:2222 and a loopback SSH server with network-style none authentication; it is not a live NetBird/Tailscale peer. It checks canonical byte preservation, refusal of a hand-edited continued/reset unit without changing it, explicit force replacement, and product removal. Outer runner backed up with `sudo -n cp -a`, restored with the same command and compared the file without displaying it: ```text authorized_keys restore exit 0; cmp exit 0 ``` Final gate (same sccache/debug/test preset as targeted tests): `INFRATERNAL_VERIFY_RUN_ID=self-install-fix3 scripts/verify fast` — exit 0. Lint findings on earlier attempts were fixed by documenting the renderer assertion and sharing installer options/configuration/context checks; no lint suppression was added. The generated unrelated notices change from the gate was restored to the clean base file before commit. Bun audit reports an existing low cookie finding as report-only; Rust advisory/license checks pass. Verbatim final gate output: ```text WARN load5=8.96 exceeds online CPU count=8; timing-sensitive checks may be delayed PASS fast: migrations are append-only (0.254s) PASS fast: workspace package dependencies (0.278s) PASS fast: gate target-directory and launch diagnostics tests (0.402s) PASS fast: JavaScript dependencies (0.010s) PASS fast: advisory review policy tests (0.156s) SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2 SUPPLY_CHAIN_NOTICES generated THIRD_PARTY_NOTICES.md from 81 frontend packages SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review advisories ok SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data licenses ok SUPPLY_CHAIN_RUST_LICENSES passed bun audit v1.4.2 (744846f84) cookie@0.6.0 workspace:@infraternal/web > @sveltejs/kit > cookie low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x 1 vulnerability (1 low) bun audit fix upgrade the vulnerable packages within their ranges bun audit fix --latest also cross major versions SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (4.576s) PASS fast: build web app (8.846s) PASS fast: cargo fmt --check (1.981s) PASS fast: cargo clippy (21.633s) PASS fast: cargo test (213.024s) PASS fast: svelte-check (12.410s) PASS fast: UI package svelte-check (4.865s) PASS fast: stream package typecheck (5.407s) PASS fast: Vitest (4.469s) PASS fast: UI package Vitest (5.254s) PASS fast: stream package Vitest (1.254s) PASS fast: OpenAPI and TypeScript client drift (65.476s) PASS fast: terminal TypeScript (2.043s) PASS fast: terminal Vitest (1.271s) ``` Verbatim gate summary: ```text Gate: fast Stages: 19 Elapsed Stage 0.254s fast: migrations are append-only 0.278s fast: workspace package dependencies 0.402s fast: gate target-directory and launch diagnostics tests 0.010s fast: JavaScript dependencies 0.156s fast: advisory review policy tests 4.576s fast: supply-chain checks 8.846s fast: build web app 1.981s fast: cargo fmt --check 21.633s fast: cargo clippy 213.024s fast: cargo test 12.410s fast: svelte-check 4.865s fast: UI package svelte-check 5.407s fast: stream package typecheck 4.469s fast: Vitest 5.254s fast: UI package Vitest 1.254s fast: stream package Vitest 65.476s fast: OpenAPI and TypeScript client drift 2.043s fast: terminal TypeScript 1.271s fast: terminal Vitest Total: 353.609s ```
Author
Owner

Starting read-only final targeted review of 1a733e9..9b67a3a, detached HEAD 9b67a3a4d2e27e9fadafef69c70fcddf23cec48a, base 1a733e9. Scope: fail-closed unit inspection, canonical integrity/round-trip, drop-ins, install/uninstall and real SSH bootstrap. Will run targeted debug/test-profile install checks with the sccache preset, ignored real tests and systemd-analyze verify; back up/restore/cmp authorized_keys. No commits, pushes, release builds or verify merge.

Starting read-only final targeted review of `1a733e9..9b67a3a`, detached HEAD `9b67a3a4d2e27e9fadafef69c70fcddf23cec48a`, base `1a733e9`. Scope: fail-closed unit inspection, canonical integrity/round-trip, drop-ins, install/uninstall and real SSH bootstrap. Will run targeted debug/test-profile install checks with the sccache preset, ignored real tests and systemd-analyze verify; back up/restore/cmp authorized_keys. No commits, pushes, release builds or verify merge.
Author
Owner

Read-only review progress at detached 9b67a3a4d2e27e9fadafef69c70fcddf23cec48a: shared inspection validates header, exact-body SHA-256 and canonical syntax before either installer receives managed text. Foreign units and drop-in contents have no parsing/presentation path.

All 122 independent inert-value checks passed (check-fixtures.py, fixtures.log beside the eventual findings): BOM/late BOM, CR/CRLF/mixed CR/NUL, Unicode separators, invalid UTF-8, continuations/comments, stale digest, header version, matching hashes on noncanonical bodies, canonical credential/comment redaction, and unit/dash-prefix/type-wide vendor drop-ins. stdout and trace stderr remained free of fixture private values; all source units remained byte-identical.

Server regular/ignored tests, CLI unit/integration tests and the ignored real SSH bootstrap test have passed. Standalone systemd generator tests and the outer authorized_keys restoration/cmp are still pending. No new blocker identified so far.

Read-only review progress at detached `9b67a3a4d2e27e9fadafef69c70fcddf23cec48a`: shared inspection validates header, exact-body SHA-256 and canonical syntax before either installer receives managed text. Foreign units and drop-in contents have no parsing/presentation path. All 122 independent inert-value checks passed (`check-fixtures.py`, `fixtures.log` beside the eventual findings): BOM/late BOM, CR/CRLF/mixed CR/NUL, Unicode separators, invalid UTF-8, continuations/comments, stale digest, header version, matching hashes on noncanonical bodies, canonical credential/comment redaction, and unit/dash-prefix/type-wide vendor drop-ins. stdout and trace stderr remained free of fixture private values; all source units remained byte-identical. Server regular/ignored tests, CLI unit/integration tests and the ignored real SSH bootstrap test have passed. Standalone systemd generator tests and the outer authorized_keys restoration/cmp are still pending. No new blocker identified so far.
Author
Owner

Verdict: merge.

Final targeted read-only review of git diff 1a733e9..9b67a3a, detached HEAD 9b67a3a4d2e27e9fadafef69c70fcddf23cec48a, Forgejo issue #72. No blockers or majors found. The prior BOM/line-separator disclosure and mixed-CR directive-loss finding is resolved by refusing value inspection of foreign bytes.

The shared inspection boundary (crates/infraternal/src/self_install.rs:1190) validates the first-line v1 header, SHA-256 of the exact body and canonical syntax before either installer receives managed text. Foreign bytes yield only a physical-line count. Unknown headers, body edits with an unchanged header, invalid UTF-8, BOMs, CR/CRLF/NUL, Unicode separators and continuations cannot reach the value parser, plan or diff. The same noncanonical forms remain foreign with a recomputed matching digest. The digest is an edit marker, not authentication; this review does not treat it as a signature.

Independent CLI checks in check-fixtures.py exercised both service modes with inert private values, trace logging, dry-run, actual refusal and incomplete forced replacement. All 122 checks passed. No private fixture value appeared in stdout or stderr, no source unit changed, and refusal created no installed binary. Canonical credential/environment directives and comments also retained their bytes without exposing their private values. Ordinary canonical nonsecret directives remain visible as specified in DESIGN; foreign units display no directives. Full evidence is in fixtures.log.

Drop-in inspection (self_install.rs:1140) reads directory entries only, never contents or filenames into presentation. Unit-specific, infraternal-.service.d and service.d overrides on an additional vendor load path all refused forced replacement without disclosing values. Repository tests also cover adjacent overrides and a load-path override without any base unit. Foreign replacement requires explicit settings and does not reuse endpoint/environment/database records; optional omitted settings are disabled. Bootstrap does not automatically force replacement.

Canonical no-op updates and atomic writes round-trip byte-for-byte. The literal server-command round-trip tests cover quotes, spaces, dollar/percent characters, tabs and BOMs represented through escapes. The ignored real SSH scenario additionally compares the entire installed canonical unit after a real reinstall, refuses a manually edited continued directive without changing the unit, explicitly replaces it with the canonical unit, and removes the installation. Both key and network authentication paths pass; network authentication uses a real loopback SSH server accepting the none method, not a live NetBird/Tailscale peer. Uninstall and shared-binary ownership regressions pass. No new runtime hot path was introduced; no performance measurements or full verification-tier pass are claimed.

All six requested targeted test commands exited 0, using debug/test profiles and the sccache preset: RUSTC_WRAPPER=/home/kayg/.local/bin/sccache, SCCACHE_DIR=/mnt/hdd/infraternal/sccache, CARGO_TARGET_DIR=/home/kayg/.cache/infraternal-targets/rereview3-self-install, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, CARGO_INCREMENTAL=0. bun install --frozen-lockfile and scripts/build-web succeeded to supply real embedded assets.

cargo test -p infraternal-server install — exit 0, server-install.log:

test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.85s

cargo test -p infraternal-server install -- --ignored — exit 0, server-install-ignored.log:

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 25.22s

cargo test -p infraternal --bin infraternal install — exit 0, cli-install.log:

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.42s

cargo test -p infraternal --test self_install — exit 0, cli-self-install.log:

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.59s

cargo test -p infraternal --test agent_install -- --ignored — exit 0, cli-agent-install-ignored.log:

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 27.96s

cargo test -p infraternal-agent systemd — exit 0, unit-generator.log:

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s

The installed systemd is 257.13-1~deb13u1. generated_agent_and_server_units_pass_systemd_analyze passed real systemd-analyze verify for generated user/system units in both modes; continued_environment_fixture_passes_systemd_analyze_verify also passed. Independent direct verification accepted the BOM, CR, CRLF, mixed-CR, NUL, continuation and stale-hash fixtures with exit 0 and empty stderr while the CLI hid them. Deliberately invalid UTF-8 fixtures failed systemd verification, and Unicode-separator fixtures produced warnings; the CLI still hid their bytes. Representative actual fixture output:

server/hashed-mixed-cr: systemd-analyze verify exit=0; stderr-empty=True
agent/hashed-continuation: systemd-analyze verify exit=0; stderr-empty=True
Independent boundary checks: 122 passed

Platform behavior was checked against primary upstream sources: systemd unit/drop-in rules, unit-paths documentation, and systemd v257 continuation parser. unit-paths reports compiled/environment-derived paths rather than querying the running manager; the implemented checks match the documented reported-load-path contract.

Before tests, the outer runner backed up sshtarget's authorized_keys using sudo -n cp -a. Its finally block restored using sudo -n cp -a and compared using sudo -n cmp, without displaying contents. Actual output:

authorized_keys restore exit 0; cmp exit 0

Final HEAD remains 9b67a3a4d2e27e9fadafef69c70fcddf23cec48a; tracked worktree status is clean. No source edits, commits, pushes, release builds, or verify merge. Issue #72 remains open.

Verdict: **merge**. Final targeted read-only review of `git diff 1a733e9..9b67a3a`, detached HEAD `9b67a3a4d2e27e9fadafef69c70fcddf23cec48a`, Forgejo issue #72. No blockers or majors found. The prior BOM/line-separator disclosure and mixed-CR directive-loss finding is resolved by refusing value inspection of foreign bytes. The shared inspection boundary (`crates/infraternal/src/self_install.rs:1190`) validates the first-line v1 header, SHA-256 of the exact body and canonical syntax before either installer receives managed text. Foreign bytes yield only a physical-line count. Unknown headers, body edits with an unchanged header, invalid UTF-8, BOMs, CR/CRLF/NUL, Unicode separators and continuations cannot reach the value parser, plan or diff. The same noncanonical forms remain foreign with a recomputed matching digest. The digest is an edit marker, not authentication; this review does not treat it as a signature. Independent CLI checks in `check-fixtures.py` exercised both service modes with inert private values, trace logging, dry-run, actual refusal and incomplete forced replacement. All 122 checks passed. No private fixture value appeared in stdout or stderr, no source unit changed, and refusal created no installed binary. Canonical credential/environment directives and comments also retained their bytes without exposing their private values. Ordinary canonical nonsecret directives remain visible as specified in DESIGN; foreign units display no directives. Full evidence is in `fixtures.log`. Drop-in inspection (`self_install.rs:1140`) reads directory entries only, never contents or filenames into presentation. Unit-specific, `infraternal-.service.d` and `service.d` overrides on an additional vendor load path all refused forced replacement without disclosing values. Repository tests also cover adjacent overrides and a load-path override without any base unit. Foreign replacement requires explicit settings and does not reuse endpoint/environment/database records; optional omitted settings are disabled. Bootstrap does not automatically force replacement. Canonical no-op updates and atomic writes round-trip byte-for-byte. The literal server-command round-trip tests cover quotes, spaces, dollar/percent characters, tabs and BOMs represented through escapes. The ignored real SSH scenario additionally compares the entire installed canonical unit after a real reinstall, refuses a manually edited continued directive without changing the unit, explicitly replaces it with the canonical unit, and removes the installation. Both key and network authentication paths pass; network authentication uses a real loopback SSH server accepting the none method, not a live NetBird/Tailscale peer. Uninstall and shared-binary ownership regressions pass. No new runtime hot path was introduced; no performance measurements or full verification-tier pass are claimed. All six requested targeted test commands exited 0, using debug/test profiles and the sccache preset: `RUSTC_WRAPPER=/home/kayg/.local/bin/sccache`, `SCCACHE_DIR=/mnt/hdd/infraternal/sccache`, `CARGO_TARGET_DIR=/home/kayg/.cache/infraternal-targets/rereview3-self-install`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, `CARGO_INCREMENTAL=0`. `bun install --frozen-lockfile` and `scripts/build-web` succeeded to supply real embedded assets. `cargo test -p infraternal-server install` — exit 0, `server-install.log`: ```text test result: ok. 58 passed; 0 failed; 4 ignored; 0 measured; 174 filtered out; finished in 6.85s ``` `cargo test -p infraternal-server install -- --ignored` — exit 0, `server-install-ignored.log`: ```text test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 25.22s ``` `cargo test -p infraternal --bin infraternal install` — exit 0, `cli-install.log`: ```text test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out; finished in 0.42s ``` `cargo test -p infraternal --test self_install` — exit 0, `cli-self-install.log`: ```text test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.59s ``` `cargo test -p infraternal --test agent_install -- --ignored` — exit 0, `cli-agent-install-ignored.log`: ```text test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 27.96s ``` `cargo test -p infraternal-agent systemd` — exit 0, `unit-generator.log`: ```text test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 47 filtered out; finished in 0.00s ``` The installed systemd is `257.13-1~deb13u1`. `generated_agent_and_server_units_pass_systemd_analyze` passed real `systemd-analyze verify` for generated user/system units in both modes; `continued_environment_fixture_passes_systemd_analyze_verify` also passed. Independent direct verification accepted the BOM, CR, CRLF, mixed-CR, NUL, continuation and stale-hash fixtures with exit 0 and empty stderr while the CLI hid them. Deliberately invalid UTF-8 fixtures failed systemd verification, and Unicode-separator fixtures produced warnings; the CLI still hid their bytes. Representative actual fixture output: ```text server/hashed-mixed-cr: systemd-analyze verify exit=0; stderr-empty=True agent/hashed-continuation: systemd-analyze verify exit=0; stderr-empty=True Independent boundary checks: 122 passed ``` Platform behavior was checked against primary upstream sources: [systemd unit/drop-in rules](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd.unit.xml), [unit-paths documentation](https://raw.githubusercontent.com/systemd/systemd/main/man/systemd-analyze.xml), and [systemd v257 continuation parser](https://raw.githubusercontent.com/systemd/systemd/v257/src/shared/conf-parser.c). `unit-paths` reports compiled/environment-derived paths rather than querying the running manager; the implemented checks match the documented reported-load-path contract. Before tests, the outer runner backed up sshtarget's authorized_keys using `sudo -n cp -a`. Its finally block restored using `sudo -n cp -a` and compared using `sudo -n cmp`, without displaying contents. Actual output: ```text authorized_keys restore exit 0; cmp exit 0 ``` Final HEAD remains `9b67a3a4d2e27e9fadafef69c70fcddf23cec48a`; tracked worktree status is clean. No source edits, commits, pushes, release builds, or `verify merge`. Issue #72 remains open.
Author
Owner

Starting self-install-merge2: only writer in /mnt/hdd/infraternal/wt-lp/self-install on branch self-install, base 9b67a3a4d2. Merging dev 056ef45435 after final approval. Preserve self-install behavior; adopt isolated sshd fixtures. Requested verification: workspace clippy with -D warnings, install tests including ignored real tests, systemd-analyze verify, and INFRATERNAL_VERIFY_RUN_ID=self-install-merge2 scripts/verify fast. Will not run verify merge or push.

Starting self-install-merge2: only writer in /mnt/hdd/infraternal/wt-lp/self-install on branch self-install, base 9b67a3a4d2e27e9fadafef69c70fcddf23cec48a. Merging dev 056ef454356fde7488a207bc1ad735c1b04e6b81 after final approval. Preserve self-install behavior; adopt isolated sshd fixtures. Requested verification: workspace clippy with -D warnings, install tests including ignored real tests, systemd-analyze verify, and INFRATERNAL_VERIFY_RUN_ID=self-install-merge2 scripts/verify fast. Will not run verify merge or push.
Author
Owner

Conflict resolutions: agent_install.rs now uses dev's AccountTestSshd for key auth and keeps the existing private NetworkSshd for network auth, preserving both ordered compiled-binary scenarios and all ownership/header/upgrade checks. Shared authorized_keys backup/append/restore was removed. install_bootstrap.rs retains self-install's delegated CLI implementation and its relocated real linger ownership failure/retry coverage (agent_install.rs); dev's private host-key probe and private account authentication tests were adopted. The obsolete fake-artifact linger test was not restored, because the delegated install now executes the uploaded CLI and requires enrollment. OPERATOR.md combines monitor01 deployment guidance with the self-install instructions; it no longer claims there is no service unit. Production bootstrap implementation is unchanged from self-install. Workspace clippy and requested tests/gate follow.

Conflict resolutions: agent_install.rs now uses dev's AccountTestSshd for key auth and keeps the existing private NetworkSshd for network auth, preserving both ordered compiled-binary scenarios and all ownership/header/upgrade checks. Shared authorized_keys backup/append/restore was removed. install_bootstrap.rs retains self-install's delegated CLI implementation and its relocated real linger ownership failure/retry coverage (agent_install.rs); dev's private host-key probe and private account authentication tests were adopted. The obsolete fake-artifact linger test was not restored, because the delegated install now executes the uploaded CLI and requires enrollment. OPERATOR.md combines monitor01 deployment guidance with the self-install instructions; it no longer claims there is no service unit. Production bootstrap implementation is unchanged from self-install. Workspace clippy and requested tests/gate follow.
Author
Owner

Workspace clippy passed (exit 0): cargo clippy --workspace --all-targets -- -D warnings. Verbatim completion:

    Finished `dev` profile [unoptimized] target(s) in 7m 47s

The approved self-install CLI, shared systemd renderer and network-auth fixture are unchanged from 9b67a3a; install_bootstrap.rs differs from that head only inside its test module. Targeted installation tests are now running, including real SSH tests and systemd-analyze verification of all four generated unit variants.

Workspace clippy passed (exit 0): `cargo clippy --workspace --all-targets -- -D warnings`. Verbatim completion: ```text Finished `dev` profile [unoptimized] target(s) in 7m 47s ``` The approved self-install CLI, shared systemd renderer and network-auth fixture are unchanged from 9b67a3a; install_bootstrap.rs differs from that head only inside its test module. Targeted installation tests are now running, including real SSH tests and systemd-analyze verification of all four generated unit variants.
Author
Owner

Targeted tests: CLI unit tests 12 passed (including systemd-analyze verify of all four unit variants); CLI integration tests 13 passed; shared systemd renderer 2 passed; server installation tests 63 passed with --include-ignored. The first full compiled-binary scenario passed key mode, then network mode failed its install step with the fixed WriteFailed diagnostic. An unchanged rerun passed both modes (1 passed in 42.90s). Suspected fixture lifecycle race: private OpenSSH uses PAM while network SSH deliberately does not; logind releases the prior user object asynchronously. Added a test-only observed logind user-list barrier between the two scenarios, bounded to ten seconds, to enforce a fresh network-auth fixture. No production changes. Will recheck the full scenario and fast gate; retaining the initial failure in the report.

Targeted tests: CLI unit tests 12 passed (including systemd-analyze verify of all four unit variants); CLI integration tests 13 passed; shared systemd renderer 2 passed; server installation tests 63 passed with --include-ignored. The first full compiled-binary scenario passed key mode, then network mode failed its install step with the fixed WriteFailed diagnostic. An unchanged rerun passed both modes (1 passed in 42.90s). Suspected fixture lifecycle race: private OpenSSH uses PAM while network SSH deliberately does not; logind releases the prior user object asynchronously. Added a test-only observed logind user-list barrier between the two scenarios, bounded to ten seconds, to enforce a fresh network-auth fixture. No production changes. Will recheck the full scenario and fast gate; retaining the initial failure in the report.
Author
Owner

Platform evidence for the fixture barrier: systemd v257 documents UserStopDelaySec as retaining the user record and user@.service after the final session ends (default 10s): https://raw.githubusercontent.com/systemd/systemd/v257/man/logind.conf.xml . The link supports asynchronous teardown; attribution of the initial WriteFailed to that transition remains an inference from its position between key/network scenarios and the unchanged passing rerun. The test waits for absence in loginctl list-users rather than sleeping for an assumed duration or retrying product installation.

Platform evidence for the fixture barrier: systemd v257 documents UserStopDelaySec as retaining the user record and user@.service after the final session ends (default 10s): https://raw.githubusercontent.com/systemd/systemd/v257/man/logind.conf.xml . The link supports asynchronous teardown; attribution of the initial WriteFailed to that transition remains an inference from its position between key/network scenarios and the unchanged passing rerun. The test waits for absence in loginctl list-users rather than sleeping for an assumed duration or retrying product installation.
Author
Owner

Requested fast gate passed (exit 0): INFRATERNAL_VERIFY_RUN_ID=self-install-merge2 scripts/verify fast. Verbatim gate output:

WARN load5=16.78 exceeds online CPU count=8; timing-sensitive checks may be delayed
PASS fast: migrations are append-only (5.118s)
PASS fast: workspace package dependencies (1.429s)
PASS fast: gate target-directory and launch diagnostics tests (0.895s)
PASS fast: JavaScript dependencies (0.363s)
PASS fast: advisory review policy tests (4.215s)
SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows
SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2
SUPPLY_CHAIN_NOTICES match THIRD_PARTY_NOTICES.md from 81 frontend packages
SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files
SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review
advisories ok
SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data
licenses ok
SUPPLY_CHAIN_RUST_LICENSES passed
bun audit v1.4.2 (744846f84)

cookie@0.6.0
  workspace:@infraternal/web > @sveltejs/kit > cookie
  low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x

1 vulnerability (1 low)

  bun audit fix           upgrade the vulnerable packages within their ranges
  bun audit fix --latest  also cross major versions
SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (15.987s)
PASS fast: build web app (87.260s)
PASS fast: cargo fmt --check (1.537s)
PASS fast: cargo clippy (34.364s)
PASS fast: cargo test (234.995s)
PASS fast: svelte-check (40.414s)
PASS fast: UI package svelte-check (6.786s)
PASS fast: stream package typecheck (7.813s)
PASS fast: Vitest (8.081s)
PASS fast: UI package Vitest (39.410s)
PASS fast: stream package Vitest (1.260s)
PASS fast: OpenAPI and TypeScript client drift (86.685s)
PASS fast: terminal TypeScript (2.677s)
PASS fast: terminal Vitest (1.821s)

The supply-chain report retains one existing low Bun cookie advisory under the documented report-only policy. No verify merge was run. The full key/network compiled-binary installation scenario has passed 12 consecutive runs with the observed fixture barrier; the 20-run check is still in progress.

Requested fast gate passed (exit 0): `INFRATERNAL_VERIFY_RUN_ID=self-install-merge2 scripts/verify fast`. Verbatim gate output: ```text WARN load5=16.78 exceeds online CPU count=8; timing-sensitive checks may be delayed PASS fast: migrations are append-only (5.118s) PASS fast: workspace package dependencies (1.429s) PASS fast: gate target-directory and launch diagnostics tests (0.895s) PASS fast: JavaScript dependencies (0.363s) PASS fast: advisory review policy tests (4.215s) SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2 SUPPLY_CHAIN_NOTICES match THIRD_PARTY_NOTICES.md from 81 frontend packages SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review advisories ok SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data licenses ok SUPPLY_CHAIN_RUST_LICENSES passed bun audit v1.4.2 (744846f84) cookie@0.6.0 workspace:@infraternal/web > @sveltejs/kit > cookie low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x 1 vulnerability (1 low) bun audit fix upgrade the vulnerable packages within their ranges bun audit fix --latest also cross major versions SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (15.987s) PASS fast: build web app (87.260s) PASS fast: cargo fmt --check (1.537s) PASS fast: cargo clippy (34.364s) PASS fast: cargo test (234.995s) PASS fast: svelte-check (40.414s) PASS fast: UI package svelte-check (6.786s) PASS fast: stream package typecheck (7.813s) PASS fast: Vitest (8.081s) PASS fast: UI package Vitest (39.410s) PASS fast: stream package Vitest (1.260s) PASS fast: OpenAPI and TypeScript client drift (86.685s) PASS fast: terminal TypeScript (2.677s) PASS fast: terminal Vitest (1.821s) ``` The supply-chain report retains one existing low Bun cookie advisory under the documented report-only policy. No verify merge was run. The full key/network compiled-binary installation scenario has passed 12 consecutive runs with the observed fixture barrier; the 20-run check is still in progress.
Author
Owner

Repetition evidence: 14 full key/network runs passed with the new logind barrier. Run 15 failed at the barrier itself (private SSH fixture left a logind user), before network installation. The initial ten-second bound matched systemd v257's documented default UserStopDelaySec, leaving no teardown margin. Raised only the test isolation timeout to thirty seconds (still polls actual absence every 50ms); no production changes or product retries. Restarting the consecutive repetition check. Source: https://raw.githubusercontent.com/systemd/systemd/v257/man/logind.conf.xml . Fast gate has passed; will rerun it after this final test-only adjustment.

Repetition evidence: 14 full key/network runs passed with the new logind barrier. Run 15 failed at the barrier itself (`private SSH fixture left a logind user`), before network installation. The initial ten-second bound matched systemd v257's documented default UserStopDelaySec, leaving no teardown margin. Raised only the test isolation timeout to thirty seconds (still polls actual absence every 50ms); no production changes or product retries. Restarting the consecutive repetition check. Source: https://raw.githubusercontent.com/systemd/systemd/v257/man/logind.conf.xml . Fast gate has passed; will rerun it after this final test-only adjustment.
Author
Owner

Final test-only timeout adjustment verified: INFRATERNAL_VERIFY_RUN_ID=self-install-merge2 scripts/verify fast passed (exit 0). Verbatim output:

WARN load5=15.53 exceeds online CPU count=8; timing-sensitive checks may be delayed
PASS fast: migrations are append-only (0.275s)
PASS fast: workspace package dependencies (0.236s)
PASS fast: gate target-directory and launch diagnostics tests (0.290s)
PASS fast: JavaScript dependencies (0.004s)
PASS fast: advisory review policy tests (0.107s)
SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows
SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2
SUPPLY_CHAIN_NOTICES match THIRD_PARTY_NOTICES.md from 81 frontend packages
SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files
SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review
advisories ok
SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data
licenses ok
SUPPLY_CHAIN_RUST_LICENSES passed
bun audit v1.4.2 (744846f84)

cookie@0.6.0
  workspace:@infraternal/web > @sveltejs/kit > cookie
  low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x

1 vulnerability (1 low)

  bun audit fix           upgrade the vulnerable packages within their ranges
  bun audit fix --latest  also cross major versions
SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (3.564s)
PASS fast: build web app (7.673s)
PASS fast: cargo fmt --check (1.454s)
PASS fast: cargo clippy (17.994s)
PASS fast: cargo test (175.797s)
PASS fast: svelte-check (23.788s)
PASS fast: UI package svelte-check (11.040s)
PASS fast: stream package typecheck (13.766s)
PASS fast: Vitest (6.959s)
PASS fast: UI package Vitest (6.027s)
PASS fast: stream package Vitest (2.537s)
PASS fast: OpenAPI and TypeScript client drift (20.091s)
PASS fast: terminal TypeScript (6.152s)
PASS fast: terminal Vitest (2.366s)

Five consecutive real installation scenarios have passed on the final thirty-second observed isolation bound; continuing to twenty.

Final test-only timeout adjustment verified: `INFRATERNAL_VERIFY_RUN_ID=self-install-merge2 scripts/verify fast` passed (exit 0). Verbatim output: ```text WARN load5=15.53 exceeds online CPU count=8; timing-sensitive checks may be delayed PASS fast: migrations are append-only (0.275s) PASS fast: workspace package dependencies (0.236s) PASS fast: gate target-directory and launch diagnostics tests (0.290s) PASS fast: JavaScript dependencies (0.004s) PASS fast: advisory review policy tests (0.107s) SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2 SUPPLY_CHAIN_NOTICES match THIRD_PARTY_NOTICES.md from 81 frontend packages SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review advisories ok SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data licenses ok SUPPLY_CHAIN_RUST_LICENSES passed bun audit v1.4.2 (744846f84) cookie@0.6.0 workspace:@infraternal/web > @sveltejs/kit > cookie low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x 1 vulnerability (1 low) bun audit fix upgrade the vulnerable packages within their ranges bun audit fix --latest also cross major versions SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (3.564s) PASS fast: build web app (7.673s) PASS fast: cargo fmt --check (1.454s) PASS fast: cargo clippy (17.994s) PASS fast: cargo test (175.797s) PASS fast: svelte-check (23.788s) PASS fast: UI package svelte-check (11.040s) PASS fast: stream package typecheck (13.766s) PASS fast: Vitest (6.959s) PASS fast: UI package Vitest (6.027s) PASS fast: stream package Vitest (2.537s) PASS fast: OpenAPI and TypeScript client drift (20.091s) PASS fast: terminal TypeScript (6.152s) PASS fast: terminal Vitest (2.366s) ``` Five consecutive real installation scenarios have passed on the final thirty-second observed isolation bound; continuing to twenty.
Author
Owner

Finished self-install-merge2 on branch self-install. Head: 4f4853408290e1fb280d09e01b2a215254db7e72. Merge parents: 9b67a3a4d2e27e9fadafef69c70fcddf23cec48a and 056ef454356fde7488a207bc1ad735c1b04e6b81. Clean worktree, no push, issue left open.

Conflict resolutions:

  • crates/infraternal/tests/agent_install.rs: adopt AccountTestSshd for key auth, retain private NetworkSshd for network auth, remove all shared authorized_keys edits. Keep the complete compiled CLI install/remove, linger ownership, canonical/foreign unit, replacement and shared-binary checks. Observe logind releasing the account between scenarios with a thirty-second timeout.
  • crates/server/src/install_bootstrap.rs: preserve delegated self-install/uninstall and ownership behavior unchanged; adopt dev's private host-key and account-authentication tests. Keep real linger ownership coverage in the compiled CLI scenario rather than restoring the obsolete fake-artifact test.
  • docs/OPERATOR.md: combine monitor01 deployment guidance with self-install instructions, without the outdated claim that no service unit exists.

All requested checks passed. Production self-install CLI, shared v1 header/hash renderer and network-auth fixture remain unchanged from the approved base. The imported dev stream/inventory fixes are included. No new production hot path was added.

Targeted command results (verbatim):

cargo test -p infraternal --bin infraternal self_install -- --nocapture

test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 74 filtered out; finished in 1.49s

cargo test -p infraternal --test self_install -- --nocapture

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.59s

cargo test -p infraternal-agent systemd -- --nocapture

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 48 filtered out; finished in 0.00s

cargo test -p infraternal-server --lib install -- --include-ignored --nocapture --test-threads=1

test result: ok. 63 passed; 0 failed; 0 ignored; 0 measured; 175 filtered out; finished in 49.13s

systemd-analyze verify was actually invoked by the generated-unit test for user/system server and infraternal agent units, and by the continued-line integration fixture. Verbatim test results:

test self_install::tests::generated_agent_and_server_units_pass_systemd_analyze ... ok
test continued_environment_fixture_passes_systemd_analyze_verify ... ok

Final full real installation check: twenty consecutive runs of cargo test -p infraternal --test agent_install -- --ignored --nocapture --test-threads=1, each executing key and network installation/removal. Verbatim runner output:

PASS real install repetition 1/20
PASS real install repetition 2/20
PASS real install repetition 3/20
PASS real install repetition 4/20
PASS real install repetition 5/20
PASS real install repetition 6/20
PASS real install repetition 7/20
PASS real install repetition 8/20
PASS real install repetition 9/20
PASS real install repetition 10/20
PASS real install repetition 11/20
PASS real install repetition 12/20
PASS real install repetition 13/20
PASS real install repetition 14/20
PASS real install repetition 15/20
PASS real install repetition 16/20
PASS real install repetition 17/20
PASS real install repetition 18/20
PASS real install repetition 19/20
PASS real install repetition 20/20

Earlier failures are retained in the preceding comments and artifacts: one network install failure before the fixture barrier; then fourteen passing runs followed by a barrier timeout at its initial ten-second limit. The final thirty-second bound passed twenty consecutive runs. The asynchronous logind lifecycle explanation is an inference supported by systemd v257 documentation: https://raw.githubusercontent.com/systemd/systemd/v257/man/logind.conf.xml .

Final requested gate: INFRATERNAL_VERIFY_RUN_ID=self-install-merge2 scripts/verify fast (exit 0). This includes workspace clippy with -D warnings after the final edit. Verbatim gate output:

WARN load5=15.53 exceeds online CPU count=8; timing-sensitive checks may be delayed
PASS fast: migrations are append-only (0.275s)
PASS fast: workspace package dependencies (0.236s)
PASS fast: gate target-directory and launch diagnostics tests (0.290s)
PASS fast: JavaScript dependencies (0.004s)
PASS fast: advisory review policy tests (0.107s)
SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows
SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2
SUPPLY_CHAIN_NOTICES match THIRD_PARTY_NOTICES.md from 81 frontend packages
SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files
SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review
advisories ok
SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data
licenses ok
SUPPLY_CHAIN_RUST_LICENSES passed
bun audit v1.4.2 (744846f84)

cookie@0.6.0
  workspace:@infraternal/web > @sveltejs/kit > cookie
  low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x

1 vulnerability (1 low)

  bun audit fix           upgrade the vulnerable packages within their ranges
  bun audit fix --latest  also cross major versions
SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only
SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only
PASS fast: supply-chain checks (3.564s)
PASS fast: build web app (7.673s)
PASS fast: cargo fmt --check (1.454s)
PASS fast: cargo clippy (17.994s)
PASS fast: cargo test (175.797s)
PASS fast: svelte-check (23.788s)
PASS fast: UI package svelte-check (11.040s)
PASS fast: stream package typecheck (13.766s)
PASS fast: Vitest (6.959s)
PASS fast: UI package Vitest (6.027s)
PASS fast: stream package Vitest (2.537s)
PASS fast: OpenAPI and TypeScript client drift (20.091s)
PASS fast: terminal TypeScript (6.152s)
PASS fast: terminal Vitest (2.366s)

Raw verification logs retained at /mnt/hdd/infraternal/artifacts/verify/self-install-merge2/install. Existing low Bun cookie advisory is report-only; no dependency changes made. Did not run verify merge. Both required commit trailers are present.

Finished self-install-merge2 on branch self-install. Head: `4f4853408290e1fb280d09e01b2a215254db7e72`. Merge parents: `9b67a3a4d2e27e9fadafef69c70fcddf23cec48a` and `056ef454356fde7488a207bc1ad735c1b04e6b81`. Clean worktree, no push, issue left open. Conflict resolutions: - crates/infraternal/tests/agent_install.rs: adopt AccountTestSshd for key auth, retain private NetworkSshd for network auth, remove all shared authorized_keys edits. Keep the complete compiled CLI install/remove, linger ownership, canonical/foreign unit, replacement and shared-binary checks. Observe logind releasing the account between scenarios with a thirty-second timeout. - crates/server/src/install_bootstrap.rs: preserve delegated self-install/uninstall and ownership behavior unchanged; adopt dev's private host-key and account-authentication tests. Keep real linger ownership coverage in the compiled CLI scenario rather than restoring the obsolete fake-artifact test. - docs/OPERATOR.md: combine monitor01 deployment guidance with self-install instructions, without the outdated claim that no service unit exists. All requested checks passed. Production self-install CLI, shared v1 header/hash renderer and network-auth fixture remain unchanged from the approved base. The imported dev stream/inventory fixes are included. No new production hot path was added. Targeted command results (verbatim): `cargo test -p infraternal --bin infraternal self_install -- --nocapture` ```text test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 74 filtered out; finished in 1.49s ``` `cargo test -p infraternal --test self_install -- --nocapture` ```text test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.59s ``` `cargo test -p infraternal-agent systemd -- --nocapture` ```text test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 48 filtered out; finished in 0.00s ``` `cargo test -p infraternal-server --lib install -- --include-ignored --nocapture --test-threads=1` ```text test result: ok. 63 passed; 0 failed; 0 ignored; 0 measured; 175 filtered out; finished in 49.13s ``` `systemd-analyze verify` was actually invoked by the generated-unit test for user/system server and infraternal agent units, and by the continued-line integration fixture. Verbatim test results: ```text test self_install::tests::generated_agent_and_server_units_pass_systemd_analyze ... ok test continued_environment_fixture_passes_systemd_analyze_verify ... ok ``` Final full real installation check: twenty consecutive runs of `cargo test -p infraternal --test agent_install -- --ignored --nocapture --test-threads=1`, each executing key and network installation/removal. Verbatim runner output: ```text PASS real install repetition 1/20 PASS real install repetition 2/20 PASS real install repetition 3/20 PASS real install repetition 4/20 PASS real install repetition 5/20 PASS real install repetition 6/20 PASS real install repetition 7/20 PASS real install repetition 8/20 PASS real install repetition 9/20 PASS real install repetition 10/20 PASS real install repetition 11/20 PASS real install repetition 12/20 PASS real install repetition 13/20 PASS real install repetition 14/20 PASS real install repetition 15/20 PASS real install repetition 16/20 PASS real install repetition 17/20 PASS real install repetition 18/20 PASS real install repetition 19/20 PASS real install repetition 20/20 ``` Earlier failures are retained in the preceding comments and artifacts: one network install failure before the fixture barrier; then fourteen passing runs followed by a barrier timeout at its initial ten-second limit. The final thirty-second bound passed twenty consecutive runs. The asynchronous logind lifecycle explanation is an inference supported by systemd v257 documentation: https://raw.githubusercontent.com/systemd/systemd/v257/man/logind.conf.xml . Final requested gate: `INFRATERNAL_VERIFY_RUN_ID=self-install-merge2 scripts/verify fast` (exit 0). This includes workspace clippy with `-D warnings` after the final edit. Verbatim gate output: ```text WARN load5=15.53 exceeds online CPU count=8; timing-sensitive checks may be delayed PASS fast: migrations are append-only (0.275s) PASS fast: workspace package dependencies (0.236s) PASS fast: gate target-directory and launch diagnostics tests (0.290s) PASS fast: JavaScript dependencies (0.004s) PASS fast: advisory review policy tests (0.107s) SUPPLY_CHAIN_REVIEWS advisory exceptions are within their review windows SUPPLY_CHAIN cargo-deny: cargo-deny 0.20.2 SUPPLY_CHAIN_NOTICES match THIRD_PARTY_NOTICES.md from 81 frontend packages SUPPLY_CHAIN_NOTICES copied source: 47 calternal-derived files SUPPLY_CHAIN_NOTICES license files: 54 distinct texts; 0 packages need manual license review advisories ok SUPPLY_CHAIN_RUST_ADVISORIES passed with refreshed advisory data licenses ok SUPPLY_CHAIN_RUST_LICENSES passed bun audit v1.4.2 (744846f84) cookie@0.6.0 workspace:@infraternal/web > @sveltejs/kit > cookie low: cookie accepts cookie name, path, and domain with out of bounds characters (<0.7.0) - https://github.com/advisories/GHSA-pxg6-pf52-xh8x 1 vulnerability (1 low) bun audit fix upgrade the vulnerable packages within their ranges bun audit fix --latest also cross major versions SUPPLY_CHAIN_BUN_AUDIT findings reported; this check is report-only SUPPLY_CHAIN_PASS Rust advisory/license checks complete; Bun findings are report-only PASS fast: supply-chain checks (3.564s) PASS fast: build web app (7.673s) PASS fast: cargo fmt --check (1.454s) PASS fast: cargo clippy (17.994s) PASS fast: cargo test (175.797s) PASS fast: svelte-check (23.788s) PASS fast: UI package svelte-check (11.040s) PASS fast: stream package typecheck (13.766s) PASS fast: Vitest (6.959s) PASS fast: UI package Vitest (6.027s) PASS fast: stream package Vitest (2.537s) PASS fast: OpenAPI and TypeScript client drift (20.091s) PASS fast: terminal TypeScript (6.152s) PASS fast: terminal Vitest (2.366s) ``` Raw verification logs retained at `/mnt/hdd/infraternal/artifacts/verify/self-install-merge2/install`. Existing low Bun cookie advisory is report-only; no dependency changes made. Did not run verify merge. Both required commit trailers are present.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal-v0#72
No description provided.