Project Brain

  1. › opening Project Brain
  2. › synthetic demo
  3. › loading workspace
Skip to content
Project Brainmemory for your AI agents

Workspace

DashboardProjectsMemoryQualityActivitySettingsSetup

Read-only example → install your own

Demo dataNumbers are examples until the API is connected.

Help

Memory/Context packs

Demo data · synthetic examples

Read-only preview. No repository or model is connected; the numbers and project knowledge are examples.

Install your own →

Loading this screen…

Context packsContext packs

Context pack — Fix lease renewal in worker queue

Complete saved Markdown, including all files and evidence.

Back to listDownload Markdown

Saved content

# Context pack — Fix lease renewal in worker queue

Demo pack. Built for billing-service @ 9f949e9.

## Files (9)

- billing/workers/lease.py — lease token acquire/release
- billing/workers/queue.py — job claim loop
- billing/db/jobs.py — commit fencing
- tests/test_lease.py — fencing regression tests
- billing/payments/retry.py — uses the renewed lease
- docs/runbooks/worker-ops.md — restart order
- billing/config.py — lease TTL settings
- migrations/0041_job_leases.sql — lease table
- billing/workers/__init__.py — exports

## Decisions carried

- D-38 Invoice numbering moves to a DB sequence
- D-41 Stripe webhooks handled out of the request path

## Rules delivered

- R-014 Payments code never touches the ORM session directly (block)
- R-021 Every migration ships a matching down-revision (warn)

Budget: medium · 6,120 tokens.