Skip to content

docs: encourage .pr/ HTML design doc + htmlpreview link for non-trivial PRs - #4371

Merged
enyst merged 5 commits into
OpenHands:mainfrom
smolpaws:docs/pr-design-doc-guideline
Aug 9, 2026
Merged

docs: encourage .pr/ HTML design doc + htmlpreview link for non-trivial PRs#4371
enyst merged 5 commits into
OpenHands:mainfrom
smolpaws:docs/pr-design-doc-guideline

Conversation

@smolpaws

@smolpaws smolpaws commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

HUMAN:

Docs-only change, the SDK counterpart to OpenHands/OpenHands#16316. Reviewed the rendered template and CONTRIBUTING section locally; htmlpreview link shape verified against the .pr/ convention already wired in this repo.

AGENT:

Why

Reviewers of a non-trivial SDK PR often reconstruct the design from the diff alone — slow, and it is exactly where the compatibility risks this repo cares about hide (Python API + agent-server REST/WebSocket surface). This adds a soft, optional guideline: commit a self-contained HTML design doc under the temporary .pr/ directory and link it via htmlpreview so reviewers see the code/API design and before/after at a glance. The .pr/ directory is already auto-removed on approval (.github/workflows/pr-artifacts.yml).

This is the counterpart to the OpenHands/OpenHands guideline PR, same process, so both repos read consistently.

Summary

  • PR template: add an optional ## Design Doc section with the htmlpreview link shape.
  • CONTRIBUTING.md: add a "Design doc for non-trivial PRs" section, emphasizing the interface before/after and the compatibility impact (additive / breaking / behind a flag) this repo reviews for.

Issue Number

N/A (docs; companion to OpenHands/OpenHands#16316)

How to Test

Docs only — nothing to run. Read .github/PULL_REQUEST_TEMPLATE.md (new ## Design Doc block) and CONTRIBUTING.md ("Design doc for non-trivial PRs"). The htmlpreview link shape is:

https://htmlpreview.github.io/?https://github.com/<your-fork>/<repo>/blob/<your-branch>/.pr/design.html

Companion PRs: OpenHands/OpenHands#16316 (same guideline) and OpenHands/extensions#451 (the pr-design-doc skill that generates the page).

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

Soft-encouraged, not enforced. htmlpreview works only for public repos and self-contained pages.

Co-authored-by: smolpaws engel@enyst.org

…al PRs

Add a soft guideline mirroring OpenHands/OpenHands: for non-trivial PRs,
commit a self-contained HTML design doc under the temporary .pr/ directory
(auto-removed on approval) and link it in the PR description via htmlpreview
so reviewers see the code/API design and before/after at a glance.

- PR template: new optional 'Design Doc' section with the htmlpreview link shape.
- CONTRIBUTING.md: a 'Design doc for non-trivial PRs' section, emphasizing the
  before/after of the interface and the compatibility impact this repo cares about.

Co-authored-by: smolpaws <engel@enyst.org>
@all-hands-bot

Copy link
Copy Markdown
Collaborator

🤖 OpenHands is reviewing this PR.

Head commit: a1241c3bc570541a843bed1a83b8e04e975e2d03
View the conversation: https://oss-agent-canvas.ngrok.dev/conversations/a1d0dc9f-bf8e-46ff-9e0a-d8498475cc27

This comment was posted by an AI agent (OpenHands).

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was created by an AI agent (OpenHands) on behalf of the repository maintainers.

Summary

Docs-only PR adding an optional, soft-encouraged guideline: commit a self-contained HTML design doc under the temporary .pr/ directory and link it via htmlpreview so reviewers can see the interface before/after and compatibility impact at a glance. The addition lands in both .github/PULL_REQUEST_TEMPLATE.md (a ## Design Doc section) and CONTRIBUTING.md (a "Design doc for non-trivial PRs" section).

The guideline is well-scoped: explicitly optional, correctly scoped to non-trivial PRs (public API / agent-loop / migration), and it points at the right compatibility lens (additive / breaking / behind a flag) this repo reviews for. The htmlpreview link shape is consistent between the two files, and the htmlpreview only works for public repos and self-contained pages caveat is stated in both places.

Findings

One material accuracy issue (detailed inline): the auto-removal guarantee is stated unconditionally, but .github/workflows/pr-artifacts.yml only auto-removes .pr/ for same-repository PRs (head.repo.full_name == github.repository). Fork PRs get no auto-cleanup, yet the link shape points contributors at <your-fork>. For a fork PR approved and merged without manual removal, .pr/ can land in main, so "it never lands in main" is not guaranteed there. The repo's own AGENTS.md already documents this fork caveat ("For fork PRs: You must manually remove .pr/ before the PR can be merged"); the new user-facing docs should align by noting fork PRs require manual removal.

Risk assessment

Low risk. No code, no tests, no config, no security surface. The only issue is a documentation accuracy gap that could mislead fork-based contributors into assuming .pr/ is always cleaned up. Recommend adding a one-line fork caveat; otherwise this is good to merge.

Correctness / security / tests

  • Correctness: No executable code; claims verified against .github/workflows/pr-artifacts.yml (auto-removal is same-repo only) and the existing .pr/ convention.
  • Security: No concerns — docs only, no code execution, no secrets, no external network calls introduced.
  • Tests: Appropriately none for a docs-only change.
  • Style: Markdown is consistent with the surrounding files; no lint concerns.

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
enyst and others added 2 commits August 10, 2026 00:27
The pr-artifacts workflow cleans up .pr/ on approval only for
same-repository PRs, and removes it from the base branch right after
merge for fork PRs. Update the design-doc guidance and PR template to
describe both paths accurately.

Co-authored-by: openhands <openhands@all-hands.dev>
@all-hands-bot

Copy link
Copy Markdown
Collaborator

🚦 CI is currently failing on this PR's latest commit.

Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request @all-hands-bot as a reviewer to have it reviewed regardless of CI status.)

This is an automated check - no AI was used to generate this comment.

@enyst
enyst requested a review from all-hands-bot August 9, 2026 23:20

all-hands-bot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Superseded: this was an OpenHands Cloud Automation smoke test; the actual review is at the next comment. View conversation.

all-hands-bot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Review complete.

This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here.

2 similar comments

all-hands-bot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Review complete.

This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here.

all-hands-bot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Review complete.

This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here.

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Good taste — small, focused, docs-only and accurate.

Verified the docs against .github/workflows/pr-artifacts.yml: cleanup-on-approval is gated on same-repo (it only fires when head.repo.full_name == github.repository), and cleanup-after-merge handles fork PRs by checking out the base branch and removing .pr/ after merge. Both paths match the wording in the PR template and CONTRIBUTING.md.

The latest commit (ba8192ae) addresses the prior review thread by splitting out the same-repo vs fork cleanup behavior explicitly — good catch on that one. The htmlpreview link shape is correct, and the docs stay aligned with the broader OpenHands/OpenHands guideline PR.

Nothing to block. Approving.


This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation

@enyst
enyst merged commit fb5bbee into OpenHands:main Aug 9, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants