Skip to content

[Agent Lee] Document take-home code export - #33647

Merged
ahaywood merged 1 commit into
productionfrom
kylie/docs/CFSA-903-take-home-code
Sep 24, 2026
Merged

ahaywood merged 1 commit into
productionfrom
kylie/docs/CFSA-903-take-home-code

Conversation

@kale-stew

@kale-stew kale-stew commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

what

Resurrects #32123, which a codeowner approved on 2026-07-17 and the stale bot closed on 2026-09-23 with the branch deleted. Recovered from refs/pull/32123/head (eafcdf3). The approver has since left Cloudflare, and this version changes the approved diff (see below), so it needs a fresh review.

  • new how-to page: agent-lee/take-home-code (export generated code)
  • overview: fixes the stale "cannot generate application code" limitation and links the new page
  • changelog entry for the launch

why

Lee can export generated code to a temporary, git-cloneable repo. The feature GA'd 2026-08-12 — the cf-agent-artifacts gate went to 100% that day — so the docs are now overdue rather than early. #32123 was opened as a draft before ship, which is how it went stale.

changes since #32123

All verified against cloudflare-agent @ 7966d6f3, not against the spec:

  • Fixes a broken command in the approved diff. Step 4 rendered git clone <copied-command>, but what the card copies is already a complete git clone <remote> <dir> invocation (artifacts/pipeline.ts:255). Anyone following it literally would have run git clone git clone https://….
  • Adds the export caps — 50 files, 100 KB per file, 2 MB total (create-code-artifact.ts:26-27,189). Previously undocumented, and the agent does reject oversized projects.
  • Says the repo "expires" rather than "is deleted" at 36h. REPO_TTL_MS is 36h (pipeline.ts:62) and the card hard-disables the copy button at expiresAt, so 36h is correct from the user's side. But reaping runs on the Agent DO's 24h housekeeping alarm (agent.ts:5746-5785), not the 5-minute cron, so the delete itself can lag. Two in-repo docs are stale on this; the public page now avoids the claim it can't keep.
  • Notes that nothing is written to your Cloudflare account and that no GitHub/GitLab connection is required.

Claims re-verified rather than assumed: 36h repo TTL (pipeline.ts:62), ~1h read credential (READ_TOKEN_TTL_SECONDS = 3600, pipeline.ts:59), button label Copy clone command (stratus:ArtifactCardPanel.tsx:160), and that the clone command never enters the DOM or the transcript (ArtifactCardPanel.tsx:56-59,84-91).

changelog date

Dated 2026-08-12 to match the actual GA rather than the merge date. Flagging it since it will not appear at the top of the feed.

notes for reviewers

  • pnpm run check → 0 errors. Full pnpm run build → 9081 pages, link check clean.
  • [Agent Lee] Refresh overview, complete rename, document access controls #33648 is stacked on this PR. Both edit the Limitations list in agent-lee/index.mdx, so the audit PR is based on this branch to avoid a merge conflict. Merge this one first.
  • Left the unrelated artifacts/ product (versioned storage) untouched.

@kale-stew
kale-stew requested review from a team and Brayden as code owners September 24, 2026 04:34
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://kylie-docs-cfsa-903-take-home-code.previews.developers.cloudflare.com (commit eb926e8)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e02242d7.previews.developers.cloudflare.com eb926e8 2026-09-24T18:01:12.084Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c3ab06c0.previews.developers.cloudflare.com a0ddba4 2026-09-24T00:17:38.912Z Visit the dashboard ↗

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed eb926e8 · 2 findings · incremental

👉 Fix in your agent 👈
Fix the following review findings in PR #33647 (https://github.com/cloudflare/cloudflare-docs/pull/33647).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification.
- If you disagree, explain why.
- If you need clarification before deciding, ask those questions.
- Then share your plan for which issues to tackle and in what order.

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit because the next review reads PR comments.

