Skip to content

Improve Codebase :: Misc #1389

Description

@81reap

I have started on this path with #1382 but I thought it would be worth creating an issue to track all of the changes I'm thinking about that will come after this. This audit was done with the help of Claude.

Small, independent, and mostly deletions the compiler can verify.

# Item Where
E1 Leftover dbg!(&normalized_path, &self.contents); in the routing test store. It prints on every lookup in every routing test. It is the only dbg! in src/. routing.rs:640
E2 type H0 and impl CanHelp for H0 — no call sites template_helpers.rs:12, :523-530
E3 impl From<URLParameters> for String — no call sites url_parameters.rs:130-134
E4 impl ResponseError for ErrorWithStatus — unreachable. Every construction site converts to anyhow::Error immediately, and the status is recovered by downcast at error.rs:212. Its body text never ships. error_with_status.rs:20-38
E5 impl From<AnyKind> for SupportedDatabase — reachable only through otel_name_from_kind, whose callers all pass a SupportedDatabase. It also maps Odbc → Generic, which contradicts DbInfo::database_type. database/mod.rs:115-125
E6 strip_site_prefix is a no-op when called from serve_file: routing.rs:169 already stripped the prefix before Serve(path) was built http.rs:480-482, called at :446
E7 telemetry::shutdown_telemetry() runs only on graceful shutdown. Both std::process::exit(1) paths (main.rs:14, :35) skip it, so traces are lost for exactly the failures traces exist to explain. main.rs:53
E8 Root test.hurl is orphaned. Both discovery sites use find examples -mindepth 2 -maxdepth 2 -name test.hurl, which cannot match a file at the repository root. scripts/test-examples-hurl.sh:74, ci.yml:422
E9 .dockerignore:9 excludes mssql/, which does not exist in the repository. .dockerignore:3 excludes sqlpage.db, but Docker anchors that pattern to the root, so sqlpage/sqlpage.db is not excluded and Dockerfile:43 copies it into the image. .dockerignore
E10 sqlpage.service duplicates ProtectClock=true on lines 42 and 47. Nothing in CI validates the unit file parses. sqlpage.service

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions