Commit Graph
26 Commits
Author SHA1 Message Date
Chris Troutner 5bbe276c58 Generate acceptance entry points incrementally
Every acceptance run re-parsed and regenerated all features even when only
one changed. Record feature_hash and aps_commit in the per-feature metadata
and skip parse/generate when both match, and drop generated tests for
features that no longer exist.

By specifier.
2026-09-15 18:13:11 -07:00
Chris Troutner 66a791bd72 Single-source the APS checkout under tmp/aps
There were up to four APS copies (tmp/aps, tmp/aps-spec, tmp/aps-fresh, and a
component-local client copy) and the briefing, wrappers, and runners disagreed
on which to use. Add ensure-aps.sh (ensure/update/reclone) as the one canonical
tmp/aps checkout, point the gherkin-parser wrapper, architect startup, and all
three acceptance runners at it, and update the architect cheat-sheet.

By specifier.
2026-09-15 17:47:33 -07:00
Chris Troutner de74551101 fix(docker): Removing VOLUME calls 2026-09-12 06:31:51 -07:00
Chris Troutner ac468072df Review and harden mute-user: kill mutation survivors, refresh manifests
Add hardening tests to kill mutation survivors in MemoMute.validate,
ProfilePage constructor/_loadState/canMute, MuteQuery._nextString,
MuteState validation guards, and the mute REST controller statused-error
path. Refresh mutation manifests and Gherkin acceptance-mutation stamps.

By architect.
2026-08-28 21:08:50 -07:00
Chris Troutner d8ab5bc79c Refactor mute-user: reduce DRY, add property coverage
Extract shared _getState/_getList helpers in the client MemoDb, a shared
_loadState/_setState base in ProfilePage, and a runAction helper for the
profile follow/mute handlers. Add property tests for the MemoMute service,
the DB MuteQuery adapter, and the indexer handleMute action. Preserve
behavior; all unit, acceptance, and property suites pass across client, DB,
and indexer.

By refactorer.
2026-08-28 19:58:39 -07:00
Chris Troutner 4b03210e85 Implement mute/unmute user feature (0x6d16/0x6d17)
- Client: MemoMute service, ProfilePage mute controls, Profile UI Mute/Unmute buttons,
  Profiles mute state, MemoDb mute read APIs, unit/acceptance tests.
- DB: mutes LevelDB store, MuteQuery adapter, /mute REST routes, MuteState and ListMuted use cases, tests.
- Indexer: mute/unmute action codes, handleMute action handler, muteDb adapter, tests.
- Backlog: mark P4.1/P4.2 mute/unmute as shipped.

By coder.
2026-08-28 19:38:42 -07:00
Chris Troutner fa90179869 Spec mute/unmute user (P4.1/P4.2)
Add client, DB, and indexer Gherkin specs for the Memo mute (0x6d16) and
unmute (0x6d17) actions.

By specifier.
2026-08-28 19:07:07 -07:00
Chris Troutner 06e95150e3 Review and harden poll actions: kill mutation survivors, reduce DRY
- Add hardening tests to kill mutation survivors across client, DB, and
  indexer (hex guards, poll byte-limit boundaries, busy-flag defaults,
  parseTxid empty-string, polls controller handleError, memo-codes
  isMemoPrefix, normalizePollCreateDatas, storePollChildRecord returns).
- Reduce duplication: extract shared reflect/isTooLong into MemoTxidAction
  (client), shared _run into the polls controller and configurable execute
  into PollReadUseCase (DB).
- Refresh mutation manifests and Gherkin acceptance-mutation stamps.

By architect.
2026-08-28 17:51:03 -07:00
Chris Troutner 739b13bfb2 Refactor poll actions: reduce CRAP/DRY, add property coverage
Extract shared txid-action and poll-page bases in the client, a shared
poll-read use-case base and a poll-txid iteration helper in the DB, and a
shared poll-child record helper in the indexer. Reduce normalizePollCreateDatas
complexity (CRAP 7.1 -> 5.0). Add property tests for poll services, handlers,
and query filtering. Preserve behavior; all unit, acceptance, and property
suites pass across client, DB, and indexer.

By refactorer.
2026-08-28 15:23:04 -07:00
Chris Troutner cf05de6630 Implement poll actions (create, option, vote) across client, indexer, and DB
- Client: add MemoPollCreate, MemoPollOption, MemoPollVote services and page controllers.
- Indexer: add create-poll, add-poll-option, and poll-vote handlers with new poll DB adapters.
- DB: add polls/pollOptions/pollVotes stores, PollQuery adapter, GET /polls/:txid endpoints, and use cases.
- Add Gherkin acceptance handlers and focused unit tests for all three components.

