Skip to content

I0836 — A synthetic repository generator for scaling cases

Add a test helper that builds a repository with N issues, N milestones, N rules and N context documents from the skeleton, and a case that runs doctor and plan validate at three sizes and asserts the yaml_flatten count grows linearly.

DONE wave 2 · p0 · implementation profile · runs alone

Part of M004 — Performance is executable evidence, and the hot path does no canonical work twice.

Objective

Add a test helper that builds a repository with N issues, N milestones, N rules and N context documents from the skeleton, and a case that runs doctor and plan validate at three sizes and asserts the yaml_flatten count grows linearly.

Why

Quadratic behaviour hides in small repositories; the counters expose it before wall clock does.

Current state

Fixtures are hand-built per case.

Desired state

One generator in test/lib.sh, one scaling case, counters linear in N.

Scope

  • test/lib.sh
  • test/cases

Out of scope

  • Wall-clock assertions in the scaling case

Dependencies

Acceptance criteria

  • Counters at N, 2N and 4N are within a linear bound
  • The generator is reused by at least one other case

Validation

  • bash test/run.sh 3053_a_repository_of_n_records_costs_n

Evidence required

  • batch_reads

Evidence

coverstypecommandresultat commit
batch_readstestbash test/run.sh 3053_a_repository_of_n_records_costs_n 886_the_timing_report_is_jsontests: 2 passed; at N=8/16/32 records plan validate makes 3/3/3 YAML parses and 0 git calls, doctor 116/124/140 parses and 124/124/124 git calls (linear bound holds); synthetic_repo is also used by case 886c0e3585

Risk

The generated records must pass plan validate; the helper builds them from the same templates the skeleton ships.

Timeline

started
2026-10-15T07:36:51Z
verified
—
completed
2026-10-15T07:36:57Z

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I0836.yaml. Read it back with majordomus plan show I0836.

Searches the titles and descriptions of every page this site publishes.