Skip to content

test: isolate signing fallback from global git config - #233

Open
Nicolas0315 wants to merge 1 commit into
arkorlab:mainfrom
Nicolas0315:codex/fix-signing-test-isolation-v2
Open

test: isolate signing fallback from global git config#233
Nicolas0315 wants to merge 1 commit into
arkorlab:mainfrom
Nicolas0315:codex/fix-signing-test-isolation-v2

Conversation

@Nicolas0315

@Nicolas0315 Nicolas0315 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Makes the signing fallback test independent of the operator's global Git configuration by isolating the fixture config and asserting the intended fallback path.

Testing:

  • pnpm --filter @arkor/cli-internal exec vitest run src/git.test.ts (9 passed)
  • git diff --check

Local Node is 24.19.0 while the repository declares 24.17.0 or 24.18.0; the test passed with only the version warning.


Summary by cubic

Makes the signing fallback test independent of the developer's global Git configuration. A global SSH signing setup previously could make the test pass without exercising the retry fallback; the fixture now pins gpg.format to openpgp so the nonexistent gpg binary is actually invoked.

Written for commit f4a024f. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Tests
    • Updated signing fallback coverage to consistently use OpenPGP signing.
    • Prevented global SSH signing settings from bypassing the fallback test path.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T02:05:43.224076Z f4a024f PR opened
🔒 Security Review Completed 2026-08-31T02:06:30.026211Z f4a024f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 05be04a7-3293-46ff-9278-db8064eb8377

📥 Commits

Reviewing files that changed from the base of the PR and between 5bb2094 and f4a024f.

📒 Files selected for processing (1)
  • packages/cli-internal/src/git.test.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Seer Code Review
🧰 Additional context used
📓 Path-based instructions (7)
Use oxfmt for formatting with the repository configuration; do not manually override its whitespace, wrapping, quotes, or trailing-comma decisions.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/cli-internal/src/git.test.ts
Add Vitest tests in the same change for SDK, CLI, scaffolder, schema, or other package logic changes; consider an `e2e/cli` scenario for CLI flow changes.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/cli-internal/src/git.test.ts
TypeScript/TSX のコード、コメント、文字列、テンプレートリテラルではエムダッシュ (U+2014) またはその HTML エンティティを使用しない。

📄 CodeRabbit inference engine (CONTRIBUTING.ja.md)

Files:

  • packages/cli-internal/src/git.test.ts
Do not use the em dash character (U+2014) in code comments, string literals, or template literals, including CLI messages, generated template bodies, and test names.

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Files:

  • packages/cli-internal/src/git.test.ts
Run both linters through the root configurations: `oxlint --deny-warnings .` followed by `eslint .`; add configuration overrides at the root rather than per-package configs.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/cli-internal/src/git.test.ts
SDK、CLI、スキャフォルダーのロジックには Vitest のテストを追加し、Studio コンポーネントには jsdom と Testing Library ベースのテストを使用する。ただしテスト追加自体は PR の必須条件ではない。

📄 CodeRabbit inference engine (CONTRIBUTING.ja.md)

Files:

  • packages/cli-internal/src/git.test.ts
リポジトリ内の追跡対象ファイルでは、エムダッシュまたはその HTML エンティティを使用しない。Markdown、YAML、JSON、HTML、設定ファイル、生成テンプレートも含む。

📄 CodeRabbit inference engine (CONTRIBUTING.ja.md)

Files:

  • packages/cli-internal/src/git.test.ts
🪛 ast-grep (0.45.2)
packages/cli-internal/src/git.test.ts

[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawn } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)

🔇 Additional comments (1)
packages/cli-internal/src/git.test.ts (1)

131-142: LGTM!


Walkthrough

The signing-fallback test now pins Git to OpenPGP signing and updates the configuration entry count. This prevents global SSH signing settings from bypassing the fallback path.

Changes

Signing fallback test

Layer / File(s) Summary
Pin OpenPGP signing configuration
packages/cli-internal/src/git.test.ts
The test adds gpg.format=openpgp, changes GIT_CONFIG_COUNT from "3" to "4", and updates the duplicate commit.gpgsign=true entry index.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to f4a02

This change makes the signing fallback test deterministic without changing production behavior. No actionable merge-blocking risk remains after normal checks and review.

🚥 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 and concisely describes the main change: isolating the signing fallback test from global Git configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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.

@drift-check

drift-check Bot commented Aug 31, 2026

Copy link
Copy Markdown

Code Review Bot

No reviewable code changes were analyzed. ⚠️ The documentation drift check could not be evaluated. Reviewed 0 file(s); skipped 1.

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes the signing-fallback unit test independent of a developer's global Git signing format.

  • Pins the fixture to OpenPGP signing so its nonexistent GPG executable reliably triggers the fallback path.
  • Retains an explicit assertion that the unsigned retry occurred.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The added Git configuration is valid on supported environments, reaches the intended signing-failure path, and remains isolated by the existing test cleanup and process model.

Important Files Changed

Filename Overview
packages/cli-internal/src/git.test.ts The fixture now overrides global SSH-signing configuration while preserving environment cleanup and the intended fallback assertion.

Reviews (1): Last reviewed commit: "test: isolate signing fallback from glob..." | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Re-trigger cubic

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