Skip to content

example-app: field-measured reconnect beats the budget — tighten AC-SYNC-01 to 2s, proof included - #5

Open
rdryfoos wants to merge 2 commits into
mainfrom
demo/discovery-sync-budget
Open

example-app: field-measured reconnect beats the budget — tighten AC-SYNC-01 to 2s, proof included#5
rdryfoos wants to merge 2 commits into
mainfrom
demo/discovery-sync-budget

Conversation

@rdryfoos

@rdryfoos rdryfoos commented Aug 11, 2026

Copy link
Copy Markdown
Owner

What changed

We instrumented reconcile on real devices, and the field pushed back on the spec — in the good direction: propagation lands well under two seconds in every run. The 5s budget in AC-SYNC-01 was looser than the truth. So this PR tightens the promise and moves the proof with it, in one diff:

- AC-SYNC-01 — A change made offline appears on a second device within 5s of reconnect.
+ AC-SYNC-01 — A change made offline appears on a second device within 2s of reconnect.
-    assert elapsed < 5.0  # AC-SYNC-01: within 5s of reconnect
+    assert elapsed < 2.0  # AC-SYNC-01: within 2s of reconnect

Why it's here

This is the discovery shape of an intent PR — the PR from the Field. Ground truth reshaped the wording, and the carriers arrive in the same PR: the restatement and its re-confirmation are one reviewable story. The durable ID is what makes this safe — AC-SYNC-01 never moves, so the thread holds while its wording and proof travel together.

Compare PR #4 — the PR from Intent: the same one-line restatement, shipped alone. There, the Thread Report pinpoints the proof still asserting the old 5s. Here, nothing stale exists to pinpoint — the pairing is the evidence. Same detector, two states; watch the 🧵 Thread Report comment below.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TM5e4tKiqCUNANBCkTtH2r


Generated by Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated the offline synchronization requirement to specify that changes should appear on a second device within 2 seconds after reconnecting.
  • Tests

    • Updated synchronization checks to validate the 2-second propagation target.

…YNC-01 to 2s

Instrumented reconcile on real devices: propagation lands well under two
seconds in every run. The 5s budget in AC-SYNC-01 was looser than the truth,
so this tightens the promise and moves the proof with it — the PRD statement
and the test assertion change together, in one PR.

This is the discovery shape of an intent PR (the PR from the Field): ground
truth reshapes the wording, and the carriers arrive in the same diff. Compare
PR #4, the same one-line restatement shipped alone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TM5e4tKiqCUNANBCkTtH2r
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

🧵 Thread Report

🟢 Golden Thread intact

What moved

No status changes in this PR.

Intent Changed

⚠️ 1 intent was restated — its wording moved under the code and tests written against the old text. Re-confirm each still satisfies the new statement.

  • AC-SYNC-01 — restated
    • was: A change made offline appears on a second device within 5s of reconnect.
    • now: A change made offline appears on a second device within 2s of reconnect.
    • Value 5s2s changed, but not found verbatim in the code or tests — re-confirm by reading.
    • re-confirm: sync.py:51 · test_sync.py:18 (updated here)

Thread Status

SYNC

ID Status
AC-SYNC-01 🟢 proven ◀ changed
AC-SYNC-02 🟠 tracked-debt

+2 untouched backlog rows not shown.

Off Thread

Every changed file carries a mark tying it to an intent. Nothing sits off the thread.


Thread Report illuminates; it does not refuse. "Off thread" is a visibility call, not a gate. Set offthread_ack: record|required in the SpecAssay config to add a human tick.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR changes the AC-SYNC-01 reconnect synchronization target from 5 seconds to 2 seconds. The test assertion now checks the updated 2-second threshold.

Changes

Reconnect synchronization threshold

Layer / File(s) Summary
Requirement and test threshold update
examples/example-app/PRD.md, examples/example-app/tests/test_sync.py
AC-SYNC-01 and its reconnect timing assertion now require synchronization within 2 seconds instead of 5 seconds.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • rdryfoos/specassay#3: Updates AC-SYNC-01 and the corresponding reconnect timing assertion to a 3-second threshold.
  • rdryfoos/specassay#4: Updates AC-SYNC-01 and the corresponding reconnect timing assertion to a 2-second threshold.

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the application, the measured reconnect result, and the change from the existing budget to 2 seconds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch demo/discovery-sync-budget

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

rdryfoos pushed a commit that referenced this pull request Aug 11, 2026
PR from Intent (wording moves alone - the alarm state, carriers owe a
re-confirm) and PR from the Field, the discovery PR (carriers move in the
same diff - the pairing is the coherence evidence). Mark the pair shipped
with links to the live demos, and document the '<- updated in this PR'
carrier annotation in the reference.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@examples/example-app/PRD.md`:
- Line 14: Update the AC-SYNC-01 requirement in sync/spec.md to use a 2-second
synchronization threshold, matching PRD.md and test_sync.py. Preserve the
existing timestamp-ordering and reconnect-edge wording while changing only the
timing value.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d95f9eaf-f7c0-4f45-a6c9-fb4da2014c62

📥 Commits

Reviewing files that changed from the base of the PR and between 929ed09 and 922ece1.

📒 Files selected for processing (2)
  • examples/example-app/PRD.md
  • examples/example-app/tests/test_sync.py

- US-SYNC-01 — As a user, I keep my lists in sync across devices.
- FR-SYNC-01 — Two-way sync reconciles list changes across devices.
- AC-SYNC-01 — A change made offline appears on a second device within 5s of reconnect.
- AC-SYNC-01 — A change made offline appears on a second device within 2s of reconnect.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Update the synchronization specification to 2 seconds.

Line [14] changes AC-SYNC-01 to 2s, but examples/example-app/specs/sync/spec.md still defines the same requirement as 5s. This leaves the requirement and specification inconsistent while examples/example-app/tests/test_sync.py enforces 2 seconds. Change the specification threshold to 2s in the same change, and retain its timestamp-ordering and reconnect-edge wording.

🤖 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/PRD.md` at line 14, Update the AC-SYNC-01 requirement in
sync/spec.md to use a 2-second synchronization threshold, matching PRD.md and
test_sync.py. Preserve the existing timestamp-ordering and reconnect-edge
wording while changing only the timing value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants