Skip to content

vms-387: fix bg-recv-length-zeroed dead anchor (targets path kernel/ -> kernel-core/) - #1225

Merged
baron-3dl merged 2 commits into
mainfrom
work/vms-bgrecv-targets
Sep 14, 2026
Merged

baron-3dl merged 2 commits into
mainfrom
work/vms-bgrecv-targets

Conversation

@baron-3dl

Copy link
Copy Markdown
Contributor

What

Fixes the active selftest FAIL bg-recv-length-zeroed: its sed anchor no longer matches the source tree.

Root cause

Not the sed text — src/kernel/vms_bg.c moved to src/kernel-core/vms_bg.c, so cmd_apply built a non-existent path from the stale targets field and found no target. The sed text (a->len = (uint32_t)n; inside vms_ioctl_bg_recv, range-anchored to exclude the identical vms_ioctl_bg_send line), the suites_red (test_syssvc_bg_echo test_syssvc_ssh_kex), and the /* negctl: bg-recv-length-zeroed */ source markers are all still valid.

Fix

targets kernel/vms_bg.ckernel-core/vms_bg.c (one line). The injection is the minimal non-fatal one — success branch a->len = (uint32_t)n;= 0;, so a 0-byte recv returns SS$_NORMAL, the guest boots, only the byte-exact echo assertion reddens.

Proof

  • selftest: bg-recv-length-zeroed now injects + no-op-reapply has teeth; removed from the anchor-FAIL list.
  • Runtime exact-red set (reddens exactly test_syssvc_bg_echo + test_syssvc_ssh_kex) proven via negctl-adhoc before flagging for reap.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HMDFjHCqxDuXgbyxNU572h

baron-3dl added a commit that referenced this pull request Sep 14, 2026
… keep sharded gate tight (#1236)

The adhoc negctl rail (negctl-adhoc.yml) runs the FULL ~124-suite pristine
control UNSHARDED plus one full-suite boot per named defect. Measured today:
under TCG contention a single 124-suite boot completes only ~89/124 in the
1800s wall (~20s/suite -> 124 needs ~2510s), self-exits (exit 1), and the
run-order tail (imgact + tcpip + ssh) reports a false-red rc=MISSING mass. This
flaked ~half of today's adhoc proofs and is the keystone blocking the whole
negctl-proof pipeline (#1225/#1226 re-anchors, #1231/#1235 dispatches).

Fix (vms-926 lineage, 600->1800 -> now 1800->2700), env-gated so it touches ONLY
the adhoc path:
- run_facility_negctl.sh: both the pristine control (line ~264) and each defect
  run (line ~273) now take KE_WALL_TIMEOUT="${NEGCTL_WALL:-1800}". Default 1800
  is UNCHANGED, so the sharded CI negctl gate
  (kernel-executive-facility-negative-controls-shard, 22 shards @ 50m, which does
  NOT set NEGCTL_WALL) stays exactly as tight as before.
- negctl-adhoc.yml: sets NEGCTL_WALL=2700 and raises the job timeout 60->100m
  (worst case 250s build + 2700 pristine + 2700 defect ~= 94m). Both walls move
  together because pristine and each defect boot the full suite set at the same
  cost -- bumping only one just relocates the flake to the other.

Guards honored: the raise is a per-boot CEILING (an uncontended boot still
finishes in ~250s and never reaches the wall, so nothing is slowed); the rc=124
outer fail-loud is preserved (message now cites ${NEGCTL_WALL}); ci.yml is
untouched (0 changes) so the sharded graduation gate is not loosened; the raw
kernel-executive-shard leg (600s run_tests.sh, no override) is likewise unaffected.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
baron-3dl and others added 2 commits September 14, 2026 16:52
…d kernel/ -> kernel-core/

The bg-recv-length-zeroed negctl was an active selftest FAIL ("its sed anchor no
longer matches the source tree"). Root cause: NOT the sed text -- the file
src/kernel/vms_bg.c moved to src/kernel-core/vms_bg.c, so cmd_apply built a
non-existent path from the stale `targets` field and found no target.

The sed text (`a->len = (uint32_t)n;` inside vms_ioctl_bg_recv, range-anchored
^long vms_ioctl_bg_recv..^}$ to exclude the identical line in vms_ioctl_bg_send),
its suites_red (test_syssvc_bg_echo test_syssvc_ssh_kex), and the
/* negctl: bg-recv-length-zeroed */ source markers are all still valid -- the
target text is present at src/kernel-core/vms_bg.c and the selftest source-copy
set already includes kernel-core. Only the targets path string was stale.

Fix: targets kernel/vms_bg.c -> kernel-core/vms_bg.c. The injection is the
minimal NON-fatal one (success branch a->len = (uint32_t)n; -> = 0; a 0-byte
recv returns SS$_NORMAL, the guest boots, only the byte-exact echo assertion
reddens).

selftest: bg-recv-length-zeroed now injects + no-op-reapply has teeth. Runtime
exact-red set proven separately via negctl-adhoc before flagging for reap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HMDFjHCqxDuXgbyxNU572h
…ecv targets fix

The bg-recv targets-path fix (kernel/ -> kernel-core/) revived the anchor, and the
runtime proof then exposed a pre-existing FAKE GATE: bg-recv-length-zeroed named
test_syssvc_ssh_kex in suites_red (+ a source marker), but ssh_kex does NOT redden
under recv-length-zero. Measured on the rail: ssh_kex stays green under
bg-recv-length-zeroed AND under bgsock-recv-length-zeroed. Root cause: ssh_kex is a
full OpenSSH E2E acceptance test whose data path rides the BSD-sockets veneer
(ovmx_socket -> BGn: -> $QIO), not the classic vms_ioctl_bg_recv this defect
patches, and OpenSSH's own framing/retries absorb a single recv-length fault.

ssh_kex was anchored ONLY here, so removing the stale claim would orphan it. Per the
never-orphan invariant's preference order, re-anchor was attempted and measured
impossible (no single-facility injection reddens it), so it is honestly SCOPED OUT:
- SCOPE_OUT_SUITES="test_syssvc_ssh_kex" + scope_out_why documenting it's a full
  OpenSSH acceptance test, not a per-facility negctl target (kept + run, just not a
  coverage-gate anchor -- INV-6, no fake anchors).
- bg-recv-length-zeroed suites_red -> test_syssvc_bg_echo ONLY; the ssh_kex
  knock_on_fail + knock_on_why removed; why-note records the measurement.
- the /* negctl: bg-recv-length-zeroed */ marker removed from ssh_kex.c.

bg_echo (the real can-fail anchor) is unaffected -- it reddens exactly as before.
Runtime exact-red set proven separately via negctl-adhoc on the 2700 wall.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@baron-3dl
baron-3dl force-pushed the work/vms-bgrecv-targets branch from d6ab6f2 to c37b300 Compare September 14, 2026 16:55
@baron-3dl
baron-3dl merged commit 146cf99 into main Sep 14, 2026
124 of 125 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant