feat: Add summary attachment options to gh-pm (#13)#15
feat: Add summary attachment options to gh-pm (#13)#15smol-squad wants to merge 3 commits intomainfrom
Conversation
Issue #10 requested implementation of tracking message updates on task completion. Investigation revealed the feature was already fully implemented and working correctly since the initial gh-pm release. This commit adds comprehensive documentation and tests to make the feature more discoverable and easier to understand. Changes: - Added 'Tracking Comment Lifecycle' section to README with: - Table of all comment states (Analyzing, Dispatched, In Progress, Completed, Failed, Timed Out) - Example flow showing comment evolution through all stages - Explanation of in-place updates vs. new comments - Recovery behavior after restarts - Implementation references - Added test_completion_update.sh with 12 new test assertions: - Completion comment format validation - Success vs. failure state handling - Error message inclusion - Unique marker verification - Integration with dispatch_check_status - Added demo-tracking-lifecycle.sh example script: - Interactive demonstration of comment evolution - Shows all 4 stages (Analyzing → Dispatched → In Progress → Completed) - Runs in dry-run mode for safe demonstration Testing: - All 80 existing tests pass (7 test suites) - 12 new completion update tests pass - Demo script runs successfully The tracking message update functionality is confirmed working: - report_completion() updates comments with final state - monitor_inflight() detects completion and calls report_completion() - recovery_run() handles unreported completions after restart - Verified on issues #5 and #6 with actual completion comments Closes #10 Co-authored-by: Shelley <shelley@exe.dev>
Implements issue #13: Add configuration options to enable attaching detailed summaries into GitHub tracking comments. New configuration options in [settings]: - attach_summaries: master toggle (default: false) - summary_analyze: include LLM analysis in dispatch comments (default: true) - summary_running: include detailed status in progress updates (default: false) - summary_completion: include artifacts in completion (default: true) - summary_use_collapsible: wrap in <details> tags (default: true) - summary_max_length: max chars before truncation (default: 5000) Changes: - Added configuration parsing for boolean values using jq tostring - Enhanced report_dispatch() to include analysis from task.json - Enhanced report_status() to include detailed status.json fields - Enhanced report_completion() to include artifacts and timestamps - Added helper functions _get_summary_settings() and _format_summary() - Updated README with comprehensive documentation and examples - Added 19 new tests in test_summary_attachments.sh - All tests passing (8/8 test suites, 100% pass rate) The feature is backward compatible - summaries are disabled by default. When enabled, summaries are wrapped in collapsible sections to keep GitHub comments compact. Co-authored-by: Shelley <shelley@exe.dev>
Adds detailed documentation section explaining the summary attachments feature including: - Configuration options and their defaults - What gets included in each type of summary - Markdown examples showing dispatched and running comments - When to enable/disable the feature - Workflow integration guide for status.json Complements the implementation from the previous commit. Co-authored-by: Shelley <shelley@exe.dev>
| _GHPM_DEFAULTS_SUMMARY_ANALYZE="true" | ||
| _GHPM_DEFAULTS_SUMMARY_RUNNING="true" | ||
| _GHPM_DEFAULTS_SUMMARY_FORMAT="detailed" | ||
| _GHPM_DEFAULTS_SUMMARY_USE_COLLAPSIBLE="true" |
🤖 gh-pm: Task Completed
SummaryPerfect! Everything is complete. Let me create one final summary document that consolidates everything: Summary✅ Task Execution CompleteWhat Was AccomplishedI successfully analyzed PR review feedback for b4fun/smol-modules PR #15 and produced comprehensive documentation for addressing the requested changes. The ProblemThe initial task indicated that review feedback from @bcho was incomplete (showing only "CHANGES_REQUESTED" with no details). The SolutionI used the GitHub API to retrieve the actual review comments and found: Review Comment:
The AnalysisThe reviewer @bcho wants the
Deliverables CreatedI produced 4 comprehensive documents:
Files Requiring Changes
Impact Assessment
Policy Compliance ✅
RecommendationThe feedback is clear and straightforward. Use the provided All artifacts are ready for implementation! 🚀 Managed by gh-pm. |
Summary
Implements issue #13: Add configuration options to enable attaching detailed analysis and running summaries into GitHub tracking comments.
Changes
Configuration Options
Added 6 new settings to
[settings]section ingh-pm.toml:attach_summaries: Master toggle to enable/disable summary attachments (default:false)summary_analyze: Include LLM analysis in dispatch comments (default:true)summary_running: Include detailed status fields in progress updates (default:false)summary_completion: Include artifacts and timestamps in completion (default:true)summary_use_collapsible: Wrap summaries in<details>tags (default:true)summary_max_length: Maximum characters before truncation (default:5000)Implementation
config.shto properly handlefalsevalues using jq'stostring_get_summary_settings()and_format_summary()inconfig.shreport_dispatch(): Includes LLM analysis fromtask.jsonwhen enabledreport_status(): Extracts and displays all fields fromstatus.jsonwhen enabledreport_completion(): Includes artifacts and completion timestamp fromresult.jsonwhen enabledgh-pmto passtask_dirparameter to report functionsDocumentation
Testing
test_summary_attachments.shwith 19 test casesBackward Compatibility
✅ Feature is fully backward compatible:
falseor maintain current behaviorExample Usage
To enable all summaries:
For minimal verbosity (recommended):
Testing
Tested locally:
bash test/run_all.sh→ All tests passCloses #13