Skip to content

Conversation

@technologic-technologic
Copy link
Owner

Summary

Bundle of maintenance updates to improve data retrieval correctness, test stability, and supply-chain security.

Changes

  • Repository query: adjust query to return correct results under current filters/sorting (eliminates edge-case mismatch).
  • Test compliance: simplify and stabilize tests (leaner specs, proper Mockito matchers, pageable assertions), reduce flakiness.
  • Build/security: upgrade pom.xml to clear scanner alerts:

More info below:

* Create ai agent for PRs
* Update ai-pr-summary.yml
Following YAGNI principles, deleted unused InventorySummary.java; deleted unused hello.html and reformatted other files.
Added server port property 
Added port property to server within application.yml file and set the port to 9090 to make the server run on this port.

PR Summary
WHAT Changed
Updated the application.yml configuration file to change the server port from the default to 9090.
Modified README 
Modified readme to show the current storage technology -> runtime local database.
Modified the agent prompt and strengthen the fallback function
Allows cross-origin requests from the new frontend port.
* Update repository query logic

- Fixed logic of the query to maths the requirements.

* Updated show-sql setting

- Updated the show-sql as theres no longer need of the  logs

---------

Signed-off-by: Leonardo Trevizo <leonardo.trevizo@encora.com>
- Updated the test to be more compliant
- Updated the pom to comply with security, avoiding current vulnerabilities

Signed-off-by: Leonardo Trevizo <leonardo.trevizo@encora.com>
@github-actions
Copy link

PR Summary

WHAT Changed

  • New GitHub Action: Added a workflow file .github/workflows/ai-pr-summary.yml to automatically generate a summary of pull requests using OpenAI's API.
  • Documentation Updates: Updated README.md to reflect changes in the application name and data storage method.
  • Dependency Updates: Updated versions of Spring Boot and SpringDoc in pom.xml.
  • Code Changes:
    • Modified InventoryManagerController to change the CORS origin from http://localhost:3000 to http://localhost:8080.
    • Updated the ProductRepository query to calculate stock values correctly.
    • Removed the unused InventorySummary service class.
    • Changed the server port in application.yml to 9090.
    • Deleted hello.html template file.
  • Test Enhancements: Added comprehensive tests for the InventoryManagerController and created new tests for the ProductMapper.

WHY It Matters

  • Automation: The new GitHub Action automates the PR review process, improving efficiency and consistency in code reviews.
  • Documentation Clarity: Updates to the README enhance clarity for users and developers regarding the application setup and functionality.
  • Code Quality: Dependency updates ensure the application uses the latest features and security patches, while test enhancements improve code reliability.

RISKS

  • API Dependency: The new workflow relies on OpenAI's API, which could introduce failures if the API is down or changes.
  • CORS Configuration: Changing the CORS origin may affect frontend applications that rely on the previous configuration.

TESTS to Add

  • Ensure that the new GitHub Action runs successfully on PRs.
  • Validate that the updated queries in the repository return the expected results.
  • Add tests for any new functionality introduced in the controller.

BREAKING CHANGES

  • CORS Origin Change: The change in the CORS origin may require updates in frontend applications that interact with this backend.
  • Removed Template: The deletion of hello.html may affect any existing functionality that relied on this template.

Changed File Paths

  • .github/workflows/ai-pr-summary.yml
  • README.md
  • pom.xml
  • src/main/java/com/encorazone/inventory_manager/controller/InventoryManagerController.java
  • src/main/java/com/encorazone/inventory_manager/repository/ProductRepository.java
  • src/main/resources/application.yml
  • src/main/resources/templates/hello.html
  • src/test/java/com/encorazone/inventory_manager/controller/InventoryManagerControllerTests.java
  • src/test/java/com/encorazone/inventory_manager/mapper/ProductMapperTests.java
  • src/test/java/com/encorazone/inventory_manager/service/InventoryProductsFilterTests.java

@technologic-technologic technologic-technologic added the enhancement New feature or request label Oct 17, 2025
@technologic-technologic technologic-technologic added this to the Major fixes milestone Oct 17, 2025
@technologic-technologic technologic-technologic merged commit 400cafc into stage Oct 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants