plans: shared-plumbing extraction note — defer to post-merge integration
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
mod-sx (Prolog) and acl-sx (Datalog) converged on the same module shape but run on different engines. Only the audit log + fed trust/outbox shapes truly share; extract at the architecture-merge point refactoring both consumers atomically, not unilaterally from a loop branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -238,6 +238,29 @@ lib/mod/fed.sx
|
||||
`mod/dedup-reports` collapses identical reports (reporter|subject|reason key,
|
||||
case-insensitive); `mod/distinct-reporters-of` counts unique reporters.
|
||||
|
||||
## Shared-plumbing extraction — post-merge integration note
|
||||
|
||||
mod-sx (Prolog) and acl-sx (Datalog, `lib/acl/`, 120/120) independently converged
|
||||
on the same module shape: `schema / engine / audit / explain / federation / api`.
|
||||
That parallel is the signal both plans flagged. **Recommendation: do NOT extract
|
||||
from a loop branch — extract at the architecture-merge integration point, after
|
||||
both `lib/mod` and `lib/acl` have landed, refactoring both consumers in one change.**
|
||||
|
||||
- **Different engines.** acl = Datalog bottom-up (native derivation trees); mod =
|
||||
Prolog backtracking (proof via per-goal `pl-query-all`). The engine and most of
|
||||
`explain` are NOT shared — same intent, different mechanism. Don't try to unify them.
|
||||
- **Genuinely convergent shapes (the only real candidates):**
|
||||
- **Append-only audit log** — `{seq, payload, retrieve-by-id}`; both have it (~40
|
||||
lines). Lift to e.g. `lib/guest/audit-log.sx` parameterized by the entry payload.
|
||||
- **Federation trust/outbox** — advisory-unless-`(trust peer :scope)` + a send
|
||||
seam; both have it. Lift the trust registry + outbox; keep `:scope` a parameter
|
||||
(`:mod` vs `:acl`).
|
||||
- **Trivia not worth a module:** `join-with`, `any?`, `str-contains?`, `distinct`.
|
||||
- **Why not now:** the branches merge independently; lifting from one leaves the
|
||||
other's copy un-refactored → duplication, not sharing. Real extraction must touch
|
||||
both consumers atomically, which only the post-merge integrator can do. Designing
|
||||
the abstraction also needs both payload shapes in view (only mod's is visible here).
|
||||
|
||||
## Progress log
|
||||
|
||||
- **Ext 19 — end-to-end triage pipeline, 390/390** (+15). Capstone: one
|
||||
|
||||
Reference in New Issue
Block a user