feat(github-app): amico[bot] identity — gh PATH shim + git credential helper - #400
Closed
aarontrowbridge wants to merge 2 commits into
Conversation
…ATH shim, git credential helper (#399) Every gh/git action in an agent session rides the researcher's personal login; this gives Amicode its own GitHub App face. Unconfigured = byte-identical passthrough; configured = self-refreshing 1-hour installation tokens, token carriage env/protocol-only, bot PRs with human-authored commits.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
…TH only (#399) A bin-map entry made pnpm link gh into node_modules/.bin, where it shadowed the developer's gh for every pnpm script: CI's fetch:opencode resolved to the shim, which re-found the .bin alias, and pnpm's wrapper prepended NODE_PATH on every recursive pass until exec hit E2BIG. The shadowing contract is agent-session-only: gh now stages via amicode.shadowBins into the extension's bin dir, gated + pinned like every declared bin. resolveRealGh additionally compares realpath'd candidate FILES, so a symlink alias of the shim in any PATH dir is skipped instead of recursing.
Member
Author
|
Superseded by /pull/401 — the auto-generated branch name carried |
aarontrowbridge
deleted the
399-github-app-identity-amicobot-acts-for-amicode-on-harmoniqs-repos-token-core-+-ghgit-shims
branch
August 17, 2026 10:00
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.
Closes #399
What
Amicode gets its own GitHub face: an org-level GitHub App whose installation tokens arm every
ghcall and httpsgit pushin an agent session — bot PRs, human-authored commits (the Claude Code split).github_app.ts— pure core: RS256 JWT mint (node:crypto, no new deps), installation-token fetch, 0600 atomic cache with 5-min reuse skew, token-free ConfigErrors (~/.amico/github.json, `` override — the pasqal credential-file pattern)launcher/gh— PATH shim in the launcher bin dir the extension already prepends: unconfigured → byte-identical passthrough; configured →GH_TOKENenv into the realgh(recursion-guarded lookup). Every current and futureghcall — agent sessions, handoff verb, repo-sync — becomes the bot with zero call-site changeslauncher/amico-git-credential— git credential helper for https github.com, registered viaGIT_CONFIG_*spawn env ONLY when the connection file exists; silent fallthrough otherwise; never blocks authassert_packaged_cli.mjs— fail-closed gate extended: behavioral probes for both new bins (malformed-credential-file seeds, hermetic, no network)Verification
opencode_devprovenance,agent_spawnconfig-dir, live-creds e2e) verified pre-existing on the clean treeghstays out of everynode_modules/.bin— pnpm-script surface untouchedPhase 0 (manual, org owner — blocking for real use)
Create the org App (contents/PRs/issues RW, members R, administration RW), install on all repos, then write
~/.amico/github.json:{app_id, installation_id, pem_path}. Revoking the PEM is the kill switch.Phase 2 (Connection panel UI) and Phase 3 (fleet propagation) follow as separate issues.