refactor(#6767): route status notifications through tracker.Client - #6770
Conversation
Site previewPreview: https://2bea5c7f-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 8:35 PM UTC · Completed 8:51 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $8.72 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
Risk Assessment: moderate (2/5) DetailsMedium-sized refactor (2090 lines, 19 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author with good test ratio (0.32); elevated git history churn on core files (run.go, statuscomment.go) but well-scoped refactor aligned with linked issue #6767; composite 2.05 rounds to score=2, preserving prior assessment. Previous runRisk Assessment: moderate (2/5) DetailsMedium-sized refactor (1747 lines, 16 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author with good test ratio (0.38); elevated git history churn on core files (run.go, statuscomment.go) but well-scoped refactor aligned with linked issue #6767; Tier 1 signals unchanged from prior assessment — preserving score=2. Previous run (2)Risk Assessment: moderate (2/5) DetailsMedium-sized refactor (1747 lines, 16 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author with good test ratio (0.38); elevated git history churn on core files (run.go, statuscomment.go) but well-scoped refactor aligned with linked issue #6767; score unchanged from prior assessment as signals remain stable. Previous run (3)Risk Assessment: moderate (2/5) DetailsMedium-sized refactor (1649 lines, 16 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author; elevated git history churn on core files (run.go, statuscomment.go) but well-scoped refactor aligned with linked issue #6767; score unchanged from prior assessment as signals remain stable. Previous run (4)Risk Assessment: moderate (2/5) DetailsMedium-sized refactor (1559 lines, 16 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author; elevated git history churn on core files (run.go, statuscomment.go) but well-scoped refactor aligned with linked issue #6767; score unchanged from prior assessment as signals remain stable. Previous run (5)Risk Assessment: moderate (2/5) DetailsMedium-sized refactor (1138 lines, 15 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author; elevated git history churn on core files (run.go, statuscomment.go) but well-scoped refactor aligned with linked issue #6767; score unchanged from prior assessment as signals remain stable. Previous run (6)Risk Assessment: moderate (2/5) DetailsMedium-sized refactor (1093 lines, 15 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author; elevated git history churn on core files (run.go, statuscomment.go) but well-scoped refactor aligned with linked issue #6767; score unchanged from prior assessment as signals remain stable. Previous run (7)Risk Assessment: moderate (2/5) DetailsMedium-sized refactor (827 lines, 13 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author; elevated git history churn on core files (statuscomment.go, run.go) but well-scoped refactor aligned with linked issue #6767. Previous run (8)Risk Assessment: moderate (2/5) DetailsMedium-sized refactor (827 lines, 13 files) routing status notifications through tracker.Client; zero protected paths, zero security-sensitive files, no CI or dependency changes, bot author; elevated git history churn on core files (statuscomment.go, run.go) but well-scoped refactor aligned with linked issue #6767. |
ReviewFindingsLow
Next steps:
Previous runReviewFindingsMedium
Low
Next steps:
Previous run (2)ReviewFindingsMedium
Low
Next steps:
Previous run (3)ReviewFindingsMedium
Low
Next steps:
Previous run (4)ReviewFindingsMedium
Low
Next steps:
Previous run (5)ReviewFindingsLow
Previous run (6)Looks good to me Previous run (7)ReviewFindingsLow
Previous run (8)ReviewFindingsLow
Next steps:
|
|
🤖 Finished Fix · ✅ Success · Started 8:53 PM UTC · Completed 9:01 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.70 |
🔧 Fix agent — iteration 1 (bot-triggered)Addressed both review findings. Updated stale package doc in tracker.go and restored 5 valuable test comments that explain non-obvious edge-case reasoning. Fixed (2):
Tests: passedNext steps:
|
- Update stale package doc in internal/tracker/tracker.go: replace "Nothing calls tracker.Client yet" with current consumers (statuscomment and reconcilestatus) - Restore five test comments that explain non-obvious edge-case reasoning removed during the API surface refactoring: outcome-neutral synthesized label (#5736), script-controlled text must not forge markers, reaction consistency on comment failure, paragraph break for GitLab CommonMark, and crash-before-post synthesis (#3635) Addresses review feedback on #6770
|
🤖 Finished Review · ✅ Success · Started 9:02 PM UTC · Completed 9:17 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $8.27 |
Superseded by updated review
|
/fs-fix improve code coverage to satisfy codecov |
|
🤖 Finished Fix · ✅ Success · Started 3:32 PM UTC · Completed 3:41 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.57 |
Cover ForgeClient.DeleteComment, AddIssueReaction, DeleteIssueReaction, AddCommentReaction, DeleteCommentReaction; JiraClient.DeleteComment; FakeJiraClient via NewFakeJiraClient; and jira.LiveClient.DeleteComment. Raises tracker package coverage from 67% to 92%, satisfying the 80% codecov/patch threshold. Addresses review feedback on #6770
🔧 Fix agent — iteration 2 (human-triggered)Added 20 test functions across 3 test files to cover all new methods introduced in this PR. Tracker package coverage rose from 67% to 92%, jira package from 89% to 89%, all new functions now at 100%. All tests pass, go vet clean, gofmt clean. Fixed (4):
Tests: passedNext steps:
|
|
🤖 Finished Review · ✅ Success · Started 3:43 PM UTC · Completed 3:57 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.26 |
- setupStatusNotifierJira now prefers GITHUB_RUN_ID over a synthetic timestamp so the status-comment marker matches reconcile-status --run-id, enabling orphan reconciliation to find the comment. - Both normalized-event paths in run.go and reconcilestatus.go now reject Jira events whose entity.key is empty or unparseable, instead of silently falling through. - --number validation is deferred until after Jira key derivation so Jira callers can omit --number (it is derived from entity.key). - Added tests covering the GITHUB_RUN_ID preference/fallback and the marker round-trip across creation and reconciliation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
86850ae to
32f5f53
Compare
|
🤖 Finished Review · ✅ Success · Started 5:15 PM UTC · Completed 5:33 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $12.99 |
|
🤖 Finished Fix · ❌ Failure (running pre-script: exit status 1) · Started 5:36 PM UTC · Completed 5:36 PM UTC Commit: Effort: high |
Signed-off-by: Ralph Bean <rbean@redhat.com>
|
🤖 Review · Commit: |
Signed-off-by: Ralph Bean <rbean@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 8:08 PM UTC · Completed 8:27 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $11.77 |
|
🤖 Finished Fix · ❌ Failure (running pre-script: exit status 1) · Started 8:29 PM UTC · Completed 8:29 PM UTC Commit: Effort: high |
|
🤖 Finished Retro · ✅ Success · Started 10:03 PM UTC · Completed 10:17 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.36 |
Retro: PR #6770 — route status notifications through tracker.ClientMetrics: 24 workflow runs (1 triage, 1 code, 10 review, 8 fix, 1 retro, 3 cancelled). 9 review rounds, 7 fix-review iterations over 4 days. ~$107 estimated agent cost. Agents resolved from What went well
Root cause of high reworkThe code agent's initial implementation was structurally complete but behaviorally incomplete. It refactored interfaces ( Evidence for existing issues
Autonomy signalThe review agent provides clear value for code-level correctness — its medium-severity validation, auth, and secrets findings in rounds 5–8 were all genuine defects that needed fixing before merge. However, it cannot evaluate whether an implementation fulfills the behavioral intent of an issue. Human review remains essential for architectural completeness on non-trivial refactoring PRs. This gap is the domain of existing issues #849 and #2008. |
Summary
Route run-status notifications (comments, reactions, orphan reconciliation) through
tracker.Clientinstead offorge.Client, so the notification destination is determined by event provenance rather than the code-output forge.tracker.ClientwithDeleteComment; addtracker.Reactoras an optional interface for emoji reactionsstatuscomment.NotifierandReconcileOrphanedto usetracker.Clientwith(project, number)addressingsetupStatusNotifierGitHub,setupStatusNotifierGitLab,reconcile-status) to wrapforge.Clientintracker.NewForgeClient()jira.LiveClient.DeleteCommentfor Jira comment deletion supportChanges
internal/tracker/tracker.go— AddDeleteCommenttoClient, addReactorinterfaceinternal/tracker/forge_client.go— ImplementDeleteCommentand allReactormethodsinternal/tracker/jira_client.go— ImplementDeleteCommentinternal/tracker/fake_jira.go— AddDeleteCommentto test fakeinternal/forge/jira/client.go— AddLiveClient.DeleteCommentinternal/statuscomment/statuscomment.go— Replaceforge.Clientwithtracker.Client; reactions via optionalReactortype assertioninternal/cli/run.go— Wrap forge clients intracker.NewForgeClient();ClientFactoryreturnstracker.Clientinternal/cli/reconcilestatus.go— Wrap forge client forReconcileOrphaneddocs/ADRs/0093-tracker-routed-status-notifications.md— New ADRdocs/architecture.md— Cross-reference ADR 0093Testing
statuscommenttests updated and passing (94% coverage)trackertests passingreconcile-statusCLI tests updated and passingTestNotifier_ReactionsSkippedForNonReactorTracker— verifies Jira-backed trackers silently skip reactionsgo vet,gofmt, ADR lints, link checks passCloses #6767
Post-script verification
agent/6767-tracker-status-routing)0195363fd5399191a2df4f0f66b9a18e9c25a903..HEAD)