Re-vendor the canonical files from sneak/prompts at dd4027b (closes #112)
check / check (push) Failing after 7s

The shared files are fetched from sneak/prompts dd4027b, with this
repository's own entries after the shared content in .gitignore,
.editorconfig and .dockerignore.

Lint and tests are Dockerfile phases (golangci-lint v2.14.0, Debian Go
1.24.13) that the build stage depends on, and the Makefile targets call
the script/ entrypoints. make fmt also formats Markdown with prettier.

Fixes for the new lint findings: the auth cookie is always Secure, an
IRC connection's relay goroutine stops when the connection closes, and
repeated strings are constants.

Model: opus-5-5
This commit is contained in:
2026-10-06 08:35:46 +00:00
parent 9a46421902
commit 60c0d4b5e3
45 changed files with 2753 additions and 1420 deletions
+9 -6
View File
@@ -987,11 +987,12 @@ func TestGetOperCount(t *testing.T) {
sid2, _, _, err := database.CreateSession(
ctx, "user2", "", "", "",
)
_ = sid2
if err != nil {
t.Fatal(err)
}
_ = sid2
// Initially zero opers.
count, err := database.GetOperCount(ctx)
if err != nil {
@@ -1023,23 +1024,25 @@ func TestGetOperCount(t *testing.T) {
func TestWildcardMatch(t *testing.T) {
t.Parallel()
const hostmask = "nick!user@host"
tests := []struct {
pattern string
input string
match bool
}{
{"*!*@*", "nick!user@host", true},
{"*!*@*", hostmask, true},
{"*!*@*.example.com", "nick!user@foo.example.com", true},
{"*!*@*.example.com", "nick!user@other.net", false},
{"badnick!*@*", "badnick!user@host", true},
{"badnick!*@*", "goodnick!user@host", false},
{"nick!user@host", "nick!user@host", true},
{"nick!user@host", "nick!user@other", false},
{hostmask, hostmask, true},
{hostmask, "nick!user@other", false},
{"*", "anything", true},
{"?ick!*@*", "nick!user@host", true},
{"?ick!*@*", hostmask, true},
{"?ick!*@*", "nn!user@host", false},
// Case-insensitive.
{"Nick!*@*", "nick!user@host", true},
{"Nick!*@*", hostmask, true},
}
for _, tc := range tests {