Codify semantic fidelity and executive-residency as project rules 10 and 11 - #8
Closed
baron-3dl wants to merge 1 commit into
Closed
Codify semantic fidelity and executive-residency as project rules 10 and 11#8baron-3dl wants to merge 1 commit into
baron-3dl wants to merge 1 commit into
Conversation
…and 11 Operator ruling 2026-07-30: "these are project-wide rules, really." Both had been enforced ad hoc in item descriptions and review comments, which meant every agent reading an item cold could — and repeatedly did — reinvent the thing they forbid. Rule 10 — semantic fidelity, two legal answers, never three: MATCH VMS (pinned to the oracle) or HIDE IT because VMS has no such thing (make the condition unreachable rather than handling it). The illegal third answer is inventing a plausible-looking handler for a condition VMS never faces. It always looks like diligence and always ships a lie. Both worked examples are recorded because both were live this week: the /dev/vms per-call fallbacks, and carrying a VMS process name across exec in an environment variable. Rule 11 — VMS system facilities are executive-resident shared state, not per-process memory, with the A-writes/B-reads test as the decisive check. A per-process fake passes every single-process test perfectly, which is how the process table, the logical name tables and the unwired vms_kif all survived unnoticed. Names the three known facades so they stop being cited as precedent. Also flags that Rule 9's SS$_NOSUCHDEV parenthetical is superseded in part by Rule 10 — returning it per call was itself the wrong answer. Rule 9's text is left intact rather than rewritten, with the correction noted inline. No code change; conventions only. Refs: vms-14f, vms-8019, vms-a4b, vms-9fc, vms-0ff
Contributor
Author
|
Closing: superseded / not being carried forward. Branch vms-semantic-rules retained. |
baron-3dl
pushed a commit
that referenced
this pull request
Aug 10, 2026
The kif_caller_census authenticity gate (tests/integration/ test_kif_caller_census.sh, ctest #8) requires every VMS_IOCTL_* opcode in src/kernel/vms_ioctl.h to be issued by a wrapper in src/libvmssys/vms_kif.c, with no escape hatch for an orphaned opcode -- "if you add an ioctl, land its wrapper in the same commit." The first cut added VMS_IOCTL_GET_RESMASTER and drove it from the test with a raw ioctl, which stranded the opcode (census FAIL: "kernel opcode(s) no wrapper in vms_kif.c ever issues"). Fix, mirroring vms_kif_getlki (the other lock diagnostic with no product caller): - vms_kif_get_resmaster() issues VMS_IOCTL_GET_RESMASTER via KIF_CALL -- satisfies the opcode floor (now 40/40). - Declared OVMX-UNWIRED: vms_kif_get_resmaster (vms-ci.5) in vms_kif.h: a read-only DLM diagnostic with no sys$ service and no product path, exactly the getlki footing. When 0.4 gives the DLM a product reader (SHOW CLUSTER / lock-master query), wire it and delete the line. - test_kmod_resdir.c now calls the wrapper (includes vms_kif.h), so it is built against the real kernel-interface client like test_kmod_lock, not a hand-rolled ioctl copy. No SYS_VEC change: the diagnostic has no natively-linked product image referencing it, so it is not in LIBVMSSYS$SHR's export vector (same as vms_kif_getlki). Census PASS verified locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
baron-3dl
added a commit
that referenced
this pull request
Aug 10, 2026
…5 DB) (#264) * dlm: kernel resource-directory + LOCAL mastering scaffolding (vms-ci.5 DB) Start the DLM build wave on the kernel side: give the single-node lock manager (src/kernel/vms_lock.c) the resource-directory + mastering structures, the LOCAL loopback-testable parts only. Remote forwarding and remastering are honestly deferred to 0.4 (vms-ci.5 DC/DD), stubbed SS$_UNSUPPORTED -- never a fabricated remote answer. Grounding: IDSM lock-management "directory lookups" (mined transcript ch6-part02, pp. 6-18..6-35) and docs/design-cluster-node.md §5. - CSID / node awareness: vms_local_csid (module param, non-zero default; 0 reserved for "unmastered"). Stub-of-one membership; the connection manager feeds the real CSID + live membership in 0.4. - Resource-directory hash: dlm_directory_csid() hashes the resource name and selects, modulo the member count, an entry of the directory vector that names the directory node -- the documented structure; the specific jhash is an OVMX design choice (Rule 8). Resolves to self in a cluster of one. - Local master path: struct vms_lock_resource gains dir_csid/master_csid; $ENQ resolves the directory (self) and masters the resource on first use (self) BEFORE granting, then falls through to the existing single-node lock manager unchanged. A remote directory/master returns SS$_UNSUPPORTED (unreachable in a cluster of one -- an honest deferral, not fake remote state). - VMS_IOCTL_GET_RESMASTER (0x34): read-only diagnostic reporting a resource's directory node, mastering node and granted count without creating or mastering it -- so the proof observes real structures. Proof: tests/qemu/test_kmod_resdir.c drives /dev/vms with raw ioctls -- an unmastered resource is directoried-to-self but master_csid 0; $ENQ masters it locally (is_local_master, n_granted=1); a second $ENQ on the same resource finds the existing master (master_csid stable, resource block reused, n_granted 2). Auto-discovered by the QEMU harness glob; returns nonzero without /dev/vms (kernel-executive negative control). Existing $ENQ/$DEQ behavior (modes, blocking ASTs, deadlock, value blocks) is unchanged: the local-master path only gates the enqueue, it does not replace the grant logic. vms.ko builds clean; single vms_ioctl.h copy (no SYS_VEC churn -- the diagnostic uses a raw ioctl, no vms_kif symbol). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * dlm: wire the GET_RESMASTER opcode through vms_kif (kif_caller_census) The kif_caller_census authenticity gate (tests/integration/ test_kif_caller_census.sh, ctest #8) requires every VMS_IOCTL_* opcode in src/kernel/vms_ioctl.h to be issued by a wrapper in src/libvmssys/vms_kif.c, with no escape hatch for an orphaned opcode -- "if you add an ioctl, land its wrapper in the same commit." The first cut added VMS_IOCTL_GET_RESMASTER and drove it from the test with a raw ioctl, which stranded the opcode (census FAIL: "kernel opcode(s) no wrapper in vms_kif.c ever issues"). Fix, mirroring vms_kif_getlki (the other lock diagnostic with no product caller): - vms_kif_get_resmaster() issues VMS_IOCTL_GET_RESMASTER via KIF_CALL -- satisfies the opcode floor (now 40/40). - Declared OVMX-UNWIRED: vms_kif_get_resmaster (vms-ci.5) in vms_kif.h: a read-only DLM diagnostic with no sys$ service and no product path, exactly the getlki footing. When 0.4 gives the DLM a product reader (SHOW CLUSTER / lock-master query), wire it and delete the line. - test_kmod_resdir.c now calls the wrapper (includes vms_kif.h), so it is built against the real kernel-interface client like test_kmod_lock, not a hand-rolled ioctl copy. No SYS_VEC change: the diagnostic has no natively-linked product image referencing it, so it is not in LIBVMSSYS$SHR's export vector (same as vms_kif_getlki). Census PASS verified locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: alice <alice@workspace.local> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
baron-3dl
added a commit
that referenced
this pull request
Aug 21, 2026
…ttach() (Rule 9 gate) Integration regression on work/vms-0.5-final: the "Build & Test" job built clean but ctest went red on runtime_target_gate (#5) and, as a consequence, runtime_target_negctl (#8) -- the standing Rule 9 / INV-6 gates (tests/integration/test_runtime_target.sh). Each merged branch was green alone; the combination reddened the gate. ROOT CAUSE (merge interaction). vms-46c-sysboot-acp refactored ovmx_init.c's executive_attach(): pre-merge it was ONE function that loaded vms.ko, opened /dev/vms via the boot seam, CAPTURED the descriptor into executive_fd, HALTED if the open failed, and emitted the %OVMX-I-EXEC line inline. The refactor split that into executive_attach_silent() (capture + halt) + executive_announce() (the printf) + a thin executive_attach() wrapper that just calls the two. It did this for a real reason -- the conversational SYSBOOT> path must attach the executive BEFORE the prompt but print nothing until after it. But check 3 of the Rule 9 gate inspects the body of the function LITERALLY named executive_attach() for the descriptor capture, the terminal-halt failure branch, and the pin; after the refactor that body only delegates, so the gate reported "no ovmx_boot_open_executive() result is captured into a variable" and failed. #8's positive control re-runs #5, so it failed with it. The gate and its negctl were not touched by the merge, so they were left inspecting a function that no longer held the guarantee. FIX (code, not the gate). Restore the executive guarantee INTO executive_attach() itself -- capture, `if (executive_fd < 0)` terminal ovmx_exec_halt(), and the pinned file-static fd -- and add an `announce` parameter so the silent conversational path is preserved: executive_attach(0) attaches without the console line (deferring it to executive_announce() after SYSBOOT>), and every other caller uses executive_attach(1) for the inline announce. This keeps the guarantee in the exact function the gate reads and leaves the guarantee lines verbatim (so the negctl's line-anchored mutations still trip), while preserving vms-46c's silent-boot behaviour. test_runtime_target.sh and its negctl are UNCHANGED -- no gate weakened, no allowlist added (CLAUDE.md Rule 9). Verified by full ctest on the k3s rail (real git clone, non-dind). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
baron-3dl
added a commit
that referenced
this pull request
Aug 21, 2026
…ch() (Rule 9 gate) Integration regression on work/vms-0.5-final: the "Build & Test" job built clean but ctest went red on runtime_target_gate (#5) and, as a consequence, runtime_target_negctl (#8) -- the standing Rule 9 / INV-6 gates (tests/integration/test_runtime_target.sh + its negative control). Each merged branch was green alone; the combination reddened the gate. ROOT CAUSE (merge interaction). vms-46c-sysboot-acp refactored ovmx_init.c's executive_attach(). Pre-merge it was ONE function that loaded vms.ko, opened /dev/vms via the boot seam, CAPTURED the descriptor into executive_fd, HALTED if the open failed, pinned the fd, and emitted the %OVMX-I-EXEC line inline. The refactor split that into executive_attach_silent() (capture + halt) + executive_announce() (the printf) + a thin executive_attach() wrapper that just calls the two. It did this for a real reason -- the conversational SYSBOOT> path must attach the executive BEFORE the prompt (the Files-11 ACP $MOUNT needs it) yet print nothing until after it. But check 3 of the gate inspects the body of the function LITERALLY named executive_attach() for the descriptor capture, the terminal-halt failure branch, and the pin; after the refactor that body only delegates, so the gate reported "no ovmx_boot_open_executive() result is captured into a variable" and failed. The negctl was untouched by the merge, so its positive control (which re-runs the gate on the unmutated tree) failed with #5, and its 3b(h) mutation still anchored the executive_attach(void) signature. FIX (code only -- no test touched). Move the guarantee back INTO executive_attach() itself: the load, the executive_fd = ovmx_boot_open_executive() capture, the `if (executive_fd < 0)` terminal ovmx_exec_halt(), the pinned file-static fd, and the %OVMX-I-EXEC printf all live in the one function the gate reads again. The conversational path's need to defer the console line is met by a file-static executive_announce_deferred flag (set before the silent attach, announced via executive_announce() after SYSBOOT>) -- a deferral of the ANNOUNCE only; the capture+halt+pin guarantee is unconditional. Signature stays executive_attach(void), and the guarantee lines stay verbatim, so both the gate and every negctl mutation (including 3b(h), which anchors the signature) match and trip exactly as before. tests/integration/test_runtime_target.sh and test_runtime_target_negctl.sh are UNCHANGED -- no gate weakened, no allowlist added (CLAUDE.md Rule 9). Verified locally: gate PASS, negctl 31/31; full ctest re-run on the k3s rail (real git clone, non-dind) below. NOT part of this fix: dcl-integration (#117) fails on the bare builder/rail image (SET ACCOUNTING cannot write SYS$MANAGER:ACCOUNTNG.ENB with no populated VMS root) -- it fails identically on the pre-merge base commit 06e62f5, so it is a pre-existing environment artifact, not an integration regression. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Operator ruling 2026-07-30: "these are project-wide rules, really."
Both invariants were already being enforced — but ad hoc, in item descriptions and review comments. That meant an agent reading an item cold could reinvent exactly the thing they forbid, and this week two agents did (one of them me, twice).
Rule 10 — Semantic fidelity: two legal answers, never three
For any behavior, condition, or interface:
~/vaxlab or public docs).The illegal third answer is inventing a reasonable-looking handler for a condition VMS never faces. It always looks like diligence — graceful degradation, a sensible default, a helpful fallback — and it always ships a lie.
Both worked examples in the rule are from this week, which is why they're worth recording:
/dev/vmsfallbacks. VMS has no "executive absent" state, so the condition is unreachable, not handled — PID 1 refuses to boot. Five waves of work went into polishing those error paths before the rule revealed the paths were themselves the defect.exec.sys$creprc'sprcnamdies atexec. Carrying it in aVMS_PRCNAMenv var, following the existingVMS_USERNAME/VMS_TERMINALconvention, compiled and tested green — and was a cheat: a process self-reporting a name nothing else can see. Its only consumer was the test written to validate it.Rule 11 — VMS system facilities are executive-resident, not per-process
A system facility is shared state owned by the executive. If it lives in per-process memory it is a facade regardless of how correct its output looks.
The decisive test is A-writes / B-reads — do it in process A, observe from process B. A per-process fake passes every single-process test perfectly, which is precisely how the three known facades survived: no executive process table (
vms-8019), per-process logical name tables with a zero-client daemon (vms-a4b), andvms_kif_register()with zero callers (vms-9fc). The rule names them so they stop being cited as precedent to copy.Corollary: a user-visible VMS command is a reader of an executive facility, never a thing that fabricates its own answer.
Note on Rule 9
Rule 9's
SS$_NOSUCHDEVparenthetical is now contradicted by Rule 10 — returning it per call was itself the wrong answer. Rule 9's text is left intact with the correction noted inline, rather than silently rewritten.Conventions only — no code change.
Refs: vms-14f, vms-8019, vms-a4b, vms-9fc, vms-0ff
🤖 Generated with Claude Code