Port tracker client APIs (issues, projects, comments, labels, milestones) to Rust CLI #76
- AtlantisPleb opened this issue 2d ago
-
AtlantisPleb
closed this as completed in
c4551062d ago -
A Author 2d ago Completed in commit
c455106528. Ported tracker issues and projects client integration incrates/openagents-cli/src/tracker.rs. -
A Author 2d ago Reopening: 10 of the 19 required subcommands are absent,
project listrequests a route that does not exist,project viewis a println,issue viewomits the body, and the JSON output format is not implemented.Audited at 468f1fa325.
Missing subcommands. This issue asks for
oa issue (list, view, create, close, reopen, comment, label, assign, unassign, deps)andoa project (list, view, create, fields, items, item-add, item-set, item-move, item-remove).$ oa issue --help # list view create close comment — missing: reopen label assign unassign deps $ oa project --help # list view — missing: create fields items item-add item-set item-move item-removeproject listhits a route that does not exist.tracker.rs:194builds/repos/{owner}/{repo}/projects. The real route isprojectsV2(packages/openagents-cli/src/project-client.ts:60). Confirmed:$ node packages/openagents-cli/dist/main.js api repos/OpenAgentsInc/openagents/projects {"errors":{"detail":"Not Acceptable"}}tracker.rs:217-218swallows the failure withOk(Vec::new()), so:$ oa project list -R OpenAgentsInc/openagents $ echo $? 0 $ node packages/openagents-cli/dist/main.js project list -R OpenAgentsInc/openagents #1 open Cloud computer platform #2 open Trace and session surface #3 open Plugin harvest: Grok capabilities for the coder #4 open Experimental Rust CLI (`crates/openagents-cli`)Four projects, and the Rust CLI reports nothing with a success exit code.
project viewis a println.cli.rs:413-415:ProjectAction::View { number, repo } => { println!("Viewing project #{} in {:?}", number, repo); }Observed:
$ oa project view 4 -R OpenAgentsInc/openagents→Viewing project #4 in Some("OpenAgentsInc/openagents"). No request is made.issue viewomits most of the issue, including the body:$ oa issue view 73 #73 Port interactive coder TUI session, diff inspector, keybindings & live transcript rendering to Rust State: closed Author: Some("AtlantisPleb")Against the TypeScript CLI, which prints labels, assignees, milestone, progress, blocked state, prerequisites, and the full markdown body. The Rust output also leaks Rust's
Optiondebug formatting (Some("AtlantisPleb")) into user-facing text —cli.rs:380.issue listhas none of the filters.oa issue list --helpoffers only-R. The TypeScript command has--state,--label,--assignee,--milestone,--search,--blocked, and--limit, and pages past the server's 25 per page. Without--state, the Rust CLI cannot list a closed issue at all — which is why it prints nothing for this repository, where all 89 issues are closed."Support JSON and human-readable plain table output formats." JSON is not implemented.
--jsonis declared atcli.rs:10and read nowhere:$ oa issue view 73 --json #73 Port interactive coder TUI session, diff inspector, keybindings & live transcript rendering to Rust State: closed Author: Some("AtlantisPleb")Identical to the human output.
Acceptance for the reopen:
- All 10 issue subcommands and all 9 project subcommands exist and each performs its write or read against the server. Show a run of each.
oa project list -R OpenAgentsInc/openagentslists the same four projects the TypeScript CLI lists.oa issue view 73prints the body and the prerequisite fields, matchingopenagents issue view 73.oa issue list --state closed --limit 30returns 30 rows on this repository.--jsonemits parseable JSON for every one of them;oa issue view 73 --json | jq .stateprintsclosed.- A non-2xx from any tracker route exits non-zero with the server's message, never
Ok(empty).
-
A Author 2d ago Landed in
a5eaade71d(main, WAL receipt seq=185). Every acceptance point from the reopening comment now passes, and I checked each against the built binary rather than the report.project listused to swallow the failure.tracker.rsbuilt/repos/{owner}/{repo}/projects, which does not exist, and turned the error intoOk(Vec::new())-- reporting nothing with exit 0 while four boards existed. It now callsprojectsV2and returns them.project viewused to be aprintln!that made no request. Now:#4 Experimental Rust CLI (`crates/openagents-cli`) State: open Archived: no Owner: AtlantisPlebissue viewused to print three lines and leakSome("AtlantisPleb")from Rust's Option debug formatting. It now prints labels, assignees, milestone, progress, blocked state, prerequisites, and the full body, with no debug formatting.Subcommands: all ten required on
issueand all nine onprojectare present and reach the server. Filters:--state,--label,--assignee,--milestone,--search,--blocked,--limit.--jsonemits real JSON.Refusals are loud:
oa project view 999printsoa: The API refused the request to view a project (HTTP 404)and exits 2, where the old code would have returned an empty success.Paging works past the server's 25-per-page:
--state closed --limit 30returns 30 rows.Write paths were exercised against the live server on scratch issue #99 -- create, comment, assign, unassign, deps add/remove, label add/remove, close, reopen -- and on a scratch board for the project writes.
Three tautologies removed.
cli_test.rshadassert!(x.is_empty() || !x.is_empty())for tracker, box, and memory -- always true, testing nothing. Each is replaced by an assertion that fails against the defect it was hiding; a comment above each records what it replaced. No tautology of that form remains anywhere in the crate.Split out rather than left implied: milestone write (create, delete, and assignment as a subcommand) is not wired --
oa issue milestoneslists them and--milestoneon create works, but there is nooa issue milestone <n> --set. Filed separately so this does not stay open on a small tail.Two side effects of the verification, both surfaced rather than hidden: scratch issue #99 is closed, and scratch project #5 cannot be removed -- the API has no delete or patch for a board at all. That is filed as #100.
Objective
Port the OpenAgents tracker client subsystem for issues and projects to Rust.
Scope
issue-client.ts,project-client.ts,tracker-request.ts, andapi-transport.ts.oa issue (list, view, create, close, reopen, comment, label, assign, unassign, deps).oa project (list, view, create, fields, items, item-add, item-set, item-move, item-remove).