Skip to content

Comments

v0.5.98: change detection improvements, rate limit and code execution fixes, removed retired models, hex integration#3294

Merged
waleedlatif1 merged 6 commits intomainfrom
staging
Feb 22, 2026
Merged

v0.5.98: change detection improvements, rate limit and code execution fixes, removed retired models, hex integration#3294
waleedlatif1 merged 6 commits intomainfrom
staging

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Feb 22, 2026

icecrasher321 and others added 5 commits February 21, 2026 07:57
…#3287)

* fix(workflow-changes): change detection logic divergence

* use shared helper
* feat(oauth): add CIMD support for client metadata discovery

* fix(oauth): add response size limit, redirect_uri and logo_uri validation to CIMD

- Add maxResponseBytes (256KB) to prevent oversized responses
- Validate redirect_uri schemes (https/http only) and reject commas
- Validate logo_uri requires HTTPS, silently drop invalid logos

* fix(oauth): add explicit userId null for CIMD client insert

* fix(oauth): fix redirect_uri error handling, skip upsert on cache hit

- Move scheme check outside try/catch so specific error isn't swallowed
- Return fromCache flag from resolveClientMetadata to skip redundant DB writes

* fix(oauth): evict CIMD cache on upsert failure to allow retry
* feat(tools): added hex

* update tool names
@vercel
Copy link

vercel bot commented Feb 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Feb 22, 2026 1:53am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 22, 2026

Greptile Summary

This release combines reliability improvements for Redis handling and code execution with new OAuth CIMD support, Hex integration, and retired model cleanup.

Key Changes:

  • Redis Resilience: Added PING-based health monitoring, exponential backoff with jitter for reconnection, and graceful fallback to PostgreSQL when Redis is unavailable
  • Rate Limiting: Changed from fail-closed to fail-open during storage errors to prevent service disruption
  • Code Execution: Removed hard failures when distributed leases are unavailable, now falls back to local execution
  • CIMD Support: Implemented Client ID Metadata Document discovery for OAuth flows with secure validation and caching
  • Hex Integration: Added comprehensive Hex integration with 16 operations (run projects, manage collections, groups, users, data connections)
  • Model Cleanup: Removed retired claude-3-7-sonnet-latest model definition
  • Refactoring: Consolidated duplicate subblock merge logic into shared helper function

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are well-tested with comprehensive test coverage, improve system resilience through graceful degradation, follow established patterns (API key visibility), and properly handle edge cases (Redis outages, lease unavailability)
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/lib/core/config/redis.ts Added health check with PING monitoring, reconnect listener system, and exponential backoff with jitter for better reliability
apps/sim/lib/core/rate-limiter/storage/factory.ts Added graceful fallback to PostgreSQL when Redis is unavailable and reconnect listener to reset cached adapter
apps/sim/lib/core/rate-limiter/rate-limiter.ts Changed error handling to fail open (allow requests) instead of fail closed when storage errors occur
apps/sim/lib/execution/isolated-vm.ts Removed hard failure when distributed lease is unavailable, now falls back to local execution with per-process limits
apps/sim/lib/auth/cimd.ts New CIMD (Client ID Metadata Document) implementation with caching, validation, and secure metadata fetching
apps/sim/lib/auth/auth.ts Integrated CIMD support in OAuth flow, added client_id_metadata_document_supported to OAuth metadata
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-change-detection.ts Refactored to use shared mergeSubblockStateWithValues helper, eliminating duplicate logic
apps/sim/providers/models.ts Removed retired claude-3-7-sonnet-latest model definition
apps/sim/blocks/blocks/hex.ts New Hex block implementation with 16 operations for project management, runs, collections, groups, and data connections

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Rate Limiter Request] --> B{Storage Method?}
    B -->|Redis| C[Get Redis Client]
    B -->|DB| D[Use PostgreSQL]
    
    C --> E{Redis Available?}
    E -->|Yes| F[Use RedisTokenBucket]
    E -->|No| G[Fallback to PostgreSQL]
    
    F --> H{Storage Error?}
    G --> H
    D --> H
    
    H -->|Error| I[Fail Open - Allow Request]
    H -->|Success| J[Apply Rate Limit]
    
    K[Redis Health Monitor] -->|PING every 30s| L{PING Success?}
    L -->|Success| M[Reset Failure Count]
    L -->|Fail| N[Increment Failure Count]
    
    N --> O{3+ Failures?}
    O -->|Yes| P[Force Reconnect]
    O -->|No| K
    
    P --> Q[Notify Listeners]
    Q --> R[Reset Cached Adapter]
    R --> S[Exponential Backoff + Jitter]
    S --> C
Loading

Last reviewed commit: c52f78c

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

43 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@waleedlatif1 waleedlatif1 merged commit 0d86ea0 into main Feb 22, 2026
26 checks passed
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