Skip to content

fix(workspace): forward gpg on browser open - #904

Merged
skevetter merged 2 commits into
mainfrom
fix/gpg-browser-forwarding
Aug 8, 2026
Merged

fix(workspace): forward gpg on browser open#904
skevetter merged 2 commits into
mainfrom
fix/gpg-browser-forwarding

Conversation

@skevetter

@skevetter skevetter commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Signed-off-by: GitHub noreply@github.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved GPG agent forwarding consistency when configured through command options or workspace context settings.
    • Browser-based IDE sessions now correctly honor context-based GPG forwarding and establish the required tunnel.
  • Workflow Updates

    • Automatic approvals are limited to the intended commit, CI, and pre-commit workflows.
    • Updated authentication configuration for workflow approvals.
  • Tests

    • Added coverage for GPG forwarding settings, IDE parameter preservation, and browser IDE tunnel behavior.

Signed-off-by: GitHub <noreply@github.com>
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 80358a0
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a7678fd7b17ae00086610ea

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR derives IDE GPG agent forwarding from CLI or context settings, adds unit and browser IDE end-to-end coverage, and narrows automatic workflow approval while changing the GitHub App token input.

Changes

GPG agent forwarding

Layer / File(s) Summary
IDE parameter construction
cmd/workspace/up/configure.go
openIDE delegates parameter assembly to buildIDEParams, which combines CLI and context GPG forwarding settings with existing IDE parameters.
IDE parameter validation
cmd/workspace/up/configure_test.go
Table-driven tests cover context-based, CLI-based, and disabled GPG forwarding. They also verify existing IDE parameter fields.
Browser IDE forwarding validation
e2e/tests/ide/browser_returns.go
The end-to-end test configures a temporary context, verifies GPG forwarding and tunnel startup, checks secret-key forwarding, and cleans up the workspace and context.

Workflow approval configuration

Layer / File(s) Summary
Approval workflow scope
.github/workflows/workflow-approval.yml
The workflow uses client-id and limits automatic approval to commit.yml, pr-ci.yml, and pre-commit.yml.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant E2ETest
  participant BrowserIDE
  participant Tunnel
  participant GPGAgent
  E2ETest->>BrowserIDE: launch with context GPG option
  BrowserIDE->>Tunnel: start forwarding tunnel
  Tunnel->>GPGAgent: forward secret key
  BrowserIDE-->>E2ETest: report forwarding and tunnel logs
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: forwarding GPG when opening a browser in a workspace.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 80358a0
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a7678fd571d9900085cc47b

@github-actions github-actions Bot added the size/l label Aug 7, 2026
Signed-off-by: GitHub <noreply@github.com>
@skevetter
skevetter marked this pull request as ready for review August 8, 2026 00:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/workflow-approval.yml:
- Line 22: Remove the missing pre-commit.yml entry from the workflows allowlist
in the workflow-approval configuration, leaving only the tracked workflow
references including pr-ci.yml.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b5c730d6-0bbb-4f9c-845f-c5685686b820

📥 Commits

Reviewing files that changed from the base of the PR and between bc4c5f4 and 80358a0.

📒 Files selected for processing (4)
  • .github/workflows/workflow-approval.yml
  • cmd/workspace/up/configure.go
  • cmd/workspace/up/configure_test.go
  • e2e/tests/ide/browser_returns.go

with:
token: ${{ steps.app-token.outputs.token }}
workflows: "commit.yml,lint.yml,pr-ci.yml,pre-commit.yml,release-please.yml,promote-release.yml"
workflows: "commit.yml,pr-ci.yml,pre-commit.yml"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

for workflow in commit.yml pr-ci.yml pre-commit.yml; do
  test -f ".github/workflows/$workflow" || {
    echo "Missing .github/workflows/$workflow"
    exit 1
  }
done

Repository: devsy-org/devsy

Length of output: 194


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "Workflow file list containing pre-commit or pr-ci:"
git ls-files '.github/workflows/*' | rg '(^|/)(pre-commit|pr-ci)\.ya?ml$' || true

echo
echo "workflow-approval.yml (line 22 area):"
sed -n '1,45p' .github/workflows/workflow-approval.yml 2>/dev/null || true

echo
echo "References to pre-commit jobs/workflows in pr-ci.yml:"
if [ -f .github/workflows/pr-ci.yml ]; then
  nl -ba .github/workflows/pr-ci.yml | sed -n '1,220p'
else
  echo "no .github/workflows/pr-ci.yml"
fi

Repository: devsy-org/devsy

Length of output: 1060


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "Existing workflow files:"
git ls-files '.github/workflows/*' | sed -n '1,120p'

echo
echo ".github/workflows/pr-ci.yml:"
awk '{printf "%6d    %s\n", NR, $0}' .github/workflows/pr-ci.yml | sed -n '1,220p'

echo
echo "Search for pre-commit references:"
rg -n "pre-commit|pre_commit|pr-ci|commit\.yml" .github/workflows -S || true

Repository: devsy-org/devsy

Length of output: 9681


Remove the missing pre-commit.yml workflow reference.

.github/workflows/pre-commit.yml is not tracked, while the pre-commit task is already a job in .github/workflows/pr-ci.yml. Keeping this allowlisted path can make automatic-approve fail and leave PR runs unapproved.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/workflow-approval.yml at line 22, Remove the missing
pre-commit.yml entry from the workflows allowlist in the workflow-approval
configuration, leaving only the tracked workflow references including pr-ci.yml.

@skevetter
skevetter merged commit b7f5563 into main Aug 8, 2026
66 of 68 checks passed
@skevetter
skevetter deleted the fix/gpg-browser-forwarding branch August 8, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant