GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(images): package main diagnostic and verify compiled source prove… · arencloud/unf@98ca1a7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .containerignore
  • bins/unf-agent/src
    • main.rs
  • docs
    • adr
      • 0433-main-diagnostic-packaging-and-compiled-provenance.md
    • development
      • phase9-attested-encryption-fabric-plan.md
      • phase9-required-locality-plan.md
    • project-status.md
  • hack
    • verify-locality-incarnation-gate.sh
    • verify-main-locality-bridge.sh
  • images
    • Containerfile
    • KernelLocalityTestContainerfile
    • KernelMainLocalityTestContainerfile
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.containerignore‎

Copy file name to clipboardExpand all lines: .containerignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ target/
1414
ebpf/unf-ebpf-tc/target/
1515
docs/
1616
hack/*
17+
!hack/verify-main-locality-bridge.sh
1718
!hack/verify-cni-workload-ownership.sh
1819
!hack/verify-local-delivery-device-lifetime.sh
1920
!hack/local-delivery-device-gate.jq
Collapse file

‎bins/unf-agent/src/main.rs‎

Copy file name to clipboardExpand all lines: bins/unf-agent/src/main.rs
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20158,6 +20158,18 @@ mod tests {
2015820158
.expect("construct test controller client")
2015920159
}
2016020160

20161+
#[test]
20162+
#[ignore = "requires exact expected source revision from immutable diagnostic gate"]
20163+
fn diagnostic_build_revision_matches_source() {
20164+
let expected =
20165+
std::env::var("UNF_EXPECT_BUILD_REVISION").expect("explicit expected source revision");
20166+
assert!(expected.len() == 40 && expected.bytes().all(|byte| byte.is_ascii_hexdigit()));
20167+
assert_eq!(
20168+
BUILD_REVISION, expected,
20169+
"compiled source revision differs from immutable diagnostic provenance"
20170+
);
20171+
}
20172+
2016120173
#[tokio::test]
2016220174
async fn unexpected_task_panic_is_a_supervised_failure() {
2016320175
let mut tasks = JoinSet::new();
Collapse file

‎docs/adr/0433-main-diagnostic-packaging-and-compiled-provenance.md‎

Copy file name to clipboard
+30Lines changed: 30 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ADR 0433: Main diagnostic packaging and compiled provenance
2+
3+
Date: 2026-09-21
4+
5+
Status: packaging repair implemented; rebuilt platform gate pending
6+
7+
The `843d810` main-program diagnostic build failed at its final script COPY:
8+
`.containerignore` excluded the new script. No image was published and no
9+
platform test or runtime rollout used that attempt. The failure is retained in
10+
`.artifacts/p9-main-locality-843d810-build.log`. The allowlist now includes the
11+
exact script **after** the general `hack/*` exclusion.
12+
13+
Review also found an old revision in a reused intermediate builder layer's
14+
configuration metadata. Direct inspection of the resulting `5f03031` startup
15+
binary instead found the correct full `5f030319526bb534bf73c64cac1b04378907a972`
16+
revision, not that old value. Thus there is no demonstrated mislabeled binary
17+
and ADR 0431's behavioral results remain valid. Intermediate metadata is not
18+
sufficient evidence of the compiler's effective environment.
19+
20+
The production and diagnostic build commands now explicitly export the revision
21+
from the distinct source ARG in the same RUN as compilation. The main diagnostic
22+
also runs an exact test comparing the compiled `BUILD_REVISION` with an externally
23+
provided full source revision. The gate requires that value, supplies it to the
24+
Pod and records it in evidence. Five exact tests must execute, including that
25+
positive provenance assertion; an empty filtered test list cannot pass.
26+
27+
Local test compilation, strict agent all-target Clippy and shell syntax checks
28+
are required. The rebuilt immutable main-program gate must still pass cl02 first,
29+
then matching Kind. Pending reverse-Service edits are separate from this repair
30+
and must not enter its source/ELF provenance. No production state changed.
Collapse file

‎docs/development/phase9-attested-encryption-fabric-plan.md‎

Copy file name to clipboardExpand all lines: docs/development/phase9-attested-encryption-fabric-plan.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ Production state is unchanged; full runtime and L3/L4/L5/Q remain open.
7474
ADR 0432 implements the policy-first forward bridge and dedicated continuation
7575
loading. Actual-main kernel qualification, reverse-Service composition, full
7676
publisher/writer delivery and restart continuity remain pending; no live rollout.
77+
ADR 0433 repairs the diagnostic script allowlist after a pre-deployment build
78+
failure and requires exact compiled source evidence. The main-program gate and
79+
full Phase 9 closure remain pending.
7780
ADRs 0381–0382
7881
qualify the isolated joint attachment/route observation on cl02 then Kind;
7982
ADR 0383 verifies stale-safe journal cuts locally. ADR 0384 implements the
Collapse file

‎docs/development/phase9-required-locality-plan.md‎

Copy file name to clipboardExpand all lines: docs/development/phase9-required-locality-plan.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ ADR 0432 adds the actual policy-first forward bridge and four dedicated
166166
continuations, including local DSR NAT revalidation and ordinary missing-bank
167167
fallback. Its real-main verifier/TestRun gate must pass cl02 before Kind.
168168
Reverse-Service composition and complete live delivery remain open; no rollout.
169+
ADR 0433 retains the main diagnostic's pre-deployment COPY/allowlist failure and
170+
adds an exact compiled-revision assertion. Rebuild and cl02-first validation
171+
remain required; intermediate layer metadata is not binary provenance.
169172

170173
## Safety and efficiency boundary
171174

Collapse file

‎docs/project-status.md‎

Copy file name to clipboardExpand all lines: docs/project-status.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,9 @@ ADR 0432 adds policy-first forward dispatch to the sealed bank, ordinary
970970
encryption fallback and separate DSR NAT/revalidation continuations. Local
971971
checks pass; actual-main cl02-before-Kind kernel checks, reverse-Service
972972
composition and full runtime delivery/recovery remain open. No rollout occurs.
973+
ADR 0433 retains the failed diagnostic packaging attempt, repairs its allowlist
974+
and adds a compiled-revision assertion. No incorrect resulting binary revision
975+
was demonstrated; rebuilt main-program cl02-before-Kind validation remains next.
973976
ADR 0338 closes the staging guard's init-container failure/restart gap before
974977
the matching Kind rollout; no live image changes occur in that metadata slice.
975978
Required locality/replica coverage, full lifecycle requalification and S1–S5
Collapse file

‎hack/verify-locality-incarnation-gate.sh‎

Copy file name to clipboardExpand all lines: hack/verify-locality-incarnation-gate.sh
+12-5Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ deadline_seconds=180
1818
poll_attempts=100
1919
case $suite in
2020
kernel-main-bridge)
21+
: "${UNF_LOCALITY_GATE_SOURCE_REVISION:?exact expected compiled source revision}"
22+
[[ $UNF_LOCALITY_GATE_SOURCE_REVISION =~ ^[0-9a-f]{40}$ ]]
2123
test_command='["env","UNF_MAIN_LOCALITY_ISOLATED_CONTAINER=yes","bash","/usr/local/bin/verify-main-locality-bridge"]'
22-
marker='main-locality-suite: PASS tests=4 actual-main=true missing-bank-fallback=true live-attachment=false bank-delivery=false$'
24+
marker='main-locality-suite: PASS tests=5 compiled-source=true actual-main=true missing-bank-fallback=true live-attachment=false bank-delivery=false$'
2325
memory_limit=2Gi
2426
cpu_limit=2
2527
deadline_seconds=300
@@ -95,8 +97,8 @@ cleanup() {
9597
rg -q "$marker" "$directory/test.log" || result=1
9698
fi
9799
if [[ $suite == kernel-main-bridge ]]; then
98-
[[ $(rg -c 'main-locality-check: name=.* passed=true$' "$directory/test.log") == 4 ]] || result=1
99-
[[ $(rg -c 'test result: ok\. 1 passed; 0 failed; 0 ignored;' "$directory/test.log") == 4 ]] || result=1
100+
[[ $(rg -c 'main-locality-check: name=.* passed=true$' "$directory/test.log") == 5 ]] || result=1
101+
[[ $(rg -c 'test result: ok\. 1 passed; 0 failed; 0 ignored;' "$directory/test.log") == 5 ]] || result=1
100102
fi
101103
if [[ $suite == kernel-delivery || $suite == kernel-admission || $suite == kernel-journal-floor || $suite == kernel-runtime-owner || $suite == kernel-agent-startup ]]; then
102104
if rg -q 'kernel-locality-delivery: PASS allowed=8 denied=16 protocols=tcp,udp families=4,6 request-bank=true reply-native=true production-policy=false$' "$directory/test.log" &&
@@ -119,8 +121,9 @@ cleanup() {
119121
rg -q 'observed-locality-mixed-mtu: PASS source=1400 target=1450 uniform-mismatch-rejected=true$' "$directory/test.log" || result=1
120122
rg -q 'kernel-locality-agent-startup: PASS actual-agent=true early-owner=true real-journal-floor=5 armed-reopen-withdrawn=true partial-rejected=true missing-same-boot-rejected=true client-error-supervised=true bytes-preserved=true packet-attachment=false cleanup=true$' "$directory/test.log" || result=1
121123
fi
122-
jq -n --argjson code "$result" --argjson removed "$removed" --argjson delivery "$delivery" --arg platform "$UNF_LOCALITY_GATE_PLATFORM" --arg suite "$suite" --arg image "$image" --arg node "$UNF_LOCALITY_GATE_NODE" --arg uid "$UNF_LOCALITY_GATE_NODE_UID" --arg ns "$namespace" --arg nsuid "$namespace_uid" \
123-
'{schemaVersion:2,result:(if $code==0 then "passed" else "failed" end),platform:$platform,suite:$suite,image:$image,node:$node,nodeUid:$uid,namespace:$ns,namespaceUid:$nsuid,cleanup:$removed,packetDeliveryTested:$delivery}' > "$directory/evidence.json"
124+
jq -n --argjson code "$result" --argjson removed "$removed" --argjson delivery "$delivery" --arg platform "$UNF_LOCALITY_GATE_PLATFORM" --arg suite "$suite" --arg image "$image" --arg node "$UNF_LOCALITY_GATE_NODE" --arg uid "$UNF_LOCALITY_GATE_NODE_UID" --arg ns "$namespace" --arg nsuid "$namespace_uid" --arg source "${UNF_LOCALITY_GATE_SOURCE_REVISION:-}" \
125+
'{schemaVersion:2,result:(if $code==0 then "passed" else "failed" end),platform:$platform,suite:$suite,image:$image,node:$node,nodeUid:$uid,namespace:$ns,namespaceUid:$nsuid,cleanup:$removed,packetDeliveryTested:$delivery}
126+
+ (if $suite=="kernel-main-bridge" then {expectedCompiledSourceRevision:$source} else {} end)' > "$directory/evidence.json"
124127
printf 'Incarnation gate result=%s evidence=%s\n' "$result" "$directory"
125128
exit "$result"
126129
}
@@ -132,6 +135,10 @@ if [[ $UNF_LOCALITY_GATE_PLATFORM == cl02 ]]; then
132135
"${kc[@]}" -n "$namespace" create rolebinding gate-privileged --clusterrole=system:openshift:scc:privileged --serviceaccount="$namespace:default" >/dev/null
133136
fi
134137
jq -n --arg ns "$namespace" --arg node "$UNF_LOCALITY_GATE_NODE" --arg image "$image" --argjson command "$test_command" --arg memory "$memory_limit" --arg cpu "$cpu_limit" --argjson deadline "$deadline_seconds" '{apiVersion:"v1",kind:"Pod",metadata:{name:"gate",namespace:$ns},spec:{nodeName:$node,hostNetwork:true,automountServiceAccountToken:false,restartPolicy:"Never",activeDeadlineSeconds:$deadline,containers:[{name:"gate",image:$image,imagePullPolicy:"IfNotPresent",securityContext:{privileged:true,runAsUser:0},resources:{requests:{cpu:"100m",memory:"64Mi"},limits:{cpu:$cpu,memory:$memory}},env:[{name:"UNF_LOCALITY_GATE_ISOLATED_CONTAINER",value:"yes"},{name:"UNF_OBSERVED_BANK_ISOLATED_CONTAINER",value:"yes"}],command:$command}]}}' > "$directory/pod.json"
138+
if [[ $suite == kernel-main-bridge ]]; then
139+
jq --arg source "$UNF_LOCALITY_GATE_SOURCE_REVISION" '.spec.containers[0].env += [{name:"UNF_EXPECT_BUILD_REVISION",value:$source}]' "$directory/pod.json" > "$directory/pod-source.json"
140+
mv "$directory/pod-source.json" "$directory/pod.json"
141+
fi
135142
"${kc[@]}" create -f "$directory/pod.json" >/dev/null
136143
finished=false
137144
for _ in $(seq 1 "$poll_attempts"); do
Collapse file

‎hack/verify-main-locality-bridge.sh‎

Copy file name to clipboardExpand all lines: hack/verify-main-locality-bridge.sh
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
set -Eeuo pipefail
44
[[ ${UNF_MAIN_LOCALITY_ISOLATED_CONTAINER:-} == yes && $EUID == 0 ]]
55
export UNF_EBPF_OBJECT=/usr/local/lib/unf/main-locality-test
6+
[[ ${UNF_EXPECT_BUILD_REVISION:-} =~ ^[0-9a-f]{40}$ ]]
67
output=$(mktemp /tmp/unf-main-locality.XXXXXX)
78
trap 'rm -f -- "$output"' EXIT
89
for name in \
10+
diagnostic_build_revision_matches_source \
911
privileged_encryption_finalizer_is_dual_stack_late_bound_and_fail_closed \
1012
privileged_locality_bridge_missing_bank_keeps_exact_encryption_and_marks \
1113
privileged_egress_source_steering_is_policy_first_destination_exact_and_dual_stack \
@@ -14,4 +16,4 @@ for name in \
1416
grep -Eq '^test result: ok\. 1 passed; 0 failed; 0 ignored;' "$output"
1517
printf 'main-locality-check: name=%s passed=true\n' "$name"
1618
done
17-
printf 'main-locality-suite: PASS tests=4 actual-main=true missing-bank-fallback=true live-attachment=false bank-delivery=false\n'
19+
printf 'main-locality-suite: PASS tests=5 compiled-source=true actual-main=true missing-bank-fallback=true live-attachment=false bank-delivery=false\n'
Collapse file

‎images/Containerfile‎

Copy file name to clipboardExpand all lines: images/Containerfile
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ FROM ${RUST_IMAGE} AS builder
44
# Keep the input distinct from the compiler environment: a reused builder's
55
# ENV takes precedence over an ARG with the same name.
66
ARG UNF_SOURCE_REVISION=unknown
7-
ENV UNF_BUILD_REVISION=${UNF_SOURCE_REVISION}
87

98
WORKDIR /src
109

@@ -13,7 +12,8 @@ COPY crates ./crates
1312
COPY bins ./bins
1413
COPY ebpf/unf-ebpf-common ./ebpf/unf-ebpf-common
1514

16-
RUN cargo build --locked --release --package unf-controller --package unf-agent --package unf-cni
15+
RUN export UNF_BUILD_REVISION="${UNF_SOURCE_REVISION}" \
16+
&& cargo build --locked --release --package unf-controller --package unf-agent --package unf-cni
1717

1818
FROM docker.io/library/debian:bookworm-slim
1919

Collapse file

‎images/KernelLocalityTestContainerfile‎

Copy file name to clipboardExpand all lines: images/KernelLocalityTestContainerfile
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ ARG LEGACY_AGENT_IMAGE=quay.io/arencloud/unf-agent-dev@sha256:74f80c81d5a208dcfe
55
FROM ${LEGACY_AGENT_IMAGE} AS legacy-agent
66
FROM ${RUST_IMAGE} AS builder
77
ARG UNF_SOURCE_REVISION=unknown
8-
ENV UNF_BUILD_REVISION=${UNF_SOURCE_REVISION}
98
WORKDIR /src
109
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
1110
COPY crates ./crates
1211
COPY bins ./bins
1312
COPY ebpf/unf-ebpf-common ./ebpf/unf-ebpf-common
14-
RUN cargo build --locked --release --package unf-locality --example kernel_observed_bank \
13+
RUN export UNF_BUILD_REVISION="${UNF_SOURCE_REVISION}" \
14+
&& cargo build --locked --release --package unf-locality --example kernel_observed_bank \
1515
&& cargo build --locked --release --package unf-agent
1616

1717
FROM ${TEST_IMAGE}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.