PostHog / PostHog/posthog

Make Rust the single writer for the HyperCache estate

Open
#96,828 0 comments 0 reactions 1 assignee View on GitHub

@JamesPatrickGill is already working on this.

Since Sep 8, 2026.

team/feature-flags
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
6h 51m
Merged PRs (30d)
232

Description

[!WARNING]
AI draft — James has not edited this yet.

At 100% of the invalidation ramp, Python still writes about 126,800 flags.json entries per day through the refresh sweep and the verifier. The Rust edit path writes about 24. update_flags_cache stays bound as update_fn on FLAGS_HYPERCACHE_MANAGEMENT_CONFIG, independent of routing. So two writers is the steady state, not a transition, and a team's flags.json alternates authors on a schedule.

Desired outcome: Rust owns the edit path, the refresh sweep, and the verifier for every HyperCache instance. Python keeps no write path and, at the end, no build code.

Python writes these caches today:

  • flags.json — the refresh sweep and the verifier, plus the edit path for teams outside the ramp
  • team_metadata — Rust already owns its read exclusively
  • flags_with_cohorts.json — the definitions cache, with its Redis-ZSET-plus-Celery rebuild subsystem
  • array/config.json
  • surveys, gateway_credential, llm_gateway_policy, llm_prompts — no Rust reader today

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.