Commit Graph
114 Commits
Author SHA1 Message Date
Chris Troutner 4422372c51 Merge following-feed hardening from architect
Merge the architect's second-pass hardening of the Following feed (P6.6):
extract parseRequiredString shared by the addr/room-scoped list use cases,
add client and DB composition-root hardening tests, and record the review
summary and architect process notes.

By specifier.
2026-09-02 12:31:16 -07:00
Chris Troutner d8639dc04c Point architect startup at its process notes
By architect.
2026-09-02 12:27:00 -07:00
Chris Troutner b4848c887e Rename process notes to architect-scoped and add role guard
By architect.
2026-09-02 12:25:24 -07:00
Chris Troutner fe75bc0dbd Document review-summary force-add exception in process notes
By architect.
2026-09-02 12:23:44 -07:00
Chris Troutner 4f6b09e011 Commit following-feed review summary (force-add; docs/ is gitignored)
By architect.
2026-09-02 12:23:38 -07:00
Chris Troutner 4bf99e7db0 Review and harden following feed: kill survivors, DRY parseRequiredString
- Extract parseRequiredString into pagination.js, shared by the three list
  use cases, removing duplicated required-field guards.
- Add client hardening tests (emptyBecauseNoFollows init, canLoadMore null
  guard) and a DB composition-root test for UseCases.start.
- Refresh mutation manifests and Gherkin acceptance-mutation stamp.

By architect.
2026-09-02 12:20:37 -07:00
Chris Troutner 9b482c4ae0 Mark Following feed (P6.6) shipped; update briefing
By specifier.
2026-08-29 13:01:25 -07:00
Chris Troutner 62d6297197 Merge Following feed (P6.6) from refactorer 2026-08-29 10:44:54 -07:00
Chris Troutner d606ee6608 Refactor following feed: reduce CRAP/DRY, add property coverage
- Extract shared runUseCase and listPostsForAddr in the posts controller to
  remove the duplicated try/catch error wrapper (CRAP 14.7 -> 4.0) and DRY
  the addr-scoped handlers.
- Add error-path unit tests for the posts controller covering both branches
  of handleError.
- Consolidate ListFollowingFeed onto the shared ListUseCase constructor to
  remove constructor duplication across list use cases.
- Add property tests for scanFollowingFeedTxidsAndCount (ordering, reply/
  viewer/membership exclusion, pagination conservation) and for the client
  FollowingFeedPage.load state invariants.

By refactorer.
2026-08-29 10:44:28 -07:00
Chris Troutner 9fff348081 Merge branch 'swarmforge-coder' into swarmforge-refactorer 2026-08-29 10:31:33 -07:00
Chris Troutner 6d1bd148e9 Implement Following feed
Add psf-memo-db endpoint GET /posts/following/:addr that returns top-level
posts from followed profiles, excluding replies and the viewer's own posts,
newest first and paginated. Add PostQuery.scanFollowingFeedTxidsAndCount,
ListFollowingFeed use case, and REST controller/router wiring.

Add psf-memo-client Following feed page, route /posts/following, nav link,
MemoDb.getFollowingFeed, and FollowingFeedPage service. Update acceptance
handlers for the new following-feed.feature.

By coder.
2026-08-29 10:30:54 -07:00
Chris Troutner 9f5357ba29 Record following-feed handoff in backlog and briefing
By specifier.
2026-08-29 10:22:14 -07:00
Chris Troutner 6d94372438 Spec Following feed (P6.6)
By specifier.
2026-08-29 10:21:28 -07:00
Chris Troutner 96956f3ef3 Mark Search (P6.4) shipped; update briefing
By specifier.
2026-08-29 09:25:52 -07:00
Chris Troutner 20328eabe7 Merge Search feature (P6.4) from architect
Merge swarmforge-architect into master. Verified client (build/test/lint)
and DB (test/lint) after merge.

By specifier.
2026-08-29 09:25:43 -07:00
Chris Troutner e8bf42a1f3 Review and harden search: kill mutation survivors, refresh manifests
Add hardening tests to kill mutation survivors in SearchQuery guards and
profileMatches defaults, SearchAll pagination/empty-query guards, the search
REST controller 500-error path, and the client SearchPage constructor/getPost/
getProfile. Refresh mutation manifests and the Gherkin acceptance-mutation
stamp.

By architect.
2026-08-29 08:51:42 -07:00
Chris Troutner d3e3b23bbe Refactor search: reduce CRAP, DRY, add property coverage
- Split SearchQuery.searchProfiles/searchPosts into small helpers to bring
  CRAP to 5.0 or below across the search feature.
- Extract shared normalizeQuery/sortByHeightDesc (src/lib/search.js) and
  loadReplyTxids (src/adapters/lib/load-reply-txids.js) to remove duplication
  with search-all, list-recent-profiles, and post-query.
- Add error-path unit tests for the search controller.
- Add property tests for SearchQuery and SearchAll (pagination, ordering,
  case-insensitivity, reply exclusion, substring containment).
- Refresh mutation manifests for post-query and list-recent-profiles.

By refactorer.
2026-08-29 07:35:26 -07:00
Chris Troutner 8508fdaff0 Implement Search feature (P6.4)
- Add psf-memo-db /search endpoint with SearchQuery adapter, SearchAll use case,
  and REST controller/router.
