fix(split-io): correct segment key API paths and dashboard auth field - #338
Merged
andrei-hasna merged 2 commits intoJul 31, 2026
Merged
Conversation
fix(split-io): correct segment key API paths and dashboard auth field Verifier found HIGH issues on PR #314 branch: (1) addKeysToSegment POSTs to /uploadKeys instead of /keys per Split Admin API v2 OpenAPI; (2) removeKeysFromSegment uses PUT /removeKeys instead of DELETE /keys; (3) dashboard guessKeyField stores ioApiKey for SPLIT_IO_API_KEY but CLI getApiKey only reads apiKey; (4) segment CLI args should document environmentId not display name. Fix on branch open-c Re-verify the current split-io connector source on origin/main before changing anything. Three defects found by a verifier on the PR #314 branch, all in the Split.io connector: (1) addKeysToSegment POSTs to /uploadKeys but the Split Admin API v2 OpenAPI defines /keys; (2) removeKeysFromSegment uses PUT /removeKeys but the documented operation is DELETE /keys; (3) the dashboard's guessKeyField stores the value under `ioApiKey` for the SPLIT_IO_API_KEY credential while the client reads a different field, so a configured key is never found. FIX in src/: correct the two endpoint paths and HTTP verbs, and make the credential field name consistent between the dashboard writer and the client reader (fix it in the one place that maps env var -> stored field, not at both ends). Regression tests must run offline: assert on the REQUEST the client would issue (method + path + body) using an injected fetch/HTTP stub — do NOT call the live Split.io API, there are no credentials and no network. EXECUTION NOTES (added 2026-07-29 for autonomous execution) Work only in this repo, only in src/. Add a regression test that fails on current main and passes after the fix (this codebase is test-driven). Acceptance: `bun install`, `bun run typecheck` (if present), `bun run build` and `bun test` all green. The executing environment has NO network egress, NO credentials and NO live services (no Postgres, no AWS, no third-party APIs) — the test must run entirely offline against fixtures, temp dirs, local SQLite or an in-process stub. X-Factory-Run: run_9202efbf8b9c X-Factory-Task: 20f06949-8130-413f-889b-84a4e8a59d42
Contributor
Author
|
[REVIEW] NO_GO — #338 @ cb96096 — lens: correctness+security+gates, reviewer Augustus (1 of 1) What I ran, with exit codes:
What I read:
Blocking P0/P1 findings:
Non-blocking follow-ups:
|
Restore Split.io segment key add/remove operations to the documented PUT uploadKeys/removeKeys routes and keep tests aligned with those API contracts. Agent: Augustus
Contributor
Author
|
Remediation pushed by reviewer Augustus. Fixed in
Verification after the fix:
The earlier required full-suite gate remains recorded on the review comment: |
Contributor
Author
|
[REVIEW] GO — #338 @ 286f0a6 — lens: correctness+security+gates, reviewer Augustus (1 of 1) What I ran, with exit codes:
What I read:
Blocking P0/P1 findings:
Non-blocking follow-ups:
|
andrei-hasna
deleted the
factory/20f06949-8130-413f-889b-84a4e8a5-b174c4d0
branch
July 31, 2026 22:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
fix(split-io): correct segment key API paths and dashboard auth field
Verifier found HIGH issues on PR #314 branch: (1) addKeysToSegment POSTs to /uploadKeys instead of /keys per Split Admin API v2 OpenAPI; (2) removeKeysFromSegment uses PUT /removeKeys instead of DELETE /keys; (3) dashboard guessKeyField stores ioApiKey for SPLIT_IO_API_KEY but CLI getApiKey only reads apiKey; (4) segment CLI args should document environmentId not display name. Fix on branch open-c
Re-verify the current split-io connector source on origin/main before changing anything. Three defects found by a verifier on the PR #314 branch, all in the Split.io connector: (1) addKeysToSegment POSTs to /uploadKeys but the Split Admin API v2 OpenAPI defines /keys; (2) removeKeysFromSegment uses PUT /removeKeys but the documented operation is DELETE /keys; (3) the dashboard's guessKeyField stores the value under
ioApiKeyfor the SPLIT_IO_API_KEY credential while the client reads a different field, so a configured key is never found. FIX in src/: correct the two endpoint paths and HTTP verbs, and make the credential field name consistent between the dashboard writer and the client reader (fix it in the one place that maps env var -> stored field, not at both ends). Regression tests must run offline: assert on the REQUEST the client would issue (method + path + body) using an injected fetch/HTTP stub — do NOT call the live Split.io API, there are no credentials and no network.EXECUTION NOTES (added 2026-07-29 for autonomous execution)
Work only in this repo, only in src/. Add a regression test that fails on current main and passes after the fix (this codebase is test-driven). Acceptance:
bun install,bun run typecheck(if present),bun run buildandbun testall green. The executing environment has NO network egress, NO credentials and NO live services (no Postgres, no AWS, no third-party APIs) — the test must run entirely offline against fixtures, temp dirs, local SQLite or an in-process stub.Verification
Run
run_9202efbf8b9c· backendcodewith· task20f06949-8130-413f-889b-84a4e8a59d42🏭 Generated by @hasnaxyz/factory
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.