Skip to content

Commit c9b353d

Browse files
committed
fix: stop requiring OpenClaw changelog edits
1 parent 0e63542 commit c9b353d

18 files changed

Lines changed: 82 additions & 103 deletions

‎AGENTS.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ not split reports into issue/PR subtrees.
3737
monitoring/debugging how ClawSweeper workflows operate on that PR. Do not fix
3838
foreign PR branches directly; ClawSweeper repair/automerge workflows own those
3939
branch edits.
40-
- OpenClaw changelog entries are maintainer/ClawSweeper-owned landing work. Do
41-
not ask contributor PR authors to edit `CHANGELOG.md`.
40+
- OpenClaw `CHANGELOG.md` is release-owned. Do not ask contributor PR authors,
41+
repair workers, or automerge/autofix lanes to edit it during normal PR work.
42+
Preserve release-note context in PR bodies and commit messages instead.
4243
- When referencing GitHub issues or PRs in user-facing output, always include
4344
the full GitHub URL, not only `#12345`.
4445

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ Common commands:
206206
- `automerge` labels an open PR, creates or reuses the adopted job, dispatches
207207
review, and enters the bounded review/fix/merge loop. Draft PRs are fix-only
208208
until GitHub marks them ready for review.
209-
- User-facing OpenClaw `fix`, `feat`, and `perf` automerge PRs get a
210-
maintainer/ClawSweeper-owned `CHANGELOG.md` entry before merge; contributors
211-
are not asked to add it.
209+
- User-facing OpenClaw `fix`, `feat`, and `perf` automerge PRs preserve
210+
release-note context in PR bodies and commit messages before merge;
211+
contributors are not asked to edit `CHANGELOG.md`.
212212
- Security-sensitive findings can be repaired only after explicit
213213
`autofix`/`automerge` opt-in; ClawSweeper still will not merge until a later
214214
exact-head review is clean.
@@ -367,7 +367,7 @@ appropriate repair job.
367367
repair artifact.
368368
- The deterministic executor applies the artifact, pushes only after validation,
369369
re-dispatches exact-head review, and waits for required checks.
370-
- `automerge` merges only after review verdict, checks, mergeability, changelog,
370+
- `automerge` merges only after review verdict, checks, mergeability,
371371
security, maintainer stop/approve state, and repository policy gates pass.
372372
- Issue implementation is narrower: strict, reproducible bugs and separately
373373
gated small `VISION.md`-aligned issues with no linked PR can open a generated

‎prompts/repair/autonomous.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Before drive mode:
3434
- new fix PR needed because the bug is real and no viable PR exists.
3535
7. For each useful open contributor PR, choose the repair path before merge or close:
3636
- if `pull_request.branch_writable` is true and the diff is narrow enough, plan to update that PR branch, address review/bot findings, rebase, run checks, then emit `merge_canonical` only after it is clean. A same-repo head branch is writable even when the raw `maintainer_can_modify` flag is false;
37-
- if `branch_writable` is false, the branch is unsafe, or the PR contains broad/unrelated churn, do not merge it and do not ask whether to wait. Emit a replacement `build_fix_artifact` / `open_fix_pr` plan that preserves the contributor's credit in `credit_notes`, PR body, and changelog plan. Put every original contributor PR in `fix_artifact.source_prs` as a full `https://github.com/<owner>/<repo>/pull/<number>` URL;
37+
- if `branch_writable` is false, the branch is unsafe, or the PR contains broad/unrelated churn, do not merge it and do not ask whether to wait. Emit a replacement `build_fix_artifact` / `open_fix_pr` plan that preserves the contributor's credit in `credit_notes`, PR body, and release-note context. Put every original contributor PR in `fix_artifact.source_prs` as a full `https://github.com/<owner>/<repo>/pull/<number>` URL;
3838
- when replacing a useful contributor PR, emit a blocked `close_superseded` comment that says ClawSweeper cannot safely update that branch, will carry the narrow fix forward separately, and will credit the contributor by username and PR URL. Keep `candidate_fix` null until the replacement PR exists; do not point `candidate_fix` at the same PR being closed.
3939
8. Do not emit closure actions until the canonical path is explicit. If the cluster is over-broad, split it into subfamilies in the action matrix and use `keep_related`/`keep_independent` for clear non-targets instead of making the whole result `needs_human`.
4040
9. When `require_fix_before_close` blocks an otherwise-clear duplicate/superseded closeout, use `status: "blocked"` and say the close is blocked on the canonical fix path or fix PR. If the item is clearly covered by an already-merged candidate PR or current `main`, `close_fixed_by_candidate` may stay `planned` with that merged candidate evidence. Do not use different vague wording.
@@ -67,17 +67,17 @@ Fix artifact actions:
6767
- If the best canonical PR is useful but not merge-ready because it is draft, unmergeable, stale, uneditable, has `maintainer_can_modify=false`, or has broad/unrelated churn, treat it as non-viable for automation and replace it with a narrow credited fix PR. This is not a `needs_human` decision when the job allows fix PRs; maintainers already chose the replacement policy.
6868
- Provider support gaps, missing model capability routing, and ordinary feature gaps reported as bugs should become a fix artifact when the artifact shows expected behavior and the patch can stay narrow.
6969
- `validation_commands` must be executable commands using the target repo's package manager. For `openclaw/openclaw`, `pnpm check:changed` is the hard local gate; focused tests may be listed as helpful context but the executor may normalize them to `pnpm check:changed` to avoid blocking on unrelated flaky main CI. Do not emit `npm run validate` because that script does not exist there. Put manual browser checks and prose test plans in `pr_body`, `credit_notes`, or action evidence, not in `validation_commands`.
70-
- For `openclaw/openclaw` changelog entries, never ask the executor to add forbidden `Thanks @codex`, `Thanks @openclaw`, or `Thanks @steipete` attribution. If the source author is one of those handles, preserve credit in `credit_notes`, PR body/history, source links, or co-author trailers instead; changelog thanks lines may name only allowed external GitHub usernames. If a user-facing changelog entry is required and only forbidden maintainers/bots are known, keep the changelog entry without a `Thanks @...` line.
71-
- The `build_fix_artifact` action target is the cluster, not an issue or PR; set `target` to `cluster:<cluster_id>` and `target_kind`/`target_updated_at` to `null`. The action must include affected surfaces, likely files, linked issues/PRs, validation commands, changelog requirement, credit notes, and a PR title/body plan.
72-
- If replacing a contributor PR, `fix_artifact.repair_strategy` must be `replace_uneditable_branch`, `fix_artifact.source_prs` must include the original full PR URL, `fix_artifact.branch_update_blockers` must explain why the branch cannot be safely updated, `fix_artifact.credit_notes` must name the original author and PR URL when known, `pr_body` must explain the borrowed/credited idea, and `changelog_required` should be true when the resulting fix is user-facing.
70+
- For `openclaw/openclaw`, do not ask the executor to edit `CHANGELOG.md` during normal repair work. Preserve release-note context in `credit_notes`, PR body/history, source links, commit messages, or co-author trailers instead. Never add forbidden `Thanks @codex`, `Thanks @openclaw`, or `Thanks @steipete` changelog attribution.
71+
- The `build_fix_artifact` action target is the cluster, not an issue or PR; set `target` to `cluster:<cluster_id>` and `target_kind`/`target_updated_at` to `null`. The action must include affected surfaces, likely files, linked issues/PRs, validation commands, release-note context, credit notes, and a PR title/body plan.
72+
- If replacing a contributor PR, `fix_artifact.repair_strategy` must be `replace_uneditable_branch`, `fix_artifact.source_prs` must include the original full PR URL, `fix_artifact.branch_update_blockers` must explain why the branch cannot be safely updated, `fix_artifact.credit_notes` must name the original author and PR URL when known, `pr_body` must explain the borrowed/credited idea, and `changelog_required` should be false for `openclaw/openclaw` because release automation generates `CHANGELOG.md`.
7373
- Set `fix_artifact.allow_no_pr` to `false` for normal fix/replacement PRs. Use `true` only for an explicitly audited no-PR outcome.
7474
- The fix plan must be narrow: list only the files expected to change, focused tests, review-bot findings to address, and the exact branch/PR that could not be updated if applicable.
7575
- Do not emit an executable fix PR path for broad feature/config/docs rewrites. If the fix needs many implementation files plus config/schema/docs/tests, split it into narrower follow-up jobs or mark the implementation blocked with exact sub-scopes; ClawSweeper Repair should not spend a 30-minute executor window on a broad product feature.
7676
- If a target checkout is unavailable or unsafe, do not pretend to patch. Return the artifact and mark only implementation as blocked; keep classification decisions non-mutating when possible.
7777

7878
Merge and post-merge close:
7979

80-
- Recommend `merge_canonical` only when security-sensitive concerns are cleared, all actionable PR comments and review threads are resolved, review state, conflicts, changelog, and changed-surface validation are clean, and the job permits merge. Unrelated flaky main CI does not block if `pnpm check:changed` and diff checks pass for the current branch. Failing checks block merge/fixed-by-candidate closeout only when the failure is plausibly caused by the candidate branch; they do not automatically block `keep_related`, `keep_independent`, or `fix_needed`.
80+
- Recommend `merge_canonical` only when security-sensitive concerns are cleared, all actionable PR comments and review threads are resolved, review state, conflicts, release-note context, and changed-surface validation are clean, and the job permits merge. Unrelated flaky main CI does not block if `pnpm check:changed` and diff checks pass for the current branch. Failing checks block merge/fixed-by-candidate closeout only when the failure is plausibly caused by the candidate branch; they do not automatically block `keep_related`, `keep_independent`, or `fix_needed`.
8181
- If the job is calibrated for finalization, treat stale branches, unknown/unstable merge state, failing relevant checks, and missing review proof as repair work for the executor: rebase/refactor narrowly, rerun review, address bot/human comments, and only then merge or block with concrete proof.
8282
- A calibrated canonical PR that needs repair must produce an executable fix artifact. Use `repair_contributor_branch` when `maintainer_can_modify=true`; use `replace_uneditable_branch` or `new_fix_pr` only when the existing branch cannot be safely updated.
8383
- Before recommending a merge, review actionable PR comments, address required changes or state why they are blocked, prefer a narrower refactor over broad churn, and rebase against current `main` when the branch is stale.

