Repository navigation
docs(gopilot): resolve self-contradiction in error-handling section - #21
Merged
Merged
Conversation
The "Wrap with context" guidance and the "Handle Errors Once" section
disagreed:
- "Wrap with context" said use low-cardinality strings AND showed a
Good example with slog.ErrorContext(...) at the wrap site followed by
return fmt.Errorf(...). That's exactly the "log AND return" pattern
the next section labels Bad.
- "Handle Errors Once"'s Good example used fmt.Errorf("connect to %s",
addr, err) — a high-cardinality wrap, contradicting the previous rule.
Real Go code is mostly intermediate (wrap-and-return), not boundary
code. Mixing boundary-level logging into wrap-site advice is what
created the contradiction. Resolution:
1. Wrap sites only wrap (low-cardinality).
2. Variable data (IDs, names, paths) is logged once at the application
boundary — HTTP middleware, gRPC interceptor, top-level main —
from ctx-scoped fields or from a single structured slog.Error call.
3. Caveat acknowledging the rule presumes a boundary that surfaces
variable data structurally; if it doesn't, embedding the variable
in the wrap is the lesser evil. Treat low-cardinality as an
optimization, not a correctness rule.
Bump to 1.0.34.
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".claude-plugin/plugin.json">
<violation number="1" location=".claude-plugin/plugin.json:3">
P2: Version bump is incomplete: `plugin.json` is `1.0.34` but marketplace manifest versions remain `1.0.33`, which can cause mismatched published/update metadata.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| { | ||
| "name": "gopilot", | ||
| "version": "1.0.33", | ||
| "version": "1.0.34", |
There was a problem hiding this comment.
P2: Version bump is incomplete: plugin.json is 1.0.34 but marketplace manifest versions remain 1.0.33, which can cause mismatched published/update metadata.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .claude-plugin/plugin.json, line 3:
<comment>Version bump is incomplete: `plugin.json` is `1.0.34` but marketplace manifest versions remain `1.0.33`, which can cause mismatched published/update metadata.</comment>
<file context>
@@ -1,6 +1,6 @@
{
"name": "gopilot",
- "version": "1.0.33",
+ "version": "1.0.34",
"description": "gopilot is your Go copilot - a skill for writing idiomatic Go code, covering design patterns, error handling, testing, concurrency, generics, and stdlib patterns up to Go 1.26.",
"author": {
</file context>
gonzaloserrano
added a commit
that referenced
this pull request
May 7, 2026
…ce.json (#22) Manual edits to plugin.json bypassed make bump and left marketplace.json behind, producing inconsistent published metadata (caught in PR #21 review). - Add check-version-sync target as a prerequisite of bump; aborts with a diff dump if the three version fields drift. - Fix CLAUDE.md: bump script doesn't touch SKILL.md frontmatters; warn against editing version fields by hand. - Bump to 1.0.35.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Wrap with context" guidance and the "Handle Errors Once" section disagreed:
Real Go code is mostly intermediate (wrap-and-return), not boundary code. Mixing boundary-level logging into wrap-site advice is what created the contradiction. Resolution:
Bump to 1.0.34.