Skip to content

revert: last 2 commit(s) on master (code-review demo)#2

Open
kramlipi wants to merge 2 commits into
masterfrom
revert/last-2-20260718-233413
Open

revert: last 2 commit(s) on master (code-review demo)#2
kramlipi wants to merge 2 commits into
masterfrom
revert/last-2-20260718-233413

Conversation

@kramlipi

Copy link
Copy Markdown
Owner

Summary

Automated revert of the last 2 non-merge commit(s) on master for a
kramlipi code-agent code-review receipt.

Reverted

Notes

  • Do not merge unless you intend to undo those changes on this fork.
  • Generated by scripts/gtm/revert_mr_review.py.

— kramlipi · cluevion@gmail.com · https://kramlipi.com · https://kramlipi.github.io

@kramlipi kramlipi left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Automated code review by kramlip code-agent.

Review notes from kramlip code-agent (@kramlipi_code_review_bot) — grounded scanners + critic, not a rubber stamp.

Comment thread chi.go
@@ -102,7 +102,6 @@ type Router interface {
Patch(pattern string, h http.HandlerFunc)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Should fix · api_break · chi.go:102 · Removal of Query method from Router interface

What: The Query method has been removed from the Router interface and Mux implementation.
Why it matters: This is a breaking change for any users relying on r.Query(...) to handle HTTP QUERY requests. While RFC 10008 is relatively new, removing it without a deprecation cycle or clear migration path (other than MethodFunc) forces immediate refactoring on consumers.
Do this: If this removal is intentional, ensure it is documented in the release notes and consider if a deprecation period was possible.

Suggestion:

Suggested change
Patch(pattern string, h http.HandlerFunc)
Keep the method but mark it as deprecated if removal is necessary.

Callers that may care:

  • _examples/custom-method/main.go:11RegisterMethodchi.RegisterMethod("LINK")
  • _examples/custom-method/main.go:12RegisterMethodchi.RegisterMethod("UNLINK")
  • _examples/custom-method/main.go:13RegisterMethodchi.RegisterMethod("WOOHOO")
  • CHANGELOG.md:244RegisterMethod- New chi.RegisterMethod(method) to add support for custom HTTP methods, see _examples/custom-method
  • CHANGELOG.md:245RegisterMethod- Deprecated LINK and UNLINK methods from the default list, please use chi.RegisterMethod("LINK")

Comment thread .github/workflows/ci.yml
steps:
- name: Install Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
uses: actions/setup-go@v5

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Worth a look · consistency · .github/workflows/ci.yml:30 · PR title/diff inconsistency

What: PR title emphasizes topics that do not appear in changed paths or added code (code, demo, last, master, revert, review).

Why it matters: Align the message or the diff. (scanner:commit_consistency)

Do this: Either fix it in this PR, or reply here explaining why the current behavior is intentional.

Evidence: title='revert: last 2 commit(s) on master (code-review demo)'; missing_in_diff=['code', 'demo', 'last', 'master', 'revert', 'review']

Callers that may care:

  • _examples/custom-method/main.go:11RegisterMethodchi.RegisterMethod("LINK")
  • _examples/custom-method/main.go:12RegisterMethodchi.RegisterMethod("UNLINK")
  • _examples/custom-method/main.go:13RegisterMethodchi.RegisterMethod("WOOHOO")
  • CHANGELOG.md:244RegisterMethod- New chi.RegisterMethod(method) to add support for custom HTTP methods, see _examples/custom-method
  • CHANGELOG.md:245RegisterMethod- Deprecated LINK and UNLINK methods from the default list, please use chi.RegisterMethod("LINK")

Comment thread README.md
@@ -221,7 +221,6 @@ type Router interface {
Patch(pattern string, h http.HandlerFunc)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Worth a look · consistency · README.md:221 · No blast-radius risk

What: The changes remove the Query method.
Why it matters: While this is an API break, the blast radius is limited to users of the Query method. A search of the provided codebase shows no internal callers of r.Query in the examples or tests (other than the test being deleted).

Callers that may care:

  • _examples/custom-method/main.go:11RegisterMethodchi.RegisterMethod("LINK")
  • _examples/custom-method/main.go:12RegisterMethodchi.RegisterMethod("UNLINK")
  • _examples/custom-method/main.go:13RegisterMethodchi.RegisterMethod("WOOHOO")
  • CHANGELOG.md:244RegisterMethod- New chi.RegisterMethod(method) to add support for custom HTTP methods, see _examples/custom-method
  • CHANGELOG.md:245RegisterMethod- Deprecated LINK and UNLINK methods from the default list, please use chi.RegisterMethod("LINK")

Comment thread tree.go
@@ -26,17 +26,11 @@ const (
mPATCH

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Worth a look · design · tree.go:26 · Removal of mQUERY constant

What: The mQUERY constant and its associated mapping logic were removed.
Why it matters: This reduces the internal support for the QUERY method. If users still need to support QUERY via MethodFunc, they must now manually manage the string constant, which is more error-prone than using the library's internal constants.
Do this: Confirm that the removal of mQUERY is consistent with the project's long-term support strategy for newer HTTP methods.

Callers that may care:

  • _examples/custom-method/main.go:11RegisterMethodchi.RegisterMethod("LINK")
  • _examples/custom-method/main.go:12RegisterMethodchi.RegisterMethod("UNLINK")
  • _examples/custom-method/main.go:13RegisterMethodchi.RegisterMethod("WOOHOO")
  • CHANGELOG.md:244RegisterMethod- New chi.RegisterMethod(method) to add support for custom HTTP methods, see _examples/custom-method
  • CHANGELOG.md:245RegisterMethod- Deprecated LINK and UNLINK methods from the default list, please use chi.RegisterMethod("LINK")

@kramlipi

Copy link
Copy Markdown
Owner Author

Review notes

4 note(s) — 0 must-fix · 1 should-fix · 3 worth a look · 1 from deterministic scanners

Themes: consistency (2), api_break (1), design (1)

Start here:

  • chi.go:102 (should-fix) — Removal of Query method from Router interface
  • .github/workflows/ci.yml:30 (look) — PR title/diff inconsistency
  • README.md:221 (look) — No blast-radius risk
  • tree.go:26 (look) — Removal of mQUERY constant

Review notes from kramlip code-agent (@kramlipi_code_review_bot) — grounded scanners + critic, not a rubber stamp.

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.

1 participant