Commit Graph
266 Commits
Author SHA1 Message Date
Chris Troutner 3de67ea491 Record like-result-modal completion in backlog and briefing
By specifier.
2026-09-16 12:35:06 -07:00
Chris Troutner f92f596bdd Merge like-result-modal from swarmforge-architect
By specifier.
2026-09-16 12:33:44 -07:00
Chris Troutner bf7edd50fc Record like-result-modal review and verification
By architect.
2026-09-16 12:32:40 -07:00
Chris Troutner e071881ea0 Harden like result modal: kill mutation survivors and DRY test setup
Add unit coverage for the LikeTipPage initial state, deps seeding, the
dust-limit boundary, and empty/null tip parsing, and assert exact
validation/broadcast error messages. Add the NewPostPage initial
result-modal state assertion. Refresh the mutate4javascript footer
manifests for the touched services and the soft Gherkin
acceptance-mutation manifest for the like-result feature.

By architect.
2026-09-16 12:29:53 -07:00
Chris Troutner e978516a0f Refactor like result modal and share the block explorer link
Deduplicate the new like-result acceptance steps behind one render helper,
and extract the bch.loping.net transaction link shared by the New Post result
modal, the post options menu, and the like/tip result into a block-explorer
service. Cover the LikeTipPage open/parse/handler failure branches and add
property tests for the explorer URL, the LikeResult markup, and the result
modal state machine.

CRAP is at or below 5 with full coverage on the changed services; every
changed/new plain source file scans at 21 or fewer mutation sites. The
existing mutation manifests are left for the mutation tool to refresh.

By refactorer.
2026-09-16 12:03:41 -07:00
Chris Troutner a0040f98c1 Implement like broadcast result modal
Keep the like/tip modal open after a successful like and show a broadcast
result instead of closing: the success message, the like transaction id, and
a link to that transaction on bch.loping.net that opens in a new tab. The
like count and filled heart update immediately, and dismissing the result
closes the modal. The result state lives on the testable LikeTipPage
controller; a server-renderable LikeResult component backs the modal and the
acceptance adapter, with acceptance step handlers for the new wording.

By coder.
2026-09-16 11:41:49 -07:00
Chris Troutner 3af0d42c67 Add like broadcast result specification
By specifier.
2026-09-16 11:15:35 -07:00
Chris Troutner efe7a6c1c9 Record post-options-menu completion in backlog and briefing
By specifier.
2026-09-16 10:05:35 -07:00
Chris Troutner fdb6efc950 Merge post-options-menu from swarmforge-architect
By specifier.
2026-09-16 10:05:06 -07:00
Chris Troutner 3486da3bf5 Record post-options-menu review and verification
Add the architect review summary and the machine-readable client verification
record (git_sha 07ff61392b) for task post-options-menu.

By architect.
2026-09-16 10:04:36 -07:00
Chris Troutner 07ff61392b Harden post-options menu: testable outside-click, kill mutation survivors
Move the outside-click decision into the pure post-options service so the
effect stays a thin adapter and the previously uncovered `&&` mutation is
unit testable. Add unit tests for the outside-click predicate and for the
default no-focus open menu, killing the two surviving `-1` default-focus
mutations.

Stamp the mutate4javascript manifests for both modules and the soft
acceptance-mutation manifest for post-options-menu.

By architect.
2026-09-16 10:02:29 -07:00
Chris Troutner d0882bbd82 Refactor post options menu and add property tests
Move the keyboard shortcut mapping into the pure post-options service so the
React component is a thin adapter and the Escape/ArrowDown decisions are unit
and property testable. DRY the duplicated post-options acceptance steps behind
two helpers, and add property tests for the explorer URL, menu-item shape,
state transitions, key command, and rendered markup.

The createElement post-options component and service stay scannable by
mutate4javascript; the JSX call sites (post-feed-item, profile) are unchanged
except for rendering the shared menu.

By refactorer.
2026-09-16 09:48:36 -07:00
Chris Troutner 20e67da216 Implement post options menu on every post card
Add a shared PostOptionsMenu component, used by the feed/thread post card and
the profile post card, with a pure post-options service for the block explorer
link and the open/close/focus state. Its first item links to the post
transaction on bch.loping.net in a new tab; the menu opens on the button and
closes on the button again, an outside click, or Escape, with ArrowDown moving
focus to the first item.

By coder.
2026-09-16 09:42:15 -07:00
Chris Troutner 5644ca75f7 Update specifier briefing for post-options-menu handoff
By specifier.
2026-09-16 09:36:51 -07:00
Chris Troutner bc964fa88c Specify post options menu for all post cards
By specifier.
2026-09-16 09:36:28 -07:00
Chris Troutner 091272df18 Record feed-total-cap completion in backlog and briefing
By specifier.
2026-09-16 09:12:11 -07:00
Chris Troutner 5e62d1ea14 Record feed-total-cap review and verification
Written review report and machine-readable verification record for the
raised recent-feed total scan cap. Verification passed 4/4 (unit 358,
property 48, acceptance all 12 suites, lint). Mutation killed 37/37 in
post-query.js; CRAP max 6.0; DRY clean for the changed files.

By architect.
2026-09-16 09:09:56 -07:00
Chris Troutner b2c78fb651 Review feed-total-cap: stamp mutation and acceptance manifests
Architectural review of the raised recent-feed total scan cap (10 -> 500)
and the refactorer's property tests. No structural change was warranted:
the cap stays a private constant in PostQuery, the new property tests use
in-memory store doubles with no IO, and dry4javascript found no duplicate
candidate in the changed source or the new property test. Mutation killed
all 37 sites in post-query.js.

This commit carries only the tool-written manifests: the mutate4javascript
manifest in post-query.js and the gherkin-mutator acceptance stamps in the
two touched feature files.

By architect.
2026-09-16 08:59:48 -07:00
Chris Troutner 10deb3e9e4 Add recent-feed cap property tests
Cover the total-scan cap and bounded raw scan of
PostQuery.scanRecentPostTxidsAndCount over seeded random corpora: capped
total, newest-first pagination conservation, the raw-scan bound, the 500
default cap, and reply exclusion.

By refactorer.
2026-09-16 08:51:15 -07:00
Chris Troutner c131b91ceb Raise recent-feed total scan cap to 500
GET /posts/recent now caps its total scan at 500 eligible top-level posts
instead of 10, so corpora smaller than the cap report an exact total while
larger corpora stay bounded. Added unit coverage for the exact-total-under-cap
and default-cap cases, plus the many-top-level-posts acceptance fixture.

By coder.
2026-09-16 08:39:16 -07:00
Chris Troutner 28b34b5a7a Specify feed total cap raised to 500
By specifier.
2026-09-16 08:34:05 -07:00
Chris Troutner a64382050c Record post-image-rendering completion in backlog
Add the shipped post image rendering feature to the Recently completed
section.

By specifier.
2026-09-16 08:06:09 -07:00
Chris Troutner c2bfbc3cfb Record post-image-rendering review and verification
Commit the review summary and the client verification record (git_sha
19e57be, the review commit) alongside the review. All five client commands
pass.

By architect.
2026-09-16 07:40:15 -07:00
Chris Troutner 19e57be1ec Review post-image-rendering: cover isImageUrl guard, stamp manifests
Merged the refactorer handoff (e77e174). The architecture holds: the image
helpers isImageUrl/imageAltText are pure post-links functions, failed-images
is a pure state transition, and PostImage/PostContent stay presentational
with no IO. Added a unit test for isImageUrl non-string input to kill the
last surviving language mutant; mutation and acceptance manifests are
tool-written.

By architect.
2026-09-16 07:34:13 -07:00
Chris Troutner e77e174c92 Refactor post image rendering and cover image helpers
Extract the pure failed-image set transition into a testable service,
DRY the acceptance no-link/no-image assertions, and add property tests
for image URL detection, alt text, and image rendering.

By refactorer.
2026-09-16 07:20:40 -07:00
Chris Troutner 3971e0736f Render image URLs inline in posts
Recognize common image file extensions in post URLs (query string and
fragment ignored), render them as inline images inside new-tab anchors
with the filename as alt text, and fall back to a plain link when the
image fails to load. Non-image URLs keep the existing plain-link
behavior.

By coder.
2026-09-16 07:07:40 -07:00
Chris Troutner 53d74398be Spec post image rendering
Add Gherkin for inline image rendering in posts: extension-based image URL
detection (.jpg/.jpeg/.png/.gif/.webp/.bmp, query and fragment ignored),
anchor-wrapped inline <img> with filename alt text, non-image URLs stay
plain links, and an image load failure falls back to a plain link.

By specifier.
2026-09-16 06:57:52 -07:00
Chris Troutner ac306daca9 Removing strict typo 2026-09-16 06:49:01 -07:00
Chris Troutner ea5c69eb7e title and footer 2026-09-16 06:44:17 -07:00
Chris Troutner add20f3b52 Record post-link-formatting completion
Mark the feature done in the backlog, add gotchas about stale architect
verification records and surviving link-example prose mutations, and
refresh the standing briefing HEAD/next-action lines.

By specifier.
2026-09-15 19:37:50 -07:00
Chris Troutner 16af94ef53 Refresh post-link-formatting verification record
The architect's record named e17c515, which predated the review commit
b63792f. Re-ran client verification on the merged b63792f; all 5 commands
pass.

By specifier.
2026-09-15 19:37:18 -07:00
Chris Troutner b63792fb7b Review post-link-formatting: kill link-parser boundary mutants
Harden the post link parser after the refactorer handoff:
- add start-of-text and leading-token boundary unit tests and drop a
  redundant range guard, killing the isBareDomainBoundary survivors
- replace the mutable React key counter with React.Children.toArray and
  assert the embedded iframe is fullscreen, killing both PostContent
  mutation survivors
- record the client verification pass and the review summary

By architect.
2026-09-15 19:33:46 -07:00
Chris Troutner e17c515065 Add property tests for post link parsing
Cover parsePostLinks invariants over broad seeded random inputs: round
trip reconstruction, link/text segment shape, trailing-punctuation
handling, input ordering, email exclusion, and determinism.

By refactorer.
2026-09-15 19:20:48 -07:00
Chris Troutner 6c7952f469 Format post URLs and bare domains as links
Render http(s) URLs and bare domains in post text as anchors that open in a
new tab. Explicit URLs keep their scheme; bare domains get an https href while
their visible text stays as written. Embeddable YouTube links keep their
embedded-player behavior.

By coder.
2026-09-15 19:08:49 -07:00
Chris Troutner 968970b364 Spec post link formatting
Add Gherkin acceptance spec for auto-linking http(s) URLs and bare domains
in post text, opening in a new tab, while preserving YouTube embeds.

By specifier.
2026-09-15 19:04:17 -07:00
Chris Troutner 971b04257a Record the 2026-09-16 process-improvement pass
The process changes were only in Git history and a briefing paragraph. Add a
consolidated what/why record with commit hashes and verification evidence, and
point to it from the feature backlog so the next specifier discovers it.

By specifier.
2026-09-15 18:44:27 -07:00
Chris Troutner 8153f6f7fa Note final process-pass HEAD in specifier briefing
By specifier.
2026-09-15 18:28:51 -07:00
Chris Troutner 0942b2ef40 Block handoffs from a dirty working tree
Unrelated tracked changes could ride along with a handoff. Refuse to send when
git status --porcelain is non-empty, list the offending files, and keep the
draft so it can be fixed and resent. SWARMFORGE_ALLOW_DIRTY=1 overrides.

By specifier.
2026-09-15 18:28:45 -07:00
Chris Troutner a5f8967a71 Add state helper and refresh specifier briefing
Add state.sh to print each role branch HEAD and the main-checkout status.
Update the briefing to use the single tmp/aps checkout, note daemon
self-healing, and point merge verification at verify.sh and the architect's
verification record.

By specifier.
2026-09-15 18:28:19 -07:00
Chris Troutner 752bf2cff6 Guard mutation runs against differential under-selection
The default differential run can select fewer covered sites than exist after a
function is added or removed, forcing a manual --mutate-all rerun. Add
mutate-file.sh (auto-reruns when Selected < Covered) and clean-builds.sh
(removes worker-copy bloat), and document them plus the intrinsic upper-bound
Gherkin survivors in the architect cheat-sheet.

By specifier.
2026-09-15 18:27:58 -07:00
Chris Troutner 0db351aaa7 Add canonical verify runner and verification record
Verification commands were transcribed in several places and the same full
suite was re-run by every role. Add verify.sh/verify.mjs as the single
per-component verification sequence emitting a machine-readable record
(git_sha, per-command exit/duration/summary). The architect records it for
each touched component; the specifier trusts a matching-SHA pass and only
re-runs the merged feature's acceptance test.

By specifier.
2026-09-15 18:24:24 -07:00
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 053e8e3d33 Self-heal the handoff daemon
Handoffs sit undelivered when handoffd is not running, and recovery was a
manual step. Add ensure_handoff_daemon.sh and call it from swarm_handoff.sh
and ready_for_next.sh so the daemon is restarted whenever it is missing.

By specifier.
2026-09-15 17:40:33 -07:00
Chris Troutner eb308d2f49 Clean up acceptance LevelDB temp dirs
Each psf-memo-db acceptance scenario opened an isolated LevelDB directory
but close() only closed the handles, so tmp/acceptance grew without bound
(found at 961 dirs / 293 MB). Delete the scenario dir in close() and sweep
tmp/acceptance at the start of the acceptance run.

By specifier.
2026-09-15 17:40:10 -07:00
Chris Troutner 0bc73ec072 Always notify the specifier at the end of the pipeline
The architect's terminal handoff went only to coder and refactorer, so the
specifier never received a merge notification and a human had to bridge the
gap. Require an end-of-chain git_handoff to the specifier for every completed
task or batch, including manifest- and metadata-only churn.

By specifier.
2026-09-15 17:37:48 -07:00
Chris Troutner f44de33362 Using Deepseek v4.1 flash for all bots 2026-09-15 17:22:19 -07:00
Chris Troutner 0e1549406f Mark thread-query-bounds complete and refresh specifier notes
Merge hardening verified on master: psf-memo-db unit (357), property (44),
acceptance (11 suites, including thread-query-performance), and lint all
pass. Record the completion and add a gotcha about upper-bound performance
assertions surviving Gherkin mutation.

By specifier.
2026-09-15 16:57:14 -07:00
Chris Troutner c8ceb825f7 Note mutate4javascript differential under-selection and gherkin report capture
By architect.
2026-09-15 13:13:12 -07:00
Chris Troutner 1ff2c020ac Review thread-query-bounds: hide postChildren representation, drop dead like scan
Encapsulate the postChildren prefix scan in PostQuery.listChildTxids and have
GetPostThread depend only on the PostQuery interface (listChildTxids,
getPostOrNull). countRepliesForTxids now reuses listChildTxids. Remove the dead
whole-database buildLikeCountMap that this task made obsolete. Cover the
prefix-scan guards and cycle back-edge, realign the thread property tests to the
adapter seam, and refresh mutation/Gherkin-acceptance manifests.

By architect.
2026-09-15 13:10:46 -07:00