~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

Following spaces with none to follow is covered by a test, not by chance

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:serve/follow-decided

What changes

The web tests run spaces::follow and languages::follow to their end on a server with no gateway and no index, where each returns at once, as they already do for shared::follow.

Why

Those early returns ran only in the tasks a server spawns as it starts, which a test can end before the runtime polls them. Coverage then counted the lines or not by chance. Since 10-30, four pulls that touched neither file, two of them in batches of one, failed the 100% gate on exactly these two lines of crates/knotless-serve/src/spaces.rs: follow's return and its closing brace. Each was ejected from the merge queue and queued again unchanged.

How it was checked

Left to CI: the lines are now reached by web (test) on every run.

Shortcomings

Other lines reached only from a spawned task could be counted by chance in the same way. These are the only ones the failed runs since 10-30 named more than once.

Approved

This adds a test change only. In the_steps_shared, the plain app (no index, built with App::build(.., None, ..)) now also runs languages::follow and spaces::follow to completion. Both functions return at once in that case: languages::follow when app.index is None, and spaces::follow when app.spaces is None. So the early-return lines no longer depend on whether a spawned task gets polled before the test ends. Both modules are pub, Duration is already imported in web.rs, and the call matches the existing shared::follow one. Nothing here needs docs or a change file. At review time the test and check runs were still queued or running, so I didn't see the 100% coverage gate pass. That gate is what shows whether the fix works.

Merged as c17f6fe