Record memo-multipush-encoding completion in backlog and briefing

By specifier.
This commit is contained in:
Chris Troutner
2026-09-16 21:39:00 -07:00
parent 4dedc518c3
commit a4b0e080a3
2 changed files with 60 additions and 10 deletions
+40 -9
View File
@@ -494,6 +494,36 @@ that a single user-facing feature may require specs in more than one component.
not implementation gaps; the wire-order and positive-repair mutations were
killed (14 executed/8 killed and 21/18).
35. **`minimal-slp-wallet` cannot emit multi-push OP_RETURNs (the
payload-layout bug class).** `sendOpReturn(msg, prefix)` hardcodes
`[OP_RETURN, prefix, msg]` and `bchjs.Script.encode2` will not nest arrays,
so every multi-field Memo action was flattened into one push. The indexer
requires `[prefix, txid(32 LE), text]` for reply/topic-message/
add-poll-option/poll-vote and `[prefix, poll_type, option_count, question]`
for create-poll; the combined form is logged as `invalid reply push data
count 2` and dropped (and memo.cash does not display it). The shared
browser-safe adapter is `psf-memo-client/src/services/memo-multipush.js`
(`attachMultiPushOpReturn`/`broadcastMultiPush`), which swaps
`bchjs.Script.encode2` to expand a pushes array and restores it in the same
tick. When adding any future action with more than one payload field, use
that adapter and assert the push count in acceptance, not just the prefix.
36. **Node `Buffer` struck again in the multi-push adapter (gotcha #19
repeat).** The first `memo-multipush.js` used the Node global `Buffer` to
build the script; CRA 5 does not polyfill it and the external wallet script
does not define `window.Buffer`, so every real-browser multi-push broadcast
would have thrown `Buffer is not defined` while Node tests passed. Fix:
import `{ Buffer } from 'buffer'` and declare `buffer` as a direct
dependency. `@psf/bitcoincashjs-lib`'s `compile2` requires genuine Buffers
(`Buffer.isBuffer` + `.copy`), so a `Uint8Array` is not a substitute here.
37. **Soft Gherkin mutation survivors for `memo-multipush-encoding.feature` are
intrinsic.** 20 executed / 8 killed / 12 survived; every survivor is a
single-character case mutation of a `text`/`topic`/`question` example value
used on both the setup and assertion sides (gotcha #12 class). The
structural assertions — push count, little-endian txid, poll type, and
option count — killed all 8 non-text mutations. `gherkin-mutator` wrote an
empty `scenarios` manifest because every scenario has an intrinsic
survivor; that is expected and committed as tool-written.
---
## 10. Run / verify the app
@@ -544,15 +574,16 @@ At the end of each session, update this file:
- Note the current `master` HEAD commit.
- State the next feature to work on.
Current `master` HEAD: `8f24ac0` (`txid-wire-encoding` merged from
`swarmforge-architect`). Two verification records name the review commit
`a2229f7dd4`: `docs/reviews/txid-wire-encoding-verification.json` (client,
417 unit / 80 property / 30 acceptance suites / lint / build) and
`docs/reviews/txid-wire-encoding-db-verification.json` (db, 371 unit / 54
property / 13 acceptance suites / lint); the architect tip added only `docs/`.
This task fixed the client big-endian txid bug for likes/replies/polls and
added the DB repair utility. Run `swarmforge/scripts/state.sh` to refresh these
HEAD lines.
Current `master` HEAD: `4dedc51` (`memo-multipush-encoding` merged from
`swarmforge-architect`). One verification record names the review commit
`fac01730c4`: `docs/reviews/memo-multipush-encoding-verification.json`
(client, 425 unit / 85 property / 31 acceptance suites / lint / build); the
commits after the review commit added only `docs/` (summary, record, architect
process note). This task fixed the multi-field payload layout for reply, topic
message, add-poll-option, poll vote, and create-poll. The specifier merged the
branch and ran only the merged feature's acceptance suite (10/10 executions
passed) as the independent check. Run `swarmforge/scripts/state.sh` to refresh
these HEAD lines.
Next action: **TBD** — ask the user for the next feature. Current direction is
front-end improvements to `psf-memo-client` (UI/UX polish, accessibility,
performance, responsiveness, state handling, error surfacing). See
+20 -1
View File
@@ -2,7 +2,7 @@
**Status**: DRAFT — refreshed 2026-09-03.
**Owner**: specifier.
**Last updated**: 2026-09-16
**Last updated**: 2026-09-17
---
@@ -31,6 +31,25 @@ focus is **front-end improvements** to `psf-memo-client` (the React SPA).
## Recently completed
- **Memo multi-push encoding (2026-09-17):** fixed the payload layout for
every multi-field Memo action. `minimal-slp-wallet`'s
`sendOpReturn(msg, prefix)` can only emit two OP_RETURN pushes
(`[prefix, msg]`), so the client had been concatenating all fields into one
push. The indexer and memo.cash expect one push per protocol field, so the
indexer logged `invalid reply push data count 2` and dropped every reply,
topic message, add-poll-option, and poll vote; create-poll was accepted by
our indexer only because it tolerates the combined form. Added the
browser-safe `psf-memo-client/src/services/memo-multipush.js` adapter
(`attachMultiPushOpReturn`/`broadcastMultiPush`) and switched the five action
services to broadcast field arrays: reply `[6d03, txid(32 LE), text]`,
topic message `[6d0c, topic, text]`, add-poll-option `[6d13, txid(32 LE),
option]`, poll vote `[6d14, txid(32 LE), comment]`, and create-poll `[6d10,
poll_type, option_count, question]`. Client-only. Spec:
`psf-memo-client/specs/memo-multipush-encoding.feature`. Merged to `master`
at `4dedc51` (review commit `fac0173`; record
`docs/reviews/memo-multipush-encoding-verification.json`, 425 unit / 85
property / 31 acceptance suites / lint / build).
- **Txid wire encoding repair (2026-09-16):** fixed the endianness bug that
broke every like, reply, poll option, and poll vote broadcast by
psf-memo-client. The client embedded the referenced txid in big-endian