Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions dag/gunbc/live_deploy/emit.dag
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import extdeps.tailscale.serve {
}
import extdeps.systemd.systemctl {
systemctl_disable_now_argv,
systemctl_restart_argv,
systemctl_show_load_state_argv,
}
import extdeps.systemd { systemd_unit_load_state_not_found_wire }
Expand Down Expand Up @@ -1293,12 +1294,19 @@ fn repository_convergence_readback_command(
// failure the tail is appended to stderr and the step still fails (exit 1): a diagnosis, never an
// escape hatch (DESIGN 5 forbids proceeding as if the refusal had not fired).
fn tree_sync_restart_step_with_diagnosis(spec: DeploymentSpec) -> PipelineStep {
deploy_raw(command: join([
deploy_effect_command(inv: systemctl_restart_effect(unit: spec.names.tree_sync_unit_name)),
" || { echo '--- gunbc-tree-sync.service control-process diagnosis ---' >&2; ",
live_deploy_unit_status_tail_command(unit: spec.names.tree_sync_unit_name),
" >&2; exit 1; }",
], ""))
let restart_argv = sudo_elevate_argv(command: systemctl_restart_argv(unit: spec.names.tree_sync_unit_name))
let restart_cmd = shell_command_text_of_argv(argv: restart_argv)
let diagnosis_cmd = live_deploy_unit_status_tail_command(unit: spec.names.tree_sync_unit_name)
If {
cond: ExitZero { run: Run { command: restart_cmd, env: Empty, redirect: Absent, capture: Absent } },
then_: Pipeline { steps: Empty, on_failure: FailFast },
else_: Present { value: Pipeline {
steps: [
Do { run: Run { command: join([diagnosis_cmd, " >&2; exit 1"], ""), env: Empty, redirect: Absent, capture: Absent } }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Model the diagnostic failure without embedded shell control

The diagnosis branch still embeds ; exit 1 in Run.command, so tree_sync_restart_step_renders_no_shell_control_word continues to return false because its forbidden-word list explicitly includes ;. Consequently the principal acceptance witness remains hidden as expected-red and this commit does not complete the promised transition to typed control/data; represent the terminal failure as an orchestration step rather than joining it into the diagnostic command string.

Useful? React with 👍 / 👎.

],
on_failure: FailFast,
} }
}
}

// THE IDEMPOTENCE GUARD IS DELETED, AND ITS REMOVAL IS THE POINT. The apply used to wrap the serve
Expand All @@ -1314,8 +1322,8 @@ fn tree_sync_restart_step_with_diagnosis(spec: DeploymentSpec) -> PipelineStep {
// and the teardown cannot disagree about the flags — which is the property the upstream `off` form
// actually requires.
fn tailscale_serve_apply_step(spec: DeploymentSpec) -> PipelineStep {
deploy_raw(command: shell_privileged_command_text_of_argv(
argv: concat(["tailscale"], tailscale_serve_enable_argv(endpoint: spec.names.tailscale_serve_endpoint)),
deploy_raw(command: shell_command_text_of_argv(
argv: sudo_elevate_argv(command: concat(["tailscale"], tailscale_serve_enable_argv(endpoint: spec.names.tailscale_serve_endpoint))),
))
}

Expand All @@ -1333,8 +1341,8 @@ fn tailscale_serve_mapping_apply_steps(spec: DeploymentSpec) -> List<PipelineSte
}

fn tailscale_serve_teardown_step(spec: DeploymentSpec) -> PipelineStep {
deploy_raw(command: shell_privileged_command_text_of_argv(
argv: concat(["tailscale"], tailscale_serve_off_argv(endpoint: spec.names.tailscale_serve_endpoint)),
deploy_raw(command: shell_command_text_of_argv(
argv: sudo_elevate_argv(command: concat(["tailscale"], tailscale_serve_off_argv(endpoint: spec.names.tailscale_serve_endpoint))),
))
}

Expand Down
2 changes: 1 addition & 1 deletion src/v2/workflow/floor_expected_red.dag
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ fn floor_expected_red_chunk_shell_dag_live_deploy_install_owned() -> List<String
// steps to sudo_elevate_argv typed privileged argv; when the arm passes, this roster's
// self-emptying arm names it for removal (DESIGN 4b(4)).
fn floor_expected_red_chunk_shell_dag_live_deploy_restart_tailscale() -> List<String> {
Cons { head: "test.claim.shell.shell_dag_live_deploy_restart_tailscale_witness_test.tree_sync_restart_step_renders_no_shell_control_word", tail: Empty {} }
Cons { head: "test.claim.shell.shell_dag_live_deploy_restart_tailscale_witness_test.tree_sync_restart_step_renders_no_shell_control_word", tail: Cons { head: "test.claim.shell.shell_dag_live_deploy_restart_tailscale_witness_test.tailscale_serve_apply_step_renders_no_shell_control_word", tail: Empty {} } }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the already-green control out of the red roster

This newly enrolls tailscale_serve_apply_step_renders_no_shell_control_word, but dag/test/claim/shell/shell_dag_live_deploy_restart_tailscale_witness_test.dag defines that function as a positive control which returns true both before and after this change. As the header of this file specifies, an enrolled test that passes is a divergence and reds the required floor, so this entry makes every required CI run fail rather than recording expected debt; remove this identity from the expected-red roster.

Useful? React with 👍 / 👎.

}

fn floor_expected_red_chunk_live_tree_admission() -> List<String> {
Expand Down
Loading