You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4.**Progressive enhancement model** - Community provides essential safety, Cloud enhances outcomes with same config
211
+
212
+
## Common Patterns and Best Practices
213
+
214
+
### Pattern 1: Idempotent by Design
215
+
Make changes idempotent when possible, then use ALWAYS_RETRY:
216
+
- INSERT ... ON CONFLICT DO NOTHING
217
+
- PUT with same key-value
218
+
- CREATE IF NOT EXISTS
219
+
220
+
### Pattern 2: Critical Path Protection
221
+
Keep MANUAL_INTERVENTION for critical data paths:
222
+
- Financial transactions
223
+
- User authentication data
224
+
- Compliance-related changes
225
+
226
+
### Pattern 3: Progressive Migration
227
+
Start with MANUAL_INTERVENTION, move to ALWAYS_RETRY after validation
228
+
229
+
### Pattern 4: Transactional vs Non-Transactional Strategy
230
+
-**Large bulk operations**: Non-transactional for performance, MANUAL_INTERVENTION for safety
231
+
-**Small critical operations**: Transactional for safety, MANUAL_INTERVENTION for consistency
232
+
233
+
### @RollbackExecution Best Practice
234
+
**Always provide @RollbackExecution methods** even for transactional changes:
235
+
1.**For transactional changes**: Used for CLI undo operations (not executed on failure)
236
+
2.**For non-transactional changes**: Executed automatically on failure to clean up
237
+
3.**CLI integration**: Essential for `flamingock undo` command functionality
238
+
4.**Audit compliance**: Provides clear trail of how changes can be reversed
239
+
240
+
## CRITICAL: Flamingock Transaction Behavior
241
+
242
+
**Important Technical Detail**: Even in Community Edition, audit operations and target system changes are ALWAYS executed in separate transactions:
243
+
244
+
### Transaction Separation Rules
245
+
1.**Non-transactional target systems**: No transactions at all - neither the change nor audit
246
+
2.**Transactional target systems**: Change executes in one transaction, audit writes in a separate transaction
247
+
3.**Same database as audit store**: Still separate transactions - target system transaction + separate audit transaction
248
+
249
+
### Recovery Implications
250
+
-**Community Edition**: Flamingock can recover the majority of failure scenarios through separate transaction approach
251
+
-**Uncertain scenarios**: When Flamingock saves "started" audit but fails before saving completion status
252
+
-**Cloud Edition**: Marker mechanism provides 100% recovery even in uncertain scenarios
253
+
254
+
### Key Point
255
+
**NEVER document that audit and changes happen in the same transaction** - this is architecturally incorrect for Flamingock's design.
256
+
257
+
## Cloud Edition Advanced Features (Future/Roadmap)
258
+
259
+
### Custom Marker Mechanisms for Non-Transactional Systems
260
+
**Status**: Planned for Cloud Edition (not yet implemented)
261
+
262
+
**Concept**: Similar to how markers work for transactional target systems (to check if change was applied or not), Cloud Edition will provide an option for users to supply custom mechanisms for non-transactional systems to determine:
263
+
- Was the change successfully applied?
264
+
- Was it not applied at all?
265
+
- Was it partially applied?
266
+
267
+
**Value**: This custom marker capability will enable Cloud Edition to provide complete recoverability even for non-transactional systems (Kafka, S3, APIs, etc.) by allowing users to define their own validation logic for change state determination.
268
+
269
+
**Documentation Note**: Mention this briefly in non-transactional sections as "Cloud Edition will provide custom marker mechanisms for enhanced recoverability" but don't elaborate details since it's not yet implemented.
- Mermaid diagrams are supported throughout the documentation
148
353
354
+
## Documentation Style Guidelines
355
+
356
+
### Title Capitalization
357
+
- Use sentence case for titles and headers (capitalize only first word and proper nouns)
358
+
- Avoid uppercase for words that are not the first word or proper names
359
+
- Example: "Recovery strategies" not "Recovery Strategies"
360
+
361
+
### Content Style
362
+
- Avoid emojis in documentation sections unless explicitly requested
363
+
- Keep technical documentation professional and clean
364
+
- Focus on clarity and readability over decoration
365
+
149
366
## Request Evaluation Framework
150
367
151
368
**CRITICAL**: Before proceeding with any request, Claude must evaluate it against these three criteria and score each from 1-10. If any criterion scores below 8, Claude must ask for clarification to ensure all criteria reach at least 8 before proceeding:
0 commit comments