Frozen state: start cold rebuilds and inspection from the latest whole copy
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend, performance
Research direction
Read the implementation of recoverStateContext, createRunStateHydrator, and workflow inspect, along with the events API and the whole-copy format described in #5215. First trace how each reader currently pages and applies events; then investigate descending pagination, skip-step-inputs, multi-log inputs, and StateSrcV1 hook payloads. Done means the three readers can start from the latest usable whole copy while replay still reads the full log.
Written by the indexing model from the issue text.
Description
Follow-up from #5215.
Frozen state is now written whole each time it doubles, and after every 1,000 changes, so a rebuild never has to apply more than about the value's own size of changes. But every reader still reads the run's log from the start:
- cold recovery (
recoverStateContext) pages through every event from the beginning; - the o11y hydrator (
createRunStateHydrator) andworkflow inspectdo the same.
So the whole copies bound the apply work, not the read. On a 180-turn eve session, a cold rebuild at turn 180 took 228 ms: 60 ms parsing and 168 ms applying, both proportional to the whole log.
Proposal: have these readers read the log newest-first until they reach the latest whole copy of each version they need, then apply forward from there. A cold read is then bounded by about twice the value's size rather than the length of the run. Replay is unaffected: it reads the full log anyway.
Open questions:
- the events API needs to support descending pages with
skip-step-inputs; - a step input can refer to more than one log, so the reader has to keep going until every needed log has reached a whole copy;
- hook payloads that hold strings a patch refers to (
StateSrcV1) may come before that whole copy.
🤖 Generated with Claude Code
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 401
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 201
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vercel/workflow
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
node-module-esbuild-plugin: getImportedIdentifier only checks the first named import when locating a violationPossibly taken @div-cowboy claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel/workflow#5057 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
code-transform.mdx §ID Generation omits the package-shipped `name@version` ID formPossibly taken @Mohith26 claimed this 113 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
Similar issues
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPossibly taken @pcbeingused333 claimed this today. OpenBug db: d1-sqlite Payload OSS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19766 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
device-management-toolkit/sample-web-ui#3711 ·
Maintainers usually reply within 1 day
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
elastic/kibana#306401 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agentes-chat/agentes-chat#927 ·
Maintainers usually reply within 1 day
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabPossibly taken @seenimohamed claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ardia-browser/ardia#2769 ·
Maintainers usually reply within 1 day