feat(go): M6.7 — single-binary embed verification #34

Closed
kacerr wants to merge 0 commits from feat/go-m6-7-embed-verify into main
Owner

Summary

  • Adds TestEmbedCompleteness in go/internal/web/assets_test.go: walks on-disk templates/ and static/ and asserts every file is present in the corresponding embed.FS — catches a file added to disk but missing from the embed glob.
  • Adds TestStaticAssetsServed: fires httptest requests through the same http.FileServerFS mux wiring as server.go, asserts 200 + correct Content-Type for app.css and all three JS modules, plus a 404 sanity check for an unknown path.
  • Manual standalone smoke test passed: binary copied to /tmp (no adjacent templates/ or static/), all pages and static assets served correctly.
  • Closes M6 (final milestone: single-binary deployment verified).

Test plan

  • make go-test green
  • make go-lint clean
  • Review new assets_test.go — two tests, no production code changes

🤖 Generated with Claude Code

## Summary - Adds `TestEmbedCompleteness` in `go/internal/web/assets_test.go`: walks on-disk `templates/` and `static/` and asserts every file is present in the corresponding `embed.FS` — catches a file added to disk but missing from the embed glob. - Adds `TestStaticAssetsServed`: fires httptest requests through the same `http.FileServerFS` mux wiring as `server.go`, asserts 200 + correct `Content-Type` for `app.css` and all three JS modules, plus a 404 sanity check for an unknown path. - Manual standalone smoke test passed: binary copied to `/tmp` (no adjacent `templates/` or `static/`), all pages and static assets served correctly. - Closes M6 (final milestone: single-binary deployment verified). ## Test plan - [ ] `make go-test` green - [ ] `make go-lint` clean - [ ] Review new `assets_test.go` — two tests, no production code changes 🤖 Generated with [Claude Code](https://claude.ai/claude-code)
kacerr added 1 commit 2026-05-08 15:25:59 +02:00
feat(go): M6.7 — single-binary embed verification
All checks were successful
Deploy to K8s / deploy (push) Successful in 8s
d981392593
Add TestEmbedCompleteness and TestStaticAssetsServed in
go/internal/web/assets_test.go. The completeness guard walks the
on-disk templates/ and static/ directories and asserts every file is
present in the corresponding embed.FS, catching forgotten files on
future additions. The static mux test hits /static/css/app.css and all
JS files through the same http.FileServerFS wiring used in server.go,
confirming assets are served from the embedded FS with correct
Content-Type and a 404 for unknown paths.

Standalone binary smoke test passed manually: binary copied to /tmp
(no adjacent templates/ or static/), assets served correctly.

Closes M6.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kacerr closed this pull request 2026-05-24 21:13:59 +02:00
All checks were successful
Deploy to K8s / deploy (push) Successful in 8s

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kacerr/fuj-management#34