Improve url parser & token authentication - #4044
Conversation
…niqueness normalize_repo_url rejected authenticated URLs like https://oauth2:password@host/path/repo.git due to ':' not in user check, leaving '@' in the normalized locator and breaking repo tracking. This affects any Git provider (GitLab, GitHub, self-hosted) using username:password or username:token authentication patterns. This change: - Fixes parsing to correctly strip userinfo with colons (e.g. oauth2:token@) - Maintains existing normalized locator format (host/path) as unique identifier - Extends repo tracking to support authenticated URLs across all Git providers - Adds regression tests proving zero degradation on existing URLs Moves normalize_repo_url to openviking/utils/url_parser.py alongside parse_url() for shared URL handling. AI: FF-27B-Q8
Detects /app/dev_openviking directory and runs uv pip install -e with --force-reinstall --no-deps before starting the server. Enables seamless local development against running containers.
Detects /app/dev_openviking and sets PYTHONPATH for seamless local development. Uses PYTHONPATH instead of pip install to avoid native build dependencies.
A lock token file left behind empty (e.g. a crash between file creation and token write) permanently wedged the path: try_create_token returned an Io error which is non-retryable in the acquire loop, so every subsequent acquire on that path failed forever with 'lock I/O error: failed to create lock token'. The filesystem provider now removes the orphaned empty file and retries the CreateNew write, falling back to Conflict if another owner claimed the lock in between.
|
Ran into broken lock files preventing sync; entirely AI patched. ┃ # Wrote /tmp/opencode/PR-DESCRIPTION.md |
Description
Weird. I filled this out previously. Simple fix proposed for user authenticated git repos and a simple dev environment using docker.
The url parser is cleaned up and tests created to demonstrate no regression in capabilities.
Human Involvement
Related Issue
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes