Skip to content

fix(docs): the quickstart's first run is one task — 19m37s to 5m52s, re-measured (#1171) - #1179

Merged
frankbria merged 5 commits into
mainfrom
fix/1171-quickstart-single-task
Aug 28, 2026
Merged

fix(docs): the quickstart's first run is one task — 19m37s to 5m52s, re-measured (#1171)#1179
frankbria merged 5 commits into
mainfrom
fix/1171-quickstart-single-task

Conversation

@frankbria

Copy link
Copy Markdown
Owner

Closes #1171.

The README's Quick Start could not be completed in fifteen minutes, and the
reason was not that anything was slow. Step 5 told a new user to promote every
generated task to READY and Step 6 told them to run cf work batch run --all-ready — for a small todo API that is 21–25 agent runs, serially. The
cold-start harness cut the batch off at 900s and the walkthrough totalled
19m37s.

Nothing makes twenty-five serial agent runs fit in fifteen minutes. So the fix
is in the documentation: the quickstart's first run is one task.

What changed

README Steps 5 and 6. Step 5 promotes a single task by the 8-character ID
cf tasks list renders (cf tasks set status <task-id> READYcf tasks set
takes a partial ID, so that prefix is enough). Step 6 runs cf work start <task-id> --execute. The full backlog is still documented, in a collapsed
aside that says plainly that it is long-running and points at cf work batch status / cf work batch follow <batch-id> — the honest version of the issue's
third option, for the path that really is long.

docs/QUICKSTART.md gets the single-task run as Option A for the same
reason, and the same long-running warning on the batch.

scripts/quickstart-cleanroom/walkthrough.sh follows the path it measures,
so it no longer has an unbounded batch step.

Re-measured, not estimated

Third acceptance criterion. Same harness, same container, published 0.9.3
the path a new user actually takes. Artifacts in
scripts/quickstart-cleanroom/artifacts-1171/, and the demo document grows a
Run C built from them.

Before (#1171 as filed) After
6-batch-run TIMEOUT at 900s not on the documented path
6-work-start 163s 179s
Total wall clock 1177s — 19m37s 352s — 5m52s
Steps that timed out 1 0

All three acceptance criteria met. The whole 825-second difference is the one
step that is gone: every other step in the old run summed to 276 seconds.

What head -1 picked is worth noting — priority 0, Deps empty. cf tasks generate orders its output foundational-first, so following the docs literally
lands on an unblocked task. The docs don't rely on that: cf work start does
not gate on dependencies, so any ID gives the same run.

Guard

tests/ci/test_quickstart_budget_guard_1171.py — six assertions across
README.md, docs/QUICKSTART.md and walkthrough.sh. The regression here is a
docs edit, which nothing else in the suite can see. Mutation-checked: moving the
promote step out of the TASK_ID guard, dropping the long-running warning, and
putting the batch back in front of cf work start each turn one red.

Review findings fixed (codex, pre-PR)

  • walkthrough.sh ran cf tasks set status '' READY when ID extraction failed,
    skipped the agent run, still reached cf proof run, and reported a fast total
    measuring a path nobody walked — set -uo pipefail has no -e, so nothing
    stopped it. Both steps now sit inside the non-empty guard, with a critical
    finding on the other branch.
  • The README claimed "empty directory to a PR in under six minutes". The harness
    stops at cf proof run and never runs cf pr create. Claim now matches the
    measurement.
  • cf work batch follow was written bare in the README, docs/QUICKSTART.md
    and CLAUDE.md, but batch_id is a required typer.Argument — following it
    literally is an argument error. status is the optional one; stop, resume
    and follow are not. Fixed in all three.
  • The guards did not cover docs/QUICKSTART.md, which could have regressed on
    its own with everything else green.

Known limitations

…log (#1171)

The README told a new user to promote every generated task and then run
`cf work batch run --all-ready`. On the 0.9.3 cold-start run that was 25 agent
runs, serially: the harness cut it off at 925s and the walkthrough totalled
19m37s against a 15-minute budget.

Every other step in that run sums to ~315s, so the whole overrun is that one
step. The fix is not to make 25 serial agent runs faster — nothing makes them
fit — it is to stop telling a first-time user to build their entire project
before they have seen the loop work once.

Step 5 now promotes one task by the 8-char ID `cf tasks list` renders; Step 6
runs `cf work start <task-id> --execute`. The full backlog stays documented, in
a collapsed aside that says it is long-running and points at
`cf work batch follow` — the honest version of the third option in the issue.

`walkthrough.sh` follows the same path it measures, so it no longer has an
unbounded batch step. `docs/QUICKSTART.md` gets the single-task run as Option A
for the same reason.

`tests/ci/test_quickstart_budget_guard_1171.py` pins this in both places. The
regression here is a docs edit, which nothing else in the suite can see.

Refs #1171
…1171)

The cold-start harness ran again against published 0.9.3 with the single-task
quickstart: **352s, no TIMEOUT step**, down from 1177s. Artifacts in
`artifacts-1171/`; the demo document grows a Run C built from them, so the
README's timing claim points at a measurement rather than an estimate.

Third-party review (codex) found four things worth fixing, all mine:

- `walkthrough.sh` ran `cf tasks set status '' READY` when ID extraction failed,
  skipped the agent run, still reached `cf proof run`, and reported a fast total
  measuring a path nobody walked. `set -uo pipefail` has no `-e`, so nothing
  stopped it. Both steps now sit inside the non-empty guard.
- The README said "to a PR in under six minutes". The harness stops at
  `cf proof run` and never runs `cf pr create`, which needs a GitHub remote. The
  claim now says what was actually measured.
- `cf work batch follow` was documented bare in three places, but `batch_id` is
  a required Argument — following it literally is an argument error. `status` is
  the optional one. CLAUDE.md said all four were optional; only one is.
- The guards did not cover `docs/QUICKSTART.md`, which could have regressed to
  recommending the whole backlog with everything else still green.

The two new guards are mutation-checked: moving the promote step out of the
TASK_ID branch, and dropping the long-running warning, each turn one red.

Refs #1171
315s is the pypi-0.9.3 run's number; Run B in this document is the source-614
run. The claim is the same either way — the batch step is the entire overrun —
but the arithmetic should match the table directly above it.

Also drops a 'cf pr create is fast' aside the harness never measured.

Refs #1171
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

GLM precision review — PR #1179

Reviewing for concrete defects (logic, crashes, data loss, security, contract breaks) in the code hunks of this PR.

  • Pull PR context and full diff (gh pr view, git diff origin/main...HEAD)
  • Check existing PR comments to avoid repeats
  • Read scripts/quickstart-cleanroom/walkthrough.sh and build-demo.sh in full, with callers
  • Read tests/ci/test_quickstart_budget_guard_1171.py in full
  • Cross-check docs claims against the CLI command surfaces they invoke
  • Verify each candidate finding against real code; discard anything without a concrete failure scenario
  • Post inline findings + one summary comment

View job run

…1171)

Post-PR review caught that `else_branch < promote < work_start` is satisfied by

    if [ -z "$TASK_ID" ]; then note ...; else :; fi
    step "5-promote-one" ...
    step "6-work-start" ...

which is precisely the regression the test claims to prevent. It now slices the
block between `else` and its column-0 `fi` and asserts both steps are inside it.
Mutation-checked against that exact bypass: valid bash, and now red.

Also drops an overclaim in the Run C prose. Run B was a source install and Run C
is published 0.9.3, with 25 generated tasks against 21 — the commands are not
the only variable that changed. Neither of the others is worth fourteen minutes,
which is the point, so the prose now says that instead.

Refs #1171
@frankbria

Copy link
Copy Markdown
Owner Author

Third-party review — codex (post-PR)

Re-run on the final diff at 1bba4797 (the pre-PR round's four findings were
already fixed, so this is a fresh pass rather than a replay).

Critical: none. Major: none.

Shell correctness in walkthrough.sh looks sound in the final diff: the empty
TASK_ID path files a critical note, promotion and work start are guarded,
and the interpolated ID is constrained to [0-9a-f]{8}, so the bash -c
quoting is not exploitable from task output.

The README, long quickstart, and harness now agree on the single-task first
run and on batch follow <batch-id> requiring an ID while batch status can
omit it.

Two Minors, both valid, both fixed in 07334b25

1. The TASK_ID guard test checked ordering, not containment.
else_branch < promote < work_start is satisfied by:

if [ -z "$TASK_ID" ]; then note ...; else :; fi
step "5-promote-one" ...
step "6-work-start" ...

— which is exactly the regression the test claims to prevent. It now slices the
block between else and its column-0 fi and asserts both steps are inside it.
Mutation-checked against that precise bypass: valid bash, and now red.

2. "The only thing that changed between Run B and Run C is which commands the
README tells them to run" was not supported by the artifacts.
Run B is a
source install, Run C is published 0.9.3, and cf tasks generate produced 21
tasks against 25. The prose now says so, and says why it does not change the
conclusion: neither difference is worth fourteen minutes, and the step that was
is gone.

Prior round (pre-PR, codex) — 4 Major, all fixed before this PR opened

Finding Fix
walkthrough.sh ran cf tasks set status '' READY on failed ID extraction, skipped the agent run, still reached cf proof run, and reported a fast total measuring a path nobody walked (set -uo pipefail, no -e) Both steps moved inside the non-empty guard; critical finding filed on the other branch
README claimed "empty directory to a PR in under six minutes" — the harness stops at cf proof run and never runs cf pr create Claim narrowed to what was measured
cf work batch follow documented bare in README, docs/QUICKSTART.md and CLAUDE.md, but batch_id is a required typer.Argument Fixed in all three; status is the optional one
Guards did not cover docs/QUICKSTART.md, which could regress alone with everything else green Added, handling its codeframe spelling

Local gate: 6495 passed, 19 skipped, 0 failed (10m24s). ruff check . clean.

@claude

claude Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review

Verified this against the actual CLI (codeframe/cli/app.py) and the source-tree docs at the PR's merge commit rather than trusting the prose — everything I checked lines up.

Confirmed accurate:

  • cf work batch status takes an optional batch_id (shows recent batches when omitted); stop/resume/follow all require it (typer.Argument(...), no default) — the CLAUDE.md two-line split (status [batch_id] vs stop|resume|follow <batch_id>) matches the code exactly.
  • cf tasks list's ID column is max_width=8, and cf tasks set (and every other task-id-taking command) resolves partial IDs — the "8-char prefix is enough" claim in README/QUICKSTART is correct.
  • The Run B "276 seconds" figure (artifacts-source-614/timings.tsv minus the 6-batch-run step) actually sums to 276, and Run C's 352s vs. Run A's 1177s gives exactly the "825-second difference" the doc claims — the arithmetic that the third commit specifically went back to fix is now right.
  • walkthrough.sh's TASK_ID guard genuinely wraps both 5-promote-one and 6-work-start (verified via else_branch < promote < work_start positioning), and the comment-stripping in the new pytest guard (test_harness_does_not_run_the_whole_backlog) correctly ignores the cf work batch run --all-ready mentions that remain in walkthrough.sh comments, so that assertion isn't accidentally vacuous.
  • The new test file's section-extraction (## Quick Start → next ## , ### Step 5### Step 6) targets unambiguous, single-occurrence headings in both docs, so the guards aren't fragile to accidental early matches.

Minor, non-blocking observations:

  • TASK_ID=$(cf tasks list --status BACKLOG | grep -oE '\b[0-9a-f]{8}\b' | head -1) extracts the first bare 8-hex-char token from the whole table, not just the ID column — same pattern as the code it replaced (previously filtered on --status READY), so it's a pre-existing risk (a task title with an 8-hex-char substring could theoretically be misparsed), not something introduced here. Not worth blocking on given it's demo/harness tooling, not user-facing.
  • docs/QUICKSTART.md's "Step 6: Monitor Progress" heading still reads as batch-oriented ("check status in another terminal") even though Step 5's Option A (the new recommended default) is a single synchronous task run that doesn't really need a second terminal. Very minor sequencing leftover from the restructure, not incorrect, just slightly less tight than the README's version of the same content.
  • Nice touch that the PR's own "Review findings fixed (codex, pre-PR)" section is itself verifiable — I independently checked the TASK_ID-guard fix and the batch follow argument-required fix and both are real, not just claimed.

No bugs found in the logic changes (walkthrough.sh, build-demo.sh, test_quickstart_budget_guard_1171.py). The docs changes are self-consistent, the guard test's assertions hold against the current file contents, and the measured numbers check out. This is a solid, well-verified docs fix — good to merge from my read.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

GLM precision review — PR #1179

Reviewing for concrete defects (logic, crashes, data loss, security, contract breaks) in the code hunks of this PR.

  • Pull PR context and full diff (gh pr view, git diff origin/main...HEAD)
  • Check existing PR comments to avoid repeats
  • Read scripts/quickstart-cleanroom/walkthrough.sh and build-demo.sh in full, with callers
  • Read tests/ci/test_quickstart_budget_guard_1171.py in full
  • Cross-check docs claims against the CLI command surfaces they invoke
  • Verify each candidate finding against real code; discard anything without a concrete failure scenario
  • Post inline findings + one summary comment

View job run

@claude

claude Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review

Independent pass over the final diff (3ebe53e), focused on the shell/test logic since the docs prose has already been checked line-by-line by the prior review and the numeric claims verified by both codex passes and the earlier Claude review.

Verified, nothing new to add on correctness:

  • walkthrough.sh's TASK_ID extraction now correctly reads from --status BACKLOG before promotion (previously it read --status READY after the batch run) — the swap is consistent with promoting a single task first and executing it.
  • The [0-9a-f]{8} constraint on TASK_ID genuinely closes the bash -c "cf tasks set status '$TASK_ID' READY" quoting from any task-output injection — confirmed by hand rather than taking the PR description's word for it.
  • Traced test_harness_never_promotes_an_empty_task_id's block-extraction regex against the actual script text: ^fi$ (column-0 anchored, re.MULTILINE) only matches the outer if/else's closing fi, not a hypothetical nested one, so the mutation this test is guarding against (steps sitting after a vacuous else :; fi) really would go red. This is the test added in 07334b25 specifically because the first version of this guard didn't catch that; the fix holds up.
  • SAYS_IT_IS_SLOW's regex alternatives all match the actual prose in both README and QUICKSTART.md's "long-running" callouts — the guard isn't accidentally vacuous.
  • Section-boundary slicing (## Quick Start → next ## , ### Step 5### Step 6) targets headings that are unique in each file, so none of the four doc-guard tests are matching on the wrong occurrence.

No new issues found. This matches the prior review's conclusion — I looked for a reason to disagree given three rounds of review already passed on this PR, and didn't find one. The one thing worth restating because it's easy to lose in a long thread: the two previously-noted minors (grepping 8-hex chars from the whole cf tasks list line rather than just the ID column, and QUICKSTART's "Step 6: Monitor Progress" heading still reading batch-oriented) are both still present and both still non-blocking — harness/demo tooling, not user-facing correctness bugs.

Good to merge from my read.

@frankbria

Copy link
Copy Markdown
Owner Author

Demo verification — every acceptance criterion, with outcome evidence

The demo for this issue is the cold-start harness itself: a throwaway container
with no CodeFRAME installed and no repo checked out, following the README
literally against published codeframe-ai 0.9.3. Artifacts committed at
scripts/quickstart-cleanroom/artifacts-1171/; the narrated version is
docs/demos/quickstart-cleanroom.md Run C.

Acceptance criterion Evidence Outcome
Following the README literally on a clean machine reaches cf proof run inside 15 minutes total.txtTOTAL_SECONDS=352; transcript.txt contains STEP: 6-proof-run 5m52s, 9m08s of headroom
scripts/quickstart-cleanroom/run.sh records no TIMEOUT step timings.tsv, status column 0 TIMEOUT (was 1: 6-batch-run, 900s)
The quickstart's own claim is re-measured, not estimated Full run committed in d51f0c51; showboat verify docs/demos/quickstart-cleanroom.md exits 0, so every code block in the demo re-runs and still matches ✅ measured

The run

step               status  seconds  exit_code  documented
1-install          OK      20       0          yes
1-smoke-cf-help    OK      16       0          yes
1-version          OK      4        0          yes
3-init             OK      4        0          yes
4-prd-generate     OK      76       0          yes
4-prd-show         OK      0        0          yes
4-tasks-generate   OK      34       0          yes
4-tasks-list       OK      0        0          yes
5-promote-one      OK      0        0          yes
6-work-start       FAIL    179      1          yes
6-proof-run        FAIL    1        2          yes
post-status        OK      0        0          yes
post-tasks-list    OK      1        0          yes
post-proof-status  OK      1        0          yes

TOTAL_SECONDS=352

findings.tsv is empty — the harness filed no new findings on this run.

The two non-zero exits, deliberately not fixed here

Neither costs time, and neither is #1171:

The transcript also still shows the CallType/verification_fix traceback,
because Run C installs published 0.9.3, which predates the fix. That is
#1172 — already fixed on main in cc95812 (#1176) and, as far as I can tell,
just never closed.

claude-review's leftover from the restructure: 'While the batch runs, check
status in another terminal' still framed monitoring around a batch, but Option A
is now a single synchronous run that streams to the terminal you started it in.
Says which is which, and adds the `follow <batch-id>` form that Step 5 already
points at.

Refs #1171
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

GLM precision review — PR #1179

Reviewing for concrete defects (logic, crashes, data loss, security, contract breaks) in the code hunks of this PR.

  • Pull PR context and full diff (gh pr view, git diff origin/main...HEAD)
  • Check existing PR comments to avoid repeats
  • Read scripts/quickstart-cleanroom/walkthrough.sh and build-demo.sh in full, with callers
  • Read tests/ci/test_quickstart_budget_guard_1171.py in full
  • Cross-check docs claims against the CLI command surfaces they invoke
  • Verify each candidate finding against real code; discard anything without a concrete failure scenario
  • Post inline findings + one summary comment

View job run

@claude

claude Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review

Fourth pass on this PR (after two codex rounds, a GLM automated pass, and two prior claude reviews already in the thread) -- independently re-verified the concrete claims against the current source rather than re-reading the prior conclusions, since that is where a doc PR like this actually fails.

Verified against codeframe/cli/app.py directly:

  • cf tasks list's ID column really is max_width=8 (line 2494), and cf tasks set (via core/tasks.py's documented partial-ID resolution) accepts a prefix -- the README/QUICKSTART '8-char prefix is enough' claim holds.
  • cf work batch status's batch_id is Optional[str] (line 4635); stop/resume/follow all use typer.Argument(...) with no default (lines 4774, 4848, 4953) -- the CLAUDE.md split (status [batch_id] vs stop|resume|follow <batch_id>) is accurate.
  • --strategy, --max-parallel, and --retry all exist as batch-run options (lines 4335-4423) -- the README's collapsed-aside mention of them is real, not aspirational.
  • --status filtering on cf tasks list (line 2458) backs walkthrough.sh's switch from filtering READY (post-promotion, old script) to filtering BACKLOG (pre-promotion, new script) -- consistent with promoting one task instead of the whole backlog first.

Read walkthrough.sh end to end: the TASK_ID guard genuinely wraps both step '5-promote-one' and step '6-work-start' inside the else branch, 6-proof-run runs unconditionally afterward (matches what the test suite and the Run C transcript both show), and the interpolation of $TASK_ID into the nested bash -c command is safe because TASK_ID is constrained by the extraction regex to 8 hex characters before it ever reaches the shell -- no injection surface even from adversarial task titles.

Doc consistency: README's

Details block is well-formed and closes correctly; QUICKSTART's Step 6 ('Monitor Progress') no longer frames monitoring purely around a batch -- it explicitly separates Option A (synchronous, no monitoring needed) from Options B/C (batch, needs a second terminal), which addresses the sequencing leftover an earlier review round flagged in this thread.

No new bugs, and nothing I checked contradicts the prior rounds' conclusions -- the numeric claims (352s/5m52s, the 825s delta, the 276s Run B baseline) all trace back to the committed artifacts-1171/timings.tsv and total.txt correctly. This is a well-scoped, thoroughly self-checked docs fix. Good to merge from my read as well.

@frankbria
frankbria merged commit 20f1386 into main Aug 28, 2026
13 of 14 checks passed
@frankbria
frankbria deleted the fix/1171-quickstart-single-task branch August 28, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P1.42] The README quickstart cannot finish in 15 minutes — Step 6 runs all 25 generated tasks serially and times out

1 participant