8000 fix(common): record a stripped source URL in the download_web spans · gominimal/minimal@b2aa4cb · GitHub
[go: up one dir, main page]

Skip to content

fix(common): record a stripped source URL in the download_web spans

Minimal Arch / arch-review succeeded Nov 23, 2026 in 0s

PASS

Inputs. First ruling on #3713 at b2aa4cb6, on arch 4f2eb87d. No since.diff, since-conditions.json, findings.json or arch-map.md is staged. I read pr.diff whole. The task marker (D2817) has no covers: line, so the requirement is the task, as in the earlier rulings on #3711 and #3736. No entry in prior-rulings.json rules on URL or secret redaction in traces, so no precedent applies and this ruling departs from none.

Governs: design principle 7 (architecture.md line 339, "secrets redacted from all output"), Output conventions (line 386, "Secrets never appear in any output mode") and D9 (line 835: content in an export stays behind flags that are off by default). A credential, a signed query token or a fragment in a source URL is a secret in this sense. Before this change, the bare #[tracing::instrument] on the two download_web_* functions recorded the raw url argument by Debug.

Ruling. The change conforms. Both spans skip url and record the stripped form. I searched crates/common for other spans or log events that record the URL on this path and found none: download_web_within and RemoteStorage::download carry no instrument. The callers in crates/op/src/sources.rs already pass error text through strip_urls. Placement (rule 8): the design names no owner for a URL-stripping helper. Moving it into common (the lower crate, which already depends on url) and making op::specs::stripped_url delegate removes a duplicate and adds no new dependency edge. The proof (rule 3) installs a real tracing::Subscriber, drives both functions to their failure exits, and asserts that the stripped URL is in each span and that the password, token, query key and fragment are in no field. It tests the rule and does not relax a gate.

Not checked. I did not run the test, by contract. The PR body reports it passing. The PR is a draft because min task run agent-verify exited 100 on metrics_test, which is outside this change's files. That is not a design question.

Ruled at b2aa4cb against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5; arch_rulings 1603, job 6f7dc63d-c86a-4e13-8d2d-986be33febca.

0