mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo-client.git
synced 2026-09-21 16:52:02 -07:00
Add the persistent runner adapter for gherkin-mutator and commit the differential/acceptance mutation manifests written by the approved tools during the architect verification pass for the post-memo feature. By architect.
3.7 KiB
3.7 KiB
Architectural Review Summary — post-memo
Task and commits reviewed
- Task:
post-memo - Reviewed the merged branch ending at
8e2693ad08(refactorer), which carried:d071b21/c9556be— specifier Post-a-Memo Gherkin spec + feature backlog514298b— coder implementation with acceptance pipeline64a7f78— refactorer merge of coder work8e2693a— refactorer memo-post complexity reduction
- 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 core behind small adapters (good).
src/services/memo-post.jsis a testable module free of UI/IO concerns. It injectswalletandfeedadapters (minimal-slp-wallet surface + feed reflection), so OP_RETURN/broadcast and UI concerns stay outside the core. Environmentally unsuitable I/O is confined to adapter boundaries. Dependency direction is inward. - Acceptance pipeline separation (good).
acceptance/lib/{generate,runtime,handlers}are the project-specific components the APS spec prescribes. The feature is parsed by the APS-supplied Babashkagherkin-parser(procured fresh from github.com/unclebob/Acceptance-Pipeline-Specification on first use), not reimplemented.handlers.jsdrives real core behavior through fake wallet/feed adapters so the run is deterministic and offline. - Information hiding (good). memo-post hides the Memo
0x6d02prefix and broadcast mechanics; handlers only assert observable outcomes (broadcast prefix, feed reflection, empty/length rejection). - Fix applied — runner adapter added. Built the project-specific persistent
runner adapter required by
gherkin-mutatoratacceptance/lib/runner-worker.js(newline-delimited JSON protocol; evaluates each mutated feature IR through the same runtime/handlers and reportstest_failure|test_success|infrastructure_error). - Manifests updated by tools (permitted). The language mutation tool embedded
its differential footer manifest in
src/services/memo-post.js; the APS mutator wrote the acceptance-mutation scenario manifest intospecs/post-memo.feature. Both are normal tool output and were left for the tooling, not hand-edited.
Verification results
- Unit (
node --test): 7/7 pass (memo-post.test.js). - Acceptance (normal): all 6 scenario executions pass.
- Mutation (
mutate4javascriptdifferential,--max-workers 8):memo-post.js— killed 7, survived 0, uncovered 0. Full kill. - DRY (
dry4javascript src): no duplicate candidates. - Gherkin acceptance mutation (soft): 6 discovered; 1 killed, 5 survived,
0 errors.
- Killed: the empty-memo boundary — dithering the
" "example makes the validation branch fail the scenario, confirming the empty-rejection guardrail is connected to the example data. - Survived (documented equivalents): message-content dithers in the valid-memo scenario and the over-long scenarios. The tests treat the message as opaque data and assert the same (mutated) text is composed and reflected, so changing one character leaves the exercised branch identical. These are acceptable equivalent survivors, not missing guardrails.
- Killed: the empty-memo boundary — dithering the
- Property tests: none present in this project.
Suite status
- Unit + acceptance suites pass; mutation fully kills source-level mutants for the testable core. Gherkin acceptance mutation has 5 documented-equivalent survivors.
Handoffs sent
git_handoff→ coder, refactorer (priority00, taskpost-memo), to review the architectural commit (runner adapter + tool manifests).
By architect.