app.services.seed_synthetic_text¶
Word lists and text rendering for the synthetic benchmark ADR corpus.
Pure, no I/O: title/body/slug text pieces built from fixed word lists
and sentence templates over an injected random.Random, used
by app.services.seed_synthetic_gen. Split out to keep that
module under the project’s module-size limit.
Public API: VOCABULARY, CONTEXT_SENTENCES,
DECISION_SENTENCES, CONSEQUENCE_SENTENCES,
sentence(), body(), title(), slug(),
decision_date(), signoff_emails(), reporter_email(),
render_document().
- app.services.seed_synthetic_text.VOCABULARY = ('PostgreSQL', 'Redis', 'Kafka', 'GraphQL', 'gRPC', 'Kubernetes', 'Terraform', 'feature flags', 'circuit breakers', 'event sourcing', 'the monolith', 'microservices', 'OAuth2', 'rate limiting', 'blue-green deployments', 'canary releases', 'the message queue', 'distributed tracing', 'the API gateway', 'multi-tenancy', 'connection pooling', 'read replicas', 'the cache layer', 'structured logging', 'feature toggles', 'the job scheduler', 'idempotency keys', 'the retry policy', 'schema migrations', 'the search index')¶
Also used as the benchmark’s free-text search vocabulary.
- app.services.seed_synthetic_text.body(rng)¶
Build a realistic ADR body, 300-3000 characters.
- app.services.seed_synthetic_text.decision_date(rng, today)¶
Pick a decision date within the last ~6 years of today.
- app.services.seed_synthetic_text.render_document(fields, body_text)¶
Render frontmatter and body to the raw document bytes.
Shared by decision and erratum generation (
app.services.seed_synthetic_genandapp.services.seed_synthetic_errata).
- app.services.seed_synthetic_text.reporter_email(rng)¶
Build one fake erratum
reported-byaddress.
- app.services.seed_synthetic_text.signoff_emails(rng)¶
Build 1-2 fake legacy sign-off addresses.
- app.services.seed_synthetic_text.slug(text)¶
Turn a title or sentence into a filename/ref-safe slug.
- app.services.seed_synthetic_text.sentence(rng, pool)¶
Render one random sentence template.