Repository navigation
fix(dg): --json field aliases, one doctor forge-v2 row, pr checkout switches, DPNS names (QW-081, QW-083) - #260
Conversation
The row was printed under network (proof-verified) and again under contracts (the recorded ids). The proof-verified row now carries the deployment file as its source and stands alone under contracts; the recorded row is shown only when the live check did not run (fresh install, no deployment, DAPI unreachable). QW-083. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Like gh pr checkout: pr/<n> is pointed at the PR head and switched to when the working tree has no uncommitted changes; with changes it stays put and prints the git switch hint. Already on pr/<n>, it fast-forwards (git refuses what would lose work) instead of failing on branch -f. JSON gains switched. QW-083. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…issue view QW-081: repo view --json gains description (as repo list has it; null when the repo document cannot be read). Issue JSON gains state (open/closed) beside open; outputs with only documentId (issue view, collab accept/add/list, ci runner add, ci report) also get id. No field is renamed or removed. QW-083: dg collab list and dg issue view print each identity's DPNS name after its id, read concurrently in one batch (PlatformClient::dpns_first_names), human output only; a failed read shows the bare id. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A local pr/<n> holding commits the PR head does not is left alone (E206 naming the rename or delete), as gh pr checkout refuses a non-fast-forward; branch -f used to move it silently. A clean but detached HEAD that no branch, tag or remote ref holds is not switched away from either. The git work moves to place_pr_branch. docs/errors.md E206 covers the new case. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (13)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR changes PR branch checkout behavior, CLI output, JSON response fields, doctor deployment checks, and repository view output. It also adds DPNS name resolution for human-readable collaboration and issue output. ChangesPR checkout
Identity and issue display
JSON document identifiers
Doctor deployment rows
Repository description
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
actor User
participant Checkout as dg pr checkout
participant Git as Local Git
User->>Checkout: Request checkout of a PR
Checkout->>Git: Check branch and worktree state
Checkout->>Git: Create or update the PR branch
Checkout->>Git: Switch branches when safe
Checkout-->>User: Report branch and switch outcome
Merge Risk: ⚪ Minimal · up to The checkout safeguard preserves local ignored files, and existing JSON identifier fields remain compatible. No actionable merge-blocking issue remains; the change is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The checkout changes add safeguards for local work, and identity names remain display-only with bounded lookups and fallback to IDs. No introduced security defect was established in the inspected flows. Concurrent worktree changes and some underlying fetch authorization behavior remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 45 functions across 11 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… DPNS display lookups git replaces an ignored file silently when a switch or fast-forward brings a tracked file to its path, so pr checkout now stays put when the PR head tracks a path that is an ignored file (or directory) here, and fast-forwards with --no-overwrite-ignore. place_pr_branch gains temp-repository tests for every case it must not lose work in: a clean switch, a fast-forward, uncommitted changes, an ignored file, a diverged pr/<n>, and an unheld detached HEAD. dpns_first_names looks up at most 50 ids and stops waiting after 5 s, keeping the names it has. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The last small
dgitems from the bonsia QA wave: part of QW-081 (--jsonshapes) and part of QW-083 (human-output polish). #254 fixed the rest of both that was small. What's left is listed at the end.QW-081:
--jsonfieldsdg repo view --jsonnow hasdescription, the same stringdg repo list --jsongives (""when the repo has none). It isnullwhen the repo document can't be read, asarchivedalready is. The human view prints adescription:line when there is one."state": "open"|"closed"(the wordsdg pruses) next to"open".idnext todocumentId: outputs that had onlydocumentIdnow also carryidwith the same value. These are issue view, collab accept / add / list, ci runner add and ci report.--jsonconsumers keep working.QW-083: human output
dg doctorprints the forge-v2 row once, under contracts. That row is the proof-checked one, and it names its source (forge-contracts/deployments/<net>.json). The recorded-ids row only appears when the live check could not run. In--json, the row moves from thenetworksection tocontracts.dg pr checkoutnow switches topr/<n>, asgh pr checkoutdoes, without losing work:git switchhint:.env. A plaingit switchwould overwrite that file silently.pr/<n>, it fast-forwards with--no-overwrite-ignore.pr/<n>has commits the PR head doesn't (a force-push, or your own commits), it refuses with E206 and namesgit branch -m/git branch -D.ghrefuses this case too. It used to move the branch silently, leaving those commits only in the reflog.switched.dg collab listanddg issue viewshow each identity as<id> (<name>.dash)when it has a name. The names come from one concurrent batch (PlatformClient::dpns_first_names), which looks up at most 50 ids and stops waiting after 5 s. An id whose lookup fails or doesn't finish in time is shown bare.--jsonmakes no DPNS lookups.Still open in these two ids
""vsnullacross every--jsonemitter. This needs an audit, and consumers would see the change.stateis already an object ({open, labels, assignees}), so a string alias would need a rename.pr mergedoesn't warn on a failing check or print a cost.cost auditgroups by repo id rather than name.repo createchecks storage before checking whether the repo exists.dg initstops at E802 before it shows its plan. This is deliberate, as recorded in fix(cli): accurate error text, codes and JSON, and errors.md brought up to date (QW-039, QW-040, QW-042, QW-081, QW-082, QW-083) #254.Tests
the_forge_v2_row_is_printed_oncecheckout_switches_only_from_a_clean_tree(a pure decision function,checkout_step)place_pr_branch_never_loses_work, run against temporary git repositories. It covers a clean switch, a fast-forward, uncommitted changes, an ignored file in the way, a divergedpr/<n>(E206), and an unheld detached HEAD.an_ignored_path_overlaps_a_tracked_file_or_directoryan_issue_state_is_the_word_a_pr_state_usesan_identity_shows_its_dpns_name_when_it_has_onecargo fmt --check,cargo clippy --workspace --all-targets -D warningsandcargo test --workspace.--jsonconsumers:issue list,closeandreopennow carrystateas a string, butissue view'sstateis still the object it always was.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
dg pr checkoutnow switches to the PR branch when safe, while preserving local commits and avoiding overwriting working-tree changes. It reports whether it switched or stayed on the current branch.repo viewnow displays the repository description when available.Improvements