.forge/issues/f9296420-bf9c-41fc-a0da-8955bd400ae7/issue.md 1.2 KiB 49 lines Raw

id: f9296420-bf9c-41fc-a0da-8955bd400ae7 title: CI redaction corrupts logs for relative repo paths state: closed labels:


What

CI log redaction mangles relative repo paths because it treats . as a literal path needle.

src/forge.rs:771-779:

for p in [root_abs.as_path(), root] {
    let needle = p.to_string_lossy();
    if !needle.is_empty() && needle != "/" {
        out = out.replace(needle.as_ref(), "<repo>");
    }
}

When the repo is passed as . (the normal hu13 build . invocation), repo_root is ./"", so every . in every log becomes <repo>.

Reproduced

Build from a fixture with hu13 build . -o … and a CI log containing:

Checking hu13 v0.1.0 (/tmp/rev4-ci)

Rendered log:

Checking hu13 v0<repo>1<repo>0 (<repo>)

Impact

CI pages are corrupted/unreadable; relative repo arguments are common. This is a regression in #94.

Fix

Canonicalize the repo root first and only replace absolute path needles; skip ./.. and empty relative parents. Add a test invoking a relative repo path, not only absolute fixtures.

view raw