Skip to content

docs(auth): document when to turn on the permission cache (A4) - #220

Merged
haksungjang merged 1 commit into
mainfrom
fix/a4-permission-cache-criteria
Aug 23, 2026
Merged

docs(auth): document when to turn on the permission cache (A4)#220
haksungjang merged 1 commit into
mainfrom
fix/a4-permission-cache-criteria

Conversation

@haksungjang

Copy link
Copy Markdown
Contributor

Summary

  • Documents the three conditions for enabling PERMISSION_CACHE_TTL_SECONDS (authenticated-read p95 over target, connection pool already sized, revocation-delay ceiling accepted as org policy) in the admin guide (EN/KO), .env.example, and the config accessor's docstring.
  • States the measured ceiling on what the cache buys post-A3: 1 of 5 authenticated-read SQL statements, about 20%.
  • Default stays 0 (off); no runtime behavior changes.

Test plan

  • New doc-oracle test (tests/unit/test_permission_cache_doc_contract.py) recomputes the "20%" figure from the same measured statement count tests/integration/test_request_query_budget.py pins, and checks it against .env.example, the config docstring, and both admin-guide mirrors.
  • Existing tests/integration/test_permission_cache.py left unchanged; passes (34 passed).
  • tests/integration/test_request_query_budget.py passes with the new named constant.
  • Full tests/unit run: 6493 passed (1 pre-existing local-disk-usage flake unrelated to this change, ScanDiskFull on a >95% full local disk).
  • ruff check, mypy clean.
  • node tools/ko-style/lint.mjs --all --fail-on S2: 0 findings.
  • node tools/em-dash/lint.mjs --base origin/main: clean.

Reference: concurrency-scaling-plan-2026-08-22.md §3.3/§4 (A4), tracker unit 26.

The cache default stays 0 (off); this documents the three conditions
under which an operator may enable it (p95 over target, connection
pool already sized, revocation-delay ceiling accepted as policy) and
the measured ceiling on what it buys post-A3: 1 of 5 authenticated-read
statements, about 20%.

Adds a doc-oracle test that recomputes that percentage from the same
measured statement count the query-budget test pins, so the figure
cannot drift out of sync with the code it describes.
@haksungjang
haksungjang merged commit c8330f8 into main Aug 23, 2026
30 checks passed
@haksungjang
haksungjang deleted the fix/a4-permission-cache-criteria branch August 23, 2026 22:01
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