Skip to content

Kerberos v3: Add ReBAC, OTel, migrate to Oxlint/Oxfmt, enhance contributor guide, and split runtimes - #3

Merged
Alex-Dolid merged 18 commits into
mainfrom
feature/refactor-and-minor-issues
Jul 20, 2026
Merged

Kerberos v3: Add ReBAC, OTel, migrate to Oxlint/Oxfmt, enhance contributor guide, and split runtimes#3
Alex-Dolid merged 18 commits into
mainfrom
feature/refactor-and-minor-issues

Conversation

@Alex-Dolid

@Alex-Dolid Alex-Dolid commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several major features, improvements, and tooling changes to the project, most notably adding relationship-based access control (ReBAC) inspired by SpiceDB/Zanzibar, enhancing error handling and observability, and migrating the codebase to new linting and formatting tools. It also adds a comprehensive CI workflow and documents all changes in the changelog.

Key changes:

Features and Enhancements

  • Added a ReBAC engine option with a built-in in-process "Zanzibar-lite" resolver, new error types, and decision tracing support.
  • Introduced new options for error handling (onError), cache retry, and configurable codec limits.
  • Added OpenTelemetry support for tracing and metrics, cache observability, and improved performance through parallel evaluation and memoization.

Breaking Changes and Security

  • Changed error semantics to decouple from logger presence and now throw on duplicate policy keys or incomplete derived-role definitions.
  • Improved construction-time validation and security hardening for policy and relation definitions.

Tooling and CI

  • Migrated linting and formatting from ESLint/Prettier to Oxlint/Oxfmt, updating configuration files and scripts accordingly. [1] [2] [3] [4]
  • Added a GitHub Actions CI workflow for linting, formatting, tests (with coverage), and type checks on Node.js versions 18, 20, and 22.
  • Updated .editorconfig for consistent formatting and line endings.

Documentation

  • Updated CHANGELOG.md with detailed release notes for all new features, changes, and migration steps.

Introduces project-level Ox formatter and linter configuration files, including style preferences (single quotes, semicolons, trailing commas, 120-char width) and broad lint rule coverage for Node, React, Promise, TypeScript, Unicorn, and Vitest contexts. `.editorconfig` is also aligned with these standards by setting max line length, tab width, and LF line endings.
Introduces a new `CLAUDE.md` with repository-specific guidance for AI-assisted contributors. It documents project context, required pnpm commands, coding style, core architecture (policy evaluation, validation, caching, logging, and testing DSL), and export/type maintenance expectations to help keep future changes consistent with existing patterns.
Replace ESLint (neostandard) and Prettier with Oxlint and Oxfmt for faster, unified linting and formatting.

- Remove ESLint, neostandard, Prettier and related dependencies
- Add oxlint and oxfmt as dev dependencies
- Update .oxlintrc.json: simplify config for Node.js project (remove React/TypeScript overrides)
- Delete .prettierrc, .prettierignore, and eslint.config.js
- Update npm scripts: lint → oxlint, add format/format:check tasks
- Reformat all source and test files to match oxfmt standards (line wrapping, spacing)
Introduces a platform runtime split with `src/runtime/node.js` and `src/runtime/browser.js`, and routes browser builds through a new root `browser.js` entry via `package.json` `browser` mappings and `exports.browser`. `Kerberos` now delegates call ID/time functions to the runtime module instead of doing try/catch feature detection inline.

This removes Node builtin leakage from browser bundles, improves bundler compatibility, and keeps Node behavior unchanged. It also adds runtime-focused tests (interface parity, native and fallback browser paths, browser entry parity), documents the new behavior in README/CLAUDE/changelog, and declares `engines.node >= 18`.
@Alex-Dolid
Alex-Dolid merged commit e703ad2 into main Jul 20, 2026
4 checks passed
@Alex-Dolid
Alex-Dolid deleted the feature/refactor-and-minor-issues branch July 20, 2026 10:14
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