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

Unleash / unleash / 30832084439
87%
master: 91%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 03 Aug 2026 04:29PM UTC
Jobs 1
Files 1210
Run time 4min
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

03 Aug 2026 04:24PM UTC coverage: 87.292% (+0.04%) from 87.255%
30832084439

push

github

web-flow
refactor: parse authorization tokens on the boundary

## Why

Authorization headers currently make each caller infer token meaning
from string prefixes and token internals. That couples routing,
validation, and storage details to middleware and admin routes, and
makes future token changes expensive to reason about.

This refactor parses an authorization value once at the boundary and
passes an explicit credential value inward. Callers branch on its
declared kind and version rather than inspecting the raw string.

## Credential model

A parsed credential has two independent dimensions:

- `kind` identifies its authorization family: user access, API token, or
legacy admin API token.
- `version` identifies its validation and storage protocol: V1 or V2.

The parser deliberately does not resolve permissions, projects,
environments, or the owner of a user-access credential. Those are
authoritative storage-backed facts and are resolved only during
authentication. A `user:` credential can belong to either a person or a
service account, so that distinction cannot be made from its syntax
alone.

## V2 values

A full V2 API-token credential contains both the submitted secret and
its selector. Authentication uses the selector to locate the stored
verifier, then uses the secret to verify the credential.

Admin token-management operations usually receive only the selector.
This is represented as a V2 identifier: it can locate a token for
management, but it cannot authenticate a request because it has no
secret. Admin operations may also accept a full V2 credential, which is
reduced to its selector.

## Why this shape

The model keeps credential family separate from credential version. This
lets V2 support later extend to user-access credentials, including PATs
and service-account tokens, without confusing them with the existing V2
API-token family. It also keeps the current feature-API policy explicit:
user-access and admin API credentials are not accepted where ba... (continued)

1981 of 2191 branches covered (90.42%)

59 of 64 new or added lines in 9 files covered. (92.19%)

1 existing line in 1 file now uncovered.

15772 of 18068 relevant lines covered (87.29%)

798.61 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
72.81
-0.75% src/lib/features/apitokensv2/api-token-v2-service.ts
2
86.76
-1.29% src/lib/services/edge-service.ts
1
88.24
0.74% src/lib/middleware/frontend-token-middleware.ts

Coverage Regressions

Lines Coverage ∆ File
1
83.9
3.39% src/lib/features/playground/feature-evaluator/constraint.ts
Jobs
ID Job ID Ran Files Coverage
1 30832084439.1 03 Aug 2026 04:29PM UTC 1210
87.29
GitHub Action Run
Source Files on build 30832084439
  • Tree
  • List 1210
  • Changed 10
  • Source Changed 9
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30832084439
  • 88b6df16 on github
  • Prev Build on main (#30827349860)
  • Next Build on main (#30836704906)
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