vms-01b: HELP .HLB compilation + HLP$LIBRARY search list - #481
Merged
Merged
Conversation
Next deferred slice of the HELP facility epic (after #449's hierarchical .HLP engine): compile a numbered-level .HLP source into a key-indexed .HLB help library, and locate HELP's library through the HLP$LIBRARY search list. LIBRARY/HELP/CREATE lib.HLB src.HLP now compiles the source: a VMS HELP library is keyed by its level-1 topics, so the compile splits the .HLP by level-1 keys and writes one module per key into the OVMX "LBRO" container (dcl/hlb.h), reusing the vms-ca9 LIBRARIAN library infrastructure. The reader (dcl_help.c help_open_hlb) reads the modules in index order and reconstructs the exact numbered-level tree, so a compiled .HLB is indistinguishable from its .HLP source once loaded. LIBRARY/HELP list/extract keep working on the compiled form. HELP resolves its library through the documented HLP$LIBRARY, HLP$LIBRARY_1..n search list (help_open_libraries), each translation defaulting to .HLB, falling back to SYS$HELP:HELPLIB.HLB then .HLP. Libraries merge in order so a key in an earlier library wins. Clean-room (Rule 8): the LIBRARY command, the HELP library-compile semantics (each level-1 key is a module), and the HLP$LIBRARY search list are documented (VSI OpenVMS DCL Dictionary: LIBRARY, HELP; Command Definition, Librarian, and Message Utilities Manual). The unpublished .HLB byte layout is NOT reproduced -- the LBRO container is a labeled OVMX design choice. No facades (INV-DCL): real compile writing a real indexed file, real search-list resolution, real content lookup. VMS status codes throughout. Tests: test_help_engine.c gains hermetic .HLB-reader + search-list-merge coverage (29/29 ok); new tests/dcl/test_help_hlb.sh drives the full DCL chain (compile two libraries, wire HLP$LIBRARY + HLP$LIBRARY_1, assert HELP reads the compiled .HLB via each, and first-library precedence for a shared key). dcl-integration 136/0, dcl-help-engine pass, no #449 regression. Native-link unchanged (no new TU/symbol; NOBJ stays 25; the three touched TUs compile clean under freestanding musl). 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
…tes real OVMX code) (#500) Bump OVMX_PRODUCT_VERSION V0.4-3 → V0.4-4. ~12 PRs since V0.4-3. Headline: OVMX's own toolchain now builds real OVMX code to a running image INSIDE OVMX. SELF-HOST IN-GUEST MMK.EXE drives TCC→LIBRARIAN→LINK over its mailbox DCL vs real /dev/vms: #476 compile-in-QEMU (first-ever TCC-in-guest), #488 archive, #493 full compile→archive→LINK→ACTIVATE (linked OVMXRT.EXE IMGACT-activates + runs, exit 216), byte-identical, CI-gated from clean archive. (BUILD.COM retirement → vms-89d.) UX FIDELITY #461 DIRECTORY wildcards/ellipsis · #478 COPY/DELETE/RENAME (explicit-version DELETE) · #481 HELP .HLB library · #487 SET SYMBOL scope · #491 DCL ON/SET NOON error control BOOT INTEGRITY #499 boot-smoke green (aligned 3 e2e tests to authentic DELETE/DIRECTORY output; strengthened the fail-stop guard) + swept other threads' merged work 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.
Summary
Next deferred slice of the HELP facility epic (vms-01b), following #449's hierarchical
.HLPengine:.HLBhelp-library compilation andHLP$LIBRARYsearch-list location. The epic stays open — per-command CDU help, HELP/MESSAGE, and the terminal subtopic-prompt-for-specified-topic remain.What landed
.HLBcompilation —LIBRARY/HELP/CREATE lib.HLB src.HLPcompiles a numbered-level.HLPsource into a key-indexed.HLB. A VMS HELP library is keyed by its level-1 topics, so the compile splits the source by level-1 keys and writes one module per key into the OVMX "LBRO" container (dcl/hlb.h), reusing the vms-ca9 LIBRARIAN library infrastructure.LIBRARY/HELPlist/extract keep working on the compiled form..HLBreader —dcl_help.chelp_open_hlb()reads the modules in index order and reconstructs the exact numbered-level tree, so a compiled.HLBis indistinguishable from its.HLPsource once loaded.help_open_any()auto-detects LBRO magic vs raw source.HLP$LIBRARYsearch list — HELP resolves its library through the documentedHLP$LIBRARY,HLP$LIBRARY_1..nsearch list (help_open_libraries()), each translation defaulting to.HLB, falling back toSYS$HELP:HELPLIB.HLBthen.HLP. Libraries merge in search order, so a topic in an earlier library wins..HLBrepresentation choiceThe
.HLBis the existing OVMX "LBRO" container (shared with LIBRARY/LIBRARIAN via the newdcl/hlb.h), library type HELP, one module per level-1 key. This reuses vms-ca9's infra rather than defining a second format.Clean-room (Rule 8)
The LIBRARY command surface, the HELP library-compile semantics (each level-1 key is a module), and the
HLP$LIBRARYsearch list are documented behavior — VSI OpenVMS DCL Dictionary (LIBRARY, HELP) and the VSI OpenVMS Command Definition, Librarian, and Message Utilities Manual (Librarian). The unpublished.HLBbyte layout is NOT reproduced; the LBRO container is a labeled OVMX design choice, never presented as VMS-authentic.No facades (INV-DCL)
Real compile writing a real indexed file, real search-list resolution, real content lookup — no hardcoded help. VMS status codes throughout.
Tests
tests/dcl/test_help_engine.c— hermetic.HLB-reader + search-list-merge coverage (builds an LBRO container by hand, asserts navigation; two-library merge asserts first-library precedence). 29/29 ok.tests/dcl/test_help_hlb.sh(new) — drives the full DCL chain: compile two.HLBlibraries, wireHLP$LIBRARY+HLP$LIBRARY_1, assert HELP reads a topic present only in the first viaHLP$LIBRARY, one only in the second viaHLP$LIBRARY_1(search continues), and first-library precedence for a shared key.dcl-integration136 passed / 0 failed;dcl-help-enginepass;dcl-harness-selftestpass. No vms-01b: HELP — faithful hierarchical-library reader (retire the printf shim + orphaned dead reader) #449 regression (existing HELP-content and LIBRARY tests green).Native-link
No new translation unit or cross-image symbol (only a new header included by existing TUs + functions inside
dcl_help.c/dcl_library.c/dcl_cmd_misc.c). Native-link enumerations unchanged —run_dcl_native.shNOBJstays 25 — and the three touched TUs compile clean under freestanding musl (-ffreestanding -fno-builtin).Follow-up (not in scope)
The shipped
SYS$HELP:HELPLIB.HLPis left as.HLPsource (the reader consumes it, and the.HLBfallback is tried first); precompiling aHELPLIB.HLBinto the bootable image is a mechanical follow-up.🤖 Generated with Claude Code