Make documented local backend startup work#27
Open
hiboydidi wants to merge 1 commit into
Open
Conversation
The README tells developers to run uvicorn from the backend directory, but importing main as a top-level module broke package-relative imports. Local macOS development also cannot rely on the Docker-only /data mount, so startup now falls back to an ignored backend data directory when /data is not writable while preserving /data for Docker. Constraint: README documents uvicorn main:app from backend/ Constraint: Docker deployment persists profiles at /data Rejected: Change README to backend.main:app only | would leave the documented backend-directory workflow less convenient and still not solve local /data startup Confidence: high Scope-risk: narrow Directive: Keep Docker default storage at /data unless the container contract changes Tested: python -m pytest -q (182 passed) Tested: uvicorn main:app --port 8081 responded on /api/status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary\n- allow backend modules to import both as package modules and via
uvicorn main:appfrom backend/\n- fall back tobackend/.datafor local development when Docker's/datapath is not writable\n- document the local data directory override and ignore generated local data\n- harden the CDP port exhaustion test against real local services using ports in the tested range\n\n## Verification\n-python -m pytest -q(182 passed)\n-uvicorn main:app --port 8081thenGET /api/statusreturned JSON\n\n## Note\nDirect push to origin failed because the logged-in GitHub account has READ permission on CloakHQ/CloakBrowser-Manager, so this branch was pushed to the fork instead.