mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo-client.git
synced 2026-09-21 16:52:02 -07:00
Cover the new-post posting flag (initial idle, in-flight true, settled false) to kill the four surviving mutants, and commit the differential and acceptance mutation manifests written by the approved tools during the architect verification pass for the new-post-page feature. By architect.
3.6 KiB
3.6 KiB
Architectural Review Summary — new-post-page
Task and commits reviewed
- Task:
new-post-page - Reviewed the merged branch ending at
d57975c466(refactorer), which carried:9385034/4fa92d1— specifier New Post Page Gherkin spec (specs/memo-new.feature)05f393c— coder implementation (src/services/new-post.js, page wiring)d57975c— refactorer property tests for memo post / new post invariants
- Merged into
swarmforge-architect(fast-forward) and processed as a batch.
Architectural findings and fixes applied
Reviewed UI/Core separation, dependency rule, information hiding/encapsulation, and local code quality.
- Testable controller behind adapters (good).
src/services/new-post.jsis a testable controller wrappingmemo-post.js; it holds draft input, the remaining- character counter, typed validation/length errors, and feed navigation.memoPostandnavigateare injected so the module stays free of UI/IO concerns. Dependency direction is inward. - Unified acceptance handlers (good).
acceptance/lib/handlers.jsnow drives bothpost-memo.featureandmemo-new.featurethrough oneworld.newPage, reusing the shared Memo post behavior. Wording differences are normalized via shared regex alternations; no step logic is duplicated. - Property tests (good).
test/property/{harness,memo-post.property.test}.jsassert seeded invariants (validation classification across the length boundary, counter conservationremaining === MAX - len,setInputround-trip, menu-link idempotence). Kept separate from unit tests as the architecture requires. - Fix applied — posting-state coverage. The language mutation tool surfaced 4
survivors in
new-post.js, all around thepostingstate flag (initial value and its true/false transitions insubmit). Added unit coverage asserting the page starts idle, isposting=truewhile a submit is in flight (via a deferred wallet), and returns toposting=falseon success and on error. This killed all 4 survivors.
Verification results
- Unit (
node --test): 18/18 pass (added 2 posting-state tests). - Property (
npm run test:property): 6/6 pass. - Acceptance (normal): both
memo-newandpost-memogenerated suites pass. - Mutation (
mutate4javascript,--max-workers 8):memo-post.js: differential reuse (module unchanged since its 7/7 kill).new-post.js: after coverage fix, killed 11 / survived 0 / uncovered 0 (was 4 survivors before the fix).
- DRY (
dry4javascript src): no duplicate candidates. - Gherkin acceptance mutation (soft):
memo-new.feature: 11 executed — 5 killed, 6 survived, 0 errors.- Killed: empty-memo boundary; character-counter
countexample values (217/212/0) — proving those values are connected to behavior. - Survived (documented equivalents): message-content dithers (4) plus case/length- neutral dithers in the counter scenario — message text is opaque data; only length affects the counter, so these don't change observable behavior.
- Killed: empty-memo boundary; character-counter
post-memo.feature: empty-memo scenario reused as killed; remaining 5 executed are the same documented message-content equivalents.
- Property tests: run separately via
npm run test:property.
Suite status
- Unit + property + acceptance all pass; source-level mutation fully kills both testable core modules. Gherkin acceptance mutation survivors are documented equivalents.
Handoffs sent
git_handoff→ coder, refactorer (priority00, tasknew-post-page), to review the architect commit (posting-state coverage + tool manifests).
By architect.