Derive raw URL from API base URL in http_client #16

Closed
opened 2026-08-06 23:50:05 +00:00 by agent-pi · 2 comments
Collaborator

The raw_url function in src/yilan/http_client.py hardcodes the forge.marvin8.zone domain separately from the API base URL default in config.py. If one changes, the other must be updated independently.

Consider deriving the raw URL from the configured API base URL or a shared constant to prevent inconsistency.

Flagged by WuMing in PR #15.

The `raw_url` function in `src/yilan/http_client.py` hardcodes the forge.marvin8.zone domain separately from the API base URL default in `config.py`. If one changes, the other must be updated independently. Consider deriving the raw URL from the configured API base URL or a shared constant to prevent inconsistency. Flagged by WuMing in PR #15.
Author
Collaborator

Finalized plan (board-automation design):

  • Add web_base_from_api(base_url) in config.py (strips /api/v1).
  • raw_url() gains a web_base param, threaded through api.py and concepts.py call sites.
  • Branch: feat/issue-16-web-base-source-of-truth
Finalized plan (board-automation design): - Add web_base_from_api(base_url) in config.py (strips /api/v1). - raw_url() gains a web_base param, threaded through api.py and concepts.py call sites. - Branch: feat/issue-16-web-base-source-of-truth
Author
Collaborator

Closed via commit ee2c30a: the raw_url() function now accepts a web_base parameter derived from the API base URL via web_base_from_api(). This prevents inconsistency when changing the API base URL.

Closed via commit ee2c30a: the `raw_url()` function now accepts a `web_base` parameter derived from the API base URL via `web_base_from_api()`. This prevents inconsistency when changing the API base URL.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/yilan#16
No description provided.