Skip to content

feat(#6214): add keep_history config option for sticky comments - #6930

Merged
ralphbean merged 6 commits into
mainfrom
agent/6214-optional-sticky-history
Sep 8, 2026
Merged

feat(#6214): add keep_history config option for sticky comments#6930
ralphbean merged 6 commits into
mainfrom
agent/6214-optional-sticky-history

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Add a keep_history per-repo config.yaml option that controls whether sticky comment updates append previous content as collapsed "Previous run" <details> blocks. When disabled (keep_history: false), updates replace the comment body in-place with no history — reducing noise when reading via the GitHub API and avoiding raw HTML rendering issues in Jira.

Related Issue

Closes #6214

Changes

  • Config layer (internal/config/): Add KeepHistory *bool field to perRepoConfig using the pointer-bool pattern (same as kill_switch). Add ConfigKeepHistory() accessor and SetKeepHistory() setter to PerRepoConfigReader/PerRepoConfigWriter interfaces. Code default is true (preserving existing behavior).
  • Sticky package (internal/sticky/): Add KeepHistory bool to sticky.Config. BuildUpdatedBody short-circuits when KeepHistory is false, discarding old content while preserving footer content.
  • CLI commands (internal/cli/): Add --keep-history flag (default true) to post-review, post-comment, and issues post-comment. The issues post-comment command also resolves the setting from config.yaml via --fullsend-dir when the flag is not explicitly set.
  • Documentation (docs/guides/infrastructure/layered-config-reference.md): Document the new field in the per-field merge rules table, scalar override section, and code defaults reference.

Testing

  • Unit tests for BuildUpdatedBody with KeepHistory: false (no history, footer preserved, multiple runs)
  • Config pointer-semantics tests (nil/true/false fallthrough)
  • YAML roundtrip tests for keep_history
  • Marshal tests (explicit false emitted, unset omitted)
  • Getter/setter interface tests
  • go vet ./... passes
  • Existing tests updated to set KeepHistory: true explicitly

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • I wrote this contribution myself and can explain all changes in it

Closes #6214

Post-script verification

  • Branch is not main/master (agent/6214-optional-sticky-history)
  • Secret scan passed (gitleaks — 9f10cac80818e71e57e92eabd7c71470c1e1f55d..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

Add a per-repo config.yaml option (keep_history) that controls whether
sticky comment updates append previous content as collapsed "Previous
run" <details> blocks. When set to false, updates replace the comment
body in-place with no history.

This addresses the noise from accumulated history blocks when reading
issues/PRs via the GitHub API and the rendering issue in Jira where
<details>/<summary> collapsible markup does not render as collapsible.

Changes:
- Add KeepHistory *bool to perRepoConfig using the pointer-bool pattern
  (nil = inherit from parent, code default true = history appended)
- Add ConfigKeepHistory()/SetKeepHistory() to PerRepoConfigReader/Writer
- Add KeepHistory bool to sticky.Config; BuildUpdatedBody short-circuits
  to replace-in-place when false, preserving footer content
- Add --keep-history flag to post-review, post-comment, and
  issues post-comment CLI commands (default: true)
- issues post-comment resolves the setting from config.yaml via
  --fullsend-dir when the flag is not explicitly set
- Document the field in the layered config reference

Closes #6214
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner September 2, 2026 20:29
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 2, 2026
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Ended 8:31 PM UTC

Commit: 10ad2a8 · View workflow run →

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Site preview

Preview: https://0ae7593a-site.fullsend-ai.workers.dev

Commit: 90aabf68e7cdfbf97e5a59b85b06fddc5b415039

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 2, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:32 PM UTC · Completed 8:54 PM UTC

Commit: 10ad2a8 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $7.87

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 26 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/cli/postcomment.go 50.00% 10 Missing ⚠️
internal/cli/postreview.go 54.54% 10 Missing ⚠️
internal/cli/issues.go 84.61% 2 Missing and 2 partials ⚠️
internal/sticky/sticky.go 84.61% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Sep 2, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 2, 2026

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Anchored to prior score of 2 (moderate): Tier 1 signals unchanged (same file count range, no protected/security paths, no dependency changes, bot author, good test ratio), Tier 2 churn and contention in config/CLI packages consistent with prior assessment, well-scoped issue with opt-in config option preserving backward compatibility.

Previous run

Risk Assessment: moderate (2/5)

Details

Moderate risk driven primarily by high churn and multi-author contention in the config and CLI packages (Tier 2), offset by bot authorship, no protected/security paths, good test ratio, and a well-scoped issue with the new behavior gated behind an opt-in config option that preserves backward compatibility.

Previous run (2)

Risk Assessment: moderate (2/5)

Details

Moderate risk driven primarily by high churn and multi-author contention in the config and CLI packages (Tier 2), offset by bot authorship, no protected/security paths, good test ratio, and a well-scoped issue with the new behavior gated behind an opt-in config option that preserves backward compatibility.

Previous run (3)

Risk Assessment: moderate (2/5)

Details

Moderate risk driven primarily by high churn and multi-author contention in the config and CLI packages (Tier 2). The change itself is well-scoped: it adds a new pointer-bool config option following established patterns, plumbs it through CLI commands, and preserves backward compatibility by defaulting to current behavior.

Previous run (4)

Risk Assessment: moderate (2/5)

Details

Moderate risk driven primarily by high churn and multi-author contention in the config and CLI packages (Tier 2). The change itself is well-scoped: it adds a new pointer-bool config option following established patterns, plumbs it through CLI commands, and preserves backward compatibility by defaulting to current behavior.

Previous run (5)

Risk Assessment: moderate (2/5)

Details

Moderate risk driven primarily by high churn and multi-author contention in the config and CLI packages (Tier 2). The change itself is well-scoped: it adds a new pointer-bool config option following established patterns, plumbs it through CLI commands, and preserves backward compatibility by defaulting to current behavior.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review

Findings

Low

  • [api-design-footgun] internal/sticky/sticky.go:23 — The KeepHistory bool field on sticky.Config has a zero value of false, inverting the pre-existing default (keep history). The config layer (perRepoConfig.KeepHistory) correctly uses *bool with nil-defaults-to-true semantics, creating an inconsistency between the two layers. All in-repo callers that exercise the update path explicitly set KeepHistory: true; future internal callers constructing Config{} without setting KeepHistory would silently get no-history behavior.
    Remediation: Consider renaming the field to SkipHistory (or NoHistory) so the zero value (false) matches the desired default, or use *bool in sticky.Config with nil defaulting to true, matching the config layer pattern.

  • [ordering-consistency] internal/config/defaults.go:82ConfigKeepHistory() is placed between ConfigInferenceWIFProvider and ConfigInferenceOpenAI, splitting the inference method group. The PerRepoConfigReader interface declaration positions ConfigKeepHistory between ConfigMintURL and ConfigInferenceProvider, before the entire inference group.

  • [ordering-consistency] internal/config/interfaces.go:563SetKeepHistory implementation is positioned between SetRuntime and SetMintURL, but the PerRepoConfigWriter interface declaration orders them as SetRuntime, SetMintURL, SetKeepHistory.

  • [architectural-coherence] internal/cli/postreview.go:118 — The keep-history resolution in postcomment.go and postreview.go inlines a bespoke pattern (check cmd.Flags().Changed, create a nil *bool, call resolveKeepHistory) that differs from the issues post-comment pattern, which captures the flag state into a *bool struct field at the cobra level.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run

Review

Findings

Low

  • [api-design-footgun] internal/sticky/sticky.go:23 — The KeepHistory bool field on sticky.Config has a zero value of false (no history), inverting the pre-existing default. All current callers explicitly set KeepHistory: true, mitigating the immediate risk. Future callers creating sticky.Config{} without setting this field would silently get no-history behavior. Consider NoHistory bool or *bool if this API gains more callers.

  • [ordering-consistency] internal/config/defaults.go:82ConfigKeepHistory() is placed between inference method accessors (ConfigInferenceWIFProvider and ConfigInferenceOpenAI), splitting the inference group. The semantically closest neighbor is IsKillSwitchActive() (both are *bool three-state fields), and the PerRepoConfigReader interface positions it between ConfigMintURL() and ConfigInferenceProvider().

  • [ordering-consistency] internal/config/interfaces.go:563SetKeepHistory implementation is positioned between SetRuntime and SetMintURL, but the PerRepoConfigWriter interface declaration orders it as SetMintURL then SetKeepHistory.

Previous run (2)

Review

Findings

Low

  • [test-adequacy] internal/cli/issues.go:492 — The resolveKeepHistory function has no unit tests. Its sibling resolveTracker has 7 unit tests covering flag override, config fallback, fullsend-dir fallback, normalization, unknown value rejection, and no-flag-no-config error. While resolveKeepHistory follows the same pattern and is simpler, its resolution logic — flag-overrides-config, config-fallback, error-returns-safe-default — is untested.
    Remediation: Add TestResolveKeepHistory_* tests mirroring the resolveTracker suite: flag overrides config, falls back to config reader, falls back to fullsend-dir config, nil-everything defaults to true, config load error returns true with error.

  • [consistency] internal/cli/postcomment.go:85 — The deprecated post-comment command adds --keep-history but does not add --fullsend-dir or call resolveKeepHistory(), unlike issues post-comment and post-review. This means keep_history set in config.yaml is silently ignored for this command.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (3)

Review

Findings

Low

  • [zero-value-footgun] internal/sticky/sticky.go:23 — The new KeepHistory bool field on sticky.Config has a Go zero value of false, which means "do not keep history" — inverting the pre-existing default (history was always kept). There are 14 sticky.Config{} literals across postreview_test.go and issues_test.go that omit KeepHistory. While these test functions currently only call sticky.Post once (create path) and never reach BuildUpdatedBody, future callers or test expansions that forget KeepHistory: true would silently get the wrong behavior.
    Remediation: Either (a) invert the field to DiscardHistory bool so the zero value preserves existing behavior, or (b) update test files to set KeepHistory: true on each sticky.Config{} literal.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (4)

Review

Findings

Low

  • [scope-mismatch] internal/cli/issues.go — The three sticky comment commands have asymmetric keep_history resolution strategies: post-review has both a CLI flag and config.yaml fallback via --fullsend-dir, deprecated post-comment has the CLI flag only, and issues post-comment resolves from config.yaml only (the keepHistory *bool struct field has no cmd.Flags() binding). The PR description claims "--keep-history flag (default true) to post-review, post-comment, and issues post-comment" but issues post-comment does not register this flag. The functionality works correctly via config.yaml, but the description is inaccurate.
    Remediation: Either register --keep-history on issues post-comment for CLI parity, or update the PR description to accurately describe the resolution asymmetry.

  • [scope-minor] internal/cli/postcomment.go:85 — The deprecated post-comment command gets a --keep-history flag but has no config.yaml resolution path via --fullsend-dir. Users who set keep_history in config.yaml will not see it take effect for this command. Since it is deprecated in favor of issues post-comment, this is a minor inconsistency.

  • [docs-accuracy] docs/guides/user/issues-commands.md:77 — The updated prose for issues post-comment says "pass --keep-history=false on post-review / post-comment" — referencing the deprecated top-level post-comment command alongside post-review. Since the deprecated command emits a deprecation warning pointing users to issues post-comment, mentioning it here creates a potentially confusing circular reference.
    Remediation: Reword to reference only post-review (the non-deprecated command).


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (5)

Review

Findings

Medium

  • [scope-gap] internal/cli/postreview.go:157 — The post-review command exposes a --keep-history CLI flag but has no config.yaml resolution path. Unlike issues post-comment (which resolves from config.yaml via --fullsend-dir and resolveKeepHistory), post-review only respects the explicit CLI flag. Since post-review is called by agent post-scripts, the per-repo config.yaml keep_history: false setting will have no effect on review comments — users who set keep_history: false expecting it to apply "uniformly to all sticky comments" (per issue Make sticky comment "Previous run" history appending optional via config.yaml #6214) will find that review comments still accumulate history.
    Remediation: Add --fullsend-dir resolution to post-review (matching the pattern in issues post-comment), or document that keep_history only applies to issues post-comment and that post-review requires the explicit --keep-history=false flag.

Low

  • [error-handling-gap] internal/cli/issues.go:492resolveKeepHistory silently swallows config.LoadConfig errors by checking err == nil and falling through to the default (true). The analogous resolveTracker function (line 452–454) propagates config load errors to the caller. When --tracker is passed explicitly but keep_history is intended to come from a malformed config.yaml, the user receives no indication that their keep_history: false setting was silently ignored.
    Remediation: Either log a warning when config loading fails, or restructure so that config loading happens once (reusing the reader from resolveTracker when available) rather than loading independently in each resolver.

  • [field-ordering] internal/config/config.go:775KeepHistory field placement in perRepoConfig (after Notifications, before MintURL) differs from its placement in perRepoConfigMarshal (after Runtime, before Roles). In the existing codebase, the marshal struct mirrors the main struct's field order.
    Remediation: Move KeepHistory in perRepoConfig to sit after KillSwitch (matching perRepoConfigMarshal ordering), or vice versa.

  • [stale-doc] docs/guides/dev/cli-internals.md:145 — CLI command tree for post-review is missing the new --keep-history flag. The PR adds the flag in internal/cli/postreview.go but the docs list only flags through --dry-run.
    Remediation: Add --keep-history entry to the post-review flag list in cli-internals.md.

  • [stale-doc] docs/guides/user/issues-commands.md:87 — The --fullsend-dir flag description says it "sources a default --tracker from its config.yaml", but the PR broadens its role to also resolve keep_history. The code's help text was updated to "sources defaults from its config.yaml when flags are omitted" (plural).
    Remediation: Update the --fullsend-dir description in the flags table to match the new help text.

  • [stale-doc] docs/guides/user/issues-commands.md:57 — The issues post-comment description states unconditionally that it "edits in-place, collapsing old content into <details> blocks." With keep_history: false, updates replace the body with no history blocks.
    Remediation: Qualify the sentence to mention the keep_history opt-out.

  • [scope-minor] internal/cli/postcomment.go:85 — The deprecated post-comment command gets a --keep-history flag but has no config.yaml resolution path. Since it is deprecated in favor of issues post-comment, this is less concerning.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 8:57 PM UTC · Completed 9:09 PM UTC

Commit: 10ad2a8 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.02

- Add --fullsend-dir config resolution to post-review (scope-gap):
  post-review now resolves keep_history from config.yaml when
  --keep-history is not explicitly set, matching issues post-comment.
- Surface config load errors in resolveKeepHistory (error-handling-gap):
  return (bool, error) matching the resolveTracker pattern; callers
  warn on failure instead of silently defaulting.
- Align KeepHistory field ordering in perRepoConfig (field-ordering):
  moved after Runtime to match perRepoConfigMarshal.
- Update cli-internals.md with --keep-history and --fullsend-dir flags
  for post-review (stale-doc).
- Update issues-commands.md: --fullsend-dir description now says
  "sources defaults" (plural), and issues post-comment description
  mentions keep_history opt-out (stale-doc).

Addresses #6930
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Addressed 6 of 7 review findings. Added config.yaml resolution to post-review via --fullsend-dir (scope-gap). Changed resolveKeepHistory to propagate config load errors (error-handling-gap). Fixed field ordering in perRepoConfig (field-ordering). Updated three stale documentation entries (cli-internals.md and issues-commands.md). Disagreed on adding config resolution to the deprecated post-comment command (scope-minor).

Fixed (6):

  1. [scope-gap] post-review command has no config.yaml resolution path for keep_history (internal/cli/postreview.go): Added --fullsend-dir flag and resolveKeepHistory call to post-review, matching the pattern in issues post-comment. When --keep-history is not explicitly set, the command now resolves keep_history from config.yaml via --fullsend-dir.
  2. [error-handling-gap] resolveKeepHistory silently swallows config.LoadConfig errors (internal/cli/issues.go): Changed resolveKeepHistory to return (bool, error) matching the resolveTracker pattern. Callers now receive config load errors and surface them as warnings instead of silently defaulting to true.
  3. [field-ordering] KeepHistory field placement in perRepoConfig differs from perRepoConfigMarshal (internal/config/config.go): Moved KeepHistory field in perRepoConfig to sit after Runtime (before Roles), matching the field order in perRepoConfigMarshal.
  4. [stale-doc] CLI command tree for post-review missing --keep-history flag (docs/guides/dev/cli-internals.md): Added --keep-history and --fullsend-dir entries to the post-review flag list in the CLI command tree.
  5. [stale-doc] --fullsend-dir flag description says it sources a default --tracker only (docs/guides/user/issues-commands.md): Updated --fullsend-dir description in both the issues list and issues post-comment flag tables to say 'sources defaults from its config.yaml when flags are omitted' (matching the updated help text).
  6. [stale-doc] issues post-comment description states unconditionally that it collapses old content (docs/guides/user/issues-commands.md): Qualified the description to mention that old content is collapsed by default, and that keep_history: false in config.yaml (or --keep-history=false) replaces the body with no history.

Disagreed (1):

  1. [scope-minor] deprecated post-comment command gets --keep-history flag but no config.yaml resolution: The post-comment command is deprecated in favor of issues post-comment. Adding config.yaml resolution to a deprecated command would add maintenance burden without meaningful benefit. Users of the deprecated command can pass --keep-history=false explicitly.

Tests: passed

Decision points
  • How to surface config load errors in resolveKeepHistory (alternatives: Return (bool, error) matching resolveTracker pattern, Add printer parameter and log inline, Restructure to share config reader with resolveTracker; rationale: Returning (bool, error) is the minimal change that matches the existing resolveTracker pattern. Callers decide whether to warn or fail, keeping the function's responsibility narrow.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 2, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:11 PM UTC · Completed 9:32 PM UTC

Commit: ae6805c · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $7.62

fullsend-ai-review[bot]

This comment was marked as outdated.

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 9:33 PM UTC · Completed 9:43 PM UTC

Commit: ae6805c · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.07

The issuesPostCommentConfig struct had a keepHistory *bool field that
was only resolved from config.yaml — no CLI flag was bound to it.
This contradicted the PR description which claimed --keep-history was
added to all three sticky comment commands.

Register --keep-history on issues post-comment using the same
Changed()-guard pattern as post-review so explicit flags take
precedence over config.yaml resolution. Update docs to remove the
confusing circular reference to the deprecated post-comment command
and add --keep-history / --fullsend-dir to the CLI command tree.

Addresses #6930
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (bot-triggered)

Addressed 3 of 4 review findings. Registered --keep-history flag on issues post-comment for CLI parity (scope-mismatch). Removed confusing circular reference to deprecated post-comment in docs (docs-accuracy). Updated CLI command tree with new flags. Disagreed on adding config.yaml resolution to the deprecated post-comment command (scope-minor) — same rationale as iteration 1.

Fixed (3):

  1. issues post-comment does not register a --keep-history CLI flag despite PR description claiming it does (internal/cli/issues.go): Registered --keep-history flag on issues post-comment using a local bool with cmd.Flags().Changed() guard, matching the pattern in post-review. When explicitly passed, it sets cfg.keepHistory to a non-nil *bool; when omitted, keepHistory stays nil and resolves from config.yaml via --fullsend-dir.
  2. issues post-comment docs reference deprecated post-comment command alongside post-review, creating confusing circular reference (docs/guides/user/issues-commands.md): Removed the reference to deprecated post-comment from the issues post-comment description. Reworded to say 'pass --keep-history=false' without naming specific sibling commands. Added --keep-history to the flags table for issues post-comment.
  3. CLI command tree for issues post-comment missing --keep-history and --fullsend-dir flags (docs/guides/dev/cli-internals.md): Added --keep-history and --fullsend-dir entries to the issues post-comment flag list in the CLI command tree.

Disagreed (1):

  1. deprecated post-comment command gets --keep-history flag but no config.yaml resolution via --fullsend-dir: The post-comment command is deprecated in favor of issues post-comment and emits a deprecation warning directing users there. Adding config.yaml resolution to a deprecated command increases maintenance burden without meaningful benefit. Users of the deprecated command can pass --keep-history=false explicitly. This was also disagreed with in iteration 1 for the same reason.

Tests: passed

Decision points
  • Whether to add --keep-history flag to issues post-comment vs updating the PR description to remove the claim (alternatives: Register the CLI flag for parity, Update PR description to remove the claim; rationale: Adding the flag gives CLI parity across all three sticky comment commands (post-review, post-comment, issues post-comment) and matches user expectations set by the PR description. The struct field and resolution logic already exist, so only the flag binding was missing.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 2, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:45 PM UTC · Completed 10:08 PM UTC

Commit: 55e49fd · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $8.43

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 10:09 PM UTC · Completed 10:20 PM UTC

Commit: 55e49fd · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.04

@fullsend-ai-review
fullsend-ai-review Bot dismissed stale reviews from themself September 2, 2026 23:14

Superseded by updated review

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Sep 2, 2026
@ralphbean

Copy link
Copy Markdown
Member

/fs-fix address the medium scope-gap problem, so that post-review also respects config.yaml

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 8:40 PM UTC · Completed 8:53 PM UTC

Commit: ce87d6c · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.94

…comment

Make post-review and post-comment auto-discover config.yaml by
defaulting --fullsend-dir to the FULLSEND_DIR environment variable.
The runner already injects FULLSEND_DIR into CI environments, so
per-repo keep_history settings now take effect on review comments
without callers needing to explicitly pass --fullsend-dir.

Note: pre-commit hooks were not run. `pre-commit` could not complete
(infrastructure failure), and the hooks were run directly instead
(gofmt, go vet).

Addresses #6930
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 5 (human-triggered)

Closed the medium scope-gap by defaulting --fullsend-dir to $FULLSEND_DIR in post-review and post-comment. Previous iterations added the flag and wiring but left the default empty, so callers that did not explicitly pass --fullsend-dir (e.g., agent post-scripts) silently ignored config.yaml keep_history settings. The new approach uses the FULLSEND_DIR env var that the runner already injects, making config.yaml auto-discovery work without changing protected post-scripts.

Fixed (3):

  1. post-review command has no config.yaml resolution path for keep_history (medium scope-gap) (internal/cli/postreview.go): Changed --fullsend-dir flag default from empty string to os.Getenv("FULLSEND_DIR"). The runner already injects FULLSEND_DIR into CI environments, so post-review now auto-discovers config.yaml and respects keep_history: false without callers needing to explicitly pass --fullsend-dir. Previous iterations (1-4) added the --fullsend-dir flag and resolveKeepHistory() wiring but defaulted the flag to empty, which meant callers that did not pass --fullsend-dir (e.g., agent post-scripts) silently ignored config.yaml.
  2. Deprecated post-comment command should also auto-discover config.yaml for consistency (internal/cli/postcomment.go): Applied the same FULLSEND_DIR env var default to post-comment's --fullsend-dir flag, maintaining consistency across all three sticky comment commands.
  3. CLI command tree docs need to reflect env var default (docs/guides/dev/cli-internals.md): Updated --fullsend-dir description in the post-review CLI command tree to note the $FULLSEND_DIR default.

Tests: passed

Strategy change: Iteration 5 (past escalation threshold): iterations 1-4 added --fullsend-dir flags and resolveKeepHistory wiring, but the root cause was that callers did not pass the flag. This iteration defaults the flag to $FULLSEND_DIR so config.yaml is auto-discovered in CI environments without requiring caller changes.

Decision points
  • How to make post-review auto-discover config.yaml without requiring callers to pass --fullsend-dir (alternatives: Default --fullsend-dir to os.Getenv("FULLSEND_DIR") so the runner's existing env var is used, Default --fullsend-dir to ".fullsend" to discover config in CWD, Modify post-scripts to pass --fullsend-dir (protected path, cannot change), Add FULLSEND_DIR fallback inside the RunE function rather than in the flag default; rationale: The runner already injects FULLSEND_DIR into every CI environment. Defaulting the flag to this env var is the smallest change that closes the gap: it works automatically in CI, is backward-compatible (empty when FULLSEND_DIR is unset), and requires no changes to protected post-scripts. This is a fundamentally different approach from iterations 1-4 which only added the flag without addressing the caller gap.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 3, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:54 PM UTC · Completed 9:15 PM UTC

Commit: 90aabf6 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $8.87

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

Comment thread internal/sticky/sticky.go
Comment thread internal/config/defaults.go
Comment thread internal/config/interfaces.go
Comment thread internal/cli/postreview.go
@fullsend-ai-review fullsend-ai-review Bot removed the ready-for-merge All reviewers approved — ready to merge label Sep 3, 2026
@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ❌ Failure (running pre-script: exit status 1) · Started 9:17 PM UTC · Completed 9:17 PM UTC

Commit: 90aabf6 · View workflow run →

Effort: high

@ralphbean
ralphbean added this pull request to the merge queue Sep 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 8, 2026
@ralphbean
ralphbean added this pull request to the merge queue Sep 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 8, 2026
@ralphbean
ralphbean added this pull request to the merge queue Sep 8, 2026
Merged via the queue into main with commit 8ca9ba6 Sep 8, 2026
60 of 62 checks passed
@ralphbean
ralphbean deleted the agent/6214-optional-sticky-history branch September 8, 2026 17:49
@fullsend-ai-retro

fullsend-ai-retro Bot commented Sep 8, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 5:51 PM UTC · Completed 6:04 PM UTC

Commit: 90aabf6 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.49

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #6930keep_history config option for sticky comments

Workflow: Issue #6214 → triage (Aug 13) → /fs-code (Sep 2) → PR #6930 → 6 review cycles, 5 fix iterations → human approvals → merged Sep 8.

Cost: ~$70 total ($11.57 code + $45.15 review across 6 runs + $13.34 fix across 5 runs). The review-fix loop ran for ~2.5 hours autonomously on Sep 2, then required human intervention on Sep 3.

What went well

  • Triage agent provided excellent implementation notes including the pointer-bool pattern recommendation and a proposed test.
  • Code agent produced a solid initial implementation in 20 minutes ($11.57).
  • Review agent caught the medium-severity scope-gap (post-review lacking config.yaml resolution) on the first review — a genuine functional gap.
  • The zero-value footgun finding (KeepHistory bool zero=false inverting default) was a legitimate design concern caught early.

Key issues

  1. Incomplete scope-gap fix went undetected — The fix agent "fixed" the medium scope-gap in iteration 1 by adding a --fullsend-dir flag to post-review, but left the default empty. This means CI callers (the normal execution path) would still ignore config.yaml. The review agent considered it resolved on re-review. 24 hours later, ralphbean had to manually trigger /fs-fix to point out the real solution: default --fullsend-dir to $FULLSEND_DIR, the env var the runner already injects.
  2. Low-severity finding churn drove unbounded iteration — Each full re-review found NEW low-severity findings (ordering-consistency, architectural-coherence, etc.) not present in any prior review, creating a self-perpetuating loop. 5 fix iterations for a feature whose medium finding was addressed in iteration 1. The final 4 low findings were overridden by human approvals.
  3. CHANGES_REQUESTED for low-only findings — The final review issued CHANGES_REQUESTED with only low-severity findings. Two human reviewers approved and merged despite this. Evidence supporting #2940.

Evidence for existing issues

  • #4956 (carry forward medium+ findings): The medium scope-gap was prematurely marked resolved after fix iteration 1 when the fix was functionally incomplete. If the review agent had critically re-evaluated the finding rather than assuming it was addressed, it would have caught the empty-default problem.
  • #6950 (incremental re-review): Each of the 6 full re-reviews cost ~$7.50. Incremental review focused on the delta since last review would have significantly reduced cost and prevented new low-severity findings from extending the loop.
  • #2940 (CHANGES_REQUESTED severity threshold): Final review used CHANGES_REQUESTED for 4 low-severity findings, which human reviewers overrode.

Merge queue

The PR required 3 merge queue attempts before successfully merging (removed at 17:17 and 17:34, merged at 17:49). Root cause not investigated — may be transient CI failures or merge conflicts.

Proposals filed

Two proposals below target the review agent definition in fullsend-ai/agents.

Proposals filed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human Agent loop needs human intervention 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.

Make sticky comment "Previous run" history appending optional via config.yaml

2 participants