Skip to content

feat: add Go parity verification + refactor to 'parity verified' header#504

Merged
kvz merged 4 commits intomainfrom
add-golang-parity-verification
Jan 7, 2026
Merged

feat: add Go parity verification + refactor to 'parity verified' header#504
kvz merged 4 commits intomainfrom
add-golang-parity-verification

Conversation

@kvz
Copy link
Copy Markdown
Collaborator

@kvz kvz commented Jan 7, 2026

Summary

  • Add Go parity verification handler (test/parity/lib/languages/golang.ts)
  • All 20 Go functions verified against golang:1.23 Docker image
  • Refactor: Rename verified: header to parity verified: with type safety

Header Change

Before: // verified: 8.3
After: // parity verified: PHP 8.3

This makes the header more explicit and enables type-safe validation:

  • Added test/parity/lib/config.ts as source of truth for supported languages
  • Added Zod validation in headerSchema.ts against parity config
  • Added displayName and parityValue to LanguageHandler interface

Functions Verified

Go (20):

  • strconv: Atoi, FormatBool, FormatInt, Itoa, ParseBool, ParseInt
  • strings: Contains, Count, HasPrefix, HasSuffix, Index, Join, LastIndex, Repeat, Replace, Split, ToLower, ToUpper, Trim, TrimSpace

Total verified: 199 (164 PHP + 15 Python + 20 Go)

Test plan

  • All 923 tests pass (yarn test)
  • Lint passes (13 pre-existing warnings)
  • Parity verification: 164 PHP, 15 Python, 20 Go verified

🤖 Generated with Claude Code

kvz and others added 4 commits January 7, 2026 18:07
- Add golang.ts parity handler with JS→Go translation
- Register golang handler in parity test index
- Add verified: 1.23 headers to all 20 Go functions
- Fix Count.js discuss URL (was pointing to php/printf)

Functions verified against golang:1.23 Docker image:
- strconv: Atoi, FormatBool, FormatInt, Itoa, ParseBool, ParseInt
- strings: Contains, Count, HasPrefix, HasSuffix, Index, Join,
  LastIndex, Repeat, Replace, Split, ToLower, ToUpper, Trim, TrimSpace

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change header from `verified: 8.3` to `parity verified: PHP 8.3`
- Add test/parity/lib/config.ts as source of truth for supported languages
- Add Zod validation for parity verified values in headerSchema.ts
- Add displayName and parityValue to LanguageHandler interface
- Update parser to read `parity verified:` key

This change makes the header more explicit about what it means and
enables type-safe validation against the configured parity languages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kvz kvz changed the title feat: add Go parity verification (20/20 functions pass) feat: add Go parity verification + refactor to 'parity verified' header Jan 7, 2026
@kvz kvz merged commit 9bb43b9 into main Jan 7, 2026
3 checks passed
@kvz kvz deleted the add-golang-parity-verification branch January 7, 2026 17:59
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