main · last commit
17 hours ago ·
skqvdbd8
sr-ht-compare-f6e Pass *http.Request into compare's template render error log
Lined Up
bd update sr-ht-compare-f6e --claim
bd close sr-ht-compare-f6e
| Created by | bigbes |
| Owner | bigbes@gmail.com |
| Created | 2026-08-17T21:37:44Z |
| Updated | 2026-08-17T21:37:44Z |
What is wrong: sourcehut-compare/web/templates.go::(*Server).render logs 'slog.Error("web: render", scribe.Err(err), "page", page, "status", status)' with no *http.Request, so there is no ErrorContext, no method, no path, and no request id. Every other service in the family logs 'slog.ErrorContext(r.Context(), ..., "method", r.Method, "path", r.URL.Path, scribe.Err(err))', the shape pages.Render's own doc-comment shows.
Why it matters: chimw.RequestLogger's request id lives in the request context and is dropped here, so a render failure in compare cannot be correlated with the request line that produced it — the one piece of observability every sibling gets for free.
Correct variant: the seven siblings, e.g. repo/path sourcehut-tokens/web/templates.go::render (or pages.Render's own doc-comment) for the ErrorContext shape.
Fix: thread an *http.Request into sourcehut-compare/web/templates.go::(*Server).render and switch the log call to slog.ErrorContext(r.Context(), ...) including method and path.
Audit: D35 (cross-repo audit, 2026-08-17)
No outgoing dependencies.
Nothing depends on this issue.
| id | sr-ht-compare-f6e |
| content_hash | c7291faccf05d3d977171de95de133c614db74303c64d102c81d5f59a4d1e764 |
| title | Pass *http.Request into compare's template render error log |
| description | What is wrong: sourcehut-compare/web/templates.go::(*Server).render logs 'slog.Error("web: render", scribe.Err(err), "page", page, "status", status)' with no *http.Request, so there is no ErrorContext, no method, no path, and no request id. Every other service in the family logs 'slog.ErrorContext(r.Context(), ..., "method", r.Method, "path", r.URL.Path, scribe.Err(err))', the shape pages.Render's own doc-comment shows. Why it matters: chimw.RequestLogger's request id lives in the request context and is dropped here, so a render failure in compare cannot be correlated with the request line that produced it — the one piece of observability every sibling gets for free. Correct variant: the seven siblings, e.g. repo/path sourcehut-tokens/web/templates.go::render (or pages.Render's own doc-comment) for the ErrorContext shape. Fix: thread an *http.Request into sourcehut-compare/web/templates.go::(*Server).render and switch the log call to slog.ErrorContext(r.Context(), ...) including method and path. Audit: D35 (cross-repo audit, 2026-08-17) |
| design | |
| acceptance_criteria | |
| notes | |
| status | open |
| priority | 3 |
| issue_type | chore |
| assignee | NULL |
| estimated_minutes | NULL |
| created_at | 2026-08-17T21:37:44Z |
| created_by | bigbes |
| owner | bigbes@gmail.com |
| updated_at | 2026-08-17T21:37:44Z |
| 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 | 01a011a8-b2a3-7dbf-844f-fd0b2e117753 |
| issue_id | sr-ht-compare-f6e |
| event_type | created |
| actor | bigbes |
| old_value | |
| new_value | |
| comment | NULL |
| created_at | 2026-08-18T00:37:43Z |
No comments.