• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

KarpelesLab / goro / 24621429745
13%

Build:
DEFAULT BRANCH: master
Ran 19 Apr 2026 05:02AM UTC
Jobs 1
Files 371
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Apr 2026 05:00AM UTC coverage: 1.955% (+0.002%) from 1.953%
24621429745

push

github

MagicalTux
Move extension-specific Global state behind a generic StateKey API

core/random and core/phpv were growing extension-aware surface area:
random.State had a gmp-specific .Gmp field and GmpSeed method, and
phpv exposed a StrtokState type + Strtok() accessor on GlobalContext
that only ext/standard touched. Core shouldn't know about either.

Replace both with a single generic mechanism:

  - phpv.StateKey is an opaque, pointer-identity-compared handle an
    extension allocates once at package init via phpv.NewStateKey("name").
  - GlobalContext gains State(key) / SetState(key, value), backed by
    a lazily-allocated map[*StateKey]any on *Global.
  - Extensions own the typed wrapper: ext/gmp/misc.go declares
    gmpRandKey and casts the stored value back to *mathrand.Rand;
    ext/standard/strings.go does the same for its strtokState struct.

Mirrors context.WithValue but scoped to the request-lifetime Global,
which is where these values actually belong.

Removed:
  - random.State.Gmp and GmpSeed
  - phpv.StrtokState
  - GlobalContext.Strtok() and the strtok field on *Global

Build, vet, CGO_ENABLED=0 build, and locale+crypt unit tests are all clean.

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

3 of 33 new or added lines in 4 files covered. (9.09%)

2188 of 111907 relevant lines covered (1.96%)

70.39 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
0.0
0.0% ext/standard/strings.go
8
0.0
0.0% core/phpctx/global.go
8
0.0
0.0% ext/gmp/misc.go
5
37.5
core/phpv/context.go
Jobs
ID Job ID Ran Files Coverage
1 24621429745.1 19 Apr 2026 05:02AM UTC 371
1.96
GitHub Action Run
Source Files on build 24621429745
  • Tree
  • List 371
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24621429745
  • 45a9c77a on github
  • Prev Build on master (#24621373581)
  • Next Build on master (#24621538787)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc