Skip to content

Conversation

@ChristopherJHart
Copy link
Collaborator

@ChristopherJHart ChristopherJHart commented Dec 18, 2025

Summary

  • Adds truncation logic to handle GitHub's 65,000 character limit for issue bodies
  • When command_output or parsed_output fields are very large, they are now proportionally truncated before template rendering
  • Truncation is applied with a clear indicator message showing how many characters were removed

Changes

  • New file: github_ops_manager/utils/truncation.py - Core truncation utilities with proportional budget distribution
  • New file: tests/unit/test_utils_truncation.py - 24 unit tests covering all truncation functions
  • Modified: github_ops_manager/utils/constants.py - Added truncation constants (default max: 60,000 chars)
  • Modified: github_ops_manager/configuration/cli.py - Integrated truncation in tac_sync_issues_cli()
  • Modified: github_ops_manager/synchronize/issues.py - Integrated truncation in render_issue_bodies()

Configuration

Set environment variable to customize the limit:

export GITHUB_MAX_ISSUE_BODY_LENGTH=55000  # default: 60000

Test plan

  • All 221 unit tests pass (197 existing + 24 new)
  • Ruff linting and formatting pass
  • Pre-commit hooks pass
  • Manual testing with large command outputs

🤖 AI Generation Metadata

  • AI Generated: Yes
  • AI Tool: claude-code
  • AI Model: opus-4.5
  • AI Contribution: ~95% (implementation + tests)
  • AI Reason: truncation utility + tests + CLI integration
  • Human Oversight: Code reviewed and approved by user

ChristopherJHart and others added 2 commits December 18, 2025 12:38
…le path for new issues

When creating a new issue with a pull request, the generated_script_path was
being used directly without prepending the test_automation_scripts_directory.
This caused the file path to be incomplete (e.g., iosxr/file.robot instead of
workspace/jobfiles/iosxr/file.robot).

The existing issue update logic correctly prepended the directory, but the new
issue creation logic did not. This fix aligns both code paths to use the same
path construction approach.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add truncation logic to handle GitHub's 65,000 character limit for issue
bodies. When command_output or parsed_output fields are very large, they
are now proportionally truncated before template rendering.

- Add truncation.py utility with proportional budget distribution
- Add constants for configurable max body length (default: 60,000)
- Integrate truncation in tac_sync_issues_cli and render_issue_bodies
- Add 24 unit tests for all truncation functions
- Support GITHUB_MAX_ISSUE_BODY_LENGTH env var for configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChristopherJHart ChristopherJHart merged commit d253b89 into master Dec 19, 2025
2 checks passed
@ChristopherJHart ChristopherJHart deleted the feature/issue-body-truncation branch December 19, 2025 14:10
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