Repository navigation
fix(#9517)!: remove the sticky history folding and keep_history - #9986
waynesun09 merged 14 commits into
Conversation
…ry folding Acceptance tests for fullsend-ai#9517 (5 of 7 criteria; the rest declared for a person). ac_1: TestHistoryFoldingMachineryRemovedFromProductionGo ac_2: TestPostCommentCmd_KeepHistoryRemovedOrSilentHiddenNoOp, TestIssuesPostCommentCmd_KeepHistoryRemovedOrSilentHiddenNoOp, TestPostReviewCmd_KeepHistoryRemovedOrSilentHiddenNoOp ac_3: TestLoadConfig_KeepHistoryKeyToleratedAfterRemoval, TestManagedConfig_KeepHistoryKeyRejectedAfterRemoval ac_4: TestGeneratedPostScriptPassesNoKeepHistoryToCurrentCLI ac_5: TestHistoryFoldingMachineryRemovedFromProductionGo ac_6: not testable — docs: keep_history and the sticky/Previous-run passages are removed from docs/reference/config-reference.md, docs/guides/infrastructure/layered-config-reference.md and docs/contributing/config-source-inventory.md, and the changelog states the flag and key decisions; a person reads that diff on the PR (doc wording is not tested) ac_7: not testable — external: the re-check reads fullsend-ai/agents scripts/post-code.src.sh (marker <!-- fullsend:code-agent -->), a different repository, and its outcome is recorded in this PR's body; a person does the re-check and writes the PR body section Red run on the base: 6 of these fail (TestPostCommentCmd_KeepHistoryRemovedOrSilentHiddenNoOp, TestIssuesPostCommentCmd_KeepHistoryRemovedOrSilentHiddenNoOp, TestPostReviewCmd_KeepHistoryRemovedOrSilentHiddenNoOp, TestGeneratedPostScriptPassesNoKeepHistoryToCurrentCLI, TestManagedConfig_KeepHistoryKeyRejectedAfterRemoval, TestHistoryFoldingMachineryRemovedFromProductionGo); the log is kept in the run's evidence. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…story Fixes fullsend-ai#9517 Acceptance tests: see the test(fullsend-ai#9517) commit in this branch. BREAKING CHANGE: managed configuration overlays now reject keep_history through strict validation — delete the key from managed repos.yaml config blocks; it has had no effect since fullsend-ai#9334. A repository's own config.yaml keeps loading (the layered loader ignores unknown keys), and --keep- history stays a hidden no-op on the three posting doors. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
PR Summary by QodoRemove sticky history folding and keep_history setting
AI Description
Merge Risk
|
The doc edits for fullsend-ai#9517, kept out of the fix(fullsend-ai#9517) commit so its size reads on its own. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Code Review by Qodo
1.
|
waynesun09
left a comment
There was a problem hiding this comment.
Review-only comments. One finding is inline. The other is below because internal/repos/managed_config_adoption.go is not in this PR's diff, so it cannot take an inline comment.
MEDIUM: Adoption guidance proposes keep_history, which the managed validator now rejects; the leftover fixtures hide this
internal/repos/managed_config_adoption.go:165: proposedManifestEntry copies every top-level key of an existing .fullsend/config.yaml overlay into the proposed repos.yaml entry. It then probes the result with a strict decode and only appends # note: repos.yaml cannot hold these settings as written: ... unknown field "keep_history". config-reference.md used to ship keep_history: true in its sample, so many overlays carry the key. After this PR, fullsend repos status/install hands operators a config block that the new BREAKING validation rejects. The settings diff also says the key "falls back to the base layer or code default", and that default no longer exists.
Several unchanged test fixtures still feed keep_history: overlays through this path: config_layers_test.go:209/221/337, managed_config_allowlist_test.go:93, managed_config_writeback_test.go:358-408 and cli/repos_managed_config_test.go:509. They now exercise the unknown-key path instead of a live setting. config_layers_test.go:221 passes only because the rejection note happens to contain "keep_history". The PR body says keep_history fixtures were swapped for kill_switch or roles, but these were missed.
Suggestion: in proposedManifestEntry and the effective-settings diff, drop keep_history (a key that no longer exists) instead of proposing it with a failure note, and add a test that pins the adoption output for an overlay that still carries it. Switch the leftover fixtures to a live key such as kill_switch: false so they keep their original meaning.
_Verified: read code at head (proposedManifestEntry lines 163-195; git grep keep_history in *test.go) at d5baff6; raised by: Claude, DeepSeek
d5baff6 to
76cb0c5
Compare
|
🤖 Finished Review · ✅ Success · Started 2:39 PM UTC · Completed 2:54 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.44 |
Site previewPreview: https://5cd6df7f-site.fullsend-ai.workers.dev Commit: |
|
Risk Assessment: moderate (2/5) DetailsExtensive cleanup across 43 files with elevated git churn in touched packages is offset by strong test coverage, no security or CI changes, and full alignment with the linked issue. |
ReviewFindingsMedium
Low
Labels: Cleanup of deprecated code and config across the CLI, config and sticky packages. Next steps:
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
waynesun09
left a comment
There was a problem hiding this comment.
Review-only comments: two MEDIUM findings, both inline.
The test a review thread asked for. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Drop removed settings from adoption guidance. Addresses review feedback on https://github.com/fullsend- ai/fullsend/pull/9986. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…e tests The test a review thread asked for. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Fixed in 585e62f: the adoption proposal now drops the keys the strict validator rejects, naming them in a note, instead of proposing them with a failure note; the settings difference marks such a key as a setting that no longer exists rather than one that falls back to a default; the missed fixtures were switched to kill_switch so they keep their original meaning; and a new test pins the adoption output for an overlay that still carries keep_history; TestAdoptionProposalDropsSettingsTheManifestCannotHold covers it |
|
🤖 Finished Review · ✅ Success · Started 8:32 PM UTC · Completed 8:42 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.79 |
|
Risk Assessment: moderate (2/5) DetailsExtensive cleanup across 49 files with elevated git churn and coupling across CLI, config, and sticky packages is offset by high test coverage, absence of CI or dependency changes, and complete alignment with linked issue #9517. |
ReviewFindingsLow
Earlier findings
Labels: Go code change across CLI, config and sticky packages. |
Superseded by updated review
|
E2E authorized for |
Pull request was closed
|
/ok-to-test a28d6bc |
|
E2E authorized for |
|
🤖 Finished Review · ✅ Success · Started 5:46 PM UTC · Completed 5:59 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.86 |
|
Code review by qodo was updated up to the latest commit 978f412 |
|
Risk Assessment: moderate (2/5) DetailsExtensive cleanup across 50 files with elevated churn and change coupling across CLI, config, and sticky packages is offset by high test coverage, absence of CI or dependency changes, and complete alignment with linked issue #9517. |
ReviewFindingsLow
Earlier findings
1 finding(s) below the |
There was a problem hiding this comment.
Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:
internal/config/managed.go(file-level): Line 267 ·
[low] breaking-config
Managed overlays that still set the removed keep_history key are now rejected with unknown field "keep_history" (decodeKnownFields uses KnownFields(true) and the key is gone from perRepoConfig and ManagedConfig), so existing managed-config layers carrying it will fail to load. A repo's own config.yaml still loads with the key, so the two config surfaces differ, and the CLI side has hidden no-op shims while the config side has none. The PR declares this as a breaking change (! title and BREAKING CHANGE footer), and issue #9517 allowed either accepting-and-ignoring the key or documenting its removal.
Suggested fix: Make sure the release notes carry the BREAKING CHANGE migration step (remove keep_history from managed repos.yaml config blocks). Optionally tolerate and ignore the key for one release.
Superseded by updated review
Summary
#9334 made every agent post a new comment per run instead of editing one in place; this removes the compatibility machinery it kept: the history folding and the
keep_historysetting.Related Issue
Fixes #9517
Changes
internal/sticky:BuildUpdatedBody, thePrevious runfolding (detailsRe,legacyDetailsRe, history sentinels) andConfig.KeepHistory/Config.FooterMarkerdeleted; posting is new-comment-only. Tests of the removed code are deleted or trimmed; other test edits swapkeep_historyfixtures forkill_switchorroles.internal/cli:--keep-historystays a hidden no-op on the three posting doors; pre-Remove sticky comments: post every agent result as a new comment #9334 post-scripts pass it unconditionally underset -euo pipefail, and its deprecation warning never prints.--fullsend-dirbecomes a hidden no-op onpost-commentandpost-reviewonly, which no longer load config.yaml for keep_history; onissues post-commentit keeps working for tracker and Jira defaults. Why-and-until-when comments mark the read-side sentinel handling inreviewdedup.goandjira/adf.go; the flag shim inissues.gocarries its own.internal/config:keep_historyleaves perRepoConfig, ManagedConfig, defaults and effective config, andConfigKeepHistory/SetKeepHistorythe reader/writer interfaces; managed overlays reject the key (the breaking surface), a repo's own config.yaml keeps loading.internal/repos:fullsend reposadoption guidance — proposals drop overlay keys the managed validator rejects (each named and quoted in a note) instead of proposing config blocks that fail validation, keys with a dedicated migration error (create_issues) stay in the proposed block so the strict-decode probe reports the migration path, and the settings difference marks a removed key as a setting that no longer exists, carrying the migration text where there is one.internal/forge/jira/adf.go: comments cite pre-Remove sticky comments: post every agent result as a new comment #9334 CLIs, not the deleted builder.internal/agentnew:post.sh.tmpland its four goldens, comment only (the flag's behaviour history by version); its help-probe stops passing--keep-historyto a current CLI (the flag is now hidden).keep_historyand the sticky/Previous runpassages dropped from five pages.Protected paths
internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/scripts/run-agent-job.sh— comment only: four lines on why thesticky:history-startcut stays while pre-Remove sticky comments: post every agent result as a new comment #9334 review comments age out.internal/scaffold/fullsend-repo/scripts/pre-fetch-prior-review.sh— comment only: one line reworded, four added, same reason.internal/scaffold/fullsend-repo/scripts/pre-fetch-prior-review-test.sh— comment only: drops the reference to the deletedsticky.BuildUpdatedBody.Reproduction
Four new test files hold the acceptance tests; six fail on the base, pass at head:
--keep-historyremoved or hidden on each of the three doors, the generated post-script passing no flag to a current CLI, managed-overlay rejection ofkeep_history, and a guard for the removed symbols in production Go. A seventh, that a repo's own config.yaml withkeep_historystill loads, passes on both. Checks green:make lint,go vet; patch coverage 35/35 (final review).External re-check
Re-checked
scripts/post-code.src.shandscripts/pre-review.src.shin fullsend-ai/agents at main (7c5993fb, 2026-12-01):post-code.src.shposts viaissues post-comment --tracker jira --marker <!-- fullsend:code-agent --> --result -and passes no--keep-history, so the hidden no-op does not affect it. Its rerun note (post-code.src.sh:388-389) still says a rerun after an ambiguous POST 5xx relies on the CLI's sticky-marker property lookup to find a created comment — a lookup the always-create change (#9399, 635b640) already removed, so a rerun has posted a duplicate comment since v0.58.0; this PR changes nothing there.pre-review.src.sh:85-88, the read-side sentinel cut that actually runs, still says "The poster preserves old markers in sticky history".Follow-ups
Closes #7468, closes #7289 and closes #7290 as obsolete when this merges: all three ask to fold or cap the
Previous runsticky history, machinery that has been dead since #9334 made every result a new comment and that this change deletes. fullsend-ai/agents#324 asks for the same capping and is obsolete the same way; closing keywords cannot reach another repository, so it needs a manual close.Re-check #6150: it asks for a way to skip the sticky find-and-update behaviour — behaviour #9334 already removed (every result is a new comment); this PR deletes the leftover folding machinery and the
keep_historysurface.Re-check #8858: it asks for a visible signal when a run only edits the sticky comment — behaviour #9334 already removed (every result is a new comment); this PR deletes the leftover folding machinery and the
keep_historysurface.Deferred from the final review: the dead
FULLSEND_DIRenv default inaddLegacyFullsendDirFlag; the false "never regenerated" and "nothing is edited in place" comments.In fullsend-ai/agents: reword
pre-review.src.sh:85-86into the read-side-shim note the scaffold copies carry, and fix or guard thepost-code.src.shrerun expectation (accept duplicate comments on rerun, or add an idempotency check).Testing
make lintpasses (stage changes first, then run)Checklist
!for breaking changes)BREAKING CHANGE: managed configuration overlays now reject
keep_historythrough strict validation — delete the key from managed repos.yaml config blocks; it has had no effect since #9334.