feat(web): W-G14 anlian-mq acceptance and auth/session listen fixes

Add a GFM-first anlian rewrite under examples/anlian-mq to exercise Go
libweb (lists, detail, gates, login, WS). Wire RBAC/login into listen,
page query/order/detail ABIs, and stop issuing Max-Age=0 CSRF cookies so
browser login sessions stick.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-10 21:20:11 +08:00
1 parent e20cf8b386
commit ce195998c1
22 files changed
+1454 -20

No files matched your search

@@ -3,6 +3,7 @@ package session_test
import (
"os"
"path/filepath"
"strings"
"testing"
"github.com/alicebob/miniredis/v2"
@@ -57,6 +58,13 @@ func TestCSRFAndCookie(t *testing.T) {
if !ok || got != id {
t.Fatalf("cookie parse %q != %q", got, id)
}
zero := session.SessionCookie(id, 0, false)
if strings.Contains(zero, "Max-Age=0") {
t.Fatalf("ttl 0 must not clear cookie: %s", zero)
}
if !strings.Contains(session.ClearCookie(), "Max-Age=0") {
t.Fatal("ClearCookie should expire")
}
}
func TestSessionPersistsInSQLite(t *testing.T) {