Files
substrate/vendor/github.com/Yiling-J/theine-go/CHANGELOG.md
T
Shruti Nair b29f97778a Initialize OpenFGA server on ATE API Server bootstrap. (#1670)
Working on https://github.com/agent-substrate/substrate/issues/1563

## Summary
Initializes an embedded OpenFGA server within `ateapi` backed by
PostgreSQL and updates the top-level authorization scope.

## Key Changes
- **Rename scope to `global`**: Renamed `type cluster` and
`parent_cluster` to `type global` and `parent_global`, adding
`can_set_policy` and `can_get_policy` to `global`.
- **Embedded OpenFGA server (`internal/authz/server.go`)**:
  - Compiles `model.fga` into OpenFGA's protobuf representation.
  - Runs OpenFGA PostgreSQL schema migrations (`goose_db_version`).
- Serializes startup via `pg_advisory_lock` to avoid multi-replica
races.
- Connects OpenFGA's PostgreSQL adapter with a new dedicated
`*pgxpool.Pool`.
- Idempotently creates or reuses the `"substrate"` store and
authorization model.
- **Service wiring (`cmd/ateapi`)**: Exposes `Pool()` on
`*atepg.Persistence` and initializes `authz.NewServer` on bootstrap.

## Verification
- `openfga model test`: 103/103 checks passing (`model_test.fga.yaml`).
- `go test -mod=mod ./internal/authz/...`: Passes against PostgreSQL
(migrations, tuple writes, permission checks, and restart idempotency).
2026-09-18 23:30:41 +00:00

1.8 KiB

0.6.1 (2025-03-02)

API Changes:

Enhancements:

0.6.0 (2024-10-29)

API Changes:

  • Added a new option, UseEntryPool, to the builder, which defaults to false. Enabling this option will reuse evicted entries through a sync pool. The sync pool was used by default before v0.6.0 and could not be turned off; but it only benefits systems optimized for allocation and those with heavy concurrent writes. See the README for more details.

Enhancements:

  • Theine now uses a single LRU window as the "W" part of W-TinyLFU, adaptively changing its size based on hit ratio. This approach is consistent with Caffeine and should improve hit ratios across various workloads.

0.5.0 (2024-10-10)

API Changes:

Enhancements:

  • Reduced Set allocations, making Theine zero allocation (amortized).
  • Improved read performance slightly by utilizing a cached now value.
  • Fixed race conditions in cost (weight) updates that could cause inaccurate policy cost.
  • Added benchmarks for different GOMAXPROC values in the README.

0.4.1 (2024-08-22)

Enhancements: