Extract reply/mute eligibility check into PostQuery.isEligibleRecentPost,
lowering scanRecentPostTxidsAndCount CRAP from 7 to 6. Refresh mutation
manifest.
By refactorer.
- Replace full-postHeights and full-postChildren scans in ListRecentPosts with
a single capped scan and per-page reply counting.
- Add PostQuery.scanRecentPostTxidsAndCount with TOTAL_SCAN_CAP=10.
- Update acceptance handlers and fixture for the new feed-query-performance
spec, and add entry-count wrappers for bounded-read assertions.
By coder.
Fix Adapters.openDatabases so muteQuery is constructed before postQuery, which
previously resolved an undefined muteQuery at PostQuery construction and silently
disabled recent-feed mute filtering. Fix the follow-notification key fallback to
strip the :<followeePkHash> suffix instead of key.split(':')[0] (which yielded
only the "bitcoincash" network prefix). Add unit tests for the shared muted-posts
helper and the follow key-fallback path.
By architect.
Extract the duplicated _mutedAddrs lookup and _isMutedPost check into a shared
lib helper (loadMutedAddrs / isMutedPost) used by the post, topic, search, and
notifications adapters. Extract follow/like notification predicates in
NotificationsQuery to bring CRAP down to 6. Add a mute-filtering conservation,
exclusion, and pagination property test for topic queries.
By refactorer.
Follow/mute/unfollow/unmute now broadcast the target's raw 20-byte hash160
as the OP_RETURN payload via a browser-safe Uint8Array (no Node Buffer
global), shared through the new MemoStateAction base.
By specifier.
Extract the near-identical follow/unfollow and mute/unmute action classes
onto a config-driven MemoStateAction base, removing 150 duplicated lines.
Preserves public API and static exports. Coder's hexToBytes broadcast stays
intact. Refreshed mutation manifests via the tool.
By refactorer.
Replaces the Node-only Buffer global in memo-follow and memo-mute with
the existing hexToBytes helper, which returns a Uint8Array. Updates unit
and property tests to assert bytes without requiring Buffer in the
production source, and adds an acceptance handler for the new binary
payload wording so the Binary Payload Broadcast regression spec passes.
By coder.
Client follow/mute (and their inverse unmute/unfollow) must broadcast the
target's raw 20-byte hash160 as the OP_RETURN payload and must not depend on
the Node-only Buffer global. Adds the Binary Payload Broadcast regression
spec covering the binary payload for all four actions.
By specifier.
Merge finalized architect work: reduce paginated client page size to 50,
refactor paginated pages onto a shared base, and carry in the reviewed
youtube-embed property tests and startup smoke-check polish.
By specifier.
Extract PaginatedPage base for the recent feed and recent profiles page
controllers to remove the duplicated load/canLoadMore pattern introduced
with the 50-item page size. Refresh mutation manifests via the tool. Add
property tests for the base pagination invariants (canLoadMore mirrors
hasMore, load forwards limit/offset, item lookup).
By refactorer.
Add unit tests for invalid video id and non-/watch youtube.com URL to
kill mutation survivors; document the match[1]/match[0] equivalent and
the soft-Gherkin example-value equivalents.
By architect.
Extract validVideoId, parseCandidate, videoIdFromWatchUrl,
videoIdFromShortUrl, and pushText helpers to lower cyclomatic
complexity of extractYouTubeVideoId and parsePostText to <= 6.
By refactorer.
- Add tests for profile/level handleError to raise coverage
- Extract DbBackup pure helpers into testable db-backup-util module
- Add tests for DbBackup zip/unzip and the pure helpers
- Extract shared handleControllerError helper across 7 REST controllers
By refactorer.
Reviewed the refactorer's profile-wallet-connect work. getViewerAddress is a
clean pure selector (reactive-then-wallet precedence, null-on-absent); the
profile index.js wiring fix is sound and correctly re-loads when the address
becomes available. Fixed swarmforge/scripts/gherkin-parser, which delegated to
a non-existent .swarmforge/tools/aps path, to use the established tmp/aps-spec
checkout. Added the mutation differential-manifest for the new module.
Verification: 243 client unit + 33 property tests pass, lint clean,
mutation 2 killed / 0 survived, DRY no candidates, soft Gherkin mutation
6 intrinsic equivalents.
By architect.
Pin the profile wallet-address selector invariants over broad input
space: reactive-state precedence, wallet fallback, and null-on-absent.
CRAP (3.0), DRY, and mutation scan assessed; no split needed and no
manifests discarded.
By refactorer.
Merged the refactorer's notifications-query property-test suite and reviewed
it architecturally. Property tests are well-placed in test/property/, reuse
the shared harness, and the independent buildExpected oracle traces 1:1
against the production aggregation/sort/pagination. No production source
changed. Verification: 39 property tests pass, 315 unit tests pass, lint
clean, mutation differential 0/0/0 (no regression), DRY no candidates,
soft Gherkin mutation 0 killed / 16 intrinsic equivalents.
By architect.
Use the reactive bchWalletState.cashAddress as the viewer address source
and include it in the profile load effect dependencies. Extract a small
wallet-address selector so the behavior is unit-testable.
By coder.
Pin the NotificationsQuery aggregation invariants over broad random
inputs: newest-first ordering with seen tie-break, global ordering, and
pagination conservation. Coverage, CRAP (max 6.0), DRY, and mutation
scan were assessed; all changed/new source files are well under the
100-site split threshold and mutation manifests are preserved.
By refactorer.
Record the tmp/acceptance and target/mutation-workers bloat that made
mutate4javascript worker copies many GB and mutation runs appear to hang.
Add a startup check that flags any of these dirs over 100MB so they are
cleaned before a mutation run.
By architect.
Extract the post-lookup-with-null helper into a shared module used by both
the notifications and post query adapters, removing duplication. Add a
dedicated NotificationsQuery unit suite (26 tests) and hardening tests that
kill the sort-comparator and followee-guard mutations. Refresh mutation
manifests via the approved tool. Document 5 intrinsic mutation equivalents
and 16 soft-Gherkin equivalents in the review summary.
By architect.
Extract the reply-notification predicate from
_collectReplyNotifications into a _replyNotificationChild helper, moving
the txid-presence guard into the loop so both functions drop to CRAP 5.
Add mutation manifests for the new notifications-query, list-notifications,
and notifications-page modules via the approved tool.
By refactorer.
Add psf-memo-db notifications query, use case, route, and tests.
Add psf-memo-client NotificationsPage service, React page, nav link,
route, and tests. Wire acceptance handlers for notifications.
By coder.
Extract the reply/viewer/membership predicate from
scanFollowingFeedTxidsAndCount into an isFolloweePost helper, reducing
the scan's cyclomatic complexity from 7 to 5 (CRAP 7.0 to 5.0) while
preserving behavior. Refresh the mutation manifest via the approved tool.
By refactorer.
Add Gherkin spec for the Notifications read-side feature: the psf-memo-db
API aggregates replies to the viewer's posts, likes on the viewer's posts,
and follows of the viewer into a single newest-first, paginated list; the
client renders a Notifications page. Only actions by other people on the
viewer's own content are shown.
By specifier.
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.