monad-developers / monad-developers/ultrafuzz

Modal retry dispatch drifts after lifecycle prompt repair

Open
#746 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deferred-post-v0.1
Dominant language
TypeScript
Stars
85
Forks
18
Avg merge
11h 10m
Merged PRs (30d)
194

Description

Problem

On release/v0.1.0, lifecycle resume can make a completed cloud dependency's handoff identity change even though none of its declared outputs changed.

Cloud publication may leave the runtime-owned prompt.rendered.md presentation copy absent from a completed producer's artifact directory. Before a later lifecycle action, repairMissingRenderedPromptsFromExecutionSnapshot() restores that file. The Modal handoff currently hashes and copies the entire declared dependency artifact directory, so the repaired presentation copy changes project_content_sha256 and therefore the logical dispatch fingerprint of an already-started downstream attempt.

A same-generation retry still uses the same durable attempt root, but its new dispatch identity no longer matches the persisted request. The worker fails closed with:

durable workspace request does not match this cloud node attempt

This happens before the selected node can resume, retry, or make a provider request.

Minimal reproduction

The regression uses only a temporary generic Git project:

  1. Create a cloud-node fixture with one declared dependency artifact directory.
  2. Build its handoff and retain the semantic content fingerprint.
  3. Add prompt.rendered.md at the dependency artifact root, matching lifecycle presentation repair.
  4. Build the same logical handoff again.
  5. Assert that the semantic fingerprint is unchanged and the presentation file is absent from the archive.

Run:

pnpm --filter @ultrafuzz/modal exec vitest run test/node-provider.test.ts \
  -t 'keeps repaired presentation prompts out of dependency handoff identity and bytes'

On the unmodified release, the test fails because the second content fingerprint differs from the baseline. The second archive also contains the repaired presentation prompt.

Expected behavior

The runtime-owned rendered-prompt presentation copy is not a declared dependency output and is already authenticated through the execution snapshot. Lifecycle repair should not change a downstream cloud dispatch's semantic input or bytes. Declared dependency artifacts and verification markers must remain fully bound and copied.

Suggested scope

Exclude only the dependency-root prompt.rendered.md presentation copy from both dependency-tree hashing and dependency-tree copying. Keep the current task's sealed prompt, all declared dependency outputs, reference trees, planner catalog, verification markers, path checks, and link/special-file rejection unchanged.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/node-provider.test.ts and run the named Vitest case to reproduce the fingerprint and archive mismatch. Trace the Modal dependency handoff hashing and copying paths, using repairMissingRenderedPromptsFromExecutionSnapshot() as the lifecycle context. Done means dependency-root prompt.rendered.md is excluded while declared outputs and verification markers remain bound and the test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.