Pattern used for Act framework performance tickets. Follow this process when creating and implementing optimization issues.
- Deep-read the current implementation — all relevant source files with line numbers
- Identify the bottleneck with specific code paths and data flow
- Name the pattern being applied (e.g., "competing consumers", "cursor-based processing")
- Map existing mechanisms (watermarks, frontiers, caches) before proposing new ones
- Understand why the current approach works before changing it
Each issue should include:
- Problem — current behavior with code references, impact at scale
- Pattern — named pattern with explanation (e.g.,
FOR UPDATE SKIP LOCKED, cursor-based processing) - Strategy — implementation approach with interface changes, SQL, and code sketches
- Benchmarking plan — specific scenarios to measure, before/after methodology
- Documentation tasks — CLAUDE.md, READMEs, Docusaurus, skills, PERFORMANCE.md
- Acceptance criteria — checklist including tests, docs, and benchmark results
- Present plan and get confirmation before coding
- Use short names matching existing vocabulary (
claim,subscribe,max_at) - Classify behaviors at build time when possible (static vs dynamic resolvers)
- Reuse existing mechanisms (watermarks as checkpoints) before creating new ones
- Keep the Store interface minimal — fold implementation details into existing methods
- Run tests after every change
- Write benchmarks that exercise the exact scenario being fixed
- Separate benchmarks per optimization dimension when a ticket solves multiple problems
- Run on master code (checkout source, build, run) for real before/after comparison
- Run on feature branch with same benchmark for after numbers
- Report honestly — if numbers are within noise, say so and explain the architectural value
libs/act/PERFORMANCE.md— detailed benchmark tables, pattern explanation, before/after comparisonlibs/act/README.md— current patterns only, link to PERFORMANCE.md for historyCLAUDE.md— Store Interface Contract, optimization notes- Docusaurus — concept pages with optimization notes
- Scaffold skills — update production.md, act-api.md as needed
- Verify Docusaurus build passes before PR
- Understand existing mechanisms deeply before proposing new ones
- Don't add to the Store interface unless strictly necessary — fold into existing methods
- Benchmarks must show real improvement in the specific scenario being fixed
- Multiple optimizations in one ticket need multiple benchmarks
- Document the pattern, not just the code — explain why it works
This repo uses Renovate for version updates and Dependabot for security alerts only. There is no .github/dependabot.yml — please don't open Dependabot version-update PRs; Renovate already handles them.
- Direct deps — Renovate opens PRs grouped by
Types packagesandDev dependencies. Patch updates auto-merge; minor/major need review. - Lockfile maintenance — runs weekly (Mon < 03:00 UTC) to refresh transitive resolutions.
- Stuck transitive vulnerabilities — when a transitive dep can't be lifted by Renovate (the parent hasn't released, or the resolution graph won't bump), pin it via
pnpm.overridesin the rootpackage.json. Use a version-range key so the override is scoped to the vulnerable range only. - Vulnerability alerts — Dependabot security alerts are enabled. Triage promptly; fix via Renovate PR, manual
pnpm update, or apnpm.overridesentry depending on where the vuln sits in the tree.