Skip to content

Keep URI maintenance surface focused - #5

Merged
zchee merged 2 commits into
mainfrom
slop
Jun 27, 2026
Merged

Keep URI maintenance surface focused#5
zchee merged 2 commits into
mainfrom
slop

Conversation

@zchee

@zchee zchee commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary

This PR keeps the URI package maintenance surface focused after the strict
anti-slop cleanup pass.

It removes stale lint configuration copied from unrelated code paths, trims
redundant test scaffolding, and makes vector fixture failures report clearer
evidence. The only production-code change is a small internal POSIX path helper
modernization using Go 1.26-compatible standard-library APIs.

Changes

  • Remove obsolete .golangci.yaml exclusions for files that are not part of
    this module.
  • Delete a duplicate With test case that covered the same authority-clearing
    behavior twice.
  • Make allocation gate expectations table-driven instead of switching on test
    case names.
  • Use slices.Contains directly in vector metadata checks.
  • Fail explicitly when vector fixtures contain an unknown error name.
  • Modernize POSIX path helper internals with strings.SplitSeq and
    strings.Builder while preserving the existing URI path behavior.

Impact

  • Reduces stale policy surface in lint configuration.
  • Makes future test failures easier to diagnose.
  • Avoids new dependencies and preserves public API behavior.
  • Keeps the cleanup small and deletion-heavy: 5 files changed,
    21 insertions, 83 deletions.

Validation

  • go test -count=1 ./...
  • make test
  • gopls check $(git ls-files '*.go' ':!:vendor/**')
  • go vet ./...
  • tools/bin/golangci-lint run ./...
  • git diff --check
  • govulncheck ./...

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.4%. Comparing base (77008ac) to head (3b145b1).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
posixpath.go 95.4% 1 Missing ⚠️
@@          Coverage Diff          @@
##            main      #5   +/-   ##
=====================================
  Coverage   88.4%   88.4%           
=====================================
  Files         10      10           
  Lines        829     840   +11     
=====================================
+ Hits         733     743   +10     
- Misses        96      97    +1     
Flag Coverage Δ
Linux-ARM64 88.4% <95.4%> (+<0.1%) ⬆️
Linux-X64 90.4% <95.0%> (-0.1%) ⬇️
Files with missing lines Coverage Δ
posixpath.go 89.3% <95.4%> (+0.1%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zchee zchee changed the title [codex] Keep URI maintenance surface focused Keep URI maintenance surface focused Jun 27, 2026
Remove stale lint exclusions for files outside this module and trim
redundant test scaffolding so future changes fail with clearer
evidence.

Keep production cleanup limited to path helper internals already
covered by the existing URI path tests.
@zchee
zchee marked this pull request as ready for review June 27, 2026 11:53
@zchee

zchee commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies linter configurations in .golangci.yaml, refactors allocation tests in fspath_test.go to use a cleaner struct-driven approach, and optimizes path operations in posixpath.go by utilizing strings.SplitSeq and strings.Builder. Additionally, test helpers in vector_test.go are updated to use standard library functions and improve error reporting. Feedback is provided on posixpath.go to further optimize posixJoin by bypassing strings.Builder for single non-empty paths and pre-allocating the builder's capacity to minimize allocations.

Comment thread posixpath.go
zchee added a commit that referenced this pull request Jun 27, 2026
Handle zero and single non-empty joins before constructing a
builder, and grow the builder exactly for multi-part joins.

This addresses the Gemini review thread on PR #5 without changing
URI path semantics.

Co-authored-by: Codex <noreply@openai.com>
Handle zero and single non-empty joins before constructing a
builder, and grow the builder exactly for multi-part joins.

This addresses the Gemini review thread on PR #5 without changing
URI path semantics.
@zchee

zchee commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request cleans up and optimizes several components. In .golangci.yaml, unused linter overrides and comments are removed. In posixpath.go, path normalization and joining are optimized to reduce allocations by using strings.SplitSeq and strings.Builder with pre-allocated capacity. Test files are also refactored: fspath_test.go simplifies allocation gate testing with a table-driven approach, change_test.go removes a redundant test case, and vector_test.go leverages standard library functions (slices.Contains) and improves error handling in vector tests. There are no review comments, so no further feedback is provided.

@zchee
zchee merged commit 3b145b1 into main Jun 27, 2026
5 checks passed
@zchee
zchee deleted the slop branch June 27, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant