main · last commit
6 hours ago ·
ti41arbu
sr-ht-dolt-57a Remove stale hashed stylesheet before writing a new one in make css
Lined Up
bd update sr-ht-dolt-57a --claim
bd close sr-ht-dolt-57a
| Created by | Eugene Blikh |
| Owner | bigbes@gmail.com |
| Created | 2026-08-17T20:39:39Z |
| Updated | 2026-08-17T20:39:39Z |
What is wrong: dolt's `Makefile` rule `static/main.min.css: static/main.css` ends with `cp $@ $(@D)/main.min.$$(sha256sum $@ | cut -c1-8).css`. Every other service's `css` recipe opens with `rm -f web/static/main.min.*.css` before writing the new hashed file; dolt's does not, so a second `make css` after a stylesheet change leaves two `main.min.<sha>.css` files on disk simultaneously.
Why it matters: `assets.Resolve` takes `fs.Glob`'s first match, so with two hashed files present, which stylesheet actually gets served depends on the lexical order of two arbitrary hex digests. dolt's own `check-css` comment already states this outright ("`css` does not remove the previous build's hashed file, which is exactly why this must not assume it did"), so the packaging path is gated against it — but the ordinary dev loop and the `make css`-then-restart path are not.
Sibling that already does it correctly: the other services' `css` recipes all carry an `rm -f` prologue; `assets.Resolve`'s own doc-comment assumes this invariant ("`make css` guarantees there is at most one").
Fix: add `rm -f $(CSS)` (or the equivalent glob) before the `cp` in dolt's `css` rule, or replace the `cp` with a `mv` so only one hashed file can exist at a time.
Status: verified.
Audit: D22 (cross-repo audit, 2026-08-17)
No outgoing dependencies.
Nothing depends on this issue.
| id | sr-ht-dolt-57a |
| content_hash | 311f83a56aaf4b37747523b26df669fcd4f233808d44196e4c0c48f144b70b70 |
| title | Remove stale hashed stylesheet before writing a new one in make css |
| description | What is wrong: dolt's `Makefile` rule `static/main.min.css: static/main.css` ends with `cp $@ $(@D)/main.min.$$(sha256sum $@ | cut -c1-8).css`. Every other service's `css` recipe opens with `rm -f web/static/main.min.*.css` before writing the new hashed file; dolt's does not, so a second `make css` after a stylesheet change leaves two `main.min.<sha>.css` files on disk simultaneously. Why it matters: `assets.Resolve` takes `fs.Glob`'s first match, so with two hashed files present, which stylesheet actually gets served depends on the lexical order of two arbitrary hex digests. dolt's own `check-css` comment already states this outright ("`css` does not remove the previous build's hashed file, which is exactly why this must not assume it did"), so the packaging path is gated against it — but the ordinary dev loop and the `make css`-then-restart path are not. Sibling that already does it correctly: the other services' `css` recipes all carry an `rm -f` prologue; `assets.Resolve`'s own doc-comment assumes this invariant ("`make css` guarantees there is at most one"). Fix: add `rm -f $(CSS)` (or the equivalent glob) before the `cp` in dolt's `css` rule, or replace the `cp` with a `mv` so only one hashed file can exist at a time. Status: verified. Audit: D22 (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:39Z |
| created_by | Eugene Blikh |
| owner | bigbes@gmail.com |
| updated_at | 2026-08-17T20:39:39Z |
| 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 |
| id | 01a01173-8783-73c0-b2ee-e8433e05a707 |
| issue_id | sr-ht-dolt-57a |
| event_type | created |
| actor | Eugene Blikh |
| old_value | |
| new_value | |
| comment | NULL |
| created_at | 2026-08-17T23:39:39Z |
No comments.