Commit Graph
274 Commits
Author SHA1 Message Date
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
Chris Troutner 652c70e4ea Implement topic discovery and topic feed
- Add psf-memo-db /topics and /topics/:room/posts read endpoints
- Add TopicQuery adapter, ListTopics and ListTopicPosts use cases
- Add topic read acceptance fixture and step handlers
- Add psf-memo-client topic services, UI routes, nav link
- Add generated topic discovery/feed acceptance handlers

By coder.
2026-08-28 06:31:43 -07:00
Chris Troutner 7a01b9f4e3 Merge specifier topic-feed specs
By coder.
2026-08-28 06:16:49 -07:00
Chris Troutner d3c3a80bbf Spec topic list/discovery and topic feed
By specifier.
2026-08-28 06:15:58 -07:00
Chris Troutner a6dd857f67 Add efficient-post-query review summary
By architect.
2026-08-27 22:27:20 -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 ba1661d79a Merge efficient post query implementation
By specifier.
2026-08-27 18:35:10 -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 83b7233f05 Mark follow/unfollow complete; set next feature to topics
By specifier.
2026-08-27 12:04:49 -07:00
Chris Troutner 7e19503643 Merge branch 'swarmforge-architect' 2026-08-27 12:04:13 -07:00
Chris Troutner bb7b5a6cfd Review and harden follow-user: kill mutation survivors
Add unit test pinning FollowQuery._nextString exclusive upper bound and
empty-string/non-string validation-rejection cases for the follow use
cases, killing the remaining mutation survivors. Update mutation manifests
and add the follow-user architectural review report.

By architect.
2026-08-27 11:23:01 -07:00
Chris Troutner b99d881205 Merge refactorer follow-user implementation
By architect.
2026-08-27 10:47:19 -07:00
Chris Troutner d9ba5a2774 Refactor follow use-cases and profile page; add follow property tests
Share the follow list use-case contract through a FollowListUseCase base
and delegate construction validation to the existing ListUseCase, removing
the duplicated follow use-case constructors and execute bodies. Extract
ProfilePage.load helpers and a shared follow/unfollow setter to reduce
CRAP below the threshold and remove duplicated follow logic. Add property
tests covering MemoFollow broadcast conservation and hash160 length, the
FollowQuery address round trip, and isFollowing/listFollowing/listFollowers
consistency over random record sets.

By refactorer.
2026-08-27 10:46:39 -07:00
Chris Troutner 247d4a9fcf Implement follow-user and follow-read behavior
- Add MemoFollow service for follow/unfollow broadcast with hash160 payloads
- Update Profiles store with follow state
- Extend ProfilePage and Profile UI with Follow/Unfollow buttons
- Add psf-memo-db /follow/state, /follow/following, /follow/followers endpoints
- Add FollowQuery adapter, use cases, REST controller, and unit tests
- Update acceptance handlers for both components

By coder.
2026-08-27 10:35:33 -07:00
Chris Troutner 3b36b5c2e8 Update session-end briefing for follow-user handoff
By specifier.
2026-08-27 10:19:00 -07:00
Chris Troutner d901cfc6cb Spec follow/unfollow user (client write path + DB read side)
Add Gherkin specs for the Follow/Unfollow button (0x6d06/0x6d07) and the
DB follow state + following/followers read side. Use bch-js Address tools
for cashaddr<->hash160 conversion instead of a new dependency.

By specifier.
2026-08-27 10:17:43 -07:00
Chris Troutner 7956d597aa Mark Set Avatar URL complete and set next feature to follow/unfollow
By specifier.
2026-08-27 10:02:43 -07:00
Chris Troutner ba2b3bf317 Review and harden set-avatar-url profile-text refactor
Merge refactorer set-avatar-url work: shared MemoProfileTextAction base with
a profileTextConfig factory so MemoSetName/MemoSetBio/MemoSetAvatarUrl become
thin config declarations, plus avatar URL byte-limit, round-trip, and byte
budget property tests. No hardening fix required; language mutation reports
no survivors and soft Gherkin acceptance mutation survivors are documented
equivalents. Record the durable review report.

By architect.
2026-08-27 09:59:49 -07:00
Chris Troutner 58e21ff01a Deduplicate Memo profile-text actions and add set-avatar-url property tests
Extract a shared MemoProfileTextAction base with a config factory so the
set-name, set-bio, and set-avatar-url actions each become a thin data
declaration, removing the duplicated config and broadcast method. Add
property tests covering the avatar URL byte limit, round trips, and byte
budget conservation.

By refactorer.
2026-08-27 09:57:13 -07:00
Chris Troutner 131d31ee10 Merge coder set-avatar-url implementation
By refactorer.
2026-08-27 09:53:50 -07:00
Chris Troutner 7bee85a36f Implement Set Avatar URL client feature
- Add MemoSetAvatarUrl service broadcasting 0x6d0a with 217-byte limit.
- Add SetAvatarUrlPage controller and React view at /memo/set-avatar-url.
- Wire route in AppBody and add Account page avatar URL display.
- Add Set Avatar URL button on Account page linking to the editor.
- Update Profiles store, AccountPage behavior, and acceptance handlers.
- Add unit tests for avatar URL behavior, page, and account page.

By coder.
2026-08-27 09:53:36 -07:00
Chris Troutner 991053ab12 Spec Set Avatar URL feature
By specifier.
2026-08-27 09:49:07 -07:00
Chris Troutner 2eb86e2d07 Mark Set Bio complete and set next feature to profile picture
Update the P1 backlog and standing specifier briefing for the merged
set-bio task. Add gotcha for the 217-byte profile-text limit vs the
indexer's looser validation.

By specifier.
2026-08-27 08:13:55 -07:00
Chris Troutner e321c7fec7 Revert unrelated specifier model change in swarmforge.conf
The architect review noted this specifier-model switch was left out of the
set-bio merge, but it leaked in with the fast-forward. Restore origin/master
config so the merge stays focused on the set-bio feature.

By specifier.
2026-08-27 08:12:26 -07:00
Chris Troutner ecb6ee7f28 Review and harden set-bio profile-text refactor
Merge refactorer set-bio work: MemoAction config-driven byte-limit and
profile-store reflection, shared ProfileTextPage base for SetBioPage and
SetNamePage, and byte-counting property tests. Harden the shared base with
a test asserting the in-flight flag initializes false.

By architect.
2026-08-27 08:09:02 -07:00
Chris Troutner 9c5767d462 Refactor set-bio to share profile-text action and page bases
Deduplicate the set-bio and set-name action and page-controller layers:
move byte-limit and profile-store reflection into MemoAction via config,
and share a ProfileTextPage base for both page controllers. Add property
tests for byte counting and the bio byte-limit boundary.

By refactorer.
2026-08-27 08:00:58 -07:00
Chris Troutner 01a16769bd Implement Set Bio (0x6d05) client write path
Add Memo set-bio action, Set Bio page controller, Set Bio React view,
account bio display, and acceptance step handlers. Includes unit tests.

By coder.
2026-08-27 07:50:33 -07:00
Chris Troutner fcab46d706 Add Gherkin spec for Set Bio (0x6d05) client write path
By specifier.
2026-08-27 07:44:41 -07:00
Chris Troutner 7e5b704a37 Switching back to deepseek for specifier 2026-08-26 20:55:00 -07:00
Chris Troutner 5926db1913 Mark like-count display complete and set next feature to profile text
By specifier.
2026-08-26 20:52:25 -07:00
Chris Troutner 21373f4d10 Harden and review like-count-display refactor
- Add unit tests to kill all mutation survivors in GetPostThread
  (sort order, missing blockHeight/seen fallbacks, non-string txid).
- Add default-limit and falsy-pagination tests for the client page
  controllers (ProfilePage, RecentFeedPage).
- Refresh mutation manifests and Gherkin acceptance mutation metadata.
- Write durable review report to docs/reviews/like-count-display-summary.md.

By architect.
2026-08-26 20:46:35 -07:00
Chris Troutner c208eb38aa Refactor like-count read side and add property tests
- Reduce GetPostThread.buildThreadNode CRAP from 10 to 5 by extracting
  fetchPostOrNull, loadChildTxids, and compareReplies helpers.
- Add like-count property tests (conservation, round-trip, pagination).
- Update post-height property test for the new likesDb requirement.
- Add client thread-page flatten property test and a small harness.

By refactorer.
2026-08-26 19:55:19 -07:00
Chris Troutner d8160c2750 Merge coder like-count-display implementation
By refactorer.
2026-08-26 19:49:16 -07:00
Chris Troutner 3f5c8f809a Display like counts on feed, profile, and thread
- Add testable RecentFeedPage, ProfilePage, and ThreadPage controllers.
- Wire acceptance handlers for the like-count-display feature.
- Render like counts on the profile page with a read-only LikeButton.
- Add unit tests for the new display page services.

By coder.
2026-08-26 19:48:37 -07:00
Chris Troutner 6114afc209 Merge specifier like-count-display spec
By coder.
2026-08-26 19:37:18 -07:00
Chris Troutner fe0981deb2 Add Gherkin spec for like count display on feed, profile, and thread
By specifier.
2026-08-26 19:36:49 -07:00
Chris Troutner b5e12c709a Mark likeCount read side complete and set next feature
- Update backlog: P1.1 read side is done; P1.2 client display is next.
- Update specifier handoff notes with current HEAD and next action.

By specifier.
2026-08-26 19:14:21 -07:00
Chris Troutner 4bd4b79f6c Add likeCount to psf-memo-db post responses
- Wire likesDb into PostQuery and add buildLikeCountMap().
- Extend pagination helpers to attach like counts to post pages.
- Update ListRecentPosts, ListPostsByAddr, and GetPostThread to
  return likeCount on every post / thread node.
- Add/extend unit tests and acceptance fixture for like counts.

By specifier.
2026-08-26 19:13:59 -07:00
Chris Troutner 7c4633753f Merge coder likeCount-on-posts implementation
By refactorer.
2026-08-26 19:05:18 -07:00