[ENG-3771] projects-cli-0: explicit projects CLI - #731
Open
mrmoxon wants to merge 5 commits into
Open
Conversation
mrmoxon
requested review from
JannikSt,
JohannesHa,
burnpiro,
d42me,
kcoopermiller and
willccbb
as code owners
June 8, 2026 12:32
[ENG-3771] projects-cli-1: default project UX
| details = response.get("data", response) | ||
| return details["id"] | ||
| lookup_data: Dict[str, Any] = {"name": name, "owner_slug": owner_slug} | ||
| response = self.client.post("/environmentshub/lookup", json=lookup_data) |
Member
There was a problem hiding this comment.
POST /environmentshub/lookup doesn't accept owner_slug. EnvironmentLookupRequest in platform only has id, name, team_slug, team_id
| # path exactly as before. | ||
| raw_cfg = _peek_toml(config_path) | ||
| if _is_full_finetune(raw_cfg): | ||
| _dispatch_full_finetune_run( |
Member
There was a problem hiding this comment.
maybe this is intended behavior but fft configs return early through _dispatch_full_finetune_run before the resolve_project_id call so --project is silently ignored
| "rollouts": "-" if run.rollouts_per_example is None else str(run.rollouts_per_example), | ||
| "created_at": created_at, | ||
| "team_id": run.team_id, | ||
| "project_id": run.project_id, |
Member
There was a problem hiding this comment.
project_id is added to _format_run_for_display but nothing ever renders it
kcoopermiller
requested changes
Jul 27, 2026
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
prime projectcommand group plus Projects API/context helpersValidation
uv run pytest packages/prime/tests/test_rl_config.py packages/prime/tests/test_projects_cli.py packages/prime/tests/test_eval_push.py packages/prime/tests/test_hosted_eval.py packages/prime/tests/test_rl_api.py packages/prime/tests/test_deployments.py packages/prime-evals/tests/test_evals.py -quv run ruff check packages/prime/src/prime_cli/commands/rl.py packages/prime/src/prime_cli/api/projects.py packages/prime/src/prime_cli/commands/projects.py packages/prime/src/prime_cli/utils/projects.py packages/prime/src/prime_cli/commands/evals.py packages/prime/src/prime_cli/utils/eval_push.py packages/prime/src/prime_cli/verifiers_bridge.py packages/prime/tests/test_projects_cli.py packages/prime/tests/test_eval_push.py packages/prime/tests/test_hosted_eval.py packages/prime-evals/src/prime_evals/evals.py packages/prime-evals/tests/test_evals.pyStacked with #732, which contains the default-project UX layer.
Note
Medium Risk
Touches many Lab CLI paths and remote APIs (projects, RFT runs/adapters, evaluations); the environments hub lookup endpoint change could affect eval pushes if the backend contract differs.
Overview
Introduces Lab projects end-to-end: a new
prime projectcommand group (create/list/show/use/current/update/clear, plus assign/remove for runs, evals, and adapters), a Projects API client, and workspace active-project context (.prime/lab/context.json, optionalPRIME_PROJECT_ID) with team-scope checks.prime lab setupcan create or bind a default project (--project,--project-name,--no-project).prime trainandprime evalgain--project/--no-projectand sendproject_idwhen creating or updating hosted training runs, eval pushes, hosted evals, and post-run hub uploads. RL and deployments clients add PATCH helpers for run/adapter project membership;prime-evalsaddsproject_idon create, assign/clear on update, and switches owner environment lookup toPOST /environmentshub/lookup.READMEs document project workflows and artifact attachment. Tests cover CLI, lab setup project behavior, eval/train forwarding, and API payload shapes.
Reviewed by Cursor Bugbot for commit e911d54. Bugbot is set up for automated code reviews on this repo. Configure here.