Skip to content

fix: validate feature flag endpoint management#2788

Open
kongwen686 wants to merge 1 commit into
stakwork:masterfrom
kongwen686:codex/feature-flag-endpoint-validation
Open

fix: validate feature flag endpoint management#2788
kongwen686 wants to merge 1 commit into
stakwork:masterfrom
kongwen686:codex/feature-flag-endpoint-validation

Conversation

@kongwen686
Copy link
Copy Markdown

Summary

  • accept the issue-specified raw string-array body for adding feature flag endpoints while preserving the existing object wrapper format
  • validate endpoint paths, reject empty or malformed paths, and reject duplicate paths before writing
  • verify endpoint ownership before updates and cover duplicate/update edge cases with handler tests

Why

The endpoint management API existed, but it could silently skip duplicate adds, accept invalid paths, and update an endpoint without first proving it belongs to the feature flag in the route. These gaps make the API behavior differ from the validation and ownership requirements in #2249.

Validation

  • git diff --check
  • go test ./handlers -run FeatureFlagEndpoint could not run in this environment because go is not installed
  • gofmt -w handlers/feature_flags.go handlers/feature_flags_test.go could not run in this environment because gofmt is not installed

Payment/contact

Refs #2249

@kongwen686 kongwen686 marked this pull request as ready for review May 17, 2026 17:15
@kongwen686
Copy link
Copy Markdown
Author

Payment / contact note if this PR is accepted for a bounty or reward:

I am based in mainland China and Stripe onboarding may not be available for me. PayPal would be the preferred payout method if supported: hooqee@126.com.

Contact email: chaoqiang.tian@gmail.com
EVM address: 0x225b4bC64E051827c069312f82fA590Ec9632209
Stellar address: GDYPL56JCCHD75ZB2I5Z4WEWZFRD24LEC62XQ2MBL34653XKO65LA
RTC/ClawRTC address: RTC02d8536941d636aee4012596afbcd8185e9f8283
Alipay: chaoqiang457963@126.com

Please let me know which payout route is supported.

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