Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,9 @@ jobs:
timeout-minutes: 5
- name: Floor cgroup peak pre-read (calibration; reset if permitted)
run: |
# dissolve-on: bash-emit (#5828 / gap-B emit(intent, Bash)) realizes the cgroup peak observation as an emitted ShellProgram intent (the floor_diff_observe.dag pattern: model the observation, emit the transport) or a typed host Observe effect; these concat-built runners retire then. Until that lands they are §2 transport scaffolds bound by the three Scaffold rows in gunbc.ci_workflow (locate/pre/post *_shell_emit_dissolution_trigger).
d="/sys/fs/cgroup$(awk -F: '$1=="0"{print $3}' /proc/self/cgroup)"
while [ -n "$d" ] && [ "$d" != "/sys/fs/cgroup" ] && [ ! -f "$d/memory.peak" ]; do d=$(dirname "$d"); done
if [ -f "$d/memory.peak" ]; then
if echo reset > "$d/memory.peak" 2>/dev/null; then echo "[calibration] floor_peak_pre reset=ok scope=floor cgroup=$d"
else echo "[calibration] floor_peak_pre reset=unsupported pre_peak=$(cat "$d/memory.peak") scope=span cgroup=$d (post>pre attributes the peak to the floor exactly; post==pre means floor peak <= pre, a job-scoped upper bound)"; fi
else echo "[calibration] floor_peak_pre scope=unavailable (no memory.peak ancestor)"; fi
if [ -f "$d/memory.peak" ]; then if echo reset > "$d/memory.peak" 2>/dev/null; then echo "[calibration] floor_peak_pre reset=ok scope=floor cgroup=$d"; else echo "[calibration] floor_peak_pre reset=unsupported pre_peak=$(cat "$d/memory.peak") scope=span cgroup=$d (post>pre attributes the peak to the floor exactly; post==pre means floor peak <= pre, a job-scoped upper bound)"; fi; else echo "[calibration] floor_peak_pre scope=unavailable (no memory.peak ancestor)"; fi
timeout-minutes: 5
- name: gunbc ci (.dag witnesses + gates)
id: floor
Expand Down Expand Up @@ -215,11 +211,9 @@ jobs:
timeout-minutes: 270
- name: Floor cgroup peak post-read (calibration; survives a killed floor)
run: |
# dissolve-on: bash-emit (#5828 / gap-B emit(intent, Bash)) realizes the cgroup peak observation as an emitted ShellProgram intent (the floor_diff_observe.dag pattern: model the observation, emit the transport) or a typed host Observe effect; these concat-built runners retire then. Until that lands they are §2 transport scaffolds bound by the three Scaffold rows in gunbc.ci_workflow (locate/pre/post *_shell_emit_dissolution_trigger).
d="/sys/fs/cgroup$(awk -F: '$1=="0"{print $3}' /proc/self/cgroup)"
while [ -n "$d" ] && [ "$d" != "/sys/fs/cgroup" ] && [ ! -f "$d/memory.peak" ]; do d=$(dirname "$d"); done
if [ -f "$d/memory.peak" ]; then echo "[calibration] floor_peak_post=$(cat "$d/memory.peak") floor_outcome=${{ steps.floor.outcome }} cgroup=$d (observation label: floor_outcome=success is an EXACT point; any other outcome is a CENSORED lower bound - the process was killed while exceeding the read, so true demand is strictly greater. scope per the floor_peak_pre line: reset=ok means this IS the floor peak; scope=span compares against pre_peak)"
else echo "[calibration] floor_peak_post floor_outcome=${{ steps.floor.outcome }} scope=unavailable (no memory.peak ancestor)"; fi
if [ -f "$d/memory.peak" ]; then echo "[calibration] floor_peak_post=$(cat "$d/memory.peak") floor_outcome=${{ steps.floor.outcome }} cgroup=$d (observation label: floor_outcome=success is an EXACT point; any other outcome is a CENSORED lower bound - the process was killed while exceeding the read, so true demand is strictly greater. scope per the floor_peak_pre line: reset=ok means this IS the floor peak; scope=span compares against pre_peak)"; else echo "[calibration] floor_peak_post floor_outcome=${{ steps.floor.outcome }} scope=unavailable (no memory.peak ancestor)"; fi
if: always()
timeout-minutes: 5
- name: Floor resolve receipt gate (declared cold-resolve count)
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/falsifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,9 @@ jobs:
timeout-minutes: 45
- name: Floor cgroup peak pre-read (calibration; reset if permitted)
run: |
# dissolve-on: bash-emit (#5828 / gap-B emit(intent, Bash)) realizes the cgroup peak observation as an emitted ShellProgram intent (the floor_diff_observe.dag pattern: model the observation, emit the transport) or a typed host Observe effect; these concat-built runners retire then. Until that lands they are §2 transport scaffolds bound by the three Scaffold rows in gunbc.ci_workflow (locate/pre/post *_shell_emit_dissolution_trigger).
d="/sys/fs/cgroup$(awk -F: '$1=="0"{print $3}' /proc/self/cgroup)"
while [ -n "$d" ] && [ "$d" != "/sys/fs/cgroup" ] && [ ! -f "$d/memory.peak" ]; do d=$(dirname "$d"); done
if [ -f "$d/memory.peak" ]; then
if echo reset > "$d/memory.peak" 2>/dev/null; then echo "[calibration] floor_peak_pre reset=ok scope=floor cgroup=$d"
else echo "[calibration] floor_peak_pre reset=unsupported pre_peak=$(cat "$d/memory.peak") scope=span cgroup=$d (post>pre attributes the peak to the floor exactly; post==pre means floor peak <= pre, a job-scoped upper bound)"; fi
else echo "[calibration] floor_peak_pre scope=unavailable (no memory.peak ancestor)"; fi
if [ -f "$d/memory.peak" ]; then if echo reset > "$d/memory.peak" 2>/dev/null; then echo "[calibration] floor_peak_pre reset=ok scope=floor cgroup=$d"; else echo "[calibration] floor_peak_pre reset=unsupported pre_peak=$(cat "$d/memory.peak") scope=span cgroup=$d (post>pre attributes the peak to the floor exactly; post==pre means floor peak <= pre, a job-scoped upper bound)"; fi; else echo "[calibration] floor_peak_pre scope=unavailable (no memory.peak ancestor)"; fi
timeout-minutes: 5
- name: affected-set falsifier (predict-only cold run)
id: floor
Expand All @@ -100,10 +96,8 @@ jobs:
timeout-minutes: 170
- name: Floor cgroup peak post-read (calibration; survives a killed floor)
run: |
# dissolve-on: bash-emit (#5828 / gap-B emit(intent, Bash)) realizes the cgroup peak observation as an emitted ShellProgram intent (the floor_diff_observe.dag pattern: model the observation, emit the transport) or a typed host Observe effect; these concat-built runners retire then. Until that lands they are §2 transport scaffolds bound by the three Scaffold rows in gunbc.ci_workflow (locate/pre/post *_shell_emit_dissolution_trigger).
d="/sys/fs/cgroup$(awk -F: '$1=="0"{print $3}' /proc/self/cgroup)"
while [ -n "$d" ] && [ "$d" != "/sys/fs/cgroup" ] && [ ! -f "$d/memory.peak" ]; do d=$(dirname "$d"); done
if [ -f "$d/memory.peak" ]; then echo "[calibration] floor_peak_post=$(cat "$d/memory.peak") floor_outcome=${{ steps.floor.outcome }} cgroup=$d (observation label: floor_outcome=success is an EXACT point; any other outcome is a CENSORED lower bound - the process was killed while exceeding the read, so true demand is strictly greater. scope per the floor_peak_pre line: reset=ok means this IS the floor peak; scope=span compares against pre_peak)"
else echo "[calibration] floor_peak_post floor_outcome=${{ steps.floor.outcome }} scope=unavailable (no memory.peak ancestor)"; fi
if [ -f "$d/memory.peak" ]; then echo "[calibration] floor_peak_post=$(cat "$d/memory.peak") floor_outcome=${{ steps.floor.outcome }} cgroup=$d (observation label: floor_outcome=success is an EXACT point; any other outcome is a CENSORED lower bound - the process was killed while exceeding the read, so true demand is strictly greater. scope per the floor_peak_pre line: reset=ok means this IS the floor peak; scope=span compares against pre_peak)"; else echo "[calibration] floor_peak_post floor_outcome=${{ steps.floor.outcome }} scope=unavailable (no memory.peak ancestor)"; fi
if: always()
timeout-minutes: 5
73 changes: 5 additions & 68 deletions dag/gunbc/ci_workflow.dag
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ import gunbc.ci_materialization {
}
import gunbc.ci_compile_jobs { ci_compile_jobs, compile_jobs_count_or_serial }
import gunbc.ci_floor_measurement { gunbc_ci_runner_slot_ram_speed_ceiling }
import v2.workflow.ci_floor_peak_emit {
ci_cgroup_peak_locate_shell,
ci_floor_peak_pre_script,
ci_floor_peak_post_script
}
import std.disposition { Disposition, RealizationDispatch, Scaffold, SingleAuthority, Terminal }
import std.decl_ref { DeclarationRef, WholeDeclaration }
import std.types { Duration }
Expand Down Expand Up @@ -285,74 +290,6 @@ fn ci_emit_determinism_step() -> Step {
}
}

data ci_cgroup_peak_locate_shell_emit_dissolution_trigger: Disposition = Scaffold {
dissolves_to: RealizationDispatch,
bind: DeclarationRef {
module_path: "gunbc.ci_workflow",
decl_name: "ci_cgroup_peak_locate_shell",
field: WholeDeclaration
}
}

data ci_floor_peak_pre_script_shell_emit_dissolution_trigger: Disposition = Scaffold {
dissolves_to: RealizationDispatch,
bind: DeclarationRef {
module_path: "gunbc.ci_workflow",
decl_name: "ci_floor_peak_pre_script",
field: WholeDeclaration
}
}

data ci_floor_peak_post_script_shell_emit_dissolution_trigger: Disposition = Scaffold {
dissolves_to: RealizationDispatch,
bind: DeclarationRef {
module_path: "gunbc.ci_workflow",
decl_name: "ci_floor_peak_post_script",
field: WholeDeclaration
}
}

data ci_floor_peak_shell_dissolve_note: String = "dissolve-on: bash-emit (#5828 / gap-B emit(intent, Bash)) realizes the cgroup peak observation as an emitted ShellProgram intent (the floor_diff_observe.dag pattern: model the observation, emit the transport) or a typed host Observe effect; these concat-built runners retire then. Until that lands they are §2 transport scaffolds bound by the three Scaffold rows in gunbc.ci_workflow (locate/pre/post *_shell_emit_dissolution_trigger)."

fn ci_cgroup_peak_locate_shell() -> String {
concat(
"d=\"/sys/fs/cgroup$(awk -F: '$1==\"0\"\{print $3\}' /proc/self/cgroup)\"\n",
"while [ -n \"$d\" ] && [ \"$d\" != \"/sys/fs/cgroup\" ] && [ ! -f \"$d/memory.peak\" ]; do d=$(dirname \"$d\"); done\n"
)
}

fn ci_floor_peak_pre_script() -> String {
concat(
concat("# ", concat(ci_floor_peak_shell_dissolve_note, "\n")),
concat(
ci_cgroup_peak_locate_shell(),
concat(
concat(
"if [ -f \"$d/memory.peak\" ]; then\n",
concat(
" if echo reset > \"$d/memory.peak\" 2>/dev/null; then echo \"[calibration] floor_peak_pre reset=ok scope=floor cgroup=$d\"\n",
" else echo \"[calibration] floor_peak_pre reset=unsupported pre_peak=$(cat \"$d/memory.peak\") scope=span cgroup=$d (post>pre attributes the peak to the floor exactly; post==pre means floor peak <= pre, a job-scoped upper bound)\"; fi\n"
)
),
"else echo \"[calibration] floor_peak_pre scope=unavailable (no memory.peak ancestor)\"; fi"
)
)
)
}

fn ci_floor_peak_post_script() -> String {
concat(
concat("# ", concat(ci_floor_peak_shell_dissolve_note, "\n")),
concat(
ci_cgroup_peak_locate_shell(),
concat(
"if [ -f \"$d/memory.peak\" ]; then echo \"[calibration] floor_peak_post=$(cat \"$d/memory.peak\") floor_outcome=$\{\{ steps.floor.outcome \}\} cgroup=$d (observation label: floor_outcome=success is an EXACT point; any other outcome is a CENSORED lower bound - the process was killed while exceeding the read, so true demand is strictly greater. scope per the floor_peak_pre line: reset=ok means this IS the floor peak; scope=span compares against pre_peak)\"\n",
"else echo \"[calibration] floor_peak_post floor_outcome=$\{\{ steps.floor.outcome \}\} scope=unavailable (no memory.peak ancestor)\"; fi"
)
)
)
}

fn ci_floor_peak_pre_step() -> Step {
RunStep {
name: Present { value: "Floor cgroup peak pre-read (calibration; reset if permitted)" },
Expand Down
4 changes: 3 additions & 1 deletion dag/tools/emit_host_transport.dag
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ data emit_host_node_bootstrap_shell_dissolution_trigger: String = "🟡 dissolve

data emit_host_node_bootstrap_script: String = "if ! command -v node >/dev/null 2>&1; then\n NODEBOOT=\"$WORKDIR/nodeboot\"\n mkdir -p \"$NODEBOOT\"\n ARCH=$(uname -m)\n case \"$ARCH\" in aarch64|arm64) NODEARCH=arm64 ;; x86_64|amd64) NODEARCH=x64 ;; *) exit 1 ;; esac\n curl -fsSL \"https://nodejs.org/dist/v22.22.3/node-v22.22.3-linux-$NODEARCH.tar.xz\" | tar -xJ -C \"$NODEBOOT\" --strip-components=1\n PATH=\"$NODEBOOT/bin:$PATH\"\n export PATH\nfi\n"

data emit_host_node_http_probe_script: String = "cat > \"$WORKDIR/probe.js\" <<'PROBE_EOF'\nconst http = require('http');\nconst port = process.env.PORT;\nconst deadline = Date.now() + 5000;\nfunction probe(cb) {\n http.get('http://127.0.0.1:' + port + '/', (res) => {\n res.resume();\n cb(res.statusCode === 200);\n }).on('error', () => cb(false));\n}\n(function wait() {\n probe((ok) => {\n if (ok) process.exit(0);\n if (Date.now() >= deadline) process.exit(1);\n setTimeout(wait, 300);\n });\n})();\nPROBE_EOF\nPORT=$PORT node \"$WORKDIR/probe.js\"\n"

fn expected_stdout_nul_run() -> String {
repeat_string(s: from_code_point(0), n: byte_size_count(stdout_byte_count))
}
Expand Down Expand Up @@ -71,6 +73,6 @@ fn run_ts_smoke() -> Bool {

fn run_node_http_serve_smoke() -> Bool {
let server_source = gunbhub_node_http_server_source()
let script = "set -e\nWORKDIR=$(mktemp -d)\n{emit_host_node_bootstrap_script}command -v node >/dev/null 2>&1\ncommand -v curl >/dev/null 2>&1\ncat > \"$WORKDIR/server.js\" <<'GUNBC_EOF'\n{server_source}\nGUNBC_EOF\nPORT=18471\nHOST=127.0.0.1 PORT=$PORT node \"$WORKDIR/server.js\" &\nSERVER_PID=$!\ntrap 'kill $SERVER_PID 2>/dev/null; rm -rf \"$WORKDIR\"' EXIT\nfor i in 1 2 3 4 5; do\n sleep 0.3\n if curl -sf http://127.0.0.1:$PORT/ >/dev/null 2>&1; then break; fi\ndone\nSTATUS=$(curl -s -o /dev/null -w '%\{http_code\}' http://127.0.0.1:$PORT/)\ntest \"$STATUS\" -eq 200"
let script = "set -e\nWORKDIR=$(mktemp -d)\n{emit_host_node_bootstrap_script}command -v node >/dev/null 2>&1\ncat > \"$WORKDIR/server.js\" <<'GUNBC_EOF'\n{server_source}\nGUNBC_EOF\nPORT=$((19000 + ($$ % 1000)))\nHOST=127.0.0.1 PORT=$PORT node \"$WORKDIR/server.js\" &\nSERVER_PID=$!\ntrap 'kill $SERVER_PID 2>/dev/null; rm -rf \"$WORKDIR\"' EXIT\n{emit_host_node_http_probe_script}"
toolchain_provision_shell_exec(script: script)
}
7 changes: 6 additions & 1 deletion src/v2/lens/medium_structure_containment.dag
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ data emitted_medium_emit_fns: List<String> = [
"serialize_template",
"gunbc_ci_workflow_run",
"gunbc_ci_run_script",
"ci_cgroup_peak_locate_shell",
"ci_floor_peak_pre_script",
"ci_floor_peak_post_script",
"scheduler_invoke",
"git_fetch_script",
"ci_release_build_script",
Expand Down Expand Up @@ -136,6 +139,8 @@ data medium_structure_exception_roster: List<String> = [

"dag/gunbc/ci_workflow.dag",
"dag/gunbc/ci_materialization.dag",
"src/v2/workflow/ci_floor_peak_emit.dag",
"src/v2/workflow/ci_floor_peak_emit_test.dag",
"dag/extdeps/formats/yaml.dag",

"dag/test/claim/ci_yaml_serializer_witness_test.dag",
Expand Down Expand Up @@ -209,7 +214,7 @@ data medium_structure_exception_roster: List<String> = [

data medium_structure_clean_tree_unquarantine_note: String = "Pre-existing rot surfaced by live host census at discovery-flip unquarantine (2026-07-09; not debt introduced by this PR): dag_compile_clean_shard_transport is shell-transport sibling to already-rostered seam/shard_totality transports; os_install_deduction + v1_dag_parse witness tests pair string_contains with emit-fn output (same pattern as ci_yaml_serializer_witness_test.dag)."

data medium_structure_exception_roster_size_baseline: Int = 59
data medium_structure_exception_roster_size_baseline: Int = 61

fn roster_growth_ratchet_holds(live_size: Int, baseline: Int) -> Bool {
live_size <= baseline
Expand Down
Loading
Loading