dtchat: whatsmeow QR-flow spike (T0.8)

whatsmeow v0.0.0-20261116124925 and Go 1.27 build with cgo sqlite3; sqlstore + GetFirstDevice + GetQRChannel + Connect produce a 277-character QR code and a 160 KB session DB. Login and message need a spare account, so the task is paused.
This commit is contained in:
lotherk committed 2026-11-16 16:24:23 +00:00
1 parent aa6ed2ccc3
commit ccbb275e86
1 file changed
+35
+35
View File
@@ -289,3 +289,38 @@ NetBSD command for later: open `/dev/audio` with `AUDIO_SETINFO`
`play.sample_rate = 48000`, `play.precision = 16`, same for `record`),
`read()`/`write()` 960 frames. The exact ioctl names are in `audio(4)`;
this file does not claim a NetBSD measurement.
---
## T0.8 -- whatsmeow builds and starts the QR flow (2026-11-16)
Host: `kitt`, Go 1.27.4 (downloaded from <https://go.dev/dl/>),
whatsmeow `v0.0.0-20261116124925-2ecca2c913b9` (master on 2026-11-16),
`github.com/mattn/go-sqlite3 v1.14.53` (cgo).
```
$ go build -o wa_spike .
$ ./wa_spike
QR code received, length=277 (not printed)
RESULT qr=1 (login not completed)
exit=0
$ ls -l spike.db
163840 spike.db
```
### What it settles
- whatsmeow builds on this host with Go 1.27 and the cgo SQLite driver;
the binary is 24 MB. A pure-Go SQLite driver was not tried; the cgo
one is what the package example uses.
- `sqlstore.New(ctx, "sqlite3", "file:spike.db?_foreign_keys=on", log)` +
`GetFirstDevice(ctx)` + `GetQRChannel(ctx)` + `Connect()` reaches the
QR event; the code is 277 characters. The code is deliberately not
printed (it is a login token).
- The session store is a SQLite file (160 KB before login), so the adapter
can keep it under `~/.dt/dtchat/wa/<account>/` with 0700.
- **Not proven:** scanning the QR, a text message in either direction, and
reconnect. That needs a spare WhatsApp account and a phone; it is the
live test in T9.2. The spike is therefore paused, not done.
- The README's "Calls" entry under "not yet implemented" (quoted in
`dtchat-upstream.txt` section 4) means no WhatsApp call button in v1.