Ready-to-merge batch + collaborator request#56
Ready-to-merge batch + collaborator request#56ds4psb-ai wants to merge 20 commits intoopenclaw:mainfrom
Conversation
Three workflows have echo-only "disabled-target" jobs that fall back to GitHub's 360-minute job default. Even trivial echo jobs deserve an explicit small timeout to bound runner exposure on stalled steps.
PR#53's Validation note flagged "two existing notifier tests with Node 22
cancelledByParent". The repo's engines.node is >=24, so Node 22 is
unsupported, but install does not enforce engine-strict and the false
alarm has now surfaced twice.
Verified all 22 notifier tests pass cleanly on Node 24.14.0 and 25.6.1
(node --test test/repair/notify-{events,merge,github-activity}.test.ts).
The 5-second retry-path tests trip the older node:test runner; on
supported Node they finish without cancellation.
Add a short note to AGENTS.md so the next contributor running on Node 22
knows the failure is environmental, not a regression.
Three write-side workflows lacked a top-level concurrency: block: - repair-comment-router.yml (cron */5min + repository_dispatch) - repair-self-heal.yml (cron 17,47 hourly) - repair-finalize-open-prs.yml (workflow_dispatch only) Without a group, overlapping cron/dispatch runs can race each other on git push (rebase-strategy=theirs ledger commits) and dispatch worker slots. comment-router uses a per-target dynamic group to keep parallel target-repo runs separate; self-heal and finalize-open-prs use static singleton groups since they operate fleet-wide. cancel-in-progress is false everywhere — these workflows write ledger state and should not be interrupted mid-publish.
Signed-off-by: samzong <samzong.lu@gmail.com> (cherry picked from commit 64a3c46)
(cherry picked from commit f868b6c)
(cherry picked from commit e2853b3)
(cherry picked from commit 9d1b504)
(cherry picked from commit e74aa62)
(cherry picked from commit 87f0075)
The Policy RFC engine is proposal-only, but its generated artifacts must be reproducible enough for maintainers to review and diff safely. Derive default timestamps from observed evidence instead of wall-clock time, and preserve archived closed-record item numbers alongside active items. Constraint: PR openclaw#39 was reviewed with two P1 launch blockers around nondeterminism and closed-record parsing. Rejected: Require every caller to pass timestamps | exported helpers are still public test surfaces and should be safe by default. Confidence: high Scope-risk: narrow Directive: Do not reintroduce wall-clock defaults in policy-rfc generation without deterministic tests. Tested: pnpm run build:all; node --test test/policy-rfc.test.ts
The fork is serving as the launch-ready runtime lane while upstream merge access is unavailable. Add a scheduled verifier that rebases the fork-only patch stack onto latest openclaw/clawsweeper main, runs the same pnpm check gate, and only then updates fork main. Constraint: ds4psb-ai has READ on upstream but can write the fork main used by the local OpenClaw runtime. Rejected: Blindly pull upstream into the fork | merge commits accumulate drift and do not prove the replayed launch stack still passes. Confidence: medium Scope-risk: narrow Directive: Keep this workflow fork-gated; it must not push from upstream if the batch PR is merged. Tested: workflow syntax inspected locally; full runtime verification follows via GitHub Actions after push.
The scheduled replay job should prove the fork patch stack still applies without rewriting main when the replayed tree is unchanged. Compare tree IDs after pnpm check so the action still verifies but avoids churn from fresh cherry-pick commit metadata. Constraint: The fork main branch is the runtime surface and should stay stable unless upstream drift changes the verified tree. Confidence: high Scope-risk: narrow Tested: pnpm run check before this workflow-only refinement; pnpm run format:check after.
The fork now carries all seven launch-readiness PRs plus the Policy RFC fixups, so the unreleased changelog should make that provenance reviewable for upstream maintainers and the production runtime fork. Constraint: Upstream merge access is unavailable, so attribution must describe the integrated fork batch without pretending the upstream PRs are merged. Confidence: high Scope-risk: narrow Tested: pending final pnpm run check on this exact head.
PR openclaw#53's pagination math was covered, but the load-bearing fetch orchestration was not. Export the window hydrator with injectable fetchers and cover the page-one tail-overlap boundary plus missing-total fallback so future refactors cannot double-fetch or drop retained context silently. Constraint: This is a launch-readiness fixup for a P1 review finding on PR openclaw#53. Rejected: Only test githubContextWindowPlan | the bug class is in how planned pages are fetched and stitched, not the pure plan math alone. Confidence: high Scope-risk: narrow Directive: Keep total-less GitHub responses on the full-pagination fallback unless GitHub exposes reliable count metadata. Tested: pnpm run build:all; node --test test/clawsweeper.test.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ca24e77ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (let page = plan.tailFirstPageNumber; page <= plan.lastPageNumber; page += 1) { | ||
| tailPages.push(...(page === 1 && plan.keepStart > 0 ? firstPage : ghPage<T>(path, page))); |
There was a problem hiding this comment.
Clamp tail paging to GitHub endpoint caps
This loop trusts tailFirstPageNumber/lastPageNumber from the raw PR totals, but GitHub’s PR list endpoints are capped (files endpoint returns at most 3000 files, commits endpoint at most 250 commits). For large PRs where pull.changed_files or pull.commits exceeds those caps, the computed tail pages are beyond what the API can return, so this branch fetches only empty pages and tailItems becomes empty. That drops the newest context from the prompt (regression from the prior full-pagination behavior, which still preserved a tail from the retrievable window).
Useful? React with 👍 / 👎.
| distinctRepos: distinctRepos.length, | ||
| successfulOutcomes, | ||
| latestObservedAt, | ||
| now: options.now ?? deterministicReferenceDate(latestObservedAt), |
There was a problem hiding this comment.
Preserve recency signal in default confidence scoring
The default now value is derived from each pattern’s own latestObservedAt, so any pattern with a valid timestamp is scored with age 0 days and gets maximum recency credit. That effectively disables recency differentiation in normal runs (runPolicyRfc does not pass now), allowing very old and very new patterns to tie on the recency component. A deterministic reference date should be shared across all groups (for example the latest observation in the whole dataset), not recomputed per pattern.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65749d48cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mkdirSync(outputDir, { recursive: true }); | ||
| for (const pattern of scored) { |
There was a problem hiding this comment.
Delete stale policy proposal files before writing new output
runPolicyRfc only writes/overwrites proposals that are currently scored, so rerunning with fewer or changed qualifying patterns leaves old *.md/*.json files in results/policy-rfc/<repo-slug>/. That causes consumers of this directory to see proposals that are no longer supported by current evidence, which can silently skew review dashboards and downstream automation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 117c88aad729a47d5bb16979c5b83c1279634079.
runPolicyRfcnow removes stale generatedpolicy-rfc-*.md/policy-rfc-*.jsonfiles from the output directory before writing the current proposal set.- Non-generated operator notes are preserved.
- Added regression coverage:
runPolicyRfc removes stale generated proposal files before writing current output. - Verification: local and fresh-clone
pnpm run checkboth passed at this head (test:unit134,test:repair248,test:coverage382; lint/format clean), and fork sync verifier passed: https://github.com/ds4psb-ai/clawsweeper/actions/runs/25577532770
|
Happy to discuss maintainer requests from humans with a face. This profile seems to be a bot. |
Ready-to-merge batch + collaborator request.
This PR is the launch-ready consolidation branch from
ds4psb-ai/clawsweeper@main. It preserves the existing seven open PR patch sets, adds the concrete launch-readiness fixups from review/follow-up commits, and adds a fork sync verifier so Ted's runtime can stay aligned while upstream merge access is pending.Crisp ask
Please do one of these:
ds4psb-aias a collaborator onopenclaw/clawsweeperso I can land/rebase the seven PRs through the normal squash-merge path.Included PRs / attribution
@samzong: guard likely-owner commit links so non-SHA provenance no longer renders as broken/commit/...URLs.@stainlu: cache comment-router issue-comment lookups, including the follow-up async prehydration fix.@stainlu: bound repair plan PR file/commit hydration, including the latest hydration-limit validation and multi-page coverage follow-up.@stainlu: bound review context hydration for large PRs while preserving head/tail prompt semantics, including endpoint-cap tail clamping for GitHub PR file/commit windows.@Freeak88: proposal-only Policy RFC Engine.records/<repo>/closed/<item>.mdpaths now preserve#<item>instead of falling back to the raw path.policy-rfc-*.md/jsonproposal files are cleared before each run writes the current proposal set, while non-generated operator notes are preserved.@ds4psb-ai: document Node 22 notifiercancelledByParentas environmental; repo requires Node 24+.@ds4psb-ai: CI hardening via workflow timeouts and write-side workflow concurrency groups.Review references already posted
Extra launch-readiness work in this batch
CHANGELOG.mdnow has consolidated attribution for the integrated batch without pretending the upstream PRs were already merged..github/workflows/sync-from-upstream.ymlis fork-gated tods4psb-ai/clawsweeper; it replays the fork-only patch stack onto latestopenclaw/clawsweeper@main, runspnpm run check, and only force-updates forkmainif the verified replay tree changes.Validation
Latest verified batch head:
ds4psb-ai/clawsweeper@117c88aad729a47d5bb16979c5b83c1279634079.pnpm run checkpassed.lint: 0 warnings / 0 errors.test:unit: 134 pass, 0 fail.test:repair: 248 pass, 0 fail.test:coverage: 382 pass, 0 fail; line coverage gate 62.91% against required 49%.format:check: all matched files formatted.ds4psb-ai/clawsweeper@117c88aad729a47d5bb16979c5b83c1279634079:pnpm install --frozen-lockfilepassed.pnpm run checkpassed with the same 134/248/382 test counts and clean lint/format.openclaw/clawsweeperatb9a420e71bdc72e6fecafac1a6480448219d40ccgit fetch https://github.com/ds4psb-ai/clawsweeper.git maingit merge --ff-only FETCH_HEADto117c88aad729a47d5bb16979c5b83c1279634079pnpm install --frozen-lockfilepassedpnpm run checkpassed with the same 134/248/382 test counts and clean lint/format.notifyskipped successfully by the fork-gated workflow predicate: https://github.com/openclaw/clawsweeper/actions/runs/25577529155/job/75088281285Why this exists
ds4psb-aicurrently hasREADonopenclaw/clawsweeper, so I cannot usegh pr merge, labels, workflow dispatch, or contributor-branch push even where PRs setmaintainerCanModify: true. This batch makes the maintainer action one click while keeping the original contributor PRs and reviews linked for credit.