Revert the routable-token decoder and grammar (!1383, !1384)

What does this MR do and why?

Reverts !1383 (merged) and !1384 (merged), newest first, each in its own revert commit.

Both MRs prepared the ground for routing the /jwt/auth Authorization: Basic credential in handler code (!1381 (closed)). !1384 (merged) lifted the routable-token decoders out of Rule into src/routable_token.ts and added a never-throwing decodeRoutableToken for that handler. !1383 (merged) unified the token grammar in that module, with a drift check that keeps the ruleset's regexes in step with the handler's decoder.

That approach is replaced. The Basic credential is now routed inside the JSON rule engine, by two session_token rules built on the existing decode-base64-match transform (!1410 (merged), stacked on this MR), and /jwt/auth scope routing falls back to them (!1411 (merged)). With no handler-side decoder there is nothing for the module or the drift check to keep in step, and the decoders go back to being private to Rule.

The revert is clean. src/rules/, src/utils.ts, src/error.ts, test/rule.spec.ts, test/fixtures/ and test/fixtures_test/ are byte-identical to 082903c, the commit before !1384 (merged) merged. Nothing merged to main since then touches these files. npm test passes; tsc --noEmit, eslint . and prettier --check clean.

Not carried over: the drift check also caught a real inconsistency, that the ruleset pins version 01 while the handler accepted any two base36 characters. With the handler decoder gone, the rule engine is the only reader, so the two can no longer disagree.

References

How to set up and validate locally

npm test. To confirm the restore: git diff 082903c HEAD -- src/rules src/utils.ts src/error.ts test/rule.spec.ts test/fixtures test/fixtures_test is empty.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sangwoo Han

Merge request reports

Loading
Loading