Skip to content

feat: added Switcher Remote flag for Hybrid Mode - #20

Merged
petruki merged 1 commit into
masterfrom
staging
Aug 1, 2026
Merged

feat: added Switcher Remote flag for Hybrid Mode#20
petruki merged 1 commit into
masterfrom
staging

Conversation

@petruki

@petruki petruki commented Aug 1, 2026

Copy link
Copy Markdown
Member

This pull request introduces Hybrid Mode to the Switcher Go SDK, allowing users to selectively force remote evaluation on a per-call basis even when Local Mode is enabled. It adds the Switcher.Remote() method, updates documentation to match, and includes comprehensive tests for the new behavior. Additionally, it improves formatting and vulnerability checks in the CI pipeline.

Hybrid Mode (force remote evaluation):

  • Added forceRemote field to Switcher and implemented the Remote(force ...bool) method, enabling per-call override to force remote API usage even when Local Mode is active. Passing Remote(false) clears the override. Validation ensures this is only allowed when Local Mode is enabled. (switcher.go) [1] [2] [3] [4] [5]
  • Comprehensive tests for Hybrid Mode, covering remote override, error cases, no-op clearing, and method chaining. (switcher_test.go)
  • Updated documentation in README.md and ARCHITECTURE.md to describe Hybrid Mode, usage, and its effect on execution mode selection. Removed outdated TODOs and diagrams, and clarified the relationship between features and code. (README.md, ARCHITECTURE.md) [1] [2] [3] [4] [5]

CI/CD and tooling improvements:

  • Added formatting checks to the CI pipeline (.github/workflows/master.yml, .github/workflows/staging.yml) and Makefile, ensuring code is properly formatted before tests run. (.github/workflows/master.yml, .github/workflows/staging.yml, Makefile) [1] [2] [3]
  • Updated govulncheck version for vulnerability checks in CI and Makefile. (.github/workflows/master.yml, .github/workflows/sonar.yml, Makefile) [1] [2] [3]

Minor documentation update:

  • Removed the "under development" status badge from README.md.

@petruki petruki self-assigned this Aug 1, 2026
@petruki petruki added enhancement New feature or request ai-generated Indicates that AI tools were used to generate this change labels Aug 1, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

@petruki
petruki merged commit 7f7092f into master Aug 1, 2026
7 checks passed
@petruki
petruki deleted the staging branch August 1, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Indicates that AI tools were used to generate this change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant