Skip to content

OpenCode suggestions for PR #34 - #35

Closed
git-code-reviewer-v1[bot] wants to merge 1 commit into
feat/meaning-presetfrom
opencode/pr-34-suggestions-0a80324
Closed

OpenCode suggestions for PR #34#35
git-code-reviewer-v1[bot] wants to merge 1 commit into
feat/meaning-presetfrom
opencode/pr-34-suggestions-0a80324

Conversation

@git-code-reviewer-v1

Copy link
Copy Markdown

This PR contains automated suggestions for #34.

Merging this PR will apply the suggestions directly into the reviewed branch (feat/meaning-preset).

[opencode-suggestion]

Original PR: #34
Original head SHA: 0a80324
Suggestions: 3
Changed lines: 38
@git-code-reviewer-v1

Copy link
Copy Markdown
Author

👀 Starting code review...

@git-code-reviewer-v1

Copy link
Copy Markdown
Author

🔄 Cloning repository...

@git-code-reviewer-v1

Copy link
Copy Markdown
Author

🤖 Analyzing code with opencode...

@git-code-reviewer-v1

Copy link
Copy Markdown
Author

This suggestion PR is now obsolete because the original PR #34 has been closed/merged. Closing automatically.

@alessiosavi
alessiosavi deleted the branch feat/meaning-preset July 15, 2026 00:22
@git-code-reviewer-v1
git-code-reviewer-v1 Bot deleted the opencode/pr-34-suggestions-0a80324 branch July 15, 2026 00:22
@git-code-reviewer-v1

Copy link
Copy Markdown
Author

✅ Review complete!

@git-code-reviewer-v1 git-code-reviewer-v1 Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Self-approval guardrail: the review decision was degraded from "request_changes" to "comment" because the bot cannot formally review its own PR.

This PR introduces syntax errors in all three changed files, preventing compilation, and introduces an incorrect test assertion.

Blocking issues:

  1. Duplicate package declarations in hygiene.go and meaning.go: Both files now contain two package textnorm lines with orphaned comment fragments between them. This is invalid Go syntax.
  2. Missing closing brace in fuzz_test.go: FuzzHygienePreset is nested inside FuzzMeaningPreset because the closing } for FuzzMeaningPreset was removed.
  3. Incorrect idempotency assertion in fuzz_test.go: HygienePreset includes a DecodeHTMLEntities stage (non-idempotent; e.g. "&""&""&"). The previous version of this test explicitly avoided an idempotency check for this reason. The new assertion will cause the fuzzer to fail on valid inputs.

Additional comments (could not be anchored to the PR diff)

  • textnorm/meaning.go:21 — The file now contains two package textnorm declarations separated by a duplicated comment fragment from the old package doc. This is invalid Go syntax.

Comment thread textnorm/fuzz_test.go
Comment on lines 105 to +106
})
func FuzzHygienePreset(f *testing.F) {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

FuzzHygienePreset is nested inside FuzzMeaningPreset because the closing brace } for FuzzMeaningPreset was removed.

Suggested change
})
func FuzzHygienePreset(f *testing.F) {
})
}
func FuzzHygienePreset(f *testing.F) {

Comment thread textnorm/fuzz_test.go
if err != nil {
t.Fatalf("second Run() error = %v", err)
}
if out1 != out2 {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

HygienePreset includes DecodeHTMLEntities, which is non-idempotent on inputs like "&" (first run → "&", second → "&"). The previous version of this test explicitly avoided an idempotency check for this reason. This assertion will cause the fuzzer to fail on valid inputs.

Comment thread textnorm/hygiene.go
Comment on lines +1 to 7
// hygiene.go: byte-hygiene stages for text that will be
// sent to an external model or stored verbatim. These stages never touch
// case, punctuation, or diacritics.
package textnorm
// sent to an external model or stored verbatim. These stages never touch
// case, punctuation, or diacritics.
package textnorm

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The file now contains two package textnorm declarations and a leftover comment fragment from the old package doc. This is invalid Go syntax.

Suggested change
// hygiene.go: byte-hygiene stages for text that will be
// sent to an external model or stored verbatim. These stages never touch
// case, punctuation, or diacritics.
package textnorm
// sent to an external model or stored verbatim. These stages never touch
// case, punctuation, or diacritics.
package textnorm
// hygiene.go: byte-hygiene stages for text that will be
// sent to an external model or stored verbatim. These stages never touch
// case, punctuation, or diacritics.
package textnorm

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