Skip to content

Comments

Generalize verbosity flag and suppress "Found project" logs in bulk operations#26

Merged
awagner-mainz merged 3 commits intomainfrom
copilot/update-log-verbosity-setting
Feb 16, 2026
Merged

Generalize verbosity flag and suppress "Found project" logs in bulk operations#26
awagner-mainz merged 3 commits intomainfrom
copilot/update-log-verbosity-setting

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

Plan: Add verbosity control for bulk upload messages ✅

  • Understand current implementation
  • Rename AuthVerbose to Verbose (making it more generic)
  • Add verbosity control to "Found project" message
  • Address review feedback
    • Fix "options not found in context" error
    • Rename test variable from authVerbose to verbose
  • Validate all tests pass

Summary

Successfully implemented verbosity control for bulk upload operations and addressed all review feedback:

Fixed Critical Bug:

  • Embeddings handlers now properly receive options via context
  • Added addOptionsToContext middleware wrapper to all embeddings route registrations
  • Updated RegisterEmbeddingsRoutes to accept options parameter

Cleaned Up Test Code:

  • Renamed test struct field from authVerbose to verbose for consistency

All Tests Pass: Both embeddings and auth tests verified working
Build Success: Application builds without errors
No Breaking Changes: Behavior remains backward compatible


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ad messages

Co-authored-by: awagner-mainz <2088443+awagner-mainz@users.noreply.github.com>
Copilot AI changed the title [WIP] Update log verbosity for bulk uploads Generalize verbosity flag and suppress "Found project" logs in bulk operations Feb 15, 2026
Copilot AI requested a review from awagner-mainz February 15, 2026 23:25
Copy link
Contributor

@awagner-mainz awagner-mainz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a tt.authVerbose left in internal/auth/auth_verbose_test.go, but maybe that does not hurt. We'll see...

@awagner-mainz awagner-mainz marked this pull request as ready for review February 16, 2026 08:06
@awagner-mainz awagner-mainz marked this pull request as draft February 16, 2026 08:07
@awagner-mainz
Copy link
Contributor

@copilot Several tests now raise a 500 error with options not found in context.

- Pass options parameter to RegisterEmbeddingsRoutes
- Wrap all embeddings handlers with addOptionsToContext middleware
- Rename authVerbose to verbose in test struct for consistency
- Fixes "options not found in context" error in embeddings tests

Co-authored-by: awagner-mainz <2088443+awagner-mainz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 16, 2026

There is a tt.authVerbose left in internal/auth/auth_verbose_test.go, but maybe that does not hurt. We'll see...

Fixed in commit 03de0e1. Renamed the test struct field from authVerbose to verbose to match the renamed option.

@copilot Several tests now raise a 500 error with options not found in context.

Fixed in commit 03de0e1. The embeddings handlers now properly receive options via context by:

  • Adding options parameter to RegisterEmbeddingsRoutes
  • Wrapping all embeddings handler registrations with addOptionsToContext middleware

All embeddings tests now pass.

Copy link
Contributor

@awagner-mainz awagner-mainz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot tests are passing, so there is probably not a problem, but I wonder where the function addOptionsToContext() is defined. You have added it in the huma.Register() calls in internal/handlers/embeddings.go, but I don't see it being defined in the set of changes you propose. Has it been defined already before?

Copy link
Contributor Author

Copilot AI commented Feb 16, 2026

@copilot tests are passing, so there is probably not a problem, but I wonder where the function addOptionsToContext() is defined. You have added it in the huma.Register() calls in `internal/handle...

Yes, addOptionsToContext() was already defined before my changes. It's defined in internal/handlers/handlers.go:123 and was already being used by the manifest handlers (see internal/handlers/manifest.go:280-281). I simply reused this existing middleware function to wrap the embeddings handlers so they could also access options from the context.

Copilot AI requested a review from awagner-mainz February 16, 2026 08:26
@awagner-mainz awagner-mainz marked this pull request as ready for review February 16, 2026 08:27
@awagner-mainz awagner-mainz merged commit 21afa2a into main Feb 16, 2026
2 checks passed
@awagner-mainz awagner-mainz deleted the copilot/update-log-verbosity-setting branch February 16, 2026 08:27
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.

2 participants