Skip to content

Update Scoop dependencies#5

Merged
Tomaszal merged 1 commit into
mainfrom
update/scoop
Jul 29, 2025
Merged

Update Scoop dependencies#5
Tomaszal merged 1 commit into
mainfrom
update/scoop

Conversation

@Tomaszal
Copy link
Copy Markdown
Contributor

No description provided.

@Tomaszal Tomaszal merged commit 2d8d843 into main Jul 29, 2025
1 check failed
@Tomaszal Tomaszal deleted the update/scoop branch July 29, 2025 01:48
ElecTwix added a commit that referenced this pull request Dec 27, 2025
…rations

Fixes critical data corruption bug where bulk operations could leave
database in inconsistent state if any item in the batch failed.

**Critical Bug Fixed:**
- Edge/FlowVariable Insert/Update/Delete operations looped without
  transactions
- If item #5 of 10 failed, items 1-4 remained committed while client
  received error
- Sync events published for items 1-4 even though overall operation
  failed
- Result: Partial data + inconsistent state = data corruption

**Changes:**
1. Refactored 6 operations with transaction wrappers:
   - EdgeInsert, EdgeUpdate, EdgeDelete
   - FlowVariableInsert, FlowVariableUpdate, FlowVariableDelete

2. Transaction pattern applied:
   - Move all validation OUTSIDE transaction (before BeginTx)
   - Wrap all DB writes in single transaction
   - Publish sync events ONLY after successful commit
   - Automatic rollback on any failure

3. Added comprehensive test coverage (7 new tests):
   - Transaction rollback tests verify no partial commits
   - All-or-nothing tests verify successful batch operations
   - Access control tests verify validation before transaction

**Benefits:**
- All-or-nothing semantics for bulk operations
- No phantom sync events on partial failures
- Faster failure detection (validation before transaction)
- Zero data corruption risk

**Test Results:**
- All 7 new transaction safety tests pass
- All existing rflowv2 tests still pass (6.568s runtime)

Phase 1 of 3-phase migration plan (Transaction Safety → HttpBodyRaw
Sync → Flow Bulk Sync Optimization)
ElecTwix added a commit that referenced this pull request Jan 13, 2026
…rations

Fixes critical data corruption bug where bulk operations could leave
database in inconsistent state if any item in the batch failed.

**Critical Bug Fixed:**
- Edge/FlowVariable Insert/Update/Delete operations looped without
  transactions
- If item #5 of 10 failed, items 1-4 remained committed while client
  received error
- Sync events published for items 1-4 even though overall operation
  failed
- Result: Partial data + inconsistent state = data corruption

**Changes:**
1. Refactored 6 operations with transaction wrappers:
   - EdgeInsert, EdgeUpdate, EdgeDelete
   - FlowVariableInsert, FlowVariableUpdate, FlowVariableDelete

2. Transaction pattern applied:
   - Move all validation OUTSIDE transaction (before BeginTx)
   - Wrap all DB writes in single transaction
   - Publish sync events ONLY after successful commit
   - Automatic rollback on any failure

3. Added comprehensive test coverage (7 new tests):
   - Transaction rollback tests verify no partial commits
   - All-or-nothing tests verify successful batch operations
   - Access control tests verify validation before transaction

**Benefits:**
- All-or-nothing semantics for bulk operations
- No phantom sync events on partial failures
- Faster failure detection (validation before transaction)
- Zero data corruption risk

**Test Results:**
- All 7 new transaction safety tests pass
- All existing rflowv2 tests still pass (6.568s runtime)

Phase 1 of 3-phase migration plan (Transaction Safety → HttpBodyRaw
Sync → Flow Bulk Sync Optimization)
ElecTwix added a commit that referenced this pull request Jan 26, 2026
Implement POC #4 and #5 for improved AI tool discovery:

- Add AIParam struct with typed parameters (name, description, type)
- Add SourceHint field for auto-chaining between tools
- Create {{ ai('name', 'desc', 'type', 'source') }} syntax parser
- Add AIParamProvider interface for nodes to declare parameters
- Add DescribableNode interface for custom tool descriptions
- Add discover_tools function for on-demand tool discovery (POC #3)
- Create AI expression functions (ai, aivar, airef, aidesc, aichain)
- Add comprehensive integration tests comparing 5 POC approaches

Test results show POC #4+#5 combination is most effective:
- Typed params give AI clear input requirements
- SourceHint tells AI exactly where to get chained values
- Reduces tool calls and improves success rate
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.

1 participant