Skip to content

feat(#10092): minimize superseded results on issues post-comment - #10098

Merged
waynesun09 merged 2 commits into
mainfrom
agent/10092-minimize-issues-post-comment
Dec 4, 2026
Merged

waynesun09 merged 2 commits into
mainfrom
agent/10092-minimize-issues-post-comment

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

fullsend issues post-comment --tracker github now minimizes the poster's earlier comments with the same marker as outdated, for the superseding result markers (review, review-skip, triage, prioritize, risk-assessment). This matches what the deprecated fullsend post-comment already does (#9957), so earlier results don't stay expanded again once the agents' post scripts switch commands.

Related Issue

#10092 (follow-up to #9957 / #10089)

Changes

  • internal/tracker: adds the optional SupersededMinimizer capability interface, in the style of StatusCommentClient. tracker.Client is not widened. ForgeClient implements it by converting the created tracker.Comment (string ID, author) into a forge.IssueComment. Jira does not implement it. GitLab's forge client returns ErrNotSupported from MinimizeComment, which is skipped quietly.
  • New internal/supersede package: holds the minimizing rules, moved unchanged from sticky.MinimizeSuperseded, which now just calls it.
    • Departure from the issue's design: the issue asked ForgeClient to call sticky.MinimizeSuperseded directly. That can't compile: tracker → sticky → statuscomment → tracker is an import cycle.
    • A leaf package that depends only on forge and ui lets both callers share one implementation, so the best-effort and same-author rules can't drift apart.
    • The direct minimizing tests moved from sticky into supersede along with the code. sticky keeps its PostComment tests and one test of the wrapper.
  • internal/cli:
    • supersedingResultMarkers moves from the deprecated postcomment.go into superseding_markers.go, which both commands use.
    • runIssuesPostComment sets sticky.Config.MinimizeSuperseded from that map.
    • postTrackerStickyComment calls the capability only after CreateComment succeeds, and only when the flag is set and the tracker implements the interface. Dry run, and --only-if-exists with nothing to post, minimize nothing.
  • Help text and docs/guides/user/issues-commands.md: name the markers whose earlier results get minimized, and say that only GitHub can minimize comments. docs/agents/triage.md and docs/agents/prioritize.md don't name the command and already say earlier results are minimized on GitHub, so they stay accurate after the switch and are unchanged.

Testing

  • Tests added/updated for new or modified logic:
    • internal/cli/issues_minimize_test.go:
      • Posting twice through runIssuesPostComment with --tracker github minimizes the first comment, for every superseding marker.
      • A marker outside the set minimizes nothing.
      • Another author's comment is never minimized.
      • A forge that can't minimize still posts.
      • Dry run, and --only-if-exists with nothing to post, minimize nothing.
      • The Jira path is unchanged: it doesn't implement the interface, and both comments stay.
      • The help text names every marker in the map.
    • internal/tracker/forge_client_minimize_test.go: the ForgeClient conversion. Cases: nil newest, non-numeric ID, invalid project.
    • internal/supersede/supersede_test.go: the minimizing rules, all branches covered.
  • go test passes for internal/cli, statuscomment, sticky, supersede and tracker. go build ./... and go vet ./... are clean. The new and changed functions are at 93–100% coverage.
  • make lint: pre-commit could not fetch its hook repos in the sandbox (HTTP 403), so the applicable hooks were run directly:
    • Passed: whitespace/EOF/CRLF/merge-conflict/private-key checks, gofmt, go vet, lychee, docs-link scope, broken symlinks, and gitleaks (via scan-secrets).
    • Not run: semgrep, because its pinned ruleset could not be downloaded.
  • Not run to completion: a full ./internal/... -race run hit the sandbox's 10-minute limit.

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO): not applicable, autonomous agent commit
  • Changes are limited to the issue's scope

🤖 Generated with Claude Code


Closes #10092

