Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
javascript-backfill - Skill - OpenSmartRoute
Skillv1.0.0
javascript-backfill
Run safe data backfills for JavaScript/TypeScript services: chunked jobs, idempotency, throttling, observability, dual-write/read, and rollback. Use when migrating schemas, populating new fields, repa
Imported from bedkillerspacex-boop/codex-skill-library (javascript-backfill/SKILL.md). Install upstream with npx skills add bedkillerspacex-boop/codex-skill-library --skill javascript-backfill. Copyright stays with the author.
JavaScript Safe Backfill Procedures
Research grounding
Operational patterns for large data backfills from Node/TS jobs: correctness, low blast radius,
and resumability. Skill id: javascript-backfill.
Scope And Authorization
In scope: owned databases and streams, authorized maintenance.
Out of scope: mass data changes on systems without change control; exfil via “backfill.”
Prefer staging rehearsal with production-sized samples.
Redact PII in backfill logs.
Pair with database-migration-safety, javascript-backpressure, code-quality-standards.
When To Use
New column needs computed values for historical rows.
Encrypt-in-place / rehash passwords migration.
Search index rebuild / denormalized field repair.
Event replay to projection stores.
Multi-tenant migrations with uneven sizes.
Do Not Use As Primary
Need
Skill instead
Schema migration DDL
database-migration-safety
Queue backpressure
javascript-backpressure
Archive old data
javascript-archival
Implementation baseline
code-quality-standards
Domain Focus — safety properties
Property
Practice
Idempotent
Same key processed twice → same result
Chunked
Keyset pagination, not giant OFFSET
Throttled
Sleep / token bucket vs primary
Observable
Progress metric, ETA, error counters
Stoppable
Feature flag / kill switch
Ordered
When needed, per-entity locking
Auditable
Batch id, counts, sample diffs
// Keyset chunk sketchasync function backfillChunk({ afterId, limit }) { const rows = await db.query( `SELECT id, payload FROM items WHERE id > $1 ORDER BY id ASC LIMIT $2`, [afterId, limit], ); for (const row of rows) { await processIdempotent(row); // upsert by id } return rows.at(-1)?.id ?? null;}
Workflow
1. Confirm scope and success criteria
Record table/stream size, SLA, maintenance window, owner, rollback plan.
Success: 100% eligible rows correct; error rate < threshold; primary p99 within budget; resume after kill works.
Data classification and backups current (javascript-backup-verify).
2. Inventory
rg -n "backfill|migrate:data|// TODO fill" --glob "*.{js,ts}"# Row counts, indexes, hot paths using table
Expand/contract: ship code reading both old/new; backfill; switch; cleanup.
Idempotent writes (UPSERT).
Chunk size adaptive to lag.
Dual-run validation sampling.
Kill switch env/flag checked each chunk.
Don’t run unconstrained UPDATE without WHERE chunking on huge tables.
Separate DB user with limited rights when possible.
5. Verify
npm ci && npm testnode jobs/backfill.js --dry-run --limit 1000node jobs/backfill.js --resume-from-checkpoint# Correctness SQL: count where new_col is null and eligible
Staging full rehearsal.
Prod: start low rate; watch lag; ramp.
Pause on anomaly.
6. Hand off
Record final counts, duration, incidents.
Remove temporary dual-read after soak.
Document for next backfill template.
Good / Bad
Topic
Good
Bad
Pagination
Keyset
OFFSET millions
Idempotency
UPSERT
Append duplicates
Rate
Adaptive to lag
Full table lock night hope
Resume
Checkpoint
Restart from zero only
Validation
Metrics + samples
“Job finished”
Secrets/PII
Redacted logs
Dump rows to stdout
Output Checklist
Change ticket and rollback
Staging rehearsal done
Idempotent chunked job
Kill switch tested
Progress metrics live
Correctness queries pass
Primary/replica health OK during run
Checkpoint/resume works
Dual-write cleanup planned
code-quality-standards applied
Rules
Owned data only; backups before irreversible transforms.
Prefer expand/contract over big-bang rewrites.
Keep focused on safe backfills for JS services.
Never paste live secrets into skill notes, commits, or chat.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slot
curl -s -X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.