brainiac-basecamp 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c8050e48cf49fc743e8e1cf01db98abcb279fa7b8a2c70b99ee77cf2f331378
|
|
4
|
+
data.tar.gz: 0eb5638888a2369c61b1b0cc3bfed7c4729df1dc1ed2e14e56af69ca36280644
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8aca50da9477027ff6800582dea934506a76897256eb4c91d8f2a9cfd8f27b3c786784a98410f487eb9c77d83924a74ee9ea9e753fe8d21c2f57c885afd7de30
|
|
7
|
+
data.tar.gz: c64f4de4ff526fa7c0a18149309b61a917b04f373ea02bc31855b752b9ce0ad820df9b040b90fe71d4fdcd2d5f7221e2ef5d3f297b6a90747cbe738b632f667f
|
|
@@ -732,6 +732,15 @@ module Brainiac
|
|
|
732
732
|
epic["updated_at"] = Time.now.iso8601
|
|
733
733
|
log_event(epic, "completed", "All tasks complete — epic finished!")
|
|
734
734
|
|
|
735
|
+
# Persist the completed status to disk IMMEDIATELY, before any slow
|
|
736
|
+
# network calls (opening final PRs, posting to Basecamp). Recovery
|
|
737
|
+
# reconciliation reads epics fresh from disk every 90s; if we defer
|
|
738
|
+
# the write until after those calls, an overlapping reconcile pass
|
|
739
|
+
# reads status="active", passes the guard above, and re-runs the
|
|
740
|
+
# whole completion flow — including the notification below. That's
|
|
741
|
+
# how the "Epic completed" Discord message fired repeatedly.
|
|
742
|
+
save_epic(epic)
|
|
743
|
+
|
|
735
744
|
LOG.info "[Basecamp:Orchestrator] Epic '#{epic['title']}' completed!" if defined?(LOG)
|
|
736
745
|
|
|
737
746
|
# If epic_branch mode, open final PRs to main
|
|
@@ -750,12 +759,20 @@ module Brainiac
|
|
|
750
759
|
profile: epic["agent"]&.downcase
|
|
751
760
|
)
|
|
752
761
|
|
|
753
|
-
# Send notification
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
762
|
+
# Send the completion notification at most once, ever. This is a
|
|
763
|
+
# belt-and-suspenders guard on top of the early status persistence
|
|
764
|
+
# above — even if two passes somehow race past the status check, the
|
|
765
|
+
# notification will only go out for the first one to reach here.
|
|
766
|
+
unless epic["completion_notified"]
|
|
767
|
+
epic["completion_notified"] = true
|
|
768
|
+
save_epic(epic)
|
|
769
|
+
|
|
770
|
+
send_notification(
|
|
771
|
+
event: :epic_completed,
|
|
772
|
+
message: "🎉 Epic completed: **#{epic['title']}** (#{epic['tasks'].size} tasks)",
|
|
773
|
+
agent: epic["agent"]
|
|
774
|
+
)
|
|
775
|
+
end
|
|
759
776
|
end
|
|
760
777
|
|
|
761
778
|
# Fetch todos from the epic's todolist.
|