By coder.
2026-08-28 14:50:05 -07:00
Chris Troutner 5d7ce7601b Spec P3 poll actions: create poll, add option, vote
By specifier.
2026-08-28 14:11:14 -07:00
Chris Troutner 883f0142c7 Review and harden ZMQ DB backups: centralize backup decision, kill mutation survivor
By architect.
2026-08-28 10:16:20 -07:00
Chris Troutner 89731964de Refactor ZMQ DB backups: add property coverage and constructor test
By refactorer.
2026-08-28 10:10:30 -07:00
Chris Troutner 2d193c6bd2 Implement ZMQ-mode DB backups every epoch blocks
By coder.
2026-08-28 10:05:24 -07:00
Chris Troutner edcb8c8f7f Spec ZMQ-mode DB backups every epoch
By specifier.
2026-08-28 10:02:12 -07:00
Chris Troutner 4679e7a11e Review and harden efficient-post-query: kill mutation survivors
- Add isReply and scanPostsByAddrTxidsAndCount unit tests in post-query to
  kill the true->false and limit-bounding survivors.
- Add normalizeTwoPushMemoDatas, stripLeadingEmptyPushes, and txHashFromPush
  unit tests in indexer helpers to kill 4 survivors.
- Refresh tool-generated mutation manifests and Gherkin acceptance-mutation
  stamps for the batch features (backfill-post-indexes, efficient-post-query,
  addr-and-like-indexing).

By architect.
2026-08-27 22:26:32 -07:00
Chris Troutner 89f0b678c7 Refactor efficient post query: reduce CRAP, DRY, and property coverage
- Extract computeLikeTip and isPaymentTo in the like handler to bring
  CRAP from 13.2 to <=5.0 without changing behavior.
- Add a level-db unit test to raise openDbs coverage and cut its CRAP
  from 10.3 to 3.0.
- Consolidate duplicate txid-extraction helpers in post-query and
  extract txidFromKeyParts (DRY).
- Add coverage for likeTxidFromPostLike and getPostOrNull edge cases.
- Add property tests for the addrPostHeights/postLikes key round-trips
  and by-address pagination conservation.

By refactorer.
2026-08-27 15:07:58 -07:00
Chris Troutner a68151b5f5 Implement efficient post query with addrPostHeights and postLikes indexes
- Add addrPostHeights and postLikes LevelDB stores to psf-memo-db.
- Update PostQuery to use addrPostHeights for /posts/by/:addr and postLikes for per-post counts.
- Add backfill utility for the new indexes.
- Update indexer to write addrPostHeights (posts/replies) and postLikes entries.
- Add acceptance handlers and unit tests for the new behavior.

By coder.
2026-08-27 14:55:09 -07:00
Chris Troutner a5dc01ede5 Spec efficient post queries via addrPostHeights and postLikes indexes
By specifier.
2026-08-27 14:31:20 -07:00
Chris Troutner 69c38d5a36 Updating Docker files for mono repo 2026-08-26 12:05:01 -07:00
Chris Troutner 30c0949d3f Harden and review post-heights-index refactor
Architectural review of the refactorer's postHeights index work. Extract a
shared assemblePostPage helper and a ListUseCase base class to remove DRY
duplication in the post-list use cases. Build the gherkin-mutator runner
adapter for psf-memo-db and psf-memo-indexer. Add boundary and tie-break
tests to kill all surviving language mutations across the changed files
(post-query, pagination, list use cases, indexer post handler).

Mutation: all changed source files fully killed. DRY: clean. CRAP <= 6.
Soft Gherkin acceptance mutation documented survivors (see review report).

By architect.
2026-08-26 11:39:12 -07:00
Chris Troutner 6a8cf6653e Refactor postHeights index code and add property tests
Deduplicate the postHeights query iteration into a shared generator,
extract shared pagination parsing/enrichment, and extract the idempotent
create-if-missing write pattern. Reduces CRAP for the changed post-height
code to <=6 and removes duplicated parse/attach logic across the post list
use cases. Add property tests covering the postHeight key round-trip and
ordering invariants for both the DB and indexer, exposed via a separate
'property' command.

By refactorer.
2026-08-26 11:02:13 -07:00
Chris Troutner fde0086385 Implement postHeights secondary index for efficient pagination
Adds a postHeights LevelDB store written by the indexer and used by
psf-memo-db to paginate recent posts and posts-by-address without full
scans. Includes unit tests and Gherkin acceptance pipelines for both
psf-memo-indexer and psf-memo-db.

By coder.
2026-08-26 10:52:17 -07:00
Chris Troutner c13adbf4aa Add postHeights secondary index specs for efficient post pagination
By specifier.
2026-08-26 10:40:42 -07:00
Chris Troutner 7134979eb8 Reconfigure monorepo for SwarmForge development
- Move specifier-prompt.md to repo root and rewrite it for the monorepo.
- Move specs/feature-backlog.md to root specs/ and update with component scope.
- Add specs/README.md, psf-memo-indexer/specs/README.md, psf-memo-db/specs/README.md.
- Add swarmforge/constitution/articles/monorepo.prompt for shared monorepo rules.
- Update root README.md with repository layout, local dev commands, and SwarmForge info.

By specifier.
2026-08-26 10:23:53 -07:00
Chris Troutner 5a68a42f77 Adding psf-memo-indexer 2026-08-26 09:30:44 -07:00