Skip to content

fix: exclude archived epics and tasks from status counts#1021

Closed
Kir-STR wants to merge 2 commits intoautomazeio:mainfrom
Kir-STR:fix/status-exclude-archived
Closed

fix: exclude archived epics and tasks from status counts#1021
Kir-STR wants to merge 2 commits intoautomazeio:mainfrom
Kir-STR:fix/status-exclude-archived

Conversation

@Kir-STR
Copy link
Copy Markdown

@Kir-STR Kir-STR commented Mar 16, 2026

Summary

  • status.sh counted the archived/ directory as an active epic, inflating the epic total
  • All three find commands for tasks included archived/ subdirectories, inflating open/closed/total task counts
  • Added grep -v '/archived/$' filter to epic count and -path "*/archived/*" -prune to all task find commands

Before/After

Before (0 active epics, 17 archived with 70 tasks):

📚 Epics:
  Total: 1          ← wrong

📝 Tasks:
  Open: 46           ← wrong
  Closed: 21         ← wrong
  Total: 70          ← wrong

After:

📚 Epics:
  Total: 0          ← correct

📝 Tasks:
  Open: 0            ← correct
  Closed: 0          ← correct
  Total: 0           ← correct

Test plan

  • Run /pm:status with archived epics present — counts should exclude them
  • Run /pm:status with no archived directory — behavior unchanged
  • Run /pm:status with mix of active and archived epics — only active counted

🤖 Generated with Claude Code

ranaroussi and others added 2 commits September 24, 2025 22:32
* fix: resolve bash command truncation and syntax errors

- Convert long one-liner bash commands to multiline format to prevent truncation
- Fix awk syntax errors in epic-sync.md (replace literal \n with proper newlines)
- Add missing directory separators in file path patterns
- Replace chained && operators with proper if-then blocks
- Break down complex pipe chains into step-by-step operations

Key changes:
* ccpm/scripts/pm/*.sh: Convert complex dependency parsing from one-liners to readable multiline blocks
* ccpm/ccpm.config: Break down repository URL processing into clear steps
* ccpm/commands/pm/epic-sync.md: Fix awk print statements for proper newline handling

Fixes command truncation errors like:
- Error: (eval):1: parse error near ')'
- awk: syntax error at source line 1
- command not found: !

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* fix: additional bash syntax fixes in command documentation

- epic-merge.md: Convert complex nested commands to multiline format
  - Fix feature list generation with proper error handling
  - Break down epic issue number extraction
  - Add proper file existence checks
- epic-refresh.md: Fix task issue extraction with error handling
- epic-sync.md: Re-fix awk syntax for proper newline handling
- test-runner.md: Remove MUXI-specific reference

Prevents additional command truncation in:
- Complex subshell operations with cd and loops
- Chained grep operations for GitHub issue extraction
- Nested command substitution patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* fix: address CodeRabbit feedback on dependency parsing and SSH URL handling

- ccpm.config: Add support for ssh://git@github.com/ and ssh://github.com/ URL schemes
  - Ensures all GitHub URL variants are properly normalized
- All PM scripts: Fix dependency parsing to handle whitespace-only cases
  - Trim leading/trailing whitespace after bracket removal
  - Properly handle empty dependency lists like "depends_on: [ ]"
  - Normalize whitespace-only strings to empty strings
  - Prevents false positive dependency detection

Fixes issues where:
- SSH URLs starting with ssh://git@github.com/ would fail parsing
- Empty dependency arrays with whitespace were treated as non-empty
- Tasks with "depends_on: [ ]" were incorrectly blocked

🤖 Generated with [Claude Code](https://claude.ai/code)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
status.sh counted the archived/ directory as an active epic and included
archived tasks in open/closed/total counts, inflating all metrics.

- Filter out archived/ from epic directory listing
- Add -path "*/archived/*" -prune to all three find commands for tasks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ranaroussi added a commit that referenced this pull request Mar 18, 2026
- status.sh: exclude archived/ epics and tasks from counts
- blocked.sh, next.sh, standup.sh: fix path separator and dep parsing
- validate.sh: fix dep parsing + use if/fi instead of && chain
- epic-list.sh: fix path separator for task counting
@ranaroussi
Copy link
Copy Markdown
Member

The bug fixes from this PR (archived epic exclusion, dependency parsing robustness, path separator fixes) have been applied to the skill's bash scripts in skill/ccpm/references/scripts/ as part of the v2 relaunch. Closing as resolved.

@ranaroussi ranaroussi closed this Mar 18, 2026
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