Skip to content

fix(docs): report post-merge draft conflicts - #12845

Merged
cv merged 3 commits into
mainfrom
fix/post-merge-docs-tunnel-conflict
Oct 26, 2026
Merged

cv merged 3 commits into
mainfrom
fix/post-merge-docs-tunnel-conflict

Conversation

@kaofelix

@kaofelix kaofelix commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

The post-merge docs run now reports the files and Git messages behind a draft merge conflict, plus a link to recovery steps. Before this change, it printed only the failed git merge-tree command line.

Reason

Run 37808064216 failed before authoring started. The managed draft and main changed the same lines in docs/manage-sandboxes/run-sandboxes.mdx. The error gave no clue which file or lines conflicted, and a rerun without a change hits the same conflict.

Changes

  • tools/post-merge-docs/run.mts: run git merge-tree --write-tree --name-only with captured stderr. On exit status 1, fail with the draft and main SHAs, the conflicting files, Git's conflict messages, and a link to the recovery steps. Other failures still report Git's stderr.
  • docs/AUTOMATION.md: add "Resolve a Draft Merge Conflict." It explains how to reproduce the conflict and choose between two recovery paths: fix main and keep the draft automated, or mark the draft ready for review and take ownership. Link it from tools/post-merge-docs/README.md.

An earlier revision also reworded the Cloudflare tunnel text in run-sandboxes.mdx. The managed draft that conflicted has since merged, so that change is dropped from this PR.

Verification

  • npx vitest run test/generation/post-merge-docs.test.ts: the conflict test checks the conflicting file, Git's CONFLICT line, and the recovery link. It failed before the runner change.
  • Ran executePostMergeDocs locally with the failed run's SHAs. The error names docs/manage-sandboxes/run-sandboxes.mdx and includes Git's conflict line.
  • The diff contains no secrets, API keys, or credentials.

Signed-off-by: Kao Félix me@kaofelix.dev

The post-merge docs author failed with only the git command line when the
managed draft conflicted with main. Report the conflicting files and git's
conflict messages, and document how to recover.

Align the Cloudflare tunnel sections in run-sandboxes.mdx with current
behavior: tunnel start targets the selected sandbox's registered dashboard
port, and tunnel state is scoped to the OpenShell gateway port. This lets
the open managed draft merge cleanly with main.

Signed-off-by: Kao Félix <me@kaofelix.dev>
@kaofelix kaofelix self-assigned this Oct 8, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: f50bbea5-0356-4d82-83fa-36760bd04325
📥 Commits

Reviewing files that changed from the base of the PR and between e63abc0 and ee45d48.

📒 Files selected for processing (5)
  • docs/AUTOMATION.md
  • docs/manage-sandboxes/run-sandboxes.mdx
  • test/generation/post-merge-docs.test.ts
  • tools/post-merge-docs/README.md
  • tools/post-merge-docs/run.mts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Walkthrough

The documentation runner now merges managed drafts with main before authoring and reports merge conflicts with recovery instructions. Sandbox tunnel guidance now describes dashboard-port selection for OpenClaw and Hermes.

Changes: Managed draft merge handling

Layer / File(s) Summary
Merge drafts and document conflict recovery
tools/post-merge-docs/run.mts, test/generation/post-merge-docs.test.ts, tools/post-merge-docs/README.md, docs/AUTOMATION.md
The runner uses git merge-tree to merge the draft with main. It uses the resulting tree during preparation, or fails on conflicts with conflicting files, Git diagnostics, and a recovery link. The test checks the diagnostic details, and the documentation explains the recovery paths.

Sandbox tunnel documentation

Layer / File(s) Summary
Describe dashboard tunnel selection and lifecycle
docs/manage-sandboxes/run-sandboxes.mdx
OpenClaw and Hermes instructions say the tunnel exposes the selected sandbox’s registered dashboard port. They identify the sandbox-selection environment variables and registry-default fallback. The instructions also state that tunnels persist independently of sandbox lifecycle changes.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant prepare
  participant mergeDraftTree
  participant Git
  prepare->>mergeDraftTree: Merge draft tree with main
  mergeDraftTree->>Git: Run git merge-tree
  Git-->>mergeDraftTree: Return tree SHA or conflict output
  alt Merge succeeds
    mergeDraftTree-->>prepare: Return validated tree SHA
    prepare->>prepare: Reset checkout to merged tree
  else Merge conflicts
    mergeDraftTree-->>prepare: Report files, diagnostics, and recovery link
  end
Loading

Suggested reviewers: cv, apurvvkumaria

Merge Risk: Minimal · up to ee45d

Conflict failures now provide file-specific diagnostics and recovery guidance, and the tunnel documentation clarifies sandbox selection. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: reporting post-merge draft conflicts in documentation automation.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd fix/post-merge-docs-... e02c232 +/-
96% 97% +1%
View coverage of the 10 most impacted files.
File main 63002cd fix/post-merge-docs-... e02c232 +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/ru...time-context.ts 100% 100% 0%
nemoclaw/src/sh...er-boundary.cts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

main 63002cd fix/post-merge-docs-... e02c232 +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd fix/post-merge-docs-... e02c232 +/-
src/lib/onboard.ts 62% 50% -12%
src/lib/actions...ess-recovery.ts 65% 81% +16%
src/lib/state/l...diness-lease.ts 66% 83% +17%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 72% +72%
src/lib/inferen...er/lifecycle.ts 0% 73% +73%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 81% +81%
src/lib/inferen...ovider/index.ts 0% 88% +88%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 25, 2026 14:49 UTC

@kaofelix
kaofelix marked this pull request as ready for review October 9, 2026 18:56
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: docs Documentation, examples, guides, or docs build chore Build, CI, dependency, or tooling maintenance labels Oct 13, 2026
Signed-off-by: Kao Félix <me@kaofelix.dev>
@kaofelix kaofelix changed the title fix(docs): report post-merge draft conflicts and align tunnel guidance fix(docs): report post-merge draft conflicts Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit e02c232. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@cv
cv merged commit 4695918 into main Oct 26, 2026
76 of 77 checks passed
@cv
cv deleted the fix/post-merge-docs-tunnel-conflict branch October 26, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: docs Documentation, examples, guides, or docs build chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants