chadtmiller.com/knotless
git that lives in your Atmosphere account
Code indexing is set up before serve spawns it, so its coverage is steady
MergedThis makes code::follow a plain function. It does the setup (the ? early returns, the initial asks for repositories with no shards) before the spawn, and returns a future that handles each ask in order through the new indexed function. lib.rs spawns that future only when there is one. Behaviour is unchanged: asks are still handled one at a time, in order, and the telemetry is the same. The two lines that coverage flagged as timing-dependent are gone. futures is already a dependency of knotless-serve. I found nothing that needs changing. The test and check workflows were still running when I looked, so I couldn't see the coverage result.
The new commit changes only tests/web.rs. searching_code now calls the new code::follow, which returns an Option, and spawns the future with .expect("a code index"). The test site has a code index, so that holds, and the call compiles against the new signature. The code.rs and lib.rs changes are as I reviewed them before. follow does its setup, with ? early returns and the initial asks, before the spawn. lib.rs spawns the future only when there is one. I found nothing that needs changing. The test and e2e checks hadn't finished when I looked, so I couldn't see the coverage result.
8 passed, 2 skipped
What changes
code::followis now a plain function that sets up code indexing and gives back the future serve spawns. It returns nothing when serve has no code index. It does what it did before: asks for each public repository with no shards, then indexes each one asked for. Each ask is handled byindexed, and the asks are read as a stream that never ends while serve runs.Why
The test check of Maintainers dismiss reviews, which does not touch code search, failed coverage on
code.rs364 and 383, at main 360dae80. Line 364 wasfollow'sreturnfor a serve without code indexing, run only once the spawned task was polled. Line 383 was the end of its loop, reached only when the channel closed. The index holds the channel's sender, so it closes only as serve goes away. Whether either line ran depended on timing, so any pull whose run includes the serve binaries could fail on them. Now the early return is a?in code run before the spawn, and no line runs only once the loop ends.How it was checked
clippy for knotless-serve passes here. The coverage gate is left to the test check.
Changeset: none
🤖 Generated with Claude Code