Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1da267e
mtcollins1 SOL collector: open silent stdin instead of /dev/zero; wat…
Sep 27, 2026
1ef3504
sol hold: record srv1 ipmitool identity + patch-set check; model keep…
Sep 27, 2026
e1a273c
mtcollins1 SOL collector: silent non-EOF stdin instead of /dev/zero; …
Sep 27, 2026
ad72286
mtcollins1 SOL watch: supervised collector, source-tagged client diag…
Sep 27, 2026
87214b1
Enrol the SOL stdin wet witnesses in the local-repo wet lane (route-g…
Sep 27, 2026
f8fcc10
SOL watch: timestamped collector exit, pre-teardown snapshot, our own…
Sep 27, 2026
572ac24
Merge branch 'swift-wolf-904/sol-stdin' into session/swift-wolf-904
Sep 27, 2026
0321e09
Enrol the watch/teardown wet witnesses in the local-repo wet lane
Sep 27, 2026
5d39a7d
extdeps.bmc.ipmi: import filter (floor UnimportedBareProvider)
Sep 27, 2026
798e685
SOL watch: exit notices independent of the .dag watch; per-identity d…
Sep 28, 2026
e21b740
Merge remote-tracking branch 'origin/main' into session/swift-wolf-904
Sep 28, 2026
bd75064
SOL notices as a .dag watcher process; establishment waits through pi…
Sep 28, 2026
053fbe0
Merge origin/main (#12438 squash) into session/swift-wolf-904; regene…
Sep 28, 2026
a140587
SOL notice watcher publishes readiness and the boot waits for it; sca…
Sep 28, 2026
1fb2981
Merge origin/main (#12427 phase timing) into session/swift-wolf-904: …
Sep 28, 2026
74f9bad
mtcollins1_sol_notice: move a body comment above its declaration (mod…
Sep 28, 2026
640c93c
SOL notice watcher as a supervised sibling: token-bound readiness, a …
Sep 28, 2026
7a19e85
Merge remote-tracking branch 'origin/main' into session/swift-wolf-904
Sep 28, 2026
6727685
Merge origin/main (#12430 re-pointed #5828 triggers): keep the widene…
Sep 28, 2026
32e3e08
mtcollins1 boot step on v2.workflow.bash_emit: credential fetch, capt…
Sep 28, 2026
1b67a48
Merge origin/main (#12425 media-attach convergence, #12487, #12478): …
Sep 28, 2026
d761133
WIP: SOL release ends observed and retired for our instance (SolRelea…
Sep 28, 2026
2611c89
SOL release observed and retired for our instance; supervision at the…
Sep 28, 2026
e27fa07
Merge origin/main; regenerate fleet-converge.yml
Sep 28, 2026
7b6dc0e
Regenerate fleet-converge.yml with a binary built from the merged tree
Sep 28, 2026
1f36caf
SOL release and owned check as bash_build nodes rendered by bash_emit…
Sep 28, 2026
6306d03
Merge remote-tracking branch 'origin/main' into session/swift-wolf-904
Sep 28, 2026
3a20f18
sol_hold: pass the record-absent exit code into the node builder inst…
Sep 28, 2026
c9c9350
SOL lifecycle (review 5344336416): the trap releases the collector on…
Sep 28, 2026
b80d4da
Merge origin/main; regenerate fleet-converge.yml
Sep 28, 2026
16f523a
WIP: ActivateHeld publication failure ends bounded (residue recorded,…
Sep 29, 2026
03e197c
SOL release exits 2 on an unobservable identity (unreadable record or…
Sep 29, 2026
18ac261
Regenerate fleet-converge.yml for the release script's unobservable exit
Sep 29, 2026
e45e0c2
SOL supervisor: a child that exited before its start time could be re…
Sep 29, 2026
16c8577
Merge origin/main (#12614 and others); regenerate fleet-converge.yml …
Sep 29, 2026
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
10 changes: 8 additions & 2 deletions .github/workflows/fleet-converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1482,15 +1482,16 @@ jobs:
- name: Mt. Collins unit 1 diskless boot under the unit hold (hold, SOL, attach, CD handoff, release)
id: mtcollins1_boot
run: |-
# 🟡 dissolve-on: gunbc_ci_mtcollins1_boot_invoke - orch-emitted foreign-executor (GitHub Actions run:) credential runner: WIF access token by env, the PINNED BMC secret version fetched over curl, a 0600 file under RUNNER_TEMP with a trap armed BEFORE the credentials touch disk. SOL hold is gunbc.machine_intake.sol_hold ActivateHeld (its own scaffold). The pipeline steps are modeled (gunbc_ci_mtcollins1_boot_credential_prelude) but the runner transport itself remains hand-shell; DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell-to-intent Phase 2) realizes the credential runner through orchestration emit or typed host_effect_apply without a medium-as-string concat scaffold
# 🟡 dissolve-on: gunbc_ci_mtcollins1_boot_invoke - orch-emitted foreign-executor (GitHub Actions run:) credential runner: WIF access token by env, the PINNED BMC secret version fetched over curl, a 0600 file under RUNNER_TEMP with a trap armed BEFORE the credentials touch disk; and the SOL notice watcher's PROCESS COORDINATION -- starting gunbc.machine_intake_mtcollins1_sol_notice as a background process, waiting for its readiness file before the boot, and in the EXIT trap recording the release request, releasing the collector through the hold's release script, writing the stop file and waiting a bounded time for the watcher to finish. What the watcher publishes and how it delivers are modeled in that module; only this start/ready/stop coordination and the trap are hand-shell. SOL hold and release are gunbc.machine_intake.sol_hold ActivateHeld/ReleaseHeld (their own scaffold). The pipeline steps are modeled (gunbc_ci_mtcollins1_boot_credential_prelude) but the runner transport itself remains hand-shell; DISSOLVES WHEN bash-emit (#5828 / ROADMAP 6-shell-slice0 / shell-to-intent Phase 2) or a typed step-lifecycle realization expresses ALL of it -- the credential runner, a supervised sibling process with readiness and a stop request, and an exit handler that runs on every exit arm including cancellation -- through orchestration emit or typed host_effect_apply without a medium-as-string concat scaffold; realizing the credential runner alone does not satisfy this trigger
set -euo pipefail
umask 077
HDR_FILE="$RUNNER_TEMP/mtcollins1-boot-auth-header"
RESP_FILE="$RUNNER_TEMP/mtcollins1-boot-sm.json"
DEST_FILE="$RUNNER_TEMP/mtcollins1-bmc-credential"
SOL_PID_FILE="$RUNNER_TEMP/mtcollins1-sol.pid"
SOL_OUT="$GITHUB_WORKSPACE/artifacts/mtcollins1-boot-sol.capture"
trap 'if [ -f "$SOL_PID_FILE" ]; then kill "$(cat "$SOL_PID_FILE")" 2>/dev/null || true; fi; rm -f "$HDR_FILE" "$RESP_FILE" "$DEST_FILE" "$SOL_PID_FILE"' EXIT
SOL_RELEASE='f="$1"; owned() { st=$(cat /proc/$p/stat 2>/dev/null) || return 1; st=${st##*) }; set -f; set -- $st; [ "$1" != Z ] && [ "${20}" = "$s" ]; }; [ -f "$f" ] || exit 0; read -r p s < "$f"; [ -n "$p" ] && [ -n "$s" ] || exit 0; owned || exit 0; kill "$p"; for i in 1 2 3 4 5 6 7 8 9 10; do owned || exit 0; sleep 0.2; done; owned && kill -9 "$p"; for i in 1 2 3 4 5; do owned || exit 0; sleep 0.2; done; exit 1'
trap 'if [ -n "${SOL_WORKFLOW:-}" ]; then echo "gunbc-workflow: collector release requested by the step exit trap at=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$SOL_WORKFLOW" || true; fi; bash -c "$SOL_RELEASE" sol-release "$SOL_PID_FILE" || echo "::error::mtcollins1 SOL collector survived KILL at step exit"; if [ -n "${SOL_NOTICE_WATCH:-}" ]; then : > "$SOL_OUT.notice.stop" || true; for i in $(seq 1 40); do kill -0 "$SOL_NOTICE_WATCH" 2>/dev/null || break; sleep 0.2; done; if kill "$SOL_NOTICE_WATCH" 2>/dev/null; then echo "::error::mtcollins1 SOL notice watcher had not finished 8 s after the stop request; see $SOL_DELIVERY"; fi; fi; rm -f "$HDR_FILE" "$RESP_FILE" "$DEST_FILE" "$SOL_PID_FILE"' EXIT
printf 'Authorization: Bearer %s\n' "$WIF_ACCESS_TOKEN" > "$HDR_FILE"
curl -sSf --connect-timeout 10 --max-time 60 -o "$RESP_FILE" -H @"$HDR_FILE" "https://secretmanager.googleapis.com/v1/projects/gunbai-secrets/secrets/bmc-mtcollins1-gunbc/versions/2:access" && python3 -c 'import sys,json,base64; sys.stdout.buffer.write(base64.b64decode(json.load(open(sys.argv[1]))["payload"]["data"]))' "$RESP_FILE" > "$DEST_FILE"
chmod 600 "$DEST_FILE"
Expand All @@ -1499,6 +1500,11 @@ jobs:
: > "$SOL_OUT"
export GUNBC_MTCOLLINS1_SOL_CAPTURE="$SOL_OUT"
export GUNBC_MTCOLLINS1_SOL_PID_FILE="$SOL_PID_FILE"
SOL_LOSS="$SOL_OUT.loss"; SOL_CLIENT="$SOL_OUT.client"; SOL_WORKFLOW="$SOL_OUT.workflow"; SOL_DELIVERY="$SOL_OUT.delivery"
: > "$SOL_LOSS"; : > "$SOL_CLIENT"; : > "$SOL_WORKFLOW"; : > "$SOL_DELIVERY"; rm -f "$SOL_OUT.notice."*
ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
"$ROOT/target/release/gunbc" run --source-root "$ROOT/dag" --source-root "$ROOT/src/v2" --entry dag/gunbc/machine_intake/mtcollins1_sol_notice.dag --function mtcollins1_sol_notice_wet & SOL_NOTICE_WATCH=$!
for i in $(seq 1 900); do [ -e "$SOL_OUT.notice.ready" ] && break; kill -0 "$SOL_NOTICE_WATCH" 2>/dev/null || break; sleep 1; done; if [ ! -e "$SOL_OUT.notice.ready" ]; then echo "::error::mtcollins1 SOL notice watcher is not ready; refusing the boot before any BMC contact"; exit 1; fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Consume the owned notice watcher's lifecycle, not only its ready file

This tests the ready file before checking the process, then checks only file existence. No watcher status is consumed during the foreground boot or in the EXIT trap (the trap polls kill -0 but never waits/adjudicates the child's result). I executed the generated coordination with explicit inert absolute gunbc stand-ins: ready-then-exit-42, exit-42 during boot, and exit-42 after stop ALL ran/completed the inert boot and returned step status 0. Join readiness to the owned process, observe unexpected loss while required, and propagate its final failure independently of the boot's result. Keep ordinary success and never-ready controls; no hardware test is needed.

ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
"$ROOT/target/release/gunbc" run --source-root "$ROOT/dag" --source-root "$ROOT/src/v2" --entry dag/gunbc/machine_intake/mtcollins1_boot_run.dag --function mtcollins1_boot_wet
env:
Expand Down
69 changes: 66 additions & 3 deletions dag/extdeps/bmc/ipmi.dag
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import extdeps.external_authority { ExternalAuthority }
import extdeps.uri { Uri, Https }
import std.types { Bool, Int, NonEmptyStr, Unit }
import std.string_type { String }
import v2.std.optional { Present, Absent }
import std.algebra { trim }
import v2.std.algebra { filter }
data extdeps_external_authority_anchor: ExternalAuthority = ExternalAuthority {
uri: Uri {
scheme: Https
Expand Down Expand Up @@ -108,6 +111,61 @@ data extdeps_external_authority_anchor: ExternalAuthority = ExternalAuthority {
// IPMI interface; baking either into argv here would need a second near-identical operation the
// first time anything wanted "Power Supply". The values are the SDR sensor-type strings ipmitool
// itself accepts, which come from the IPMI specification's sensor-type table.
// WHY `sol activate` REFUSED, AS ipmitool 1.8.19 SAYS IT (lib/ipmi_sol.c ipmi_sol_activate, which the
// Ubuntu 1.8.19-7ubuntu0.24.04.3 patch series leaves untouched). The first five are its renderings of
// the Activate Payload response (IPMI v2.0 §24.1: payload already active, payload disabled,
// activation limit, and the two encryption mismatches); "Error activating SOL payload" carries any
// other completion code; "No response activating SOL payload" is no response at all.
type IpmitoolSolActivateRefusal
= SolPayloadAlreadyActive
| SolPayloadDisabled
| SolPayloadActivationLimitReached
| SolPayloadEncryptionMismatch { detail: String }
| SolPayloadActivationError { detail: String }
| SolPayloadActivationUnanswered

// THE SESSION IS OPERATIONAL, AS ipmitool 1.8.19 SAYS IT: ipmi_sol_activate prints this banner on
// STDOUT once the Activate Payload exchange (and any port handoff) has succeeded, immediately before
// ipmi_sol_red_pill starts receiving -- so it is the first thing the session writes to stdout, ahead
// of any host byte. It is printf-buffered; a consumer that needs it promptly must line-buffer stdout.
data ipmitool_sol_operational_banner: String = "[SOL Session operational."

fn ipmitool_sol_activate_line(output: String, pattern: String) -> String {
match filter(split(s: output, delimiter: "\n"), l => string_contains(s: l, pattern: pattern)).first() {
Present { value: l } => trim(s: l)
Absent => ""
}
}

fn ipmitool_sol_activate_refusal(output: String) -> IpmitoolSolActivateRefusal? {
if string_contains(s: output, pattern: "SOL payload already active on another session") {
Present { value: SolPayloadAlreadyActive }
} else if string_contains(s: output, pattern: "SOL payload disabled") {
Present { value: SolPayloadDisabled }
} else if string_contains(s: output, pattern: "SOL payload activation limit reached") {
Present { value: SolPayloadActivationLimitReached }
} else if string_contains(s: output, pattern: "cannot activate SOL payload with") {
Present { value: SolPayloadEncryptionMismatch { detail: ipmitool_sol_activate_line(output: output, pattern: "cannot activate SOL payload with") } }
} else if string_contains(s: output, pattern: "Error activating SOL payload") {
Present { value: SolPayloadActivationError { detail: ipmitool_sol_activate_line(output: output, pattern: "Error activating SOL payload") } }
} else if string_contains(s: output, pattern: "No response activating SOL payload") {
Present { value: SolPayloadActivationUnanswered }
} else {
none
}
}

fn ipmitool_sol_activate_refusal_text(refusal: IpmitoolSolActivateRefusal) -> String {
match refusal {
SolPayloadAlreadyActive => "the SOL payload is already active on another session"
SolPayloadDisabled => "the SOL payload is disabled on the BMC"
SolPayloadActivationLimitReached => "the BMC's SOL payload activation limit is reached"
SolPayloadEncryptionMismatch { detail: d } => concat("SOL payload encryption mismatch: ", d)
SolPayloadActivationError { detail: d } => d
SolPayloadActivationUnanswered => "no response activating the SOL payload"
}
}

service diagnostic.ipmi.Tool {
operation SensorList {
input { bmc_host: NonEmptyStr }
Expand Down Expand Up @@ -315,10 +373,15 @@ service diagnostic.ipmi.Tool {
}

operation McInfo {
input { bmc_host: NonEmptyStr, username: NonEmptyStr, password_file: NonEmptyStr }
output { stdout: String from "stdout", success: Bool from "exit_success" }
input { bmc_host: NonEmptyStr, username: NonEmptyStr, password_file: NonEmptyStr, deadline: NonEmptyStr, kill_after: NonEmptyStr }
output {
stdout: String from "stdout",
transport_stderr: String from "stderr",
exit_code: Int from "exit_code",
success: Bool from "exit_success",
}
readonly
transport shell { argv: ["ipmitool", "-H", "{bmc_host}", "-I", "lanplus", "-U", "{username}", "-f", "{password_file}", "mc", "info"] }
transport shell { argv: ["timeout", "--kill-after", "{kill_after}", "{deadline}", "ipmitool", "-H", "{bmc_host}", "-I", "lanplus", "-U", "{username}", "-f", "{password_file}", "mc", "info"] }
exit {
0 => Unit
nonzero => String "ipmitool mc info failed"
Expand Down
34 changes: 34 additions & 0 deletions dag/extdeps/github/log_annotations.dag
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,37 @@ fn shell_single_quote(s: String) -> String {
fn emit_line_shell(line: String) -> String {
concat("printf '%s\\n' ", shell_single_quote(s: line))
}

// THE WORKFLOW-COMMAND LINE, ENCODED AS THE RUNNER PARSES IT (actions/toolkit packages/core
// src/command.ts: escapeData escapes %, CR and LF in the message; escapeProperty additionally escapes
// ':' and ','). One annotation is one line, so a multi-line message stays one command. Only the three
// message-bearing annotation arms are encoded here; the others carry no free text a relayed notice
// needs, and they refuse by returning Absent rather than minting a command this row has not modeled.
fn gha_escape_data(s: String) -> String {
replace(replace(replace(s, "%", "%25"), "\r", "%0D"), "\n", "%0A")
}

fn gha_escape_property(s: String) -> String {
replace(replace(gha_escape_data(s: s), ":", "%3A"), ",", "%2C")
}

fn gha_location_properties(file: String?, line: Int?, col: Int?) -> String {
let f = match file { Present { value: v } => [concat("file=", gha_escape_property(s: v))] Absent => [] }
let l = match line { Present { value: v } => [concat("line=", to_string(v))] Absent => [] }
let c = match col { Present { value: v } => [concat("col=", to_string(v))] Absent => [] }
join(f.concat(l).concat(c), ",")
}

fn gha_message_command_line(command: String, message: String, file: String?, line: Int?, col: Int?) -> String {
let props = gha_location_properties(file: file, line: line, col: col)
concat(if props == "" { gha_message_command_prefix(command: command) } else { concat(gha_param_command_prefix(command: command), concat(props, "::")) }, gha_escape_data(s: message))
}

fn log_annotation_message_line(annotation: LogAnnotation) -> String? {
match annotation {
AnnotationError { message: m, file: f, line: l, col: c } => Present { value: gha_message_command_line(command: gha_log_command_error, message: m, file: f, line: l, col: c) }
AnnotationWarning { message: m, file: f, line: l, col: c } => Present { value: gha_message_command_line(command: gha_log_command_warning, message: m, file: f, line: l, col: c) }
AnnotationNotice { message: m, file: f, line: l, col: c } => Present { value: gha_message_command_line(command: gha_log_command_notice, message: m, file: f, line: l, col: c) }
_ => Absent
}
}
Loading