hyperhive/hive-agent/src/web_ui
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas a6acf58b4f docs: stop writing repo-doc pointers as relative links rustdoc cannot resolve
Eleven doc comments pointed at `docs/` files as markdown links. Ten of
them render as broken hyperlinks in the docs rustdoc CI builds, and
nothing in the tree can tell.

Rustdoc renders a page at `target/doc/<crate>/<module…>/`, so a relative
link resolves against that directory and not against the source file it
was typed in. Every one of these except the single crate-root `//!` was
written for a reader resolving from the source tree, which is one `../`
short at module level and two short one directory deeper.

Two measurements on a throwaway crate, same build and same
`RUSTDOCFLAGS="-D rustdoc::all"`:

  * a bogus intra-doc link `[`no_such_item`]` is a hard error, so the
    `docs-rustdoc` check in nix/checks.nix works for its class;
  * a relative link to a nonexistent file in the same comment produces
    no diagnostic at all and lands in the html verbatim as
    href="../../../docs/does-not-exist.md".

So the class is invisible to the one gate whose stated purpose is to
stop a doc pointer dangling — and it is worse than the plain-text
failure that gate's comment describes, because a broken href still
looks clickable.

Fixing the depths was the other option and is rejected: the correct
depth is a function of how deeply the module is nested, so any module
move silently breaks it again, and no check we have would notice.

The link text was already the canonical pointer — `docs/x.md::Section`,
the same repo-root-relative form used everywhere else in the tree and
the form scripts/check-doc-refs.sh gates. Dropping the `[…](…)` wrapper
keeps every byte of information a reader uses and removes the only part
that was ever wrong.

Refs #3926.
2026-09-02 08:59:48 +02:00
..
actions.rs hive-agent: guarantee a wake after a self-requested /compact 2026-08-13 23:17:10 +02:00
auth.rs docs: stop writing repo-doc pointers as relative links rustdoc cannot resolve 2026-09-02 08:59:48 +02:00
mod.rs docs: stop writing repo-doc pointers as relative links rustdoc cannot resolve 2026-09-02 08:59:48 +02:00
proxy.rs refactor(#2464): rename hive-ag3nt crate to hive-agent, collapse lib into main 2026-07-15 16:09:39 +02:00
screen.rs agent icon: 404 when unconfigured, client-side fallback 2026-08-10 20:59:59 +02:00
state.rs docs: stop writing repo-doc pointers as relative links rustdoc cannot resolve 2026-09-02 08:59:48 +02:00
stats.rs hive-agent: replace json! with typed structs in web_ui handlers 2026-08-13 19:43:58 +02:00
stream.rs Fix stale default-open doc comments per argus's review 2026-08-30 21:28:34 +02:00