feat(#1957): wire gh-identity plugin into workspace-server - #2020
Merged
Conversation
Contributor
Author
molecule-ai Bot
pushed a commit
that referenced
this pull request
Apr 24, 2026
CI Platform (Go) and Analyze (go) were failing because workspace-server/go.mod contained an unresolved <<<<<<< HEAD conflict marker on line 7, causing "malformed module path" on every go command. Remove the marker — both the auth-plugin and gh-identity-plugin deps are already present in the file; go.sum already contains the correct hashes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ships the monorepo side of molecule-core#1957 (agent identity collapse). Companion to molecule-ai-plugin-gh-identity (new repo, merged-and-tagged separately). Changes: - manifest.json: add gh-identity plugin to Tier 1 registry - workspace-server/go.mod: require github.com/Molecule-AI/molecule-ai-plugin-gh-identity - cmd/server/main.go: build a shared provisionhook.Registry, register gh-identity first (always), then github-app-auth (gated on GITHUB_APP_ID) - workspace_provision.go: propagate workspace.Role into env["MOLECULE_AGENT_ROLE"] before calling the mutator chain, so the gh-identity plugin can see which agent is booting - provisionhook/mutator.go: add Registry.Mutators() accessor so individual-plugin registries can be merged onto a shared one at boot Boot log gains a line like: env-mutator chain: [gh-identity github-app-auth] Effect per workspace: - env contains MOLECULE_AGENT_ROLE, MOLECULE_OWNER, MOLECULE_ATTRIBUTION_BADGE, MOLECULE_GH_WRAPPER_B64, MOLECULE_GH_WRAPPER_SHA - Each workspace template's install.sh can decode + install the wrapper at /usr/local/bin/gh, intercepting @me assignment and prepending agent attribution on PR/issue creates Does not break existing workspaces — absent workspace.role, the plugin is a no-op. Absent install.sh updates in each template, the env vars are simply unused. Follow-up template PRs (hermes, claude-code, langgraph, etc.) each add ~15 lines to install.sh to decode + install the wrapper. Ref: #1957 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
molecule-ai
Bot
force-pushed
the
fix/gh-identity-plugin-role-env
branch
from
April 24, 2026 18:28
7b596e5 to
40cfc55
Compare
HongmingWang-Rabbit
pushed a commit
that referenced
this pull request
Jun 12, 2026
…ernal#742 Part 3)' (#2020) from feat/rfc742-rescue-read into main
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.
Summary
Wires the
gh-identityGitHub App plugin into workspace-server, enabling per-agent GitHub attribution via env injection. Each workspace agent receives its own installation-scoped GitHub token injected at runtime, providing:Changes
molecule-ai-plugin-gh-identitydependency (replacing older github-app-auth version on this branch)go.mod/go.sumresolved against current staging depsTest plan
go build ./cmd/server✅go vet ./...✅GITHUB_TOKENenv var is injected🤖 Generated with Claude Code