Repository navigation
[Agent Lee] Document take-home code export - #33647
Conversation
🚀 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 deploymentPreview Deployments by commit
|
AI Review✅ Reviewed 👉 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 ReviewSkipped: no new code changes since the last review.
Style GuideSkipped: no new docs content changes since the last review.
Commands
|
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.
a0ddba4 to
eb926e8
Compare
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.agent-lee/take-home-code(export generated code)why
Lee can export generated code to a temporary, git-cloneable repo. The feature GA'd 2026-08-12 — the
cf-agent-artifactsgate 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:git clone <copied-command>, but what the card copies is already a completegit clone <remote> <dir>invocation (artifacts/pipeline.ts:255). Anyone following it literally would have rungit clone git clone https://….create-code-artifact.ts:26-27,189). Previously undocumented, and the agent does reject oversized projects.REPO_TTL_MSis 36h (pipeline.ts:62) and the card hard-disables the copy button atexpiresAt, 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.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-12to 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. Fullpnpm run build→ 9081 pages, link check clean.agent-lee/index.mdx, so the audit PR is based on this branch to avoid a merge conflict. Merge this one first.artifacts/product (versioned storage) untouched.