Skip to content

C parallelization - #20

Merged
frankreyesgarcia merged 13 commits into
api-diff-generatorfrom
c-parallelization
Apr 8, 2026
Merged

frankreyesgarcia merged 13 commits into
api-diff-generatorfrom
c-parallelization

Conversation

@frankreyesgarcia

Copy link
Copy Markdown
Member

This pull request primarily migrates all Java package and Maven group IDs from com.example to github.chains across the codebase. It also updates the Gitleaks job in the GitHub Actions workflow to use a pinned version of actions/checkout and installs Gitleaks manually instead of using the action. These changes improve project ownership clarity, package organization, and CI reliability.

Migration to new package and group ID:

  • All Java source files under api_changes are renamed from com.example.japicmp to github.chains.japicmp, including their sub-packages and all import statements. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
  • All Maven pom.xml files update their <groupId> from com.example to github.chains, and all internal dependencies are updated to use the new group ID. [1] [2] [3] [4]
  • Main class references in Maven plugin configurations are updated to the new package path. [1] [2]
  • Java imports in change-impact-reporter models are updated to reference the new github.chains packages for both japicmp and spoonanalyzer modules. [1] [2] [3]

CI/CD workflow improvements:

  • The Gitleaks job in .github/workflows/secret-scan.yml now uses a specific commit SHA for actions/checkout and installs Gitleaks manually, replacing the previous gitleaks-action.

- Updated AgentFactory to support the new OpenCodeAgent, allowing for additional LLM agent and rule generator combinations.
- Refactored agent registration logic to improve clarity and maintainability.
- Enhanced AgentExecutionResult to include a container ID for better tracking of execution contexts.
- Updated JavaParserAgent and SpoonAgent to accommodate the new container ID parameter in execution results.
- Improved logging in MainCli and AgentRepairPipeline to include container ID information for better traceability during agent execution.
- Added a new method in DockerBuild to mount GitHub CLI configuration for improved authentication during agent operations.
…nd temporary file handling

- Updated OpenCodeAgent to create temporary log files for compile and test outputs, enhancing log management during Docker builds.
- Added error handling for log file creation, falling back to default paths if temporary files cannot be created.
- Enhanced AgentRepairPipeline to delete temporary log files after use, ensuring cleaner resource management and reducing clutter in the workspace.
- Corrected a typo in the JavaParserAgent's error message formatting for clarity.
- Updated the DockerBuild class to enhance the logging command for Maven execution, ensuring output is properly directed to the log file.
…andling and error detection

- Updated OpenCodeAgent to support the new "openrouter" provider, injecting the OPENROUTER_API_KEY from LLM_API_KEY.
- Enhanced error handling in MainCli to log and propagate provider limit exceptions, ensuring proper feedback during pipeline execution.
- Introduced a new method in AgentRepairPipeline to detect insufficient credits from OpenRouter and OpenCode, stopping the pipeline with clear error messages when limits are reached.
- Improved logging throughout the affected classes for better traceability and debugging during agent operations.
…nd configuration defaults

- Changed the default value of PARALLEL_ENABLED in MainCli to true, enhancing parallel processing capabilities.
- Removed the extraction service dependency from CommitProcessor, creating a local instance for each thread to avoid shared mutable state.
- Simplified progress callback handling in CommitProcessor, improving clarity and reducing unnecessary complexity.
- Enhanced logging and error handling in CommitProcessor to provide better feedback during commit processing.
…erAgent and SpoonAgent

- Added a new method in BaseAgent to copy files to the commit report directory, preserving filenames and logging actions.
- Updated JavaParserAgent and SpoonAgent to copy the agent session JSON file to the commit report directory during execution.
- Removed the redundant copyFileToReport method from OpenCodeAgent to streamline the codebase.
…files and remove unused classes in api_changes module

- Changed the groupId in pom.xml files for the main project, api_changes, breaking-classifier, change-impact-reporter, and core modules to reflect the new namespace.
- Deleted unused classes and models in the api_changes module to clean up the codebase and improve maintainability.
…upport and error handling

- Updated OpenCodeAgent to support multiple LLM providers, including Google and GitHub Copilot, with appropriate API key injection and logging.
- Enhanced AgentRepairPipeline to improve error detection for insufficient credits and access issues, specifically for OpenRouter and GitHub Copilot.
- Improved logging throughout the affected classes for better traceability during agent operations.
…ecks

- Updated the logic in OpenCodeAgent to require the presence of both "input_change-impact.json" and "breaking-changes.json" for analysis.
- Modified the prompt generation to provide clearer instructions based on the availability of analysis files, improving user guidance during error resolution.
- Refactored related code sections for better clarity and maintainability.
…all it directly

- Changed the checkout action to a specific commit for consistency.
- Added installation steps for Gitleaks to ensure the correct version is used during scanning.
- Modified the Gitleaks execution step to run the command directly instead of using the action.
# Conflicts:
#	core/src/main/java/com/example/core/agent/AgentFactory.java
#	core/src/main/java/com/example/core/agent/impl/JavaParserAgent.java
#	core/src/main/java/com/example/core/agent/impl/SpoonAgent.java
#	core/src/main/java/com/example/core/agent/model/AgentExecutionResult.java
#	core/src/main/java/github/chains/core/cli/MainCli.java
#	core/src/main/java/github/chains/core/pipeline/AgentRepairPipeline.java
#	core/src/main/java/github/chains/core/pipeline/ProviderLimitException.java
#	docker-build/src/main/java/se/kth/DockerBuild.java
…to streamline the agent architecture. This cleanup eliminates unused code and prepares for future enhancements in agent implementations.
@frankreyesgarcia
frankreyesgarcia merged commit f591591 into api-diff-generator Apr 8, 2026
3 checks passed
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