Repository navigation
Description
Problem
TestSDKTypescriptRelease_Scenario11_TagVersionParity can hang during ordinary local task test runs because its temporary-repository Git subprocesses inherit the developer's global Git configuration and environment.
This is fixture setup, not an actual release: the test creates a disposable repository and local tags, and pushes nothing. The integration coverage is useful; the subprocess isolation is defective.
Observed failure
During image-capability regression verification, the test stalled until the package's 10-minute timeout. Investigation found the process chain:
server.test → git tag → nvim …/.git/TAG_EDITMSG
The developer's global settings included tag.gpgsign = true and core.editor = nvim. Fixture tag creation therefore attempted an interactive signed/annotated tag instead of the intended noninteractive fixture operation. Stalled editor subprocesses remained after timed-out runs.
Process-local noninteractive Git overrides allowed verification to complete; no user-global configuration changes should be required to run this test.
Relevant code
internal/adapter/server/sdk_typescript_scenario11_test.go:
exerciseSDKScenario11IdentityGatecreates the repository witht.TempDir()(around line 172).- Its
runGithelper usesexec.Command("git", args...)and sets onlycmd.Dir, inheriting ambient configuration/environment and providing no per-command deadline (around lines 173–181). - Fixture setup commits and creates tags (around lines 198–203).
- The identity-script subprocess also uses unbounded
exec.Commandand explicitly inheritsos.Environ()(around lines 214–227).
Expected behavior / acceptance criteria
- The fixture and identity-script subprocesses are isolated from user/system Git configuration and relevant inherited Git environment overrides, while retaining the toolchain environment they actually need.
- Fixture commits/tags are noninteractive, unsigned, and cannot execute developer-configured hooks or editors. Do not change the developer's real Git configuration, keys, or repository.
- Bound subprocess execution and clean up spawned processes on timeout/cancellation so a failed test does not leave editors or signing helpers behind.
- Add regression coverage with hostile ambient Git configuration (signing enabled and an editor/hook sentinel) proving that the fixture neither invokes those helpers nor hangs.
- Preserve the existing behavioral coverage of the real release identity script: matching tag/package version succeeds; mismatched versions and unmerged commits are rejected.
- Ordinary
task testsucceeds without callers supplying Git-specific workarounds.
Scope
Fix the test fixture and subprocess harness, not production release signing policy. Reuse existing repository test helpers where appropriate; do not replace the behavioral integration test with string assertions alone.
Activity