‎prompts/review-item.md‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -503,16 +503,14 @@ Keep open any item whose GitHub author association is `OWNER`, `MEMBER`, or `COL
503503

504504
Keep open any item with a protected label: `security`, `beta-blocker`, `release-blocker`, or `maintainer`. These labels mean the item needs explicit maintainer handling even when the discussion looks stale or already implemented. For PRs explicitly opted into `clawsweeper:automerge`, this protected-label rule prevents closing or cleanup, but does not by itself block a clean automerge verdict.
505505

506-
For OpenClaw PR changelog review, repo policy requires user-facing `fix`,
507-
`feat`, and `perf` changes to have a `CHANGELOG.md` entry, but forbidden bot or
508-
maintainer handles must not be forced into a `Thanks @...` line. Do not create a
509-
review finding, needs-changes verdict, contributor action, public author request,
510-
or next-step blocker solely because a contributor PR lacks a changelog entry.
511-
Changelog entries are maintainer-owned landing/release work; do not ask the PR
512-
author to add one. Also do not create a review finding merely because a
513-
changelog entry lacks `Thanks @steipete`, `Thanks @openclaw`, or `Thanks
514-
@codex`; if those are the only known source authors, preserving credit in PR
515-
history/source links is sufficient.
506+
For OpenClaw PR release-note review, `CHANGELOG.md` is release-owned. Normal
507+
PRs, repair workers, and automerge/autofix lanes should not edit it. Do not
508+
make missing `CHANGELOG.md` a review finding, merge blocker, work item, or
509+
next-step blocker. If release-note context is needed, ask for PR-body or commit
510+
message context: user-visible behavior, affected surface, issue/PR refs, and
511+
credited human author/reporter when known. Never request `Thanks @steipete`,
512+
`Thanks @openclaw`, `Thanks @clawsweeper`, or other forbidden bot/maintainer
513+
changelog attributions.
516514

517515
When citing docs in the close comment, link the public `docs.openclaw.ai` page rather than the internal `docs/*.md` GitHub file whenever a public page exists. The docs site publishes the same content and is the user-facing target. Keep `file`, `line`, and `sha` populated in the structured `evidence` object for auditability, but the prose/comment should prefer links like `https://docs.openclaw.ai/plugins/building-plugins` over `https://github.com/openclaw/openclaw/blob/.../docs/plugins/building-plugins.md`.
518516

‎src/repair/comment-router-core.ts‎

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@ Title: ${safeTitle}
272272
ClawSweeper should use this job only for the bounded ClawSweeper review/fix loop:
273273
274274
- Emit a fix artifact with \`repair_strategy: "repair_contributor_branch"\` and \`source_prs: ["${prUrl}"]\` so the Codex edit pass can make this PR merge-ready.
275-
- The edit pass should rebase onto latest main, address PR comments and review findings, fix CI/check failures, add a changelog entry when required, run the relevant validation, and keep iterating until the branch is ready or an external blocker is proven.
275+
- The edit pass should rebase onto latest main, address PR comments and review findings, fix CI/check failures, preserve release-note context when required, run the relevant validation, and keep iterating until the branch is ready or an external blocker is proven.
276276
- If the PR branch cannot be safely updated, emit a narrow credited replacement only when the artifact can preserve the original contributor credit; otherwise return \`needs_human\`.
277-
- Never add forbidden changelog credit lines for \`@codex\`, \`@openclaw\`, or \`@steipete\`; preserve contributor credit through source links and commit/PR history.
277+
- Never add forbidden changelog credit lines for \`@codex\`, \`@openclaw\`, or \`@steipete\`; preserve contributor credit through source links, PR body, and commit/PR history.
278278
- ${finalMergeLine}
279279
- Keep repair scope limited to actionable ClawSweeper findings, failing relevant checks, and required review feedback on this PR.
280280
${extraInstructions ? `\nMaintainer special instructions:\n\n${extraInstructions}\n` : ""}
@@ -417,40 +417,14 @@ external blocker is proven.
417417
- Keep one PR for this issue; reuse \`${branch}\` if it already exists.
418418
- Keep the diff narrow and avoid unrelated refactors.
419419
- Preserve issue context and link ${issueUrl} in the PR body.
420-
- Add a changelog entry when the target repo expects one.
420+
- Preserve release-note context in the PR body or commit message when the
421+
target repo expects it.
421422
`;
422423
}
423424

424-
export function automergeChangelogBlockReason({ repo, files }: LooseRecord): string | null {
425+
export function automergeChangelogBlockReason({ repo }: LooseRecord): string | null {
425426
if (String(repo ?? "").toLowerCase() !== "openclaw/openclaw") return null;
426-
427-
const paths = normalizeChangedPaths(files);
428-
if (paths.some(isChangelogPath)) return null;
429-
if (!paths.some(isPotentiallyUserFacingPath)) return null;
430-
431-
return "CHANGELOG.md entry is required for user-facing ClawSweeper automerge changes";
432-
}
433-
434-
function normalizeChangedPaths(files: JsonValue): string[] {
435-
if (!Array.isArray(files)) return [];
436-
return files
437-
.map((file) => (typeof file === "string" ? file : (file?.path ?? file?.filename)))
438-
.map((file) => String(file ?? "").trim())
439-
.filter(Boolean);
440-
}
441-
442-
function isChangelogPath(file: string): boolean {
443-
return /(^|\/)CHANGELOG\.md$/i.test(file);
444-
}
445-
446-
function isPotentiallyUserFacingPath(file: string): boolean {
447-
if (/^(?:docs|test|tests|\.github)\//.test(file)) return false;
448-
if (/(?:^|\/)__tests__\//.test(file)) return false;
449-
if (/\.(?:test|spec)\.[cm]?[jt]sx?$/.test(file)) return false;
450-
if (/(?:^|\/)(?:README|CONTRIBUTING|CODE_OF_CONDUCT|SECURITY|SUPPORT|LICENSE)\.md$/i.test(file))
451-
return false;
452-
if (file.startsWith("docs/.generated/")) return false;
453-
return true;
427+
return null;
454428
}
455429

456430
export function automergeGateBlockReason(env: LooseRecord = process.env) {
@@ -522,8 +496,8 @@ export function automergeActivationRepairReason({
522496
if (rebaseRepairReason) return rebaseRepairReason;
523497

524498
if (String(intent ?? "") !== "automerge") return null;
525-
if (!automergeChangelogBlockReason({ repo, title, files })) return null;
526-
return "CHANGELOG.md entry is required before automerge; dispatch a focused changelog repair";
499+
automergeChangelogBlockReason({ repo, title, files });
500+
return null;
527501
}
528502

529503
export function automergeMergeFailureRepairReason(reason: JsonValue): string | null {

‎src/repair/comment-router.ts‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,16 +2293,6 @@ function executeAutomerge(command: LooseRecord) {
22932293
block = validateAutomergeReadiness({ command, view, target: latestTarget });
22942294
}
22952295
if (block) {
2296-
if (isAutomergeChangelogBlock(block)) {
2297-
return {
2298-
action: "merge",
2299-
status: "repair_needed",
2300-
reason: block,
2301-
repair_reason:
2302-
"CHANGELOG.md entry is required before automerge; dispatch a focused changelog repair",
2303-
merge_method: "squash",
2304-
};
2305-
}
23062296
if (isTransientAutomergeBlock(block)) {
23072297
return {
23082298
action: "merge",
@@ -2506,10 +2496,6 @@ function validateAutomergeReadiness({ command, view, target }: LooseRecord) {
25062496
return "";
25072497
}
25082498

2509-
function isAutomergeChangelogBlock(reason: string) {
2510-
return /CHANGELOG\.md entry is required/i.test(String(reason ?? ""));
2511-
}
2512-
25132499
function isAutomergeCheckBlock(reason: string) {
25142500
return /^checks are not green:/i.test(String(reason ?? "").trim());
25152501
}

‎src/repair/create-job.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ ${validation.length ? validation.map((step: JsonValue) => `- ${step}`).join("\n"
194194
- Do not merge.
195195
- Do not close issues before a fix PR is opened, landed, or explicitly proven unnecessary.
196196
- Keep one PR for this cluster; reuse \`${branch}\` if it already exists.
197-
- Preserve contributor credit and add a changelog entry when the target repo expects one.
197+
- Preserve contributor credit and release-note context when the target repo expects it.
198198
`;
199199
}
200200

‎src/repair/deterministic-automerge-result.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function deterministicAutomergeResult({
3232
const repairMode = String(job?.frontmatter?.repair_mode ?? "automerge");
3333
const summary = [
3434
`Make PR ${ref} merge-ready for ClawSweeper ${repairMode}.`,
35-
"Rebase onto latest main, address PR comments and review findings, fix CI/check failures, add required changelog if needed, and validate before returning.",
35+
"Rebase onto latest main, address PR comments and review findings, fix CI/check failures, preserve release-note context, and validate before returning.",
3636
].join(" ");
3737
const likelyFiles = likelyRepairFiles(files, Boolean(changelogReason));
3838
const failedChecks = failingCheckEvidence(canonical);
@@ -58,7 +58,7 @@ export function deterministicAutomergeResult({
5858
likely_files: likelyFiles,
5959
linked_refs: [ref],
6060
validation_commands: ["pnpm check:changed"],
61-
changelog_required: Boolean(changelogReason),
61+
changelog_required: false,
6262
credit_notes: [`Source PR: ${prUrl}`],
6363
pr_title: title,
6464
pr_body: [

‎src/repair/execute-fix-artifact.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,7 +1882,7 @@ function editValidatePrepareMerge({
18821882
}
18831883
}
18841884
if (!producedChanges && !reconcileWithBase) {
1885-
const mechanicalFix = applyMechanicalChangelogFix({ fixArtifact, targetDir });
1885+
const mechanicalFix = applyMechanicalChangelogFix({ fixArtifact, repo: result.repo, targetDir });
18861886
producedChanges = mechanicalFix?.status === "applied";
18871887
if (producedChanges) logProgress("applied mechanical changelog fix");
18881888
}

0 commit comments

Comments
 (0)