Post-script verification

  • Branch is not main/master (agent/10092-minimize-issues-post-comment)
  • Secret scan passed (gitleaks — 2edaf570c7171fc7a967790485fad3ae59fca3c4..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Final PR description secret scan passed (gitleaks — no-git)

`fullsend issues post-comment --tracker github` now folds the poster's
earlier comments with the same marker as outdated, for the markers in
supersedingResultMarkers, matching the deprecated `post-comment` (#9957).
Without this, earlier triage, prioritize and risk-assessment results
would stay expanded again once the agents' post scripts switch commands.

- tracker: add the optional SupersededMinimizer capability (in the style
  of StatusCommentClient) instead of widening tracker.Client.
  ForgeClient implements it; Jira does not. GitLab's forge client
  reports minimize as not supported, which is skipped quietly.
- supersede: new leaf package holding the folding rules moved
  unchanged from sticky.MinimizeSuperseded, which now delegates to it.
  The issue asked ForgeClient to call sticky directly, but tracker
  cannot import sticky (sticky -> statuscomment -> tracker is a
  cycle); sharing one implementation keeps the same best-effort and
  same-author rules. The direct folding tests moved with the code.
- cli: move supersedingResultMarkers to its own file, set
  MinimizeSuperseded in runIssuesPostComment, and call the capability
  in postTrackerStickyComment after CreateComment succeeds. Dry run and
  --only-if-exists with nothing to post fold nothing.
- Help text and docs/guides/user/issues-commands.md name the markers.

Note: pre-commit could not fetch hook repos (HTTP 403), so hooks were
run directly: whitespace/EOF checks, gofmt, go vet, lychee, docs-link
and symlink checks passed; gitleaks via scan-secrets passed. semgrep
was skipped because its pinned ruleset could not be downloaded. A
full ./internal/... -race run exceeded the sandbox time limit; the
affected packages (cli, statuscomment, sticky, supersede, tracker)
pass.

Closes #10092
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner December 3, 2026 23:12
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Dec 3, 2026
@waynesun09

Copy link
Copy Markdown
Member

/fs-fix-stop

@github-actions github-actions Bot added the fullsend-no-fix Skip bot-triggered fix agent runs label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Fix agent disabled for this PR. Remove the fullsend-no-fix label or use /fs-fix to re-engage.

@fullsend-ai-review

fullsend-ai-review Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Started 11:15 PM UTC · Ended 11:23 PM UTC

Commit: 5bf9aad · View workflow run →

This review was superseded by a newer commit. Check the current pull request HEAD's review status before merging.

@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://79a5573d-site.fullsend-ai.workers.dev

Commit: c6bcee98c4273619903882c98ea1aa898045de90

The issues-commands guide and the issues post-comment help named the
five markers inside one long sentence, and the guide said the newest
result "replaces" the earlier ones although nothing is edited in place.
List the markers one per line, say the earlier comments collapse but
stay expandable, and drop the repeated "stay visible". The post-comment
help still named only three markers although it reads the same
five-marker set; it now matches.

Assisted-by: Claude (fix), Gemini (prose review), DeepSeek (review)
Signed-off-by: Wayne Sun <gsun@redhat.com>
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ⚠️ Cancelled · Started 11:15 PM UTC · Completed 11:23 PM UTC

Commit: 5bf9aad · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.25

This review was superseded by a newer commit. Check the current pull request HEAD's review status before merging.

@fullsend-ai-review

fullsend-ai-review Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:25 PM UTC · Completed 11:37 PM UTC

Commit: c6bcee9 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.80

@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Moderate file count and elevated churn in touched CLI packages are balanced by zero protected or security-sensitive paths, solid test coverage, and complete alignment with the linked issue scope.

@fullsend-ai-review

fullsend-ai-review Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Review

Findings

Low

  • [api-shape] internal/tracker/tracker.go:170 — SupersededMinimizer.MinimizeSuperseded takes a *ui.Printer and returns nothing. internal/tracker and forge_client.go now import internal/ui, which no other non-test tracker file does. The other tracker capability interfaces take only context and domain data and return errors. As a result, ForgeClient.MinimizeSuperseded can only report a splitProject failure through printer.StepWarn. Mitigating context: issue Minimize superseded results on the issues post-comment --tracker github path #10092 asked for the same best-effort behavior as sticky.MinimizeSuperseded, which already takes a printer. The only caller always passes a non-nil printer. This is a design-consistency note, not a defect.
    Remediation: If you want the tracker package free of UI coupling, change the method to return an error and let internal/cli print the warning. Otherwise keep the printer and make the implementations tolerate a nil one.

Labels: PR changes Go code in the CLI, tracker and sticky packages.

Comment thread internal/tracker/tracker.go Resolved
@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge go Pull requests that update go code labels Dec 3, 2026
@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@waynesun09

Copy link
Copy Markdown
Member

Live check on github.com

Built fullsend from 5bf9aad and posted through fullsend issues post-comment --tracker github on nonflux/tmp-9957-minimize-demo#2: two results with <!-- fullsend:prioritize-agent --> and two notes with a marker outside the superseding set (<!-- fullsend:custom-note -->), interleaved.

The second prioritize post printed Superseded comments minimized. Minimized state from the GraphQL API afterwards:

Comment Marker Body isMinimized minimizedReason
7395371614 prioritize-agent Run 1 true outdated
7395371911 custom-note first note false —
7395372207 prioritize-agent Run 2 false —
7395372662 custom-note second note false —

Run 1 hidden as outdated; both custom notes and run 2 visible

Limit: posted with a user token, not an agent App token. The test repo is temporary.

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated live on github.com via issues post-comment --tracker github (see the comment above); unit tests pass; docs and help reviewed for facts and prose.

@waynesun09
waynesun09 added this pull request to the merge queue Dec 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 4, 2026
@waynesun09
waynesun09 added this pull request to the merge queue Dec 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 4, 2026
@waynesun09
waynesun09 added this pull request to the merge queue Dec 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 4, 2026
@waynesun09
waynesun09 added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 75e2e5f Dec 4, 2026
104 checks passed
@waynesun09
waynesun09 deleted the agent/10092-minimize-issues-post-comment branch December 4, 2026 05:25

This branch was successfully deployed

1 active and 1 inactive deployments
site-preview — c6bcee98 Deployed Dec 3, 2026 by github-actions[bot]
forgejo-dev — c6bcee98 Deployed Dec 3, 2026 by waynesun09 via forgejo-behaviour #21902
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fullsend-no-fix Skip bot-triggered fix agent runs go Pull requests that update go code ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimize superseded results on the issues post-comment --tracker github path

1 participant