- Add psf-memo-client SearchPage service, Search component, route, and nav link.
- Wire search support into the acceptance handler fake MemoDb.
- Add unit tests for the new adapter, use case, controller, and page service.

By coder.
2026-08-29 07:18:39 -07:00
Chris Troutner 236bb5a9fa Update specifier briefing for task search
By specifier.
2026-08-29 07:11:08 -07:00
Chris Troutner d11365c057 Spec Search feature (P6.4)
Add psf-memo-client/specs/search.feature specifying the /search read
endpoint (posts by text, profiles by name/bio) and the client Search page.
Update the backlog: mark Search in pipeline, note Send money (P5.1) skipped.

By specifier.
2026-08-29 07:10:38 -07:00
Chris Troutner 35cb1725a3 Update briefing and backlog for mute-user merge
Mark P4.1/P4.2 mute/unmute shipped; point next spec at P5.1 send money.

By specifier.
2026-08-28 21:46:05 -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 befae539c7 Update briefing and backlog for poll-actions merge
By specifier.
2026-08-28 18:24:22 -07:00
Chris Troutner 6309c4a50d Merge branch 'swarmforge-coder' 2026-08-28 18:11:39 -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 b349af0ae3 Update briefing and backlog for P3 poll-actions handoff
By specifier.
2026-08-28 14:11:50 -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 25de2d9eb7 Update backlog and briefing for topic-actions merge
By specifier.
2026-08-28 13:38:29 -07:00
Chris Troutner 61616eb9eb Merge topic-actions implementation from architect
Merge swarmforge-architect into master for task topic-actions.

By specifier.
2026-08-28 13:17:10 -07:00
Chris Troutner 5183359143 Review and harden topic actions: kill mutation survivors
- Add hardening tests for topic-post-page, profiles, topic-feed-page, and
  topic-query to kill mutation survivors.
- Refresh mutation manifests and Gherkin acceptance-mutation stamps.
- Add topic-actions review summary.

By architect.
2026-08-28 13:13:01 -07:00
Chris Troutner d6f56780be Refactor topic actions: reduce CRAP/DRY, add property coverage, complete acceptance
- Add unit coverage for Profiles topic follow state to bring CRAP to 4.
- DRY Profiles set/get follow state via shared nested-map helpers.
- Add TopicQuery topic-follow read-side property tests and MemoTopicPost
  byte-accounting property tests.
- Complete client and DB acceptance step handlers and mocks for the
  topic-follow and topic-post features.

By refactorer.
2026-08-28 11:13:03 -07:00
Chris Troutner 50e287ed0f Implement topic post, follow, and unfollow
- Add MemoTopicPost service and TopicPostPage controller for topic messages.
- Add MemoTopicFollow service for topic follow/unfollow broadcasts.
- Extend TopicFeedPage with follow state and follower list.
- Update TopicFeed view with composer and Follow/Unfollow button.
- Extend MemoDb client with topic follow state and followers endpoints.
- Extend Profiles store with topic follow state.
- Add DB topic follow read side: TopicQuery, use cases, REST routes.
- Add unit tests for all new behavior.

By coder.
2026-08-28 10:55:42 -07:00
Chris Troutner 20cc2e0399 Update backlog and briefing for topic-actions handoff
By specifier.
2026-08-28 10:44:20 -07:00
Chris Troutner b8a10d3706 Spec topic post, follow, and unfollow actions
Add client specs for the topic post composer and topic follow/unfollow
buttons, plus the DB read side for topic follow state and followers.

By specifier.
2026-08-28 10:43:52 -07:00
Chris Troutner b517795573 Update briefing and backlog for ZMQ DB backups fix
By specifier.
2026-08-28 10:28:51 -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 fcaebeb6a4 Add consolidated architect startup verification script
By architect.
2026-08-28 10:16:16 -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 d84a022c1a Update backlog and briefing for topic list/feed
By specifier.
2026-08-28 09:39:28 -07:00
Chris Troutner f12e5b38db Add architect startup cheat-sheet
Capture tool locations, the --mutate-all differential gotcha, the
gherkin-mutator invocation, and the refactorer-forward no-op pattern to
speed up the next session's startup.

By architect.
2026-08-28 09:25:01 -07:00
Chris Troutner c9bdf326d6 Review and harden topic-feed: kill mutation survivors
- Add topic-query, list-topic-posts, topics controller, and client
  topic-page hardening tests to kill mutation survivors.
- Refresh mutation manifests and Gherkin acceptance-mutation stamps.
- Add topic-feed review summary.

By architect.
2026-08-28 08:55:48 -07:00
Chris Troutner 4c5fb38661 Refactor topic feed: reduce CRAP, DRY, and add property coverage
- Add topics controller error-handling unit tests to bring handleError
  CRAP from 14.7 to 4.0.
- Consolidate duplicate getTopicPosts/getPostsByAddr HTTP page fetches
  into a shared getPage helper in memo-db (DRY).
- Add TopicQuery property tests: listTopics conservation/ordering,
  getTopicPostTxids newest-first pagination, and room/txid key round-trips.
- Add client topic-services property tests for getTopic/getPost lookup
  completeness.

By refactorer.
2026-08-28 06:43:18 -07:00
Chris Troutner 30dcf244cf Merge commit '652c70e4ea' into swarmforge-refactorer 2026-08-28 06:32:02 -07:00