Verification
A crawl of every declared route on a running copy, reporting what rendered and what went unmatched. Exit 5 is the expected result today.
Verification is a crawl, not a test suite. hiiu verify visits every declared route on an already-running
copy and records what each one did.
hiiu verify --url http://127.0.0.1:5173 ./path/to/app
It starts nothing. --url names a server that is already up, which is usually
one hiiu dev is running in another terminal.
What it is measuring
Two questions, and one crawl answers both:
- Did every route render? A route that crashes is a broken copy, whatever else is true about it.
- Did anything try to leave? Every request the interception layer refused is counted, per route.
The second is the one that matters. It is the operational form of the claim that the copy is hermetic: run the crawl with egress blocked to everything but loopback, and anything that was quietly depending on a real host fails loudly, in CI, rather than in front of a design partner.
Exit 5 is expected today
The exit code is not the interesting output. The document is. It names every route, whether it rendered, and how many requests went unmatched, which is a frequency-ranked list of exactly what hiiu could not stand in for. Watch the unmatched count fall as the contract improves; do not watch the exit code.
Exit 5 specifically means a route crashed, or a denied request landed on a
route the decisions document marks as a priority.
Which routes are priorities is a decision, not a fact, which is why it comes
from a file rather than from a heuristic.
Why it can be trusted
The crawl is split so the interesting half has no browser in it. Route order,
the outcome rule, endpoint identity and document assembly are pure
orchestration; a single file mentions Playwright at all, and it is loaded by a
dynamic import inside the function that needs it. Every other command,
including --help, pays nothing for a browser it never uses.
That is also why Playwright is not a dependency of the package. Declaring it
would make npx @hiiu/cli analyze download a per-platform browser before it
could read a directory. hiiu doctor reports a missing
browser as a warning, never a failure, because a machine that only ever runs
analyze is healthy without one.
The loop it belongs to
Verification is not only a report. hiiu init runs it inside
a loop: build with a recorder, crawl, treat every refused request as a missing
endpoint, feed those back, rebuild, and crawl again until the gaps stop
changing.
That loop is bounded at three rounds, deliberately. Round one discovers what the contract missed, round two proves the inference closed it, and a third round still finding new gaps means the app mints requests faster than templates collapse them. That is a report for a human, not a reason to keep retrying: unbounded retries against a misbehaving app is a hang wearing a loop's clothing.