~bigbes/sr-ht-dolt · parade

main · last commit 6 hours ago · ti41arbu

← Back to the parade

sr-ht-dolt-lam Log a warning in web/router.go when assets.Resolve returns empty Lined Up

status: open P2 bug
bd update sr-ht-dolt-lam --claim bd close sr-ht-dolt-lam
Created byEugene Blikh
Ownerbigbes@gmail.com
Created2026-08-17T20:39:45Z
Updated2026-08-17T20:39:45Z
Description
What is wrong: `sourcehut-dolt/web/router.go` has an unhashed `main.css` fallback for when `assets.Resolve` returns `""` (meaning "no build artifact"), but logs nothing when that fallback is taken. `assets.Resolve`'s own doc prescribes logging in this case, and bench, compare, coverage, curator, specs, and tokens all call `slog.Warn` naming `make css` as the remedy.

Why it matters: a build without `make css` starts, serves every page unstyled, and says nothing in the logs. This is precisely the failure mode D08 (hardcoded `sha256sum` producing an empty hash on non-GNU machines) and D22 (stale hashed files) can silently produce in dolt — a missing warning here is the only thing that would surface either problem operationally.

Sibling that already does it correctly: bench, compare, coverage, curator, specs, and tokens all warn when `assets.Resolve` comes back empty.

Fix: add an `if cssHref == "" { slog.Warn(...) }` arm to `web/router.go`, placed after dolt's existing unhashed-fallback logic (since dolt's fallback itself currently also skips logging), naming `make css` as the remedy.

Status: verified.

Audit: D23 (cross-repo audit, 2026-08-17)

Depends on

No outgoing dependencies.

Depended on by

Nothing depends on this issue.

No comments.

  • Eugene Blikh created the issue · 2026-08-17T23:39:45Z
Stored rows — what this pane was built from, as read
issues 1 row
id sr-ht-dolt-lam
content_hash 4f64761aa435c5d8cf89fa2abc4d7c21a0df1646ab5c3603640ea87a0a4f1f54
title Log a warning in web/router.go when assets.Resolve returns empty
description What is wrong: `sourcehut-dolt/web/router.go` has an unhashed `main.css` fallback for when `assets.Resolve` returns `""` (meaning "no build artifact"), but logs nothing when that fallback is taken. `assets.Resolve`'s own doc prescribes logging in this case, and bench, compare, coverage, curator, specs, and tokens all call `slog.Warn` naming `make css` as the remedy. Why it matters: a build without `make css` starts, serves every page unstyled, and says nothing in the logs. This is precisely the failure mode D08 (hardcoded `sha256sum` producing an empty hash on non-GNU machines) and D22 (stale hashed files) can silently produce in dolt — a missing warning here is the only thing that would surface either problem operationally. Sibling that already does it correctly: bench, compare, coverage, curator, specs, and tokens all warn when `assets.Resolve` comes back empty. Fix: add an `if cssHref == "" { slog.Warn(...) }` arm to `web/router.go`, placed after dolt's existing unhashed-fallback logic (since dolt's fallback itself currently also skips logging), naming `make css` as the remedy. Status: verified. Audit: D23 (cross-repo audit, 2026-08-17)
design
acceptance_criteria
notes
status open
priority 2
issue_type bug
assignee NULL
estimated_minutes NULL
created_at 2026-08-17T20:39:45Z
created_by Eugene Blikh
owner bigbes@gmail.com
updated_at 2026-08-17T20:39:45Z
closed_at NULL
closed_by_session
external_ref NULL
spec_id
compaction_level 0
compacted_at NULL
compacted_at_commit NULL
original_size NULL
sender
ephemeral 0
wisp_type
pinned 0
is_template 0
mol_type
work_type
source_system
metadata �{}
source_repo
close_reason
event_kind
actor
target
payload
await_type
await_id
timeout_ns 0
waiters
hook_bead
role_bead
agent_state
last_activity NULL
role_type
rig
due_at NULL
defer_until NULL
no_history 0
started_at NULL
is_blocked 0
events 1 row
id 01a01173-9eca-7249-b010-3d61327c89f5
issue_id sr-ht-dolt-lam
event_type created
actor Eugene Blikh
old_value
new_value
comment NULL
created_at 2026-08-17T23:39:45Z