vms-0d75: Ctrl/T reflexive status line (real handler over the SET CONTROL=T flag) - #448
Merged
Merged
Conversation
…NTROL=T flag
SET CONTROL=T tracked a flag with no handler; Ctrl/T did nothing (a first-30-
seconds fidelity tell, docs/design-vms-parity-map.md §9.1). This wires the
handler.
- context.h: add ctrl_t_enabled (VMS default OFF, per the User's Manual).
- dcl_cmd_set.c: SET CONTROL=T / SET NOCONTROL=T now sets the flag (was a
no-op "track but not implemented" branch).
- dcl_terminal.c: dcl_format_ctrl_t_status() renders the one-liner
NODE::USER hh:mm:ss [image ]CPU=hh:mm:ss.cc PF=n [IO=n ]MEM=n
Format is clean-room from the OpenVMS User's Manual "Ctrl/T" section
(example GREEN::MCCARTHY 13:45:02 EVE CPU=00:00:03.33 PF=778 IO=295
MEM=315); no binary was disassembled (Rule 8). Every field is READ from the
executive $GETJPI row (struct vms_procinfo) the caller fetched with
vms_kif_getjpi_self() — the same source SHOW PROCESS reads. Fabricates
nothing (INV-6): node=SCSNODE (not the Linux hostname), user/CPU/PF/MEM from
the row's valid-bit-gated fields.
- dcl_main.c: static emitter + a readline Ctrl/T (0x14) binding replacing the
default transpose-chars, gated on ctrl_t_enabled; status is drawn between the
input line and a forced redraw. No /dev/vms -> emit nothing, never a faked
line (Rule 9).
Deferred honest omissions (filed as follow-up, not fabricated): the IO field
(JPI$_DIRIO/BUFIO are structurally unsourced in OVMX — valid bit never set)
and the image name (OVMX does not yet source JPI$_IMAGNAME; empty at the DCL
prompt, which is where no image is active anyway).
Test: tests/libvms/test_ctrl_t_status.c compiles the production renderer and
drives it against a vms_procinfo shaped exactly as fill_proc_acct() fills one
— the real $GETJPI boundary, no monkeypatch — asserting the format, real-field
consumption, field order, honest degrade when a valid bit is clear, and that
IO= never appears (anti-fabrication). ctest green (33/33 libvms; dcl +
terminal_identity + runtime_target gates green). Edits existing DCL TUs only
(dcl_terminal already in both native-link enumerations) + no new cross-image
symbol, so native-link is unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
baron-3dl
added a commit
that referenced
this pull request
Aug 13, 2026
…456) Bump OVMX_PRODUCT_VERSION V0.4-1 → V0.4-2. 10 PRs since V0.4-1, toward the 0.5 milestone: owns-kernel #450 OVMX builds its own pinned linux-6.12.103 LTS from source (byte-reproducible, boots 17/17+24/24) — vms-19e beachhead self-host #4 #446 MMK.EXE parses descrip.mms + emits TCC→LINK plan (exec-drive facilities, all proven vs real /dev/vms:) #451 lib$spawn real DCL (facade killed) · #452 mailbox IPC #453 write-attention AST · #454 exec-drive design record UX fidelity #447 DIRECTORY format+versions · #448 Ctrl-T status line #449 hierarchical HELP engine · #455 SHOW MEMORY (drop buffers+cached fabrication) + swept other threads' merged work MMK does not yet DRIVE builds (spine #4 needs async AST delivery + IO$M_NOW + DCL-mailbox-SYS$INPUT — filed vms-feb/5df/786, faithful path in flight). Co-authored-by: alice <alice@workspace.local> 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.
What
Wires a real Ctrl/T handler onto the DCL interactive terminal. Previously
SET CONTROL=Ttracked a flag with no handler and Ctrl/T did nothing — a first-30-seconds fidelity tell (docs/design-vms-parity-map.md§9.1). Every VMS user hits Ctrl/T; now it prints the reflexive one-liner.Format (clean-room, Rule 8)
Taken from the OpenVMS User's Manual, "Interrupting Command Execution" / "Ctrl/T" — documented example
GREEN::MCCARTHY 13:45:02 EVE CPU=00:00:03.33 PF=778 IO=295 MEM=315, with the fields defined as node/user, time of day, executing image, charged CPU time (hh:mm:ss.cc), page faults, I/O activity, and memory in CPU-specific pages. No VSI/HPE binary was disassembled.Rendered example (test output):
GREEN::MCCARTHY 13:45:02 CPU=00:00:03.33 PF=778 MEM=315Data sourcing (INV-6 / Rule 9 / Rule 11)
Every field is read from the executive
$GETJPIrow (struct vms_procinfo) the handler fetches withvms_kif_getjpi_self()— the same sourceSHOW PROCESSreads. Nothing is fabricated:ovmx_node_name()→ SCSNODE (VMS node identity, not the Linux hostname)info.username(executive-stamped)hh:mm:ssJPI$_CPUTIM(info.cputim, gated onVMS_PI_V_CPUTIM)JPI$_PAGEFLTS(gated onVMS_PI_V_PAGEFLTS)JPI$_PPGCNT(info.pages, gated onVMS_PI_V_PAGES)If
/dev/vmsis absent$GETJPIfails and the handler emits nothing — never a faked line.Deferred honest omissions (filed, not faked)
JPI$_DIRIO/BUFIOare structurally unsourced in OVMX (theirfields_validbits are never set;src/kernel/vms_ioctl.hcalls a syscall count wearing that heading a mislabel), so the token is omitted rather than fabricated.JPI$_IMAGNAMEfor a running image; empty at the DCL prompt (where no image is active anyway).How it hooks
Readline binds Ctrl/T (0x14) to the handler, replacing the emacs default transpose-chars, gated on
ctrl_t_enabled(SET CONTROL=T, default off). The status line is drawn between the current input line and a forced redraw, so it interrupts without disturbing typed input.Test
tests/libvms/test_ctrl_t_status.ccompiles the production renderer and drivesdcl_format_ctrl_t_status()against avms_procinfoshaped exactly asfill_proc_acct()fills one — the real$GETJPIboundary, no monkeypatch. Asserts: format, real-field consumption, field order (CPU→PF→MEM), image-present case, honest degrade when a valid bit is clear, and thatIO=never appears (anti-fabrication, including that the struct's dirio/bufio values do not leak).test_libvms_ctrl_t_statusPASS; libvms suite 33/33 green.dcl-integration,dcl-harness-selftest,terminal_identity_gate,runtime_target_gate/negctlall green.Native-link
Edits existing DCL TUs only (
dcl_terminalis already in both native-link enumerations —mk_dcl.sh,run_dcl_native.sh) and adds no cross-image symbol, so the native-link object graph is unchanged.🤖 Generated with Claude Code