Skip to content

vms-1c6: DIRECTORY wildcards + ellipsis uniformity, multi-dir grand total, %DIRECT-W-NOFILES - #461

Merged
baron-3dl merged 2 commits into
mainfrom
vms-1c6-wildcards-ellipsis
Aug 13, 2026
Merged

baron-3dl merged 2 commits into
mainfrom
vms-1c6-wildcards-ellipsis

Conversation

@baron-3dl

Copy link
Copy Markdown
Contributor

Slice

Next slice of vms-1c6 (File/RMS user-visible fidelity). The DIRECTORY format + version slice already landed (#447); this PR does the wildcards + ellipsis uniformity slice. The rd item stays open (broader surface remains).

What changed

Filename wildcards * / % — one matcher. * (any chars) and % (single char) continue to route through the single vmsfs_wildcard_match() (version-aware). The DIRECTORY collection is refactored into dir_collect() + dir_print_entries() so the single- and multi-directory paths share one matcher and one renderer. The DCL file commands already all call vmsfs_wildcard_match — there were no divergent DCL-layer matchers to unify.

[...] / [dir...] ellipsis — real recursion. dir_gather_recurse() performs a genuine depth-first opendir/readdir walk of the on-disk vmsfs tree (INV-6: no faked recursion — every listed file exists). dir_deellipsize() rewrites the ellipsis spec to its start directory and reuses the existing path resolution.

Multi-directory grand-total rollup. A wildcard/ellipsis listing that spans directories prints a per-directory Directory ...] header + Total of N files subtotal for each directory with matches, then one Grand total of D directories, F files[, M blocks]. line.

%DIRECT-W-NOFILES. Zero matches now emit the authentic %DIRECT-W-NOFILES, no files found warning with no header, instead of an empty Total of 0 files. success.

Grounding (clean-room, Rule 8)

VSI OpenVMS DCL Dictionary, DIRECTORY: the ... ellipsis directory wildcard ("this directory and all subdirectories below it"), the per-directory + Grand total multi-directory layout, and the NOFILES warning.

Tests

  • New tests/dcl/test_directory_wildcards.sh: builds a real subdirectory tree and asserts *.TXT (matches only .TXT), %.LOG (1-char name, not 2-char), [...]*.TXT ellipsis recursion (per-dir subtotals + Grand total of 2 directories, 2 files.), and %DIRECT-W-NOFILES on a no-match.
  • tests/dcl/test_directory.sh made hermetic (lists a real temp dir) so the smoke test no longer depends on the pre-existing, non-authentic header-before-DNF behavior my NOFILES/DNF change removes.
  • dcl-integration: 125 passed. The 3 remaining failures (test_install_command, test_lexical_scsnode, test_misc_commands) are pre-existing + environmental — verified identical on the stashed origin/main baseline; they need INSTALL.EXE / the executive / PCSI, which are absent in a plain build dir and present in CI.
  • vmsfs_unit: green (matcher untouched).

No new cross-image symbols or DCL translation units (all helpers static), so no native-link enumeration wiring was required.

Remaining vms-1c6 slices (not in this PR)

🤖 Generated with Claude Code

alice and others added 2 commits August 13, 2026 09:25
…otal, %DIRECT-W-NOFILES

Next slice of vms-1c6 (File/RMS user-visible fidelity), after the DIRECTORY
format+version slice (#447). Scope: the wildcard/ellipsis surface a VMS user
drives constantly.

- `*` (any chars) and `%` (single char) filename wildcards continue to route
  through the single matcher vmsfs_wildcard_match(); the DIRECTORY collect path
  is refactored into dir_collect()/dir_print_entries() so the single- and
  multi-directory paths share one filename matcher and one renderer (no divergent
  matchers — the DCL file commands already all call vmsfs_wildcard_match).

- `[...]` / `[dir...]` ellipsis now actually recurses the real on-disk vmsfs
  tree (dir_gather_recurse — a genuine depth-first opendir/readdir walk, INV-6:
  no faked recursion). dir_deellipsize() rewrites the ellipsis spec to the start
  directory, reusing the existing resolution.

- Multi-directory listing prints a per-directory header + "Total of N files"
  subtotal for each directory that has matches, then one
  "Grand total of D directories, F files[, M blocks]." rollup.

- Zero matches now yield the authentic "%DIRECT-W-NOFILES, no files found"
  warning with NO header, instead of an empty "Total of 0 files." success.

Grounded (clean-room, Rule 8): VSI OpenVMS DCL Dictionary, DIRECTORY — the "..."
ellipsis directory wildcard ("this directory and all subdirectories below it"),
the per-directory + Grand total multi-directory layout, and the NOFILES warning.

Tests: new tests/dcl/test_directory_wildcards.sh exercises *, %, ellipsis
recursion (per-dir subtotals + two-directory grand total), and the NOFILES
warning against a real subdirectory tree. test_directory.sh made hermetic
(lists a real temp dir) so the smoke test no longer relies on the pre-existing
non-authentic header-before-DNF behavior. dcl-integration: 125 passed
(remaining 3 failures — install/scsnode/misc — are pre-existing, environmental,
identical on baseline: they need INSTALL.EXE/executive/PCSI). vmsfs_unit green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…output

CI Build & Test caught the real regression: test_create_dir listed the freshly
created (empty) directory with `DIRECTORY [.NEWDIR]` and asserted the output
contained "NEWDIR". That only worked because the OLD code printed a
"Directory ...] / Total of 0 files." header for an empty directory. This PR
makes an empty listing yield the authentic "%DIRECT-W-NOFILES, no files found"
(no header), so "NEWDIR" no longer appears — the test encoded the old,
non-authentic output.

Fix (not a weakening — a stronger, VMS-authentic proof): create the directory
with an absolute target spec so it lands deterministically under the parent,
then list the PARENT and assert the "NEWDIR.DIR;1" entry with "Total of 1 file."
(a directory is a .DIR file within its parent — VSI OpenVMS DCL Dictionary,
DIRECTORY). This proves creation via a real, non-empty listing and also guards
EXPECT_NOT %DIRECT-W-NOFILES and EXPECT_NOT mkdir:. Self-cleaning (no device-root
leak the previous form left behind).

Full dcl-integration now 128 passed / 0 failed with /vms set up exactly as the
CI Build & Test job does (sudo mkdir /vms/SYS0/SYSCOMMON/... ; ctest).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@baron-3dl
baron-3dl merged commit 6978e27 into main Aug 13, 2026
61 checks passed
baron-3dl added a commit that referenced this pull request Aug 13, 2026
…ve (#472)

Bump OVMX_PRODUCT_VERSION V0.4-2 → V0.4-3. 15 PRs since V0.4-2. Headline:
the self-host toolchain now BUILDS — MMK.EXE drives real compile+link
inside OVMX against a live executive.

  SELF-HOST #4 COMPLETE  MMK.EXE genuinely drives compile+link builds vs real
                         /dev/vms (#464 capstone). Full exec-drive substrate:
                         async AST delivery + interruptible $HIBER (#457),
                         IO$M_NOW (#458), DCL-over-mailbox (#460), + crash fixes
                         #463 (32→64 ptr-width) / #464 (IO$M_NOW func-code mask).
                         Freeze-join fix (#459). Component build host-proven (#470).
  UX FIDELITY            SHOW CPU (#465), file protection SET/display (#467),
                         RECALL readline-independent (#468), DCL scripting
                         $STATUS/%X + CALL/SUBROUTINE + DECK/EOD (#469),
                         DIRECTORY wildcards/ellipsis (#461).
  + swept other threads' merged work

Self-host spine #5/#6 (MMK-drives-a-real-component IN QEMU) in flight.

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 13, 2026
…ELETE/DIRECTORY output (#461/#478) (#499)

P0: the Persistent Boot Smoke job went RED and stayed red. Two authentic-VMS
fidelity changes each left a boot-smoke test asserting the pre-change,
non-authentic output; nothing in the boot path regressed.

Root cause (bisected on main, by the "Persistent Boot Smoke Test" job/step):

  * #461 (6978e27, DIRECTORY %DIRECT-W-NOFILES): a zero-match exact-filespec
    DIRECTORY now prints the authentic "%DIRECT-W-NOFILES, no files found"
    instead of an empty "Total of 0 files." trailer. First-red step was
    "STARTUP.COM phase driver" (OVMX.CONF absence check). The same change
    breaks test_boot_scsnode_hostname_e2e.sh's OVMXVMSSYS.PAR-absence check.

  * #478 (1d6bb5b, DELETE requires an explicit version): a bare
    "DELETE SYS$SYSTEM:PROVISION.EXE" is now refused with %DELETE-E-DELVER,
    and DELETE/LOG prints the authentic "%DELETE-I-FILDEL, <spec> deleted"
    (was "%DELETE-S-DELETED"). This broke test_release_e2e.sh's "noprovision"
    case: the version-less DELETE never landed, PROVISION.EXE survived, boot 2
    came up (creating JOB_CONTROL 10000003) instead of fail-stopping, so the
    expect harness waited for a halt that never came and QEMU was timeout-killed
    — the "prints 10000003 then hangs" symptom (33 passed / 3 failed).

Fix (align stale tests with authentic VMS, not a revert — both product changes
are grounded in the VSI OpenVMS DCL Dictionary and are more VMS-faithful):

  * test_release_e2e.sh: DELETE/LOG SYS$SYSTEM:PROVISION.EXE;* (explicit
    version), and accept the authentic %DELETE-I-FILDEL success identifier.
    Boot 2 now genuinely halts — the case actually exercises the fail-stop it
    was written to prove, so the guard is strengthened, not weakened.
  * test_startup_phase_driver.sh: accept %DIRECT-W-NOFILES (or the old trailer)
    as proof OVMX.CONF is absent.
  * test_boot_scsnode_hostname_e2e.sh: key the OVMXVMSSYS.PAR-absence check on
    %DIRECT-W-NOFILES. A present file would list its name + "Total of 1 file.",
    so every check stays discriminating.

Reproduced GREEN locally against the standard bootable image
(distro/Dockerfile.bootable), foreground, timeout-wrapped:
  test_startup_phase_driver.sh        19/19
  test_boot_scsnode_hostname_e2e.sh   21/21
  test_release_e2e.sh                 36/0  (was 33/3)
  test_persistent_boot.sh             24/24 (unchanged, already green)
  test_distrib_boot.sh                17/17 (unchanged, already green)

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