main · last commit
5 hours ago ·
ti41arbu
sr-ht-dolt-u2b Add bind-address config key and replace static-dir with go:embed
Lined Up
bd update sr-ht-dolt-u2b --claim
bd close sr-ht-dolt-u2b
| Created by | Eugene Blikh |
| Owner | bigbes@gmail.com |
| Created | 2026-08-17T20:39:26Z |
| Updated | 2026-08-17T20:39:26Z |
What is wrong, in two parts. (a) `sourcehut-dolt/config.example.ini` has `remotesapi-listen=127.0.0.1:5306`, `credsapi-listen=127.0.0.1:5308`, and `static-dir=/usr/share/sourcehut/dolt.sr.ht/static`, but no `bind-address` key — the web listener's bind address is settable only through the `-b` command-line flag (`cmd/doltsrht/main.go` calls `server.New(serviceName, defaultWebAddr, conf, os.Args)`), not through the shared `bind-address` config key every sibling service uses. (b) dolt is the one service in the family that serves its stylesheet from an on-disk `static-dir` rather than compiling it into the binary with `go:embed` — every sibling's `config.example.ini` carries the sentence "There is no static-dir key: CSS and JS are compiled into the binary with go:embed", and dolt is the reason that sentence has to be written at all. Why it matters: (a) the containerized deployment relies on the config key to set `0.0.0.0:<port>` in exactly one place — every entrypoint's comment says repeating the port on the command line "is how a unit and its config drift apart", and dolt is one of only two services (with specs) where this can happen. (b) an on-disk static tree means a version-skewed package can serve a stylesheet from a different build than the binary running — exactly what `check-embedded-css` prevents everywhere else, and dolt is separately missing that gate (see D12) and does not clean up old hashed files either (see D22), compounding the risk. Sibling that already does it correctly: every other sibling service, on both halves — they read `bind-address` from config and `go:embed` their static assets. Fix: add a `bind-address` key to dolt's `[dolt.sr.ht]` config section and read it in `validateConfig`; convert dolt's `static/` tree to `go:embed` and drop the `static-dir` config key entirely. Status: verified — confirmed directly by reading dolt's `config.example.ini` and `cmd/doltsrht/main.go` (this was one of two contradictory claims across the source reports and was settled by reading the code). Audit: D20 (cross-repo audit, 2026-08-17)
No outgoing dependencies.
Nothing depends on this issue.
| id | sr-ht-dolt-u2b |
| content_hash | f5120a5915edd32830478ece9e2fbc0dbf8f91c85460d25f3737aaec0ae44ac5 |
| title | Add bind-address config key and replace static-dir with go:embed |
| description | What is wrong, in two parts. (a) `sourcehut-dolt/config.example.ini` has `remotesapi-listen=127.0.0.1:5306`, `credsapi-listen=127.0.0.1:5308`, and `static-dir=/usr/share/sourcehut/dolt.sr.ht/static`, but no `bind-address` key — the web listener's bind address is settable only through the `-b` command-line flag (`cmd/doltsrht/main.go` calls `server.New(serviceName, defaultWebAddr, conf, os.Args)`), not through the shared `bind-address` config key every sibling service uses. (b) dolt is the one service in the family that serves its stylesheet from an on-disk `static-dir` rather than compiling it into the binary with `go:embed` — every sibling's `config.example.ini` carries the sentence "There is no static-dir key: CSS and JS are compiled into the binary with go:embed", and dolt is the reason that sentence has to be written at all. Why it matters: (a) the containerized deployment relies on the config key to set `0.0.0.0:<port>` in exactly one place — every entrypoint's comment says repeating the port on the command line "is how a unit and its config drift apart", and dolt is one of only two services (with specs) where this can happen. (b) an on-disk static tree means a version-skewed package can serve a stylesheet from a different build than the binary running — exactly what `check-embedded-css` prevents everywhere else, and dolt is separately missing that gate (see D12) and does not clean up old hashed files either (see D22), compounding the risk. Sibling that already does it correctly: every other sibling service, on both halves — they read `bind-address` from config and `go:embed` their static assets. Fix: add a `bind-address` key to dolt's `[dolt.sr.ht]` config section and read it in `validateConfig`; convert dolt's `static/` tree to `go:embed` and drop the `static-dir` config key entirely. Status: verified — confirmed directly by reading dolt's `config.example.ini` and `cmd/doltsrht/main.go` (this was one of two contradictory claims across the source reports and was settled by reading the code). Audit: D20 (cross-repo audit, 2026-08-17) |
| design | |
| acceptance_criteria | |
| notes | |
| status | open |
| priority | 2 |
| issue_type | task |
| assignee | NULL |
| estimated_minutes | NULL |
| created_at | 2026-08-17T20:39:26Z |
| created_by | Eugene Blikh |
| owner | bigbes@gmail.com |
| updated_at | 2026-08-17T20:39:26Z |
| 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-52ec-7802-abb7-d86fb715cda0 |
| issue_id | sr-ht-dolt-u2b |
| event_type | created |
| actor | Eugene Blikh |
| old_value | |
| new_value | |
| comment | NULL |
| created_at | 2026-08-17T23:39:25Z |
No comments.