Prompt file imported from aclarke6/DraftView (
.github/Prompts/S-Sprint-Prompts/ssprint5-phase3.prompt.md). Copyright stays with the author.
AGENT REQUIREMENT - MANDATORY
Before performing any work, the agent MUST:
-
Read and apply:
-
AGENTS.md
-
.github/Instructions/refactoring.instructions.md
-
-
Operate fully within their constraints
If these files are not read or cannot be applied:
STOP.
Do not proceed with the task.
mode: agent description: S-Sprint-5 Phase 3 - Failure and recovery handling
S-Sprint-5 Phase 3 - Failure and recovery handling
Branching
- Checkout
mainand pull latest fromorigin/main - Create
S-Sprint-5-basefrommainif it does not already exist - Create
S-Sprint-5-base/phase-3-failure-and-recovery-handlingfromS-Sprint-5-base - All work on
S-Sprint-5-base/phase-3-failure-and-recovery-handling - Developer merges:
S-Sprint-5-base/phase-3-failure-and-recovery-handling->S-Sprint-5-base->main
Context
This is Phase 3 of S-Sprint-5 (Reuse Existing Sync Pipeline End to End).
See DropBox Synchronisation Using WebHooks.md section for S-Sprint-5 for full phase architecture.
Phase Brief: Ensure failures do not lose outstanding demand, leases expire safely, and retries remain possible through later worker passes.
Reading List
Read the following files in order before writing code:
-
DropBox Synchronisation Using WebHooks.md- Read S-Sprint-5 Phase 3 section
- Ask: What is the specific deliverable for this phase?
-
TASKS.md- Read section 3.1 (Dropbox Webhook Sync Sprint Series)
- Ask: What is the current phase completion status?
-
.github/copilot-instructions.md- Read TDD and phased delivery rules
- Ask: What constraints apply to this phase?
Specification
Phase Goal
Ensure failures do not lose outstanding demand, leases expire safely, and retries remain possible through later worker passes.
Key Deliverables
Refer to DropBox Synchronisation Using WebHooks.md S-Sprint-5 Phase 3 for:
- Exact implementation requirements
- Domain/application/infrastructure scope
- Test coverage expectations
What NOT to Do
- Do not skip TDD sequence (stub → failing test → implementation)
- Do not add features beyond this phase's scope
- Do not modify unrelated code
- Do not publish content or create versions (ingestion-only constraint)
What to Produce - Plan First, Then Pause
After reading all files, produce a written plan containing all four sections below.
Stop after the plan. Do not write any code. Wait for the plan to be reviewed and approved by the developer.
Section 1 - Current State Analysis
State precisely:
- What code/tests exist from previous phases
- What dependencies this phase has on prior work
- Current checkbox state in TASKS.md
Section 2 - Implementation Plan
Describe in plain English:
- What files will be created or modified
- What tests will be written (arrange/act/assert)
- What the TDD sequence is (stub → red → green)
Section 3 - Verification Steps
Confirm:
- How you will verify the phase deliverable works
- What browser/manual testing is needed (if applicable)
- How you will confirm no regressions
Section 4 - Success Gates
Gate 1 - Tests written and confirmed red (if TDD phase)
- All new tests written
- Tests confirmed red - paste failing output
Gate 2 - Implementation complete and tests green
- Implementation complete
- All new tests pass - paste passing output
Gate 3 - No regressions
- Full test suite passes - paste count
Gate 4 - Browser verification (if applicable)
- Manual verification complete (describe what was verified)
Gate 5 - Committed to GitHub
- Committed to
S-Sprint-5-base/phase-3-failure-and-recovery-handlingwith message:feat: S-Sprint-5 Phase 3 - Failure and recovery handling -
git statusis clean
Gate 6 - TASKS.md updated
- S-Sprint-5 Phase 3 marked complete in TASKS.md
- Committed with message:
chore: mark S-Sprint-5 Phase 3 complete in TASKS.md
Gate 7 - Present merge commands
- Present for manual execution - do not execute:
git checkout S-Sprint-5-base git merge S-Sprint-5-base/phase-3-failure-and-recovery-handling git checkout main git merge S-Sprint-5-base git push origin main
Rules
- No code before the plan is reviewed and approved
- TDD: stub → failing test → implementation → confirm green
- Follow existing patterns in Domain/Application/Infrastructure layers
- No inline styles in views - CSS classes only
- Webhook sync is ingestion-only - never publishes or creates versions
- All git commands are presented to the developer for manual execution
- A task is not complete until every Success Gate is confirmed