Split compose dev/prod and relax contact form friction.

Use compose.dev.yaml and compose.prod.yaml with fixed Go cache mounts, block sudo make dev, build Air outside app/tmp for rootless Docker, soften English spam checks, and simplify contact error copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-07 11:41:13 +12:00
parent 3f5235daaf
commit bf110d0bc7
13 changed files with 125 additions and 76 deletions

View File

@@ -0,0 +1,29 @@
package contactcheck
import "testing"
func TestValidateEnglish_acceptsPlainEnglish(t *testing.T) {
if err := ValidateEnglish("Jimmy", "Hello, I need help with an LED install."); err != nil {
t.Fatalf("unexpected error: %v", err)
}
}
func TestValidateEnglish_acceptsTechnicalEnglish(t *testing.T) {
msg := "Need a quote for 50m WS2812 strip + ESP32 controller in Auckland."
if err := ValidateEnglish("Alex", msg); err != nil {
t.Fatalf("unexpected error: %v", err)
}
}
func TestValidateEnglish_rejectsNonLatinScript(t *testing.T) {
msg := "これは日本語のテストメッセージです。十分な長さがあります。"
if err := ValidateEnglish("Jimmy", msg); err != ErrNotEnglish {
t.Fatalf("got %v, want ErrNotEnglish", err)
}
}
func TestValidateEnglish_rejectsTooShort(t *testing.T) {
if err := ValidateEnglish("Jimmy", "Hi there"); err != ErrTooShort {
t.Fatalf("got %v, want ErrTooShort", err)
}
}