A SimpleX Chat bot that answers arithmetic (closes #1)
check / check (push) Successful in 54s
check / check (push) Successful in 54s
Remove the template's HTTP service, database and fx wiring. Add exact arithmetic on go/parser and go/constant, a client that runs simplex-chat as a child process and drives its WebSocket API, and the bot, which keeps an auto-accepting address and replies to each message. The image adds the checksum-pinned simplex-chat v7.0.2 on Ubuntu 22.04. Model: opus-5-5
This commit is contained in:
+17
-32
@@ -10,44 +10,29 @@
|
||||
|
||||
# Status
|
||||
|
||||
pre-1.0. No git tags exist. `main` is a working HTTP service that
|
||||
builds, tests and lints clean: cobra command tree, `fx` object graph,
|
||||
viper configuration that aborts on an unparseable value, sqlite with an
|
||||
embedded schema and a migration runner, embedded templates and static
|
||||
assets, the full middleware chain (request id, logging, metrics, panic
|
||||
recovery, request timeout, body cap, security headers, CSRF), Sentry,
|
||||
and Prometheus `/metrics` behind optional basic auth.
|
||||
|
||||
This repository is a template. A project seeded from it should replace
|
||||
this Status section and everything below it, keeping the Workflow
|
||||
section above unchanged.
|
||||
pre-1.0. No git tags exist. `main` is a working bot: one container image
|
||||
holding the bot and the SimpleX Chat command-line client v7.0.2, a bot
|
||||
profile named `calc` with a long-term address that accepts every contact
|
||||
request, and exact arithmetic replies (`+ - * /`, parentheses,
|
||||
decimals). The Gitea issue tracker is the authoritative list of work;
|
||||
this file mirrors it.
|
||||
|
||||
# Next Step
|
||||
|
||||
Replace `gomodguard` with `gomodguard_v2` in `.golangci.yml`.
|
||||
golangci-lint v2.12.2 emits a deprecation warning for it on every run
|
||||
(`the linter 'gomodguard' is deprecated (since v2.12.0) ... Replaced by gomodguard_v2`).
|
||||
Neither is configured with rules here, so the change is to the `linters`
|
||||
block only; done when `make lint` runs clean with no deprecation warning
|
||||
in the output.
|
||||
Adopt the canonical `.golangci.yml` from the `prompts` repository once
|
||||
it replaces `gomodguard` with `gomodguard_v2`. golangci-lint v2.12.2
|
||||
warns on every run that `gomodguard` is deprecated. The file is
|
||||
maintained upstream and is not edited here; done when `make lint` runs
|
||||
with no deprecation warning.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-08-22 Built the template out from an empty repository: STRTA
|
||||
`script/` entrypoints with `Makefile` shims, `Dockerfile` and
|
||||
`Dockerfile.lint` on digest-pinned bases, Gitea workflow running
|
||||
`script/cibuild`, `.golangci.yml`, `.editorconfig`, `.prettierrc`,
|
||||
`docs/REPO_POLICIES.md`, `AGENTS.md`, the HTTP service and its tests,
|
||||
and `script/rename` for seeding
|
||||
- 2026-09-26 Seeded from `go-template-repo` (renamed, its HTTP service
|
||||
removed) and built the bot: `internal/calc` for the arithmetic,
|
||||
`internal/simplex` for the chat client process and its WebSocket API,
|
||||
`internal/bot` for address setup and replies, and a runtime image on
|
||||
Ubuntu 22.04 carrying the checksum-verified `simplex-chat` binary
|
||||
|
||||
# Future Steps
|
||||
|
||||
- Add a `docker-compose.yml` showing the service behind a
|
||||
TLS-terminating reverse proxy with `X-Forwarded-Proto` set, since that
|
||||
is the deployment shape the CSRF middleware is written for and the one
|
||||
an operator is most likely to get wrong
|
||||
- Add a `script/release` that tags, builds with `VERSION` set, and
|
||||
pushes the image, so `globals.Version` is something other than `dev`
|
||||
in a real deployment
|
||||
- Decide whether the template should ship a session/auth layer or stay
|
||||
deliberately without one
|
||||
none
|
||||
|
||||
Reference in New Issue
Block a user