Skip to content

[Bug] release.sh --execute validation step hangs and fails to commit version changes #82

@fxstein

Description

@fxstein

Error Description

The release.sh --execute command enters an infinite hang or silent exit during the validation step, leaving uncommitted version changes that cause the script to fail on subsequent runs.

Command Used

./release/release.sh --execute

Steps to Reproduce

  1. Run ./release/release.sh --prepare --beta --summary release/AI_RELEASE_SUMMARY.md (succeeds)
  2. Run ./release/release.sh --execute
  3. Script updates version files (ai_todo/init.py, legacy/todo.ai, pyproject.toml, uv.lock)
  4. Script reaches "🔍 Validating generated files..." step
  5. Script silently exits or hangs indefinitely
  6. Version files remain uncommitted
  7. Re-running --execute fails pre-flight check: "Uncommitted changes detected"

Expected Behavior

The script should:

  1. Update version files
  2. Run pre-commit validation
  3. Handle validation results (pass/fail/auto-fix)
  4. Commit version changes
  5. Create git tag
  6. Push to origin
  7. Create GitHub release

Actual Behavior

The script:

  1. ✅ Updates version files successfully
  2. ❌ Hangs/exits during validation step
  3. ❌ Leaves files uncommitted
  4. ❌ Never reaches commit stage

Output:

🔍 Validating generated files...
   Checking: release/RELEASE_NOTES.md release/RELEASE_SUMMARY.md legacy/todo.ai pyproject.toml ai_todo/__init__.py
[HANGS HERE - no further output]

Root Cause Analysis

The validation code at lines ~1973-2035 in release/release.sh:

  1. Runs uv run pre-commit run --files ... and captures output
  2. This command appears to hang or exit silently
  3. The script never proceeds to the commit stage
  4. When manually running the same pre-commit command, it succeeds immediately

Evidence:

# Manual validation succeeds quickly
$ uv run pre-commit run --files release/RELEASE_NOTES.md release/RELEASE_SUMMARY.md legacy/todo.ai pyproject.toml ai_todo/__init__.py
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
[... all checks pass in ~6 seconds ...]

Workaround

Manual execution of remaining steps:

# Commit version changes
git add legacy/todo.ai pyproject.toml ai_todo/__init__.py release/RELEASE_SUMMARY.md release/RELEASE_NOTES.md uv.lock
git commit --no-verify -m "chore: Bump version to 4.0.0b3"

# Create and push tag
git tag -a v4.0.0b3 -m "Release v4.0.0b3"
git push origin main
git push origin v4.0.0b3

# Create GitHub release
gh release create v4.0.0b3 --title "Release v4.0.0b3" --notes-file release/RELEASE_NOTES.md --prerelease

Impact

  • Severity: High (blocks automated releases)
  • Scope: Developer workflow only
  • Frequency: Every release attempt

Environment

  • OS: macOS 25.2.0 (darwin)
  • Shell: zsh
  • Version: 4.0.0b3
  • Python: 3.14
  • uv: Latest

Additional Context

This issue occurred during the v4.0.0b3 release preparation (AIT-14). The pre-flight validation passes, but the script fails during the file validation step after updating versions.

The validation code uses command substitution:

validation_output=$(uv run pre-commit run --files "${files_to_validate[@]}" 2>&1)
local validation_status=$?

Possible issues:

  1. Command substitution may be causing buffering/blocking behavior
  2. Pre-commit hooks might be waiting for input or producing streaming output that blocks
  3. The script timeout/exit handling may be incorrect

Suggested Fix

Investigate the validation command execution:

  1. Add timeout to pre-commit execution
  2. Use alternative output capture method (redirect to file instead of command substitution)
  3. Add debug logging to identify where execution stops
  4. Consider running validation in background with monitoring

Metadata

Metadata

Assignees

Labels

ReleasebugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions