docs(programming-interface): add "Persisting state across runs" page#2739
Draft
DaveHanns wants to merge 1 commit into
Draft
docs(programming-interface): add "Persisting state across runs" page#2739DaveHanns wants to merge 1 commit into
DaveHanns wants to merge 1 commit into
Conversation
Adds guidance for a common pattern that isn't currently covered in the docs: how a scheduled/cron-driven Actor can read data written by a previous run of itself. - New page under Programming interface with two recommended patterns (list previous runs via the API vs. named key-value store), a side-by-side comparison, and the caveats around named storages under limited permissions. - Cross-links from the Programming interface landing card grid. - Clarifies in the `actor.json` reference that `environmentVariables` is a JSON object (not an array) and documents the `@secretName` reference form. Surfaced during an evaluation of Apify surfaces for agent-driven Actor development. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new page under Programming interface that documents a pattern the current docs don't cover: how a scheduled or cron-driven Actor can read data written by a previous run of itself.
Two patterns are presented with runnable JavaScript and Python snippets:
STATErecord from that run's default KVS.Actor.openKeyValueStore('name')pattern, together with a:::cautionblock that spells out the limited-permissions edge cases (stores created under full permissions aren't visible to limited-permissions runs; stores are per-user).A side-by-side comparison table helps the reader choose between the two.
Related touch-ups
actor.jsonreference: clarified thatenvironmentVariablesis a JSON object (not an array), and documented the"@secretName"reference form for values managed viaapify secrets add. This is where new users trip up first.index.mdx): added a card linking to the new page.Test plan
actor.json, environment variables, permissions, migration guide, key-value store, storage pages) resolve.Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.