Skip to content

feat(claude-code): cherry-pick upstream claude_code plugin - #79

Merged
muzamilkm merged 4 commits into
arbisoft:main-arbisoftfrom
muzamilkm:feat/claude-code-upstream-cherry-pick
Oct 5, 2026
Merged

muzamilkm merged 4 commits into
arbisoft:main-arbisoftfrom
muzamilkm:feat/claude-code-upstream-cherry-pick

Conversation

@muzamilkm

@muzamilkm muzamilkm commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Brings upstream Apache DevLake's claude_code plugin into the fork as upstream ships it. It is phase 1a of the Claude convergence plan (claude-code-upstream-convergence-plan.md). The plugin lands dormant: no connections, no blueprints and no domain writes. Its domain layer, the Enterprise analytics gaps and the upstream bug fixes come in phase 2. Retiring our claude (Claude Platform) plugin is the separate PR 1b.

Upstream cherry-picks

Conflicts resolved toward ours

5 files conflicted. Every resolution keeps our behaviour:

  • table_info_test.go, api/connection/index.ts, types/connection.ts: union of both sides. Our claude, codex and cursor entries and our org/loginUrl/workspaceSlug/… fields stay. Upstream's claude_code, customHeaders and adminApiKey are added. table_info_test.go is also gofmt'd, which moves upstream's claudeCode import into order.
  • features/connections/utils.ts: ours, plus customHeaders.
  • connection-form/index.tsx: ours in all 3 hunks. Upstream's side would have replaced the shared connection form for every plugin with its own refactor. That would revert our fixes for:
    • stuck Test/Save buttons and leaked errors;
    • masked credentials being preserved on edit;
    • the whitelisted save payload.

Custom headers through our connection form

Upstream's Claude Code form lets you set custom headers (for middleware auth). Our form only sends whitelisted fields, so without this commit the headers would be silently dropped. The change:

  • Adds customHeaders to CONNECTION_FORM_FIELDS, so they are saved.
  • Sends them in Test Connection: diffed against the saved connection on edit, picked on create.
  • Reuses upstream's sanitizeCustomHeaders on test and save, so blank header rows are dropped.
  • For plugins without custom headers the payloads are unchanged: the field is undefined and is omitted.

Dashboards archived

Upstream's ClaudeCodeAdoption and ClaudeCodeAdoptionByUser move to grafana/archived_dashboards/, so they are not provisioned. They show org-wide, per-user data with no project-access filtering. Phase 2 rebuilds Claude reporting on the domain layer with access filtering.

Test plan

  • Rebuilt devlake and config-ui locally from this branch against an existing local database with FORCE_MIGRATION=true:
    • exactly the 3 claude-code migrations ran, with no errors;
    • they created 8 _tool_claude_code_* and 5 _raw_claude_code_* tables, and nothing was dropped;
    • _tool_claude_code_otel_* and ai_activities row counts are identical before and after.
  • go build/go vet and go test ./plugins/claude_code/... pass. claude_otel tests pass. So do the 4 packages with whitespace-only upstream edits (gh-copilot/models, github/tasks, jira/tasks, bitbucket/api).
  • The table-info checker passes for claude_code, claude and claude_otel. The full table_info_test needs libgit2 1.3.0 and runs in CI.
  • Config UI: tsc, eslint and prettier pass on all changed files.
  • Config UI unit tests: the 2 new customHeaders save-payload cases pass. The 3 failing access-route tests fail identically on main-arbisoft.
  • By hand: created, edited and tested GitHub and Jira connections, which behave as before; the Claude Code connection form renders.

Notes for reviewers

  • Do not create claude_code connections on any environment yet. Upstream stores the API key and custom headers in plaintext (no encdec). Encrypting them is the first PR of phase 2.

la-tamas and others added 4 commits October 2, 2026 14:50
…he#8808)

* feat: Add claude code metrics data integration

(cherry picked from commit 78fd47d9e7647ff3ac8b886b2ddb45f1df55e2b4)
(cherry picked from commit fa69cf9ec0fa0db6aa5fb0aec2e5ca2796355ffd)

(upstream) story: XPL-551: Add license headers

(cherry picked from commit a12ece8c1ca65ff27acc14d4630ac3d404d51ce8)

* feat: Fix header validation issues, migrations and tests

* feat: Update plugin table tests

* feat: Update claude_code unit tests

---------

Co-authored-by: tamas.albert <tamas.laczkoalbert@concentrix.com>
Co-authored-by: Eldrick Wega <eldrick.wega@outlook.com>
@muzamilkm
muzamilkm merged commit 213321c into arbisoft:main-arbisoft Oct 5, 2026
5 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.

4 participants