Add startup config logging, /config endpoint, and Makefile #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The API/CLI lacked visibility into runtime configuration, making it difficult to debug mode/auth/project issues without inspecting code or environment variables.
Changes
Startup banner: Logs MUSIC_GEN_MODE, API key status (yes/no), GCP project/region at API startup. No secrets in logs.
GET /config endpoint: Returns safe config snapshot without credentials:
{ "mode": "simulate", "region": "us-central1", "project": "my-project", "presets_available": ["rock_anthem", "jazz_smooth", ...], "auth_enabled": true }Structured validation errors: Pydantic returns field-specific 422 errors with location and constraints for duration/temperature validation.
Makefile: Targets for
venv,install,test,api,cli-helpworkflows.UTF-8 logging: Configured stdout reconfigure for emoji/international character support.
Updated README: Added Makefile usage, expected CLI outputs, /config endpoint docs.
Technical notes
@app.on_event("startup")with lifespan context managerOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.