Skip to content

No observability for CRDT conflict resolution rates #274

Description

@flyingrobots

1. Background Context

Source: git-warp #274. Audited against main 94b40dac64034cd8caab9bb05efe14a0c22bd735. Template: feature; work type: type:debt.

Current scope and disposition: Lightweight CRDT resolution counters can instrument current fast reduction; complete root-commitment streaming work is not a prerequisite.

Reported context (historical names and counts require the current disposition above):
Default materialization (applyFast in JoinReducer) produces no
telemetry. Operators cannot:

  • Count superseded writes (LWW losses) per materialization
  • Detect write amplification from lagging writers
  • Alert on divergence rates between writers

The TickReceipt system tracks outcomes but only when
collectReceipts: true is passed. The effect pipeline exists
but materialization doesn't emit CRDT metrics through it.

2. Problem Description

Lightweight CRDT resolution counters can instrument current fast reduction; complete root-commitment streaming work is not a prerequisite.

Historical source report; the current disposition above supersedes obsolete claims:
Add lightweight counter mode to applyFast that tracks
applied/superseded/redundant counts without full receipts. Emit
as materialization summary through the effect pipeline.

2b. Proposed Solution

Lightweight CRDT resolution counters can instrument current fast reduction; complete root-commitment streaming work is not a prerequisite.

Historical approach to reconcile:
Current architecture rules take precedence: parsing/encoding stays at adapters, domain concepts are runtime-backed, no trust casts are introduced, and tests run in Docker.
Add lightweight counter mode to applyFast that tracks
applied/superseded/redundant counts without full receipts. Emit
as materialization summary through the effect pipeline.

2c. Alternatives considered and rejected

No additional alternatives are recorded as decided. Reject duplicate ownership, private-import escape hatches and a broken intermediate mainline; retain original alternatives below when present.

2d. Acceptance Criteria

  • Fast reduction reports applied/superseded/redundant counts without collecting complete receipts; counters match equivalent receipt-enabled reductions and add bounded overhead.
  • The issue-specific positive and negative witnesses in Test Plan pass; relevant compatibility and failure behavior are recorded.

2e. Test Plan

Golden: Compare the declared CRDT result with an independent expected-state witness.

Edges: Empty operations, concurrent additions/removes, replay permutations and checkpoint round trips.

Known failure modes: Malformed inputs or stale evidence cannot silently change membership/causality.

Fuzz and stress: Deterministic writer schedules and join permutations; include a calibrated broken control.

All tests and benchmarks execute in COPY-based Docker containers without host repository or Git-directory mounts. This planning audit does not claim those checks were run.

For a refactor, touched executable code reaches 100% coverage and the manual SSTS checklist is green.

3. Prerequisites

No unsatisfied open-issue prerequisite established by this review. This is not proof that an unresolved design or external readiness condition is satisfied.

4. Scope

In: Lightweight CRDT resolution counters can instrument current fast reduction; complete root-commitment streaming work is not a prerequisite.

Out: unrelated domain work and any expansion beyond the issue’s stated observable outcome.

Safe intermediate state: the PR builds and passes relevant checks after its listed prerequisites; existing supported behavior remains usable. Any preparatory step must be independently mergeable.

5. Why now

Maintainer ordering: memory correctness first, supported attachments next, then land eligible PRs. Preserve this card’s existing priority unless a separately recorded scope decision changes it.

6. Risks

Main risk: implementing the historical description instead of the current runtime contract. Preserve compatibility, causal/ownership invariants and bounded behavior relevant to crdt.

7. Definition of Done

The issue-specific acceptance checks pass, relevant validation evidence is attached, and the issue links the coherent PR and resulting mainline integration commit. No open item is hidden in a later repair PR.

8. Stakeholders

James Ross: maintainer, assignee and acceptance owner. git-warp contributors and consumers rely on this domain’s supported contract and reproducible evidence.

9. Related Issues

No additional downstream blocker is established. Shared domain membership alone is not a prerequisite.

Historical paths, counts, release names and shell examples in source material are evidence to reconcile, not authority to restore retired documentation or run host tests.

Activity

  1. added
    type:debtDebt, rot, or structural risk.
    area:runtimePrimary work area: runtime.
    priority:laterDeferred or speculative work.
    status:availableOpen and available for prioritization; not blocked or actively in progress.
    and removed
    lane:bad-codeMethod source lane bad-code.
    on Jun 10, 2026
  2. added this to the v20.0.0 milestone on Jun 21, 2026
  3. self-assigned this
    on Oct 1, 2026
  4. modified the milestones: v20.0.0, v20.1.0 on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:runtimePrimary work area: runtime.domain:crdtpriority:laterDeferred or speculative work.status:availableOpen and available for prioritization; not blocked or actively in progress.template:featureCard template: featuretype:debtDebt, rot, or structural risk.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions