Skip to content

devlore-test run fails on Windows: output streams default to /dev/stdout #379

Closed

Description

@David-Noble-at-work

devlore-test run cannot execute on Windows. Its default output routing names Unix device paths, which do not exist there, so the command fails before producing any output.

Mechanism

cmd/devlore-test/devloretest/commands.go:53-55 sets the default for every stream:

"summary": "/dev/stdout",
"receipt": "/dev/stdout",
"graph":   "/dev/stdout",

On Windows the open fails and the command aborts:

error: opening graph output: open /dev/null: The system cannot find the path specified.

/dev/null appears the same way in the documented examples at commands.go:71, commands.go:73, commands.go:78, and root.go:43, root.go:45, so the guidance shipped to users is also Unix-only. Ten references in production code, nineteen more across tests, and one Starlark fixture (data/test_compensation.star).

Evidence

From the second three-platform CI run (PR #378, commit 762c61ec, job test (windows-latest)). After the .exe fix let the binary start, the CLI now runs and exits 1 with empty stdout for every test that executes a script:

--- FAIL: TestCLI_ScriptFirst
    cli_test.go:137: exit code = 1, want 0
    cli_test.go:138: no JSON summary found in output
--- FAIL: TestCLI_DefaultAllToStdout
    cli_test.go:157: exit code = 1, want 0
    cli_test.go:158: output missing "Hello World!" (len=0)

Roughly 16 of the 47 remaining Windows failures trace to this one default — the 12 exit code = 1 cases, the 5 "no JSON summary" assertions, the 2 "missing Hello World!" assertions, and the 2 explicit /dev/null failures in commands_test.go.

It was invisible until now for two reasons: CI ran the unit suite on ubuntu only (#373), and until the .exe fix the binary never started on Windows at all, so this failure sat behind that one.

Why it is a product defect rather than a test problem

The default is in the shipped command definition, not in a test. Any Windows user running devlore-test run test.star hits it immediately, with no flag combination in the documented examples that avoids it — the examples themselves route to /dev/null.

Likely shape of the fix

The three streams want a platform-neutral way to say "standard output" and "discard" — a sentinel the routing layer resolves (os.Stdout, io.Discard) rather than a filesystem path handed to open. os.DevNull is Go's portable constant for the discard case and is NUL on Windows. Whether the sentinel should remain spelled /dev/stdout for continuity, or become something explicit like - or stdout, is a surface decision worth making deliberately, since it appears in help text, examples, docs, and at least one Starlark fixture.

Found by the platform test matrix (#373). Classified bucket 1 — a genuine platform defect — under that plan's phase 2 triage.

Activity

  1. David-Noble-at-work commented on Aug 12, 2026

    @David-Noble-at-work
    ContributorAuthor

    Closing on verified evidence, per direction. The fix merged in #380 (develop 26a1104a's parent chain) and the post-fix windows run shows every #379 signature gone: zero output-routing errors, zero open /dev/null failures, zero missing-JSON-summary assertions, and all output-routing TestCLI_* cases passing. The two TestCLI_* failures still standing on that leg are different causes — Windows error text ("The system cannot find the file specified" vs "no such file") and a path-separator expectation in TestCLI_ConfigPath — both bucket-2 items tracked under #373 phase 3e, not output routing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions