• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / valkyrja-java / 30325166727 / 1
100%
26.x: 100%

Build:
DEFAULT BRANCH: 26.x
Ran 28 Jul 2026 03:10AM UTC
Files 655
Run time 16s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jul 2026 03:09AM UTC coverage: 99.977%. Remained the same
30325166727.1

push

github

web-flow
[Http][Cli] Add request, response, and CLI input message-mapping fidelity tests (#55)

# Description

Adds framework-level **message-mapping fidelity** tests: proof that an
incoming HTTP request, an
outgoing HTTP response, and an incoming CLI command map faithfully onto
the framework's own
objects — independent of routing.

This implements the architecture TODO item
["Framework tests — request & command mapping
fidelity"](https://github.com/valkyrjaio/architecture/pull/65)
for Java, mirroring the PHP reference implementation 1:1 in structure
and assertions.

Sibling PRs:

- **PHP** — valkyrjaio/valkyrja-php#932 (merged, the reference tests)
and
valkyrjaio/valkyrja-php#935 (fixes the `--expr=a=b` truncation noted
below).
- **Architecture** — valkyrjaio/architecture#68 (documents the
per-language CLI argv conventions).

A mapping defect — a dropped header, a wrong reason phrase, a mis-parsed
option — is invisible to
route-matching tests. The Java and TypeScript starter-app entry/worker
end-to-end work surfaced
exactly this class of bug, caught far from the source. These tests shift
that coverage left:
sooner, and closer to where the mapping actually lives.

The tests are **functional** (they exercise the factory → collection →
message pipeline as a whole)
rather than unit, and they assert observable behavior only, through the
public API.

## Two real mapping bugs found and fixed

Unlike the PHP sibling, which was test-only, these tests caught two
genuine framework defects.
Reverting either fix makes the new tests fail (3 failures), so both are
covered by regression tests
in this PR.

1. **CLI options in the command-name slot were swallowed.**
`InputFactory` checked `i == 0` *before*
the `-` check, so `valkyrja --verbose app:version` produced the command
name `"--verbose"` instead
of parsing an option and leaving the default command name to stand. PHP
never hits this because
   its `$argv[0]` is always the script path.
2. **Parsed body and uploaded files... (continued)

1898 of 1900 branches covered (99.89%)

Branch coverage included in aggregate %.

6896 of 6896 relevant lines covered (100.0%)

4.34 hits per line

Source Files on job 30325166727.1
  • Tree
  • List 655
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 30325166727
  • 037205eb on github
  • Prev Job for on 26.x (#30323111914.1)
  • Next Job for on 26.x (#30325186143.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc