feat: add benchmark seed provisioning (task 0025) #26
Reference in New Issue
Block a user
Delete Branch "task-0025-bench-seed-provisioning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task:
.claude/tasks/0025-bench-seed-provisioning.mdSummary
Adds the deterministic, idempotent seed that brings a freshly provisioned throwaway repository to a known ground truth before a trial runs, scripted over the live Gitea API.
bench/seed-plan.ts— the pure ground truth (fixed labels, an eight-issue spread across the single-user-seed discriminating dimensions of label / state / assignee presence / title keyword, and three pull requests: labelled, reviewed, and real-branch-backed) plusgroundTruth(user), which realizes it into theRepoStatethe checker scores against, with the shared issue/pull-request numbering a fresh repo hands out.bench/seed.ts— idempotent seeding reconciled by natural key (label by name, issue/PR by title, comment/review by body, branch by name), reusing gitea-axi's own tea-login credential discovery viaresolveBenchAccess(no new secret handling;selectLoginwas exported fromsrc/context.tsfor this).vitest.bench-smoke.config.ts,npm run test:bench:smoke) — validates provisioning + seeding + idempotency end-to-end against a real host, gated onGITEA_AXI_BENCH_LOGINand skipping cleanly when unset, kept out of the deterministictest:benchtier. Validated live againstgit.alexion.dev.Deviations (full detail in the task file's Implementation Notes):
deleteRepoandreadSeedSummarywere added as bounded smoke-test support; pull-request state reconciliation (reopen a drifted-closed PR) was added in response to review; the ADR's self-review-promotion verification is deferred to the task-suite slice (task 0028), since the seed needs only always-permitted comment reviews.Review
Risk
Overall: Medium
bench/(dev-only, npm-excluded); the solesrc/touch is wideningselectLoginfrom private toexport, a purely additive visibility change.seed.tsis validated only by a live smoke test that skips (as a pass) wheneverGITEA_AXI_BENCH_LOGINis unset, so it runs unverified in normal CI.Standards findings left unaddressed
bench/seed.tsrequest/sendvstest/e2e/provision.tsapiRequest). Kept separate deliberately: the spec keeps bench vocabulary and code apart fromtest/, and the bench copy adds a JSON-returningsend<T>layer, so extracting a shared client would cross that boundary.Spec findings left unaddressed
REVIEW_EVENTand needs only always-permitted comment reviews.deleteRepoexceeds the seed's stated surface. Retained as best-effort smoke-test cleanup so the live run does not litter the host; cell-loop teardown remains the run loop's job.