Commit Graph

4 Commits

Author SHA1 Message Date
Damir Mukimov
d50722dad5
Refactor ID handling to use UUIDs across the application
Some checks failed
Test / Integration Tests (push) Successful in 4s
Build / Build Binary (push) Failing after 2m9s
Docker Build / Build Docker Image (push) Failing after 2m32s
Test / Unit Tests (push) Failing after 3m12s
Lint / Go Lint (push) Failing after 1m0s
- Updated database models and repositories to replace uint IDs with UUIDs.
- Modified test fixtures to generate and use UUIDs for authors, translations, users, and works.
- Adjusted mock implementations to align with the new UUID structure.
- Ensured all relevant functions and methods are updated to handle UUIDs correctly.
- Added necessary imports for UUID handling in various files.
2025-12-27 00:33:34 +01:00
google-labs-jules[bot]
d0852353b7
feat: Add SearchAlpha support for hybrid search tuning
Add configurable SearchAlpha parameter for hybrid search tuning

- Added SearchAlpha config parameter (default: 0.7) for tuning BM25 vs vector search balance
- Updated NewWeaviateWrapper to accept host and searchAlpha parameters
- Enhanced hybrid search with configurable alpha parameter via WithAlpha()
- Fixed all type mismatches in mocks and tests to use domainsearch.SearchResults
- Updated GraphQL resolver to use new SearchResults structure with SearchResultItem
- All tests and vet checks passing

Closes #30
2025-11-30 03:34:32 +01:00
Damir Mukimov
d7390053b9
feat: Apply Jules AI changes - Search service implementation and refactoring
- Implement full-text search service with Weaviate integration
- Remove Bleve search implementation
- Add GraphQL schema files for search, work, author, and translation
- Refactor search domain interfaces
- Update Weaviate wrapper with integration tests
- Clean up unused search client files
2025-11-30 03:15:35 +01:00
google-labs-jules[bot]
c2e9a118e2 feat(testing): Increase test coverage and fix authz bugs
This commit significantly increases the test coverage across the application and fixes several underlying bugs that were discovered while writing the new tests.

The key changes include:

- **New Tests:** Added extensive integration and unit tests for GraphQL resolvers, application services, and data repositories, substantially increasing the test coverage for packages like `graphql`, `user`, `translation`, and `analytics`.

- **Authorization Bug Fixes:**
  - Fixed a critical bug where a user creating a `Work` was not correctly associated as its author, causing subsequent permission failures.
  - Corrected the authorization logic in `authz.Service` to properly check for entity ownership by non-admin users.

- **Test Refactoring:**
  - Refactored numerous test suites to use `testify/mock` instead of manual mocks, improving test clarity and maintainability.
  - Isolated integration tests by creating a fresh admin user and token for each test run, eliminating test pollution.
  - Centralized domain errors into `internal/domain/errors.go` and updated repositories to use them, making error handling more consistent.

- **Code Quality Improvements:**
  - Replaced manual mock implementations with `testify/mock` for better consistency.
  - Cleaned up redundant and outdated test files.

These changes stabilize the test suite, improve the overall quality of the codebase, and move the project closer to the goal of 80% test coverage.
2025-10-09 07:03:45 +00:00