Skip to content

feat(connectors): add statsig connector#295

Open
andrei-hasna wants to merge 1 commit into
mainfrom
open-connectors-cursor/open-connectors/d21a49c0-ffa2-4fe6-9bdc-df66fed14b68-69f3a243
Open

feat(connectors): add statsig connector#295
andrei-hasna wants to merge 1 commit into
mainfrom
open-connectors-cursor/open-connectors/d21a49c0-ffa2-4fe6-9bdc-df66fed14b68-69f3a243

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

Summary

  • Add @hasna/connect-statsig package under connectors/statsig/ with Statsig Console API client (STATSIG-API-KEY + version 20240601)
  • Resource modules: gates, experiments, dynamic-configs, holdouts, segments, layers, autotunes, metrics, tags, users, teams, events
  • CLI with profile/config management and grouped subcommands; registry entry in Developer Tools adjacent to LaunchDarkly
  • 12 focused bun:test cases for auth headers, paths, error parsing, and 429 retry

Test plan

  • cd connectors/statsig && bun install && bun run typecheck && bun run build && bun test (12 pass)
  • bun run typecheck at repo root
  • bun run build && bun test at repo root (1198 pass, 1 pre-existing unrelated failure in events CLI test)
  • rg scan: no secrets, beepmedia, hasnaxyz, or browser-use references in connectors/statsig

Implement @hasna/connect-statsig against the Statsig Console API with
typed client modules, CLI subcommands, registry entry, and mocked tests.
@andrei-hasna

Copy link
Copy Markdown
Contributor Author

Worker review for task edac4197-1657-46c6-85ff-245b1d999087: not safe to merge yet.

Validation performed in isolated OpenLoops worktree against live origin/main (b4efcfe0) with PR head 1ff9dd9a cherry-picked locally:

  • PR is open/non-draft; GitHub check build is passing.
  • Local cherry-pick onto live origin/main applied cleanly; candidate diff remained 33 files: new connectors/statsig package plus src/lib/connectors/developer-tools.ts registry entry.
  • git diff --cached --check: passed.
  • Staged secret scan: no real credential values found; hits were placeholders/test literals/auth field names.
  • bun test connectors/statsig/src/api/client.test.ts: passed, 12 tests.
  • cd connectors/statsig && bun run build: passed.
  • cd connectors/statsig && bun run typecheck: passed.
  • root bun run typecheck: passed.
  • built CLI help executes: connectors/statsig/bin/index.js --help.

Blockers before merge:

  1. connectors/statsig/package.json advertises types / export types as ./dist/index.d.ts, but the connector package build script only runs bun build and does not emit declarations. After cd connectors/statsig && bun run build, connectors/statsig/dist/index.js exists but connectors/statsig/dist/index.d.ts is missing. Publishing this package as-is would ship broken TypeScript declarations.

  2. The API-key connector includes unused OAuth template scaffold in connectors/statsig/src/utils/auth.ts with accounts.example.com endpoints, generic scopes, and local callback HTML. It is not exposed by the current CLI/API surface, but it is committed package source and should be removed or replaced with real Statsig auth behavior before merge.

Merge mechanics note: live main is newer than the PR snapshot, but a local cherry-pick onto live origin/main applied cleanly. The merge mechanics are not the current blocker; the package quality issues above are.

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