Skip to content

Add claude GitHub actions 1777390682610#1929

Closed
zhangyinxina-ui wants to merge 6 commits intodimensionalOS:mainfrom
zhangyinxina-ui:add-claude-github-actions-1777390682610
Closed

Add claude GitHub actions 1777390682610#1929
zhangyinxina-ui wants to merge 6 commits intodimensionalOS:mainfrom
zhangyinxina-ui:add-claude-github-actions-1777390682610

Conversation

@zhangyinxina-ui
Copy link
Copy Markdown

Problem

Closes DIM-XXX

Solution

Breaking Changes

How to Test

Contributor License Agreement

  • I have read and approved the CLA.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f86ab9ccc7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if planar_distance > 1e-3:
duration = planar_distance / safe_speed
move_rpc(
Twist(linear=Vector3(safe_speed if x >= 0 else -safe_speed, 0.0, 0.0), angular=Vector3()),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Always drive forward after yaw-align in navigate_3d

After Step 1 rotates the robot to face the (x, y) target direction, Step 2 still flips linear velocity sign based on the original x value. For any request with x < 0 (for example x=-1, y=0), the robot turns to face the target and then drives backward, which sends it away from the requested offset. This makes navigate_3d systematically incorrect for half of the XY plane and can produce large navigation errors in both sim and hardware.

Useful? React with 👍 / 👎.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR introduces stair-climbing skills (climb_stairs, navigate_3d, climb_stairs_3d) for the Unitree G1 robot and adds two GitHub Actions workflows for Claude-powered code review and @claude mention handling.

  • navigate_3d velocity sign bug (skill_container.py line 145): step 1 yaw-aligns the robot to face atan2(y, x), so step 2 must always drive forward at +safe_speed. Using safe_speed if x >= 0 else -safe_speed drives the robot backward when x < 0, moving it away from the target. The unit tests only cover x > 0, so this is not caught.
  • Both GitHub Actions workflows grant only pull-requests: read: claude-code-review.yml cannot post review comments and claude.yml cannot reply to @claude mentions — both require pull-requests: write.

Confidence Score: 3/5

Not safe to merge as-is: navigate_3d produces incorrect motion for negative-x targets, and both CI workflows silently fail to post any output.

Two independent P1s: a behavioral robot navigation bug that produces the wrong motion direction, and broken GitHub Actions workflows that can never write back. The stair waypoint logic and validation are solid, pulling the score slightly above the P1 ceiling floor.

dimos/robot/unitree/g1/skill_container.py (velocity sign), .github/workflows/claude-code-review.yml and .github/workflows/claude.yml (permissions)

Important Files Changed

Filename Overview
.github/workflows/claude-code-review.yml New workflow to run Claude Code Review on PRs; broken because pull-requests: read prevents the action from posting any review comments
.github/workflows/claude.yml New workflow for @claude mention handling; also missing pull-requests: write and issues: write, so all responses will fail silently
dimos/robot/unitree/g1/skill_container.py Adds navigate_3d and climb_stairs skills; navigate_3d has a velocity-sign bug that drives the robot backward when x < 0 after yaw alignment
dimos/navigation/stair_navigation.py New helper that generates evenly-spaced 3D waypoints for stair traversal; input validation and waypoint math are correct
dimos/agents/skills/navigation.py Adds climb_stairs_3d skill using generate_stair_waypoints; docstring misleadingly says 'Positive total z increase' but negative values are silently accepted
dimos/robot/unitree/g1/test_skill_container.py Tests for navigate_3d and climb_stairs; only tests x > 0 cases so the velocity-sign bug in navigate_3d is not caught
dimos/agents/system_prompt.py Adds climb_stairs_3d instruction to the navigation section of the base system prompt
dimos/robot/unitree/g1/system_prompt.py Documents navigate_3d, climb_stairs, and climb_stairs_3d in the G1-specific system prompt

Sequence Diagram

sequenceDiagram
    participant Agent
    participant climb_stairs_3d
    participant generate_stair_waypoints
    participant NavigationInterface

    Agent->>climb_stairs_3d: climb_stairs_3d(goal_x, goal_y, total_height, steps)
    climb_stairs_3d->>generate_stair_waypoints: generate_stair_waypoints(start, goal, height, steps)
    generate_stair_waypoints-->>climb_stairs_3d: list[PoseStamped] waypoints

    loop for each waypoint
        climb_stairs_3d->>NavigationInterface: set_goal(waypoint)
        loop poll until timeout
            climb_stairs_3d->>NavigationInterface: get_state()
            NavigationInterface-->>climb_stairs_3d: state
            alt state == IDLE
                climb_stairs_3d->>NavigationInterface: is_goal_reached()
                NavigationInterface-->>climb_stairs_3d: reached?
                alt reached
                    climb_stairs_3d-->>climb_stairs_3d: break to next waypoint
                else not reached
                    climb_stairs_3d-->>Agent: failed at waypoint N
                end
            end
        end
        alt timeout
            climb_stairs_3d->>NavigationInterface: cancel_goal
            climb_stairs_3d-->>Agent: timed out at waypoint N
        end
    end
    climb_stairs_3d-->>Agent: Completed stair climbing plan
Loading

Reviews (1): Last reviewed commit: ""Claude Code Review workflow"" | Re-trigger Greptile

Comment on lines +144 to +147
move_rpc(
Twist(linear=Vector3(safe_speed if x >= 0 else -safe_speed, 0.0, 0.0), angular=Vector3()),
duration=duration,
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Wrong velocity direction after yaw alignment

After step 1 rotates the robot to face atan2(y, x), the robot's local forward axis already points toward the target. Step 2 must therefore always use +safe_speed for forward motion. Using safe_speed if x >= 0 else -safe_speed reverses this: when x < 0 (e.g., x=-1, y=0) the robot rotates 180° and then drives backward at -safe_speed, moving away from the target instead of toward it.

Suggested change
move_rpc(
Twist(linear=Vector3(safe_speed if x >= 0 else -safe_speed, 0.0, 0.0), angular=Vector3()),
duration=duration,
)
move_rpc(
Twist(linear=Vector3(safe_speed, 0.0, 0.0), angular=Vector3()),
duration=duration,
)

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 pull-requests: read prevents posting review comments

The claude-code-review action posts inline comments and a review summary on the PR, but the job only grants pull-requests: read. Without pull-requests: write, the GitHub API calls to create review comments will fail with a 403, silently swallowing all review output. claude.yml has the same issue — it responds to @claude mentions but cannot write back.

Suggested change
pull-requests: read
pull-requests: write

Comment on lines +23 to +24
pull-requests: read
issues: read
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 pull-requests: read prevents Claude from writing responses

Same issue as claude-code-review.yml: claude.yml responds to @claude mentions in PR review comments, but without pull-requests: write it cannot post any reply. Also issues: write is needed if Claude should comment on issues.

Suggested change
pull-requests: read
issues: read
pull-requests: write
issues: write

Args:
goal_x: Goal x coordinate in map frame (meters).
goal_y: Goal y coordinate in map frame (meters).
total_height: Positive total z increase (meters) while climbing.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Docstring says "Positive" but negative total_height is silently accepted

The docstring states total_height: Positive total z increase (meters) while climbing, but no guard enforces positivity — generate_stair_waypoints accepts negative values for descent. The docstring should match the actual behavior, or an explicit validation should be added if only ascending is intended here.

Suggested change
total_height: Positive total z increase (meters) while climbing.
total_height: Total vertical displacement in meters. Positive climbs, negative descends.

@paul-nechifor
Copy link
Copy Markdown
Contributor

I have closed this since it is a duplicate of #1928

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants