signal-view-fix #35
No reviewers
Labels
No Label
CI/CD 🛠️
WIP 🚧
bug 🐞
code quality 🧹
data collection 🗃️
dependency 📦
do not merge 🚫
documentation 📝
duplicate 🔄
enhancement ✨
good first issue 🌱
help wanted 👋
inference 🧠
invalid 🛑
machine learning 🚀
priority
high🔥
priority
low 🍃
priority
medium 🌟
quantum ⚛️
question ❓
radio 📡
sprintable 🏃♂️
test 🧪
wont fix ❌
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: qoherent/ria-toolkit-oss#35
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "signal-view-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This branch adds two new CLI commands (setup_repo and upload) and improves the CLI startup experience.
ria setup_repo: Create a RIA Hub Project repository
Creates a properly-configured RIA Hub Project repo both remotely and locally in one command.
(badge in the UI, DB flag set) and seeds README.md and .gitattributes with LFS tracking rules in the initial commit
RIA Hub with git
Note: requires a corresponding change in ria-hub to expose is_ria in the CreateRepoOption API struct
(modules/structs/repo.go) and wire it through the API handler (routers/api/v1/repo/repo.go). Without that deployed,
repo creation falls back to local file setup and the RIA Project DB flag is not set.
ria upload: Stream large files to a RIA Hub Project via Git LFS
Uploads arbitrarily large files to a repo's LFS object store without buffering anything into memory.
MB chunks with a progress bar, then commits the LFS pointer via the Gitea contents API
CLI improvements (cli.py)
pip-installed matplotlib (common on Ubuntu)
instructions
pauses before showing help so the warning is not immediately scrolled past
Minor: agent/cli.py
with a comment to switch for production), removing the required=True friction
Code quality
reduced by extracting helpers (_resolve_path_and_name, _resolve_owner, _git_init, _configure_remote in setup_repo;
_upload_single_file, _stream_upload_progress in upload)
Bugs (should fix before merge)
Wrong URL in _configure_remote skip message (setup_repo.py): the printed git remote add URL is {hub}/{repo_name}.git, missing the owner segment. Should be {hub}/{resolved_owner}/{repo_name}.git.
Connection leak in _stream_upload_progress (upload.py): conn.connect() has no try/finally, so if conn.send() or the file read raises, the connection is never closed. The older _stream_upload function gets this right with a try/finally, but that function is never called (dead code, should be removed). Either add the try/finally to _stream_upload_progress or consolidate the two.
click.pause() hangs in non-TTY contexts (cli.py): if ria is invoked in CI or with piped stdin and git-lfs is missing, this blocks indefinitely. Guard with sys.stdin.isatty().
Security gaps (both in upload.py)
No redirect protection: setup_repo.py has _NoRedirectHandler with a good explanation of why following redirects on authenticated requests is dangerous. _get_file_sha and _commit_lfs_pointer in upload.py use plain urlopen and don't get that protection.
No insecure-HTTP warning: setup_repo.py calls _warn_if_insecure before any credential use; upload.py skips this entirely despite sending Basic auth.
Code quality
_get_stored_credentials, _resolve_credentials, and _basic_auth are copy-pasted between the two new files. Worth extracting to a shared _hub_auth.py — this is also where the redirect handler and insecure warning should live, which would fix points 4 and 5 for free.
"https://riahub.ai" is now defined as three separate constants/literals across agent/cli.py, setup_repo.py, and upload.py. A single source of truth in the shared module would fix this too.
The annotation changes (Annotation, transforms, viewer, annotate display, tests) are clean and ready as-is.
Bugs fixed:
manual-add message
raises; the dead _stream_upload function was removed
Security gaps fixed:
plain urlopen
Code quality:
basic_auth, get_stored_credentials, store_credentials, and resolve_credentials — both setup_repo.py and upload.py
import from it; all local duplicates removed