Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
6
22
kind
stringclasses
8 values
text
stringlengths
53
127
anchors
listlengths
1
1
m.stripe_raw_body
gotcha
Stripe webhooks must be verified against the raw request body; the JSON body parser breaks the signature check.
[ "src/webhooks/stripe.ts" ]
m.stripe_test_keys
howto
Local Stripe testing uses stripe listen --forward-to localhost:3000/webhooks/stripe and the sk_test key from .env.example.
[ "src/webhooks/stripe.ts" ]
m.refund_idempotency
constraint
Refunds must send an Idempotency-Key header; retries without it double-refund customers.
[ "src/payments/refunds.ts" ]
m.currency_minor_units
gotcha
Prices are stored in minor units (cents) as integers. Never use floats for money.
[ "src/payments/money.ts" ]
m.tax_provider
decision
Sales tax is calculated by TaxJar at checkout, not in our code; we cache rates for 24 hours.
[ "src/checkout/tax.ts" ]
m.cart_expiry
fact
Guest carts expire after 7 days and are deleted by the nightly cleanup job.
[ "src/jobs/cleanup.ts" ]
m.inventory_lock
constraint
Inventory is reserved with SELECT ... FOR UPDATE inside the order transaction to stop overselling.
[ "src/orders/reserve.ts" ]
m.order_states
structure
Order states: pending -> paid -> packed -> shipped -> delivered; cancelled is only allowed before packed.
[ "src/orders/state.ts" ]
m.shipping_rates
fact
Shipping rates come from the Shippo API; free shipping applies above 75 USD after discounts.
[ "src/shipping/rates.ts" ]
m.emails_postmark
structure
Transactional email goes through Postmark; templates live in emails/ and are previewed with npm run email:dev.
[ "emails/" ]
m.auth_sessions
structure
Login uses httpOnly session cookies stored in Redis with a 14 day sliding expiry; there are no JWTs.
[ "src/auth/session.ts" ]
m.auth_rate_limit
constraint
The login endpoint is rate limited to 5 attempts per minute per IP and per email.
[ "src/auth/login.ts" ]
m.password_reset
gotcha
Password reset tokens are single use and expire after 30 minutes; the link must use APP_URL, not the request host.
[ "src/auth/reset.ts" ]
m.admin_roles
fact
Admin roles are owner, manager and support; only owner can issue refunds above 500 USD.
[ "src/admin/roles.ts" ]
m.db_migrations
howto
Database migrations use Prisma: npx prisma migrate dev locally, migrate deploy in CI. Never edit an applied migration.
[ "prisma/schema.prisma" ]
m.db_seed
howto
Seed local data with npm run db:seed; it creates 40 products and the test admin user.
[ "prisma/seed.ts" ]
m.search_meili
structure
Product search is Meilisearch; the index is rebuilt by npm run search:reindex after bulk imports.
[ "src/search/index.ts" ]
m.images_cdn
fact
Product images are stored in S3 and served through CloudFront with on-the-fly resizing via ?w= parameters.
[ "src/media/images.ts" ]
m.feature_flags
structure
Feature flags are read from LaunchDarkly; local development falls back to flags.local.json.
[ "src/flags.ts" ]
m.e2e_playwright
howto
End-to-end tests use Playwright: npm run test:e2e starts the app on port 3100 and needs the seeded database.
[ "e2e/" ]
m.unit_vitest
howto
Unit tests run with Vitest (npm test); snapshot files live next to the components.
[ "vitest.config.ts" ]
m.flaky_checkout_test
gotcha
checkout.spec.ts is flaky when Stripe test mode is slow; it waits for the payment-intent webhook, not a fixed timeout.
[ "e2e/checkout.spec.ts" ]
m.deploy_vercel
howto
The storefront deploys to Vercel on merge to main; preview deployments are created for every pull request.
[ "vercel.json" ]
m.deploy_worker
howto
Background jobs run on a separate Fly.io worker app deployed with fly deploy -c fly.worker.toml.
[ "fly.worker.toml" ]
m.env_secrets
constraint
Secrets are managed in Doppler; never commit .env files. New variables must be added to .env.example.
[ ".env.example" ]
m.queue_bullmq
structure
Jobs use BullMQ on Redis; failed jobs retry 5 times with exponential backoff, then land in the dead-letter queue.
[ "src/jobs/queue.ts" ]
m.i18n
fact
The store is translated into English, German and French with next-intl; message files are in messages/*.json.
[ "messages/" ]
m.analytics
decision
We use PostHog for product analytics and turned off session recording on checkout pages for privacy.
[ "src/analytics.ts" ]
m.coupon_stacking
constraint
Coupons do not stack: only the single best discount is applied, and gift cards are applied after discounts.
[ "src/checkout/discounts.ts" ]
m.owner_payments
people
Dana owns payments and refunds; ask her before changing anything under src/payments.
[ "src/payments/" ]
m.owner_search
people
Luis maintains search and the product catalog import.
[ "src/search/" ]
m.style_tailwind
constraint
UI uses Tailwind with the design tokens in tailwind.config.ts; do not add new hex colors inline.
[ "tailwind.config.ts" ]
m.a11y
constraint
Every interactive element needs a visible focus ring and an accessible name; axe runs in the e2e suite.
[ "e2e/a11y.spec.ts" ]
m.perf_budget
constraint
Product pages must stay under 170 KB of JavaScript; the bundle check fails CI above that.
[ ".github/workflows/ci.yml" ]
m.bug_tax_rounding
worklog
Fixed a tax rounding bug where totals were off by one cent for multi-item orders; rounding now happens once on the order total.
[ "src/checkout/tax.ts" ]
m.incident_redis
decision
After the October Redis outage, sessions fail open to read-only browsing instead of logging everyone out.
[ "src/auth/session.ts" ]

amem retrieval benchmark

A small, hand-written benchmark for memory recall in coding agents: given a project's stored memories and a question phrased the way a developer actually asks it, does the memory layer return the right memory, and does it stay quiet when the prompt has no topic?

It's the benchmark amem (agent memory, anchored to your code) runs in CI on every change.

What's inside

File Rows Fields
memories.jsonl 36 id, kind (constraint, howto, structure, gotcha, decision, fact, people, worklog), text, anchors (the source files the memory is tied to)
queries.jsonl 40 question, expected_memory_ids, vague
retrieval.json — the original combined file used by amem's CI

The memories describe a fictional web shop after a few weeks of agent sessions: payment webhooks, migrations, deploy steps, owners, gotchas. Everything is synthetic; there's no real company data.

  • 32 topical questions are written without the memory's exact words ("why does the stripe webhook signature check fail?" should find the memory about the raw request body).
  • 8 vague prompts ("ok sounds good, go ahead") name no topic. A good memory layer returns nothing for these rather than injecting noise.

Metrics

  • Hit@1: the first returned memory is one of expected_memory_ids.
  • Hit@3: an expected memory appears in the top 3.
  • Vague-prompt injection rate: the share of vague prompts that got any memory at all (lower is better).

amem's scores (CI floors)

Path Hit@1 Hit@3 Vague prompts given memory
Prompt hook (automatic injection) 88% 97% 0%
amem_context (agent asks) 81% 94% n/a

amem ranks with SQLite FTS5 (BM25), a 256-dimension n-gram encoder running in-process, and recency, usage and pin signals. It uses no embeddings API.

Reproduce

git clone https://github.com/sslugic/amem && cd amem
npm install
npm run bench            # prints Hit@1, Hit@3 and the vague-prompt rate
npm run bench -- --misses  # shows what it gets wrong

To evaluate your own memory system, index memories.jsonl, ask each question in queries.jsonl, and compare the returned ids with expected_memory_ids.

Links

License

MIT, same as amem.

Downloads last month
23

Space using iamem/amem-retrieval-bench 1

Collection including iamem/amem-retrieval-bench