## Code Review
- C-050e9bb9 | src/content/changelog/agent-lee/2026-08-12-agent-lee-take-home-code.mdx:19 | Example runs outside the cloned repository
  This code block follows the bullet that tells the reader to run the copied `git clone` command, so the shell is still in the parent directory when these commands execute — the cloned repository lives in the `<project-name>` directory the clone creates. Run literally, `git remote set-url` and `git push` both fail with "not a git repository (or any of the parent directories)". The how-to page added in this same PR performs the `cd <project-name>` step before these commands, so the changelog snippet is inconsistent with it and will not work if followed as written.
  ```txt
  git remote set-url origin https://your-git-host.example/you/your-repo.git
  ```

## Style Guide
- S-03eb2ba3 | src/content/changelog/agent-lee/2026-08-12-agent-lee-take-home-code.mdx:32 | Use `refer to` instead of `see` before a link
  Prose uses the `see [link]` pattern: `For details, see [Export generated code](/agent-lee/take-home-code/).` Per the style rules, `see [link]` should be replaced with `refer to [Page Title]`.

Code Review

Skipped: no new code changes since the last review.

  • src/content/changelog/agent-lee/2026-08-12-agent-lee-take-home-code.mdx:19 · Example runs outside the cloned repository

    This code block follows the bullet that tells the reader to run the copied git clone command, so the shell is still in the parent directory when these commands execute — the cloned repository lives in the <project-name> directory the clone creates. Run literally, git remote set-url and git push both fail with "not a git repository (or any of the parent directories)". The how-to page added in this same PR performs the cd <project-name> step before these commands, so the changelog snippet is inconsistent with it and will not work if followed as written.

    git remote set-url origin https://your-git-host.example/you/your-repo.git

Style Guide

Skipped: no new docs content changes since the last review.

  • src/content/changelog/agent-lee/2026-08-12-agent-lee-take-home-code.mdx:32 · Use refer to instead of see before a link

    Prose uses the see [link] pattern: For details, see [Export generated code](/agent-lee/take-home-code/). Per the style rules, see [link] should be replaced with refer to [Page Title].

Commands
  • /review Run a review now.
  • /full-review Review the entire PR diff.
  • /disable-auto-review Stop automatic reviews.
  • /rebase Rebase against production.

Agent Lee can export the code it generates to a temporary, git-cloneable
repository. This resurrects the docs from #32123 (closed by the stale bot
on 2026-09-23 with the branch deleted) and adds what shipped since.

New how-to page `agent-lee/take-home-code` covers the ephemeral repo
(~36h), the on-demand ~1h clone command, and the clone -> set your own
remote -> push flow. The overview's "cannot generate application code"
limitation is corrected and links the new page. Adds the launch changelog
entry, dated to the 2026-08-12 GA.

Changes since #32123, all verified against cloudflare-agent @ 7966d6f3:

- Document the export size caps (50 files / 100 KB per file / 2 MB total)
  from create-code-artifact.ts:26-27,189.
- Fix the clone step. #32123 rendered `git clone <copied-command>`, but
  what the card copies is already a full `git clone <remote> <dir>`
  invocation (artifacts/pipeline.ts:255), so following it verbatim would
  have produced `git clone git clone https://...`.
- Say the repo "expires" rather than "is deleted" at 36h. REPO_TTL_MS is
  36h (pipeline.ts:62) and the card hard-disables the copy button at
  expiry, but reaping runs on the DO's 24h housekeeping alarm, so the
  delete itself is not punctual.
- Note that nothing is written to the user's account and that no GitHub
  or GitLab connection is required.
@kale-stew
kale-stew force-pushed the kylie/docs/CFSA-903-take-home-code branch from a0ddba4 to eb926e8 Compare September 24, 2026 17:45
@ahaywood
ahaywood merged commit e676f49 into production Sep 24, 2026
15 checks passed
@ahaywood
ahaywood deleted the kylie/docs/CFSA-903-take-home-code branch September 24, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants