example-app: prove the disjoint-field merge (close AC-SYNC-02 debt) - #1
example-app: prove the disjoint-field merge (close AC-SYNC-02 debt)#1rdryfoos wants to merge 3 commits into
Conversation
Closes the tracked-debt on AC-SYNC-02 (disjoint-field merge) with a real proof (test_AC_SYNC_02_*), checks off task T005, and drops the 'deferred' note. Also adds src/metrics.py — incidental event counters that carry no @Covers, so the Thread Report will surface it as 'far from the thread'.
🧵 Thread Report🟢 Golden Thread intact What moved
Thread StatusSYNC
+2 untouched backlog rows not shown. Off Thread1 changed file sits off the thread — changed, but nothing in it carries a mark tying it to an intent this PR moved. Not a defect (a refactor and unwanted scope look identical here); just worth a glance: Thread Report illuminates; it does not refuse. "Off thread" is a visibility call, not a gate. Set |
📝 WalkthroughWalkthroughThe example app adds an in-process event counter and proves disjoint-field synchronization. Synchronization documentation and task tracking now mark AC-SYNC-02 as completed. ChangesEvent metrics
Synchronization proof
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
examples/example-app/tests/test_sync.py (1)
52-64: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winMake the device connectivity precondition explicit.
SyncHub.reconcilereturns without syncing whendevice.onlineis false. This test never setsa.onlineorb.online, so it depends on theDeviceconstructor default. Set both devices online before reconciliation, or verify that the constructor guaranteesonline=True.Proposed test setup
a = Device("a") b = Device("b") + a.online = True + b.online = True🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@examples/example-app/tests/test_sync.py` around lines 52 - 64, Make the connectivity precondition explicit in test_AC_SYNC_02_disjoint_field_edits_merge_without_conflict by setting both devices, a and b, online before calling SyncHub.reconcile. Keep the existing reconciliation sequence unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@examples/example-app/tests/test_sync.py`:
- Around line 52-64: Make the connectivity precondition explicit in
test_AC_SYNC_02_disjoint_field_edits_merge_without_conflict by setting both
devices, a and b, online before calling SyncHub.reconcile. Keep the existing
reconciliation sequence unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e536c754-6105-4986-bdd2-2c1003104868
📒 Files selected for processing (4)
examples/example-app/specs/sync/tasks.mdexamples/example-app/src/metrics.pyexamples/example-app/src/sync.pyexamples/example-app/tests/test_sync.py
…ks, broken path, real offthread_ack) Rewrites docs/thread-report.md for the shipped v2: the single-line gate header, clickable diff-hunk/registry links (with the sha256 anchor + blob fallback note), hidden untouched-backlog rows, the broken path (post the report, then block via a separate verdict step), and offthread_ack as a real config key. Cross-links both live demos — green PR #1 and broken PR #2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TM5e4tKiqCUNANBCkTtH2r
Closes the tracked debt on AC-SYNC-02 (disjoint-field merge) with a real proof —
test_AC_SYNC_02_disjoint_field_edits_merge_without_conflict— so two devices editing different fields of the same item both survive the merge. Alongside it:src/sync.pysrc/metrics.py— small in-process event counters for local debuggingThe SpecAssay Thread Report workflow posts a briefing on this PR: what moved on the Golden Thread, the SYNC thread as it stands now, and any changed files that sit far from the thread.
Generated by Claude Code
Summary by CodeRabbit