Skip to content

feat(#603): state-appropriate action buttons on dependency graph nodes - #623

Merged
xsovad06 merged 3 commits into
mainfrom
feat/issue-603
Aug 7, 2026
Merged

feat(#603): state-appropriate action buttons on dependency graph nodes#623
xsovad06 merged 3 commits into
mainfrom
feat/issue-603

Conversation

@xsovad06

@xsovad06 xsovad06 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

Automated changes for: feat(supervisor): state-appropriate action buttons on dependency graph nodes

Closes #603

Context

Summary

The dependency graph node drawer currently shows only "Run Researcher" regardless of issue state. Action buttons should adapt to the issue's current state so the user can take the right action directly from the graph without navigating to the priority queue.

Problem

Clicking a Backlog node shows "Run Researcher" — but Backlog issues need Triage first. Clicking a Researched node correctly shows "Run Researcher," but should show "Run Developer." There is no way to triage an iss...

Commits

22ae3e95 feat(core): state-appropriate action buttons on dependency graph nodes
Closes #603

Files changed

.claude/agent-memory/cookbook.md    |  1 +
 sova/supervisor/dependency_graph.py |  2 +-
 tests/test_dependency_graph.py      | 13 +++++++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

@xsovad06 xsovad06 self-assigned this Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2c8cbb8b-c26d-4c0a-983b-32226172d9bd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The dependency graph now provides a Triage action for tasks in the BACKLOG state. Tests verify the action identifier, label, role, and availability alongside other task states.

Changes

Backlog triage action

Layer / File(s) Summary
Backlog action mapping and validation
sova/supervisor/dependency_graph.py, tests/test_dependency_graph.py
Backlog nodes now expose one triage action labeled Triage. Tests cover the backlog node and preserve existing state action checks.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: dsova06

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive The excluded cookbook file was modified, but its contents cannot be reviewed to determine whether the change is related to issue #603. Review .claude/agent-memory/cookbook.md, excluded by !.claude/**, and confirm the modification supports issue #603 or remove it.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: state-appropriate action buttons on dependency graph nodes.
Description check ✅ Passed The description explains the problem, solution context, linked issue, commit, and changed files, but omits the template checklist and type-of-change section.
Linked Issues check ✅ Passed The change adds the required BACKLOG Triage action with the valid triage role and adds focused test coverage without API or data model changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously requested changes Aug 7, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sova/supervisor/dependency_graph.py`:
- Line 56: Update the workflow or architecture documentation associated with the
supervisor state-action model to describe TaskState.BACKLOG items and its
exposed Triage action, keeping the description concise and consistent with the
existing workflow documentation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8a7accaf-87ab-49f8-a8de-fc01cbaafc82

📥 Commits

Reviewing files that changed from the base of the PR and between e4bd600 and 22ae3e9.

⛔ Files ignored due to path filters (1)
  • .claude/agent-memory/cookbook.md is excluded by !.claude/** and included by none
📒 Files selected for processing (2)
  • sova/supervisor/dependency_graph.py
  • tests/test_dependency_graph.py

Comment thread sova/supervisor/dependency_graph.py
@xsovad06

xsovad06 commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

Address Review: Round 1

# Finding Action
1 sova/supervisor/dependency_graph.py:56: document Backlog state action in architecture docs Fixed: added _STATE_ACTIONS documentation to architecture.md supervisor section describing the state-to-action mapping for graph drawer nodes.

@xsovad06
xsovad06 dismissed coderabbitai[bot]’s stale review August 7, 2026 11:54

Findings addressed or acknowledged. See Address Review comment.

@xsovad06

xsovad06 commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@xsovad06 xsovad06 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

PR Summary

This PR by xsovad06 (3 commits, 4 files, +24/-2) adds state-appropriate action buttons to the supervisor dependency graph node drawer. Previously, _STATE_ACTIONS had an empty list for BACKLOG and was missing entries for NEEDS_SPEC and ON_QA entirely. Now BACKLOG exposes "Triage", NEEDS_SPEC exposes "Run Researcher", and ON_QA gets an explicit empty-actions entry. Tests and architecture docs are updated accordingly.

Findings

[LOW] Test Coverage: NEEDS_SPEC and ON_QA not tested in action assertion
Location: tests/test_dependency_graph.py:346
Problem: The comprehensive test test_to_dict_node_has_available_actions was updated to cover BACKLOG but does not include the two other newly added _STATE_ACTIONS entries (NEEDS_SPEC, ON_QA). Commit 2 (fix(supervisor): add missing TaskState entries) has no dedicated test coverage.
Suggestion: Add NEEDS_SPEC and ON_QA to the multi-state test, or add a dedicated test similar to test_backlog_node_has_triage_action:

_task(6, state=TaskState.NEEDS_SPEC),
_task(7, state=TaskState.ON_QA),
# ...
assert any(a["role"] == "researcher" for a in by_id[6])
assert by_id[7] == []

[LOW] Scope: Unrelated cookbook.md change
Location: .claude/agent-memory/cookbook.md:133
Problem: The model-pinning cookbook entry (from issue #619 post-mortem) is bundled into this PR. It is unrelated to #603.
Suggestion: Acceptable since it is agent-memory (gitignored in practice), but for cleaner history, unrelated learnings should go in their own commit on main or a separate PR.

Confirmed Bot Findings

Agree with CodeRabbit on sova/supervisor/dependency_graph.py:56: document the Backlog state action in architecture docs. See their inline comment. Addressed in commit 079ebb9.

Verdict

Approve. The code change is correct, well-scoped, and all TaskState enum values are now covered in _STATE_ACTIONS. The mapping logic is sound (BACKLOG->Triage, NEEDS_SPEC->Researcher, ON_QA->empty). Tests cover the primary new behavior (backlog triage action, epic exclusion). The two LOW findings are minor and do not block merge.

(Posted as comment: GitHub does not allow self-reviews with formal approval/rejection state.)

What's Done Well

  1. Complete enum coverage: all 9 TaskState values now have explicit entries in _STATE_ACTIONS, eliminating the implicit .get() fallback for missing states.
  2. Good test additions: the dedicated test_backlog_node_has_triage_action test verifies the exact shape of the action dict (id, label, role), not just presence. The epic exclusion test fills a gap in ready-task filtering coverage.
  3. Doc update in architecture.md describes the _STATE_ACTIONS mapping concisely, addressing the CodeRabbit finding in the same commit that introduced the code change.

@xsovad06

xsovad06 commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

Address Review: Round 2

# Finding Action
1 tests/test_dependency_graph.py:346: NEEDS_SPEC and ON_QA states not covered in action assertion Fixed: added NEEDS_SPEC and ON_QA to test_to_dict_node_has_available_actions, verifying researcher action for NEEDS_SPEC and empty actions for ON_QA. Folded into the fix(supervisor) commit.
2 .claude/agent-memory/cookbook.md: unrelated cookbook change bundled in PR Acknowledged: agent-memory is gitignored in practice and was already tracked; acceptable as part of the feature commit.

@xsovad06

xsovad06 commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@xsovad06
xsovad06 merged commit 108eb11 into main Aug 7, 2026
8 checks passed
@xsovad06
xsovad06 deleted the feat/issue-603 branch August 7, 2026 12:53
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.

feat(supervisor): state-appropriate action buttons on dependency graph nodes

1 participant