Skip to content

docs: allow the export_test.go alias - #161

Merged
retr0h merged 1 commit into
mainfrom
docs/export-test-alias
Aug 16, 2026
Merged

docs: allow the export_test.go alias#161
retr0h merged 1 commit into
mainfrom
docs/export-test-alias

Conversation

@retr0h

@retr0h retr0h commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Follows osapi-io/specs#80, which corrected the export_test.go requirement.

This repository stated the strict form in two places — the test file conventions and done-definition item 6 — saying export_test.go may expose setters only and never var ReadX = readX aliases.

That contradicts the corrected capability. The alias is idiomatic Go; twenty-two standard library packages use it, and this repository has four of its own (BytesToString, DefaultUname, ReadInterfaces, DefaultInterfaceAddrs) that the strict rule made violations of its own documentation.

Both passages now state what the rule was always protecting:

  • Do not use an alias to test an internal step the caller's own test already covers. A pure helper with its own contract is what the pattern is for.
  • Seams sit at the boundary with the upstream library, so the bridge mapping runs on every table row — not partway through the collector.

just md-fmt-check passes.

🤖 Generated with Claude Code

The strict form here said export_test.go may expose setters only,
never an alias. That contradicts the corrected capability, and the
pattern it banned is idiomatic Go used by twenty-two standard
library packages.

The concern was always about a test re-covering what the caller's
test already reaches, and about where a seam sits. Both say that now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #161   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          184       184           
  Lines         6359      6359           
=========================================
  Hits          6359      6359           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ccdc3b...8599691. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@retr0h
retr0h merged commit 1bdc253 into main Aug 16, 2026
9 checks passed
@retr0h
retr0h deleted the docs/export-test-alias branch August 16, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant