Skip to content

vms-0d75: Ctrl/T reflexive status line (real handler over the SET CONTROL=T flag) - #448

Merged
baron-3dl merged 1 commit into
mainfrom
vms-0d75-ctrl-t-status
Aug 13, 2026
Merged

baron-3dl merged 1 commit into
mainfrom
vms-0d75-ctrl-t-status

Conversation

@baron-3dl

Copy link
Copy Markdown
Contributor

What

Wires a real Ctrl/T handler onto the DCL interactive terminal. Previously SET CONTROL=T tracked 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)

NODE::USER   hh:mm:ss   [image   ]CPU=hh:mm:ss.cc PF=n [IO=n ]MEM=n

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=315

Data sourcing (INV-6 / Rule 9 / Rule 11)

Every field is read from the executive $GETJPI row (struct vms_procinfo) the handler fetches with vms_kif_getjpi_self() — the same source SHOW PROCESS reads. Nothing is fabricated:

Field Source
node ovmx_node_name() → SCSNODE (VMS node identity, not the Linux hostname)
user info.username (executive-stamped)
time wall clock, local hh:mm:ss
CPU JPI$_CPUTIM (info.cputim, gated on VMS_PI_V_CPUTIM)
PF JPI$_PAGEFLTS (gated on VMS_PI_V_PAGEFLTS)
MEM JPI$_PPGCNT (info.pages, gated on VMS_PI_V_PAGES)

If /dev/vms is absent $GETJPI fails and the handler emits nothing — never a faked line.

Deferred honest omissions (filed, not faked)

  • IOJPI$_DIRIO/BUFIO are structurally unsourced in OVMX (their fields_valid bits are never set; src/kernel/vms_ioctl.h calls a syscall count wearing that heading a mislabel), so the token is omitted rather than fabricated.
  • image name — OVMX does not yet source JPI$_IMAGNAME for 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.c compiles the production renderer and drives dcl_format_ctrl_t_status() against a vms_procinfo shaped exactly as fill_proc_acct() fills one — the real $GETJPI boundary, no monkeypatch. Asserts: format, real-field consumption, field order (CPU→PF→MEM), image-present case, honest degrade when a valid bit is clear, and that IO= never appears (anti-fabrication, including that the struct's dirio/bufio values do not leak).

  • test_libvms_ctrl_t_status PASS; libvms suite 33/33 green.
  • dcl-integration, dcl-harness-selftest, terminal_identity_gate, runtime_target_gate/negctl all green.

Native-link

Edits existing DCL TUs only (dcl_terminal is 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

…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
baron-3dl merged commit 532c312 into main Aug 13, 2026
61 checks passed
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>
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