Skip to content

Clarify offline default branch planning - #320

Merged
steipete merged 1 commit into
openclaw:mainfrom
Jhacarreiro:fix/offline-default-branch
Jun 19, 2026
Merged

steipete merged 1 commit into
openclaw:mainfrom
Jhacarreiro:fix/offline-default-branch

Conversation

@Jhacarreiro

Copy link
Copy Markdown
Contributor

Summary

Avoid reporting main as the repository branch when plan-cluster runs in offline mode and cannot hydrate the real default branch.

Online planning already asks GitHub for default_branch. Offline planning cannot know that value, so the artifact should mark it as unknown instead of fabricating a main branch URL.

Changes

  • Change the offline branch fallback from main to unknown.
  • Point the offline URL at the repository rather than /tree/main.
  • Add a regression test for offline planning output.

Validation

  • corepack pnpm run build:repair
  • node --test test/repair/plan-cluster.test.ts

@clawsweeper

clawsweeper Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 18, 2026, 4:55 PM ET / 20:55 UTC.

Summary
The PR changes offline plan-cluster output to report an unknown default branch and repository-root URL instead of fabricating main, with a regression test for the offline artifact.

Reproducibility: yes. from source inspection: current main's offline helper reports main and /tree/main without fetching a default branch. I did not run the PR branch, so this is source-reproducible rather than executed.

Review metrics: 1 noteworthy metric.

  • Repair files touched: 2 files changed, 48 additions, 3 deletions. The patch is confined to the repair planning helper and its focused regression test.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted terminal output or a cluster-plan.json excerpt from an offline plan-cluster run showing the new main object.
  • After adding proof, update the PR body to trigger a fresh review; if that does not happen, ask a maintainer to comment @clawsweeper re-review.

Proof guidance:

  • [P1] Needs real behavior proof before merge: Only build and unit-test validation is described; real offline-run output or a redacted artifact excerpt is still needed before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] External contributor proof is limited to build and unit-test claims; no redacted offline artifact output or terminal run output was provided.
  • [P1] The GitHub check rollup was still in progress during review, so maintainers should wait for normal CI before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Merge the narrow metadata correction after the contributor adds real offline-run proof and normal CI completes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] No automated code repair is needed; the remaining gate is contributor-supplied real behavior proof plus normal CI/maintainer merge review.

Security
Cleared: The diff does not change credentials, workflow permissions, dependency resolution, downloaded artifacts, or package execution sources.

Review details

Best possible solution:

Merge the narrow metadata correction after the contributor adds real offline-run proof and normal CI completes.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection: current main's offline helper reports main and /tree/main without fetching a default branch. I did not run the PR branch, so this is source-reproducible rather than executed.

Is this the best way to solve the issue?

Yes; reporting an unknown branch and linking the repository root is the narrowest maintainable correction when offline mode cannot hydrate the real default branch.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a6ee02e323c1.

Label changes

Label changes:

  • add P3: This is a low-risk repair-artifact metadata correction for offline planning rather than an urgent runtime failure.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Only build and unit-test validation is described; real offline-run output or a redacted artifact excerpt is still needed before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is a low-risk repair-artifact metadata correction for offline planning rather than an urgent runtime failure.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Only build and unit-test validation is described; real offline-run output or a redacted artifact excerpt is still needed before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

What I checked:

Likely related people:

  • TurboTheTurtle: Authored the merged online default-branch planning PR that changed fetchMainBranch and added the nearby default-branch regression test. (role: recent adjacent contributor; confidence: high; commits: b13706852cc2; files: src/repair/plan-cluster.ts, test/repair/plan-cluster.test.ts)
  • Peter Steinberger: Merged the related default-branch work and local blame attributes the current helper block to the release commit in this checkout history. (role: merger and source-history owner; confidence: medium; commits: dc824915bb6c, 932d56f2c4fd; files: src/repair/plan-cluster.ts, test/repair/plan-cluster.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 18, 2026
@Jhacarreiro

Copy link
Copy Markdown
Contributor Author

Validation evidence

Local validation run against this branch:

corepack pnpm run build:repair
node --test test/repair/plan-cluster.test.ts

Result:

build:repair: passed
plan-cluster.test.ts: passed

Behavior covered by the regression test:

plan-cluster offline mode does not pretend the default branch is main

The test verifies that offline planning reports:

{
  "name": "unknown",
  "sha": null,
  "url": "https://github.com/openclaw/openclaw",
  "note": "offline mode did not fetch current default branch"
}

This keeps online behavior unchanged while avoiding fabricated /tree/main evidence in offline artifacts.

@steipete
steipete merged commit 6990a7a into openclaw:main Jun 19, 2026
8 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Landed after maintainer verification.

Proof:

  • Structured Codex autoreview against origin/main: clean, no accepted/actionable findings.
  • pnpm run build:repair && node --test test/repair/plan-cluster.test.ts: 8 passed, 0 failed.
  • Direct offline dist/repair/plan-cluster.js execution produced cluster-plan.json with main.name set to unknown, a null SHA, the repository-root URL, and the corrected default-branch note.
  • GitHub CI and CodeQL were green on the reviewed head.

Landed commit: 6990a7a407b7c497601d48b2c4c3f8be6694fc81

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

Labels

rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants