Skip to content

example-app: tighten the offline-sync reconnect budget to 2s - #4

Open
rdryfoos wants to merge 1 commit into
mainfrom
demo/intent-changed-sync
Open

example-app: tighten the offline-sync reconnect budget to 2s#4
rdryfoos wants to merge 1 commit into
mainfrom
demo/intent-changed-sync

Conversation

@rdryfoos

@rdryfoos rdryfoos commented Aug 10, 2026

Copy link
Copy Markdown
Owner

What changed

Product tightened the offline-sync SLA. A change made offline should now appear on a second device within 2s of reconnect, down from 5s. This restates the AC-SYNC-01 acceptance criterion in the PRD — one line, the intent's own wording.

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

Why it's here

This is a demo of the Thread Report's Intent Changed section. The ID didn't change — the meaning did. The code and test written against the old 5s wording are now standing behind a criterion that says 2s. The Golden Thread still reads intact (the proof still exists and passes), so nothing is broken — but the report should flag AC-SYNC-01 for re-confirmation and pinpoint that tests/test_sync.py still asserts the old budget.

That's the whole point of the feature: a restatement is illuminated, never blocked. Watch the 🧵 Thread Report comment below for the Intent Changed section.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TM5e4tKiqCUNANBCkTtH2r


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated the synchronization acceptance criterion to require offline changes to appear on a second device within 2 seconds of reconnecting, reduced from 5 seconds.

Product tightened the sync SLA: a change made offline should now appear
on a second device within 2s of reconnect, down from 5s. Restates the
AC-SYNC-01 acceptance criterion in the PRD.

This is a demo PR for the Thread Report's Intent Changed section: the
intent's wording moved, but the proof (test_AC_SYNC_01) still asserts the
old budget — so the report should flag the criterion for re-confirmation
without breaking the Golden Thread.

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

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PRD updates AC-SYNC-01 to require offline changes to appear on a second device within 2 seconds after reconnecting, reduced from 5 seconds.

Changes

Synchronization requirement

Layer / File(s) Summary
Reconnect synchronization criterion
examples/example-app/PRD.md
AC-SYNC-01 changes the reconnect synchronization requirement from 5 seconds to 2 seconds.

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

Possibly related PRs

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 and concisely describes the change to reduce the offline-sync reconnect budget from 5 seconds 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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch demo/intent-changed-sync

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.

@github-actions

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.
    • re-confirm:

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 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: Align the sync timing threshold with the 2-second requirement from
AC-SYNC-01 by updating the corresponding acceptance expectation in sync/spec.md
and the enforcement in test_sync.py, replacing the existing 5-second limit while
preserving the rest of the sync behavior.
🪄 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: ee92dc5a-4b95-4201-a2e0-d628b97dc876

📥 Commits

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

📒 Files selected for processing (1)
  • examples/example-app/PRD.md

- 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 | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- PRD ---'
sed -n '1,28p' examples/example-app/PRD.md

printf '%s\n' '--- specification ---'
sed -n '1,80p' examples/example-app/specs/sync/spec.md

printf '%s\n' '--- test ---'
sed -n '1,160p' examples/example-app/tests/test_sync.py

printf '%s\n' '--- related acceptance references ---'
rg -n -C 2 'AC-SYNC-01|within 2s|within 5s|elapsed' examples/example-app

Repository: rdryfoos/specassay

Length of output: 8386


Align the sync acceptance threshold across artifacts.

If the 2-second threshold is confirmed, update examples/example-app/specs/sync/spec.md and examples/example-app/tests/test_sync.py; both still enforce 5 seconds.

🤖 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, Align the sync timing threshold with
the 2-second requirement from AC-SYNC-01 by updating the corresponding
acceptance expectation in sync/spec.md and the enforcement in test_sync.py,
replacing the existing 5-second limit while preserving the rest of the sync
behavior.

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