Skip to content

TaskGroup type + GitHub sub-issue detection + group state - #83

Open
hsubra89 wants to merge 8 commits into
mainfrom
rlph-77-taskgroup-type-github-sub-issue-detection-group-st
Open

TaskGroup type + GitHub sub-issue detection + group state#83
hsubra89 wants to merge 8 commits into
mainfrom
rlph-77-taskgroup-type-github-sub-issue-detection-group-st

Conversation

@hsubra89

Copy link
Copy Markdown
Owner

Resolves #77

Automated implementation by rlph.

hsubra89 and others added 2 commits February 26, 2026 06:41
- TaskGroup enum (Standalone/Group) with next_eligible_sub_issue,
  is_complete, all_sub_issue_ids, parent methods
- GitHub GraphQL query fetching sub-issues with GraphQL-Features header
- Grouping logic: labeled sub-issues form Group, unlabeled ignored,
  children deduplicated from top-level standalone list
- Intra-group topological sort via Kahn's algorithm in deps.rs
- TaskSource trait extended with fetch_eligible_task_groups()
- CurrentGroupState in StateData with set/mark/complete/get methods
- Unit tests for GraphQL parsing, group state roundtrip, topo sort

Closes #77

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hsubra89

hsubra89 commented Feb 26, 2026

Copy link
Copy Markdown
Owner Author

Review Summary

3 warnings found that need code changes before merge. 10 informational items noted for optional improvement.

Warnings (must fix)

  • .gitignore L29 — tracked config with dev branch: .rlph/config.toml was removed from .gitignore and is now committed with base_branch set to a development branch name. This looks unintentional — re-add it to .gitignore and remove the tracked file.
  • src/sources/github.rs L186 — inconsistent label case-sensitivity: Sub-issue label matching uses exact equality (l.name == self.label) while is_gql_eligible (L117) uses eq_ignore_ascii_case for status labels. Apply eq_ignore_ascii_case consistently for label matching on lines 186 and 210 to avoid silent filtering mismatches.
  • src/sources/github.rs L179 — child_ids from ineligible parents suppress standalone tasks: child_ids are collected from ALL top-level issues (including ones with in-progress/in-review/done labels). If a parent has an exclusion label, its sub-issues are added to child_ids but the parent is skipped at L201. Sub-issues that also appear as top-level issues are then suppressed at L198, making them unselectable as standalone tasks. Only collect child_ids from parents that pass the eligibility check.

Info (optional improvements)

  • src/deps.rs L18: Regex recompiled on every parse_dependencies call — consider static LazyLock<Regex>.
  • src/deps.rs L77: Mixed ref/deref destructuring style in .filter(|&(_, deg)| *deg == 0).
  • src/sources/github.rs L46: (*header).into()header.to_string().
  • src/sources/github.rs L125: parse_gql_issue and parse_gql_sub have near-identical bodies — could share a helper.
  • src/sources/github.rs L145: _impl suffix is uncommon; fetch_task_groups_via_graphql conveys intent better.
  • src/sources/github.rs L209: Chained .filter().filter() could be a single .filter().
  • src/sources/github.rs L219: .map(|si| Self::parse_gql_sub(si)).map(Self::parse_gql_sub).
  • src/sources/mod.rs L59: all_sub_issue_ids on Standalone returns the task's own ID — add a doc comment clarifying this choice.
  • src/state.rs L25: CurrentGroupState fields have redundant group_ prefix (e.g., group.group_idgroup.id).

hsubra89 and others added 2 commits February 26, 2026 06:46
- Add `state` field to GraphQL sub-issue query and GqlSubIssue struct
- Filter out non-OPEN sub-issues before including them in task groups
- Rename GqlLabel2 to GqlLabel for consistency
- Add tests for closed sub-issue filtering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the .filter(|d| group_ids.contains(d)) that was discarding
external dependencies, so ALL deps (intra-group and external) are
checked against done_ids. Update the unit test to verify external
deps properly block sub-issues until resolved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hsubra89

Copy link
Copy Markdown
Owner Author

The warning about external dependency blocking is outdated — commit 8ba7586 removed the group_ids filter from next_eligible_sub_issue. The current code at src/sources/mod.rs:109-110 checks all deps against done_ids, and the test test_group_next_eligible_external_dep_blocks (line 337) verifies external deps block correctly.

@hsubra89

Copy link
Copy Markdown
Owner Author

The external dependency blocking warning is now resolved — commit 8ba7586 removed the group_ids.contains(d) filter so all deps (including external) are checked against done_ids. The test test_group_next_eligible_external_dep_blocks confirms the fix.

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.

TaskGroup type + GitHub sub-issue detection + group state

1 participant