Skip to content

fix(core): handle absolute URLs in update check redirect parser - #994

Merged
ajianaz merged 2 commits into
developfrom
fix/update-check-absolute-url
Aug 10, 2026
Merged

fix(core): handle absolute URLs in update check redirect parser#994
ajianaz merged 2 commits into
developfrom
fix/update-check-absolute-url

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

What

Fix Cora finding on PR #990: strip_prefix used relative path but GitHub returns absolute URLs in 302 redirects.

Why

GitHub's 302 redirect returns Location: https://github.com/codecoradev/uteke/releases/tag/v0.13.1 (absolute URL). The previous code used strip_prefix("/codecoradev/uteke/releases/tag/") which always failed on absolute URLs, falling through to the rsplit('/') fallback that required a v prefix.

Changes

  • Primary path: strip_prefixfind() to locate tag marker anywhere in URL
  • Fallback: relaxed starts_with('v') check → !tag.is_empty() (accept any valid tag format)

Testing

  • cargo fmt
  • cargo clippy --workspace --all-targets
  • cargo test --workspace ✅ — 480 pass, 0 fail

GitHub 302 redirects return absolute URLs
(https://github.com/codecoradev/uteke/releases/tag/v0.13.1),
not relative paths. The previous strip_prefix('/codecoradev/...')
always failed on absolute URLs, falling through to the rsplit
fallback which required a 'v' prefix.

Fix: use find() to locate the tag marker anywhere in the URL,
and relax the rsplit fallback to accept any non-empty tag.

Found by Cora Code review on PR #990.
@ajianaz ajianaz added bug Something isn't working scope:core Core engine work labels Aug 10, 2026
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

Cora finding: byte-indexed slicing (&loc[idx+len..]) could panic on
non-char-boundary if Location header contains multi-byte UTF-8.

Replace with split_once() — idiomatic, zero-cost, UTF-8 safe.
@ajianaz
ajianaz merged commit 03b1042 into develop Aug 10, 2026
14 checks passed
@ajianaz
ajianaz deleted the fix/update-check-absolute-url branch August 10, 2026 14:33
@ajianaz ajianaz mentioned this pull request Aug 11, 2026
ajianaz added a commit that referenced this pull request Aug 11, 2026
Version bump 0.13.1 → 0.13.2 + CHANGELOG.

Changes since v0.13.1:
- feat: update check (CLI, MCP, HTTP) (#990)
- fix: NULL embeddings crash vector index (#992, #993)
- fix: absolute URL in update check redirect (#994)
- fix: LongMemEval benchmark threshold false negatives (#995, #996)
- chore: branding refresh (#991)

Co-authored-by: ajianaz <ajianaz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working scope:core Core engine work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant