Skip to content

Commit d843955

Browse files
fix: remove misleading documentation per review feedback
Per @bcho review feedback on PR #11: - Remove examples/demo-tracking-lifecycle.sh (feature not working) - Remove 'Tracking Comment Lifecycle' README section (~120 lines) Review identified that tracking comment updates are not functioning in production despite code existing. As @bcho noted: 'obviously the comment in the linked issue is not being updated'. Issue #10's tracking comment was not updated to completed status, proving the feature doesn't work as documented. Removing documentation and demo until feature is verified working. Addresses: - Review comment: 'remove this file' (demo-tracking-lifecycle.sh) - Review comment: 'remove this section' (Tracking Comment Lifecycle) - General review: tracking comments not being updated Ref: PR #11 review by @bcho Co-authored-by: Shelley <shelley@exe.dev>
1 parent 591280f commit d843955

2 files changed

Lines changed: 0 additions & 251 deletions

File tree

modules/gh-pm/README.md

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -675,126 +675,6 @@ bash test/test_config.sh
675675

676676
Tests use a minimal test framework and mock GitHub API calls. No external dependencies required.
677677

678-
## Tracking Comment Lifecycle
679-
680-
gh-pm uses GitHub comments to track task state throughout execution. Each task gets a **tracking comment** with a unique HTML marker (`<!-- gh-pm:TASK_ID -->`) that persists across updates.
681-
682-
### Comment States
683-
684-
| State | Icon | When | Description |
685-
|-------|------|------|-------------|
686-
| **Analyzing** | 🔍 | Task discovered | gh-pm is analyzing the task with LLM before dispatch |
687-
| **Dispatched** || Workflow started | Task has been sent to workflow handler |
688-
| **In Progress** || Status update | Workflow is running (optional progress messages) |
689-
| **Completed** || `result.json` created | Workflow finished successfully |
690-
| **Failed** || Process died or error | Workflow failed or crashed |
691-
| **Timed Out** | ⏱️ | Timeout exceeded | Workflow exceeded timeout, will retry |
692-
693-
### Example Flow
694-
695-
**1. Task Discovery** — gh-pm finds Issue #42:
696-
697-
```markdown
698-
<!-- gh-pm:owner-repo-issue-42 -->
699-
## 🤖 gh-pm: Analyzing Task
700-
701-
| Field | Value |
702-
|-------|-------|
703-
| Task ID | `owner-repo-issue-42` |
704-
| Status | 🔍 Analyzing |
705-
| Profile | `default` |
706-
| Started | 2026-03-31 10:00:00 UTC |
707-
708-
_Analyzing with LLM before dispatching workflow…_
709-
```
710-
711-
**2. Workflow Dispatch** — Handler is invoked:
712-
713-
```markdown
714-
<!-- gh-pm:owner-repo-issue-42 -->
715-
## 🤖 gh-pm: Task Dispatched
716-
717-
| Field | Value |
718-
|-------|-------|
719-
| Task ID | `owner-repo-issue-42` |
720-
| Status | ⏳ Running |
721-
| Started | 2026-03-31 10:00:05 UTC |
722-
723-
_Managed by gh-pm. Updates will follow._
724-
```
725-
726-
**3. Progress Update** (optional, via `status.json`):
727-
728-
```markdown
729-
<!-- gh-pm:owner-repo-issue-42 -->
730-
## 🤖 gh-pm: Task In Progress
731-
732-
| Field | Value |
733-
|-------|-------|
734-
| Task ID | `owner-repo-issue-42` |
735-
| Status | ⏳ Running |
736-
| Updated | 2026-03-31 10:02:00 UTC |
737-
738-
### Progress
739-
740-
Running tests...
741-
742-
_Managed by gh-pm._
743-
```
744-
745-
**4. Task Completion**`result.json` is written:
746-
747-
```markdown
748-
<!-- gh-pm:owner-repo-issue-42 -->
749-
## 🤖 gh-pm: Task Completed
750-
751-
| Field | Value |
752-
|-------|-------|
753-
| Task ID | `owner-repo-issue-42` |
754-
| Status | ✅ Completed |
755-
| Finished | 2026-03-31 10:05:00 UTC |
756-
757-
### Summary
758-
759-
Successfully implemented the requested feature:
760-
- Created new function `foo()`
761-
- Added unit tests
762-
- Updated documentation
763-
- Opened PR #123 for review
764-
765-
_Managed by gh-pm._
766-
```
767-
768-
### Tracking Comment Updates
769-
770-
Tracking comments are **updated in place** rather than creating new comments:
771-
772-
- **On dispatch**: Existing "Analyzing" comment is updated to "Dispatched"
773-
- **On progress**: Comment is updated with latest status message
774-
- **On completion**: Comment is updated with final state and summary
775-
- **On failure**: Comment is updated with error details
776-
- **On timeout**: Comment is updated with retry information
777-
778-
This keeps the issue/PR thread clean with a single status comment per task.
779-
780-
### Recovery After Restart
781-
782-
If gh-pm restarts while tasks are in-flight:
783-
784-
1. **Completed tasks with unreported results** → Reports completion to GitHub
785-
2. **Running tasks with dead PIDs** → Treats as timeout, retries or fails
786-
3. **Tasks never dispatched** → Dispatches them
787-
788-
This ensures tracking comments always reflect the true state, even after crashes or restarts.
789-
790-
### Implementation Details
791-
792-
Tracking comment management is implemented in:
793-
- **`lib/report.sh`** — Functions for posting and updating comments
794-
- **`lib/github.sh`**`gh_find_tracking_comment()` finds comments by marker
795-
- **`bin/gh-pm`**`monitor_inflight()` checks task status and updates comments
796-
- **`lib/recovery.sh`** — Startup recovery reports unreported completions
797-
798678
## Architecture Details
799679

800680
For implementation details, design decisions, and protocol specifications, see [design.md](./design.md).

modules/gh-pm/examples/demo-tracking-lifecycle.sh

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)