Practical engineering · Original scripted fixtures · Product experiments not performed
One bounded brownfield bugfix
Download run_demos.py and contracts.json into one folder before running these commands. Methodology and limitations.
Status: executed scripted demonstration on an original redistributable fixture. This is not a customer incident or an observed coding-agent run.
Use this workflow when an existing function is wrong and you want a small patch whose behavior and recovery can be reviewed. The task is pagination: return at most limit items starting at offset, preserve the caller's list, and reject negative offsets or nonpositive limits.
Reproduce the baseline and repair
Requirements: Python 3.11+ and Git. No external dependency or network call.
python3 run_demos.py brownfield --output /tmp/lr-brownfield-demo
Use a new directory. The script creates a disposable Git repository and records its actual baseline commit and source SHA-256. Commit IDs vary with commit time; the baseline source hash and behavioral expectations are reproducible. The baseline incorrectly slices items[offset:limit].
The run found two contract failures: offset 2 / limit 2 returned an empty list instead of [2, 3], and offset 5 / limit 3 returned an empty list instead of [5]. The one-line scripted repair uses offset:offset + limit.
Task to give a tool when access is available
“Fix pagination for nonzero offsets. Edit only pagination.py. Preserve the function signature, error conditions and input list. Do not add dependencies, change the acceptance contract or refactor unrelated code. Stop after producing a candidate and its development-test output, or after twenty minutes.”
Record the actual product, surface, version, model, plan, input commit and usage before execution. The fixture script does not execute this prompt.
Acceptance and recovery
Inspect the actual repair.diff and result.json. The demonstration checks first-page behavior, a middle page, the last partial page, offset at the end, empty input, invalid bounds and preservation of the input list. All these checks passed after the repair. They do not establish performance for large inputs or correctness for every possible Python object.
Recovery was exercised: git restore pagination.py recovered the exact baseline, then the scripted patch was restored. The candidate remains local in the disposable repository. No real project branch is merged by this command.
For a real task, keep separate decisions for process exit, tests passing and patch acceptance. Record unplanned edits, changed tests and human interventions. If an acceptance requirement is missing, stop and clarify that requirement before treating the result as accepted.
Observational boundary
One local scripted patch ran; coding-tool runs remain NOT_RUN. There is no measured comparison between Codex, Claude Code or any other product. API spend is zero for the script; subscription allocation, token usage and human review time are not measured. Use this as a reproducible acceptance pattern, not a speed or quality claim about agents.