Skip to content

JWT Policy Preview EN

teamswyg edited this page Oct 5, 2026 · 2 revisions

JWT policy validation and cache comparison

실제 JWT 캐시 비용 비교 / Actual JWT cache costs: 한국어 · English. 160쌍 동등성·48개 운영 기록 완료. 같은 요청 4개·3회 준비 상태 반복의 합계에서 고정 순서는 약 1.90배 빨라졌고 첫 후보 일치 시 캐시는 약 6.8% 느렸습니다. / 160 paired outcomes match; 48 operations complete. Aggregate fixed-order warm work is about 1.90× faster; a matching predeclared-first candidate is about 6.8% slower with caching. 독립 평가·모델 이득·토큰 절감의 증거는 아닙니다. / No independent evaluation, model benefit or token-savings evidence. PR152 · CI · Hub

Go Scope

한국어 · PR151 · CI · Hugging Face

Why this experiment?

A tiny hint that improves candidate order is useful only when the work it saves exceeds its own cost. We first checked predefined outcomes against actual program behavior and measured verification costs. This is a development experiment using fictional session tokens.

Verified so far

Four requests × five fixture positions × eight policies produced one acquisition of160 original Go JWT ParseWithClaims calls. There are13 distinct tokens. One policy per request matched all five expectations. Across32 request/candidate combinations,4 matched(T),28 mismatched(F),0 were unknown(U). Token acceptance100/rejection60 is a separate count.

Fictional request Matching policy
Lantern alpha or beta: WithAudience
Harbor both alpha and beta: WithAllAudiences
Moss expiration required: WithExpirationRequired
Cove two-second time leeway: WithLeeway

On Mac M4 Pro / Go1.27.1 / GOMAXPROCS=1, peak OS RSS was11.94MiB, main work9.607ms, and process startup through pipe cleanup598.010ms. GOMAXPROCS controls Go scheduler execution slots, not OS thread count. The difference between these timings does not isolate pure startup.

Try the saved check

In the repository with Go1.27.1, compare the first saved output with original expectations:

go run ./experiments/short-claim/next-cohort-jwt-audit/replay

This calls no new original JWT API/model/Fit. Agents can consume the same structured JSON and preserve T/F/U. Re-running actual JWT and reading saved results are separate operations. See the English README for complete sources, inputs, failure scope and licenses.

Next comparison and training criteria

We plan to compare repeated authentication/decoding against authenticated claims reuse scoped to identical token, public key, algorithm, decoder and source. Final policy decisions are never cached; every candidate receives fresh validation. First,160 comparison pairs must match acceptance and normalized error semantics; then48 operational records compare fixed/manual order with/without caching.160 pairs does not mean160 API calls. Lookup, copying, setup and ranking costs are included. Retrieval controls need their own frozen conditions.

These four exposed requests belong to one JWT lineage frozen as development_validation. They do not establish independent2,400-task evaluation, general performance, Laya/GPU inference, agent token savings or new training. No new training rows were admitted; previous failed models remain inactive. The next model experiment depends on demonstrated remaining benefit in total verification work.

Public scope and provenance

Linux/macOS, secrets and quality CI passed; the bot merged the identical source tree. All20 new Hub files were fully read back, preserving834 prior files and10 tags. No new model binaries were released.

Pinned upstream retains full MIT/original copyright notices. Owned observation code, fixtures and docs use Apache-2.0. Tokens and public keys are fictional generated fixtures, with no live credentials/private paths. Full applicable SDK notices are in TOOLCHAIN-NOTICES. Model training/distribution rights require separate review.

Clone this wiki locally