[PR #2139] [MERGED] fix(conversation-calls): a finished call video never reads as missing (1.1.8) #2136

Closed
opened 2026-11-07 16:39:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/2139
Author: @SpicyMarinara
Created: 11/6/2026
Status: ✅ Merged
Merged: 11/6/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/calls-video-manifest-race


📝 Commits (2)

  • 5c8b70c fix(conversation-calls): a finished call video never reads as missing (1.1.8)
  • de8b57f Merge branch 'staging' into fix/calls-video-manifest-race

📊 Changes

16 files changed (+202 additions, -117 deletions)

View changed files

➕ artifacts/conversation-calls-1.1.8.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/conversation-calls/CHANGELOG.md (+4 -0)
📝 packages/conversation-calls/client.js (+46 -38)
📝 packages/conversation-calls/manifest.json (+5 -5)
📝 packages/conversation-calls/server.mjs (+38 -38)
📝 packages/conversation-calls/src/engine/packages/server/src/services/conversation/call-character-videos.service.ts (+6 -2)
📝 scripts/build-feature-packages.mjs (+2 -1)
📝 scripts/vendored-engine-baseline.json (+0 -1)
📝 tests/calls-swarmui-video.regression.mjs (+58 -7)
📝 tests/conversation-calls-summary.regression.mjs (+1 -1)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #2132

Why this change

tests/calls-swarmui-video.regression.mjs failed once in CI with 'missing' !== 'ready'. It turned out to be a real race in Conversation Calls, not a flaky test.

getConversationCallCharacterVideoManifest read manifest.json first and only then checked whether a generation job held its lock. When the job finished during that read, the poll got the old "generating" entry and found no lock. It then reported generating: false with the clip missing.

In the app, the client stops polling once generating is false. A call's video tile could then stay on "missing" until something else made it refresh.

Under load the unmodified test failed 5 times in 300 runs, and 16 in 500 in a second stress loop.

What changed

  • conversation-calls 1.1.8 (rebuilt server.mjs, client.js, manifest, artifact and catalog entries).
  • The fix: getConversationCallCharacterVideoManifest now reads the manifest and builds its answer under the per-character manifest lock (withManifestLock). A job writes its final clip entry under that same lock before it releases its generation lock, so the read and the generation state can't disagree.
    • No deadlock: the lock's only other user is updateDiskManifest. All six internal callers call the getter after their update has finished.
  • Moved into Calls' own tree: the service is now at packages/conversation-calls/src/engine/packages/server/src/services/conversation/call-character-videos.service.ts.
    • sources/engine is a pinned vendored snapshot, and its baseline may only shrink. Calls 1.1.2 took over conversation-call-command-runtime.ts the same way (6f4c190b8).
    • The path is added to conversationCallsOwnedSourcePaths, and its baseline line is removed.
    • The Engine's own file is only a proxy to this capability service, so the Engine needs no change.
  • Regression: tests/calls-swarmui-video.regression.mjs imports the moved file and adds a deterministic overlap case. It holds one manifest read open while the job finishes, then asserts the answer says either still generating or ready.
    • The new case fails 10/10 against the old service and passes 10/10 with the fix.
  • client.js changed although no client source did. The rebuild picks up the Engine's newer lucide-react, which other packages' bundles already carry. server.mjs without this fix rebuilds byte-identical.
  • Docs and release: CHANGELOG 1.1.8.

Package and security impact

  • Affected package IDs: conversation-calls
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify in a call with character videos that a clip that just finished generating shows as ready without reopening the call.

Agent-run checks:

  • Stress: 10 workers × 25 runs of the real test under full CPU load: 250 runs, 0 failures.
  • Calls regressions: calls-swarmui-video, calls-playback, calls-speech-to-text, calls-mic-segments, calls-character-call, conversation-calls-summary, all passing.
  • Other checks: npm run typecheck:packages, npm run check, validate-catalog, validate-package-locales, validate-package-locale-keys, catalog-release-notes, test-catalog-lanes, vendored-engine.regression.mjs and git diff --check, all passing.
  • validate-vendored-engine.mjs fails, but not because of this PR. It reports 165 "Unbaselined drifted" errors against current Engine staging, and unmodified Agents staging gets the identical 165. The Noodle browser job on staging already fails on this check (163 errors on 2026-11-05). This PR removes one drifted file and adds none.
  • The Calls browser job was not run locally; CI runs it.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/2139 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 11/6/2026 **Status:** ✅ Merged **Merged:** 11/6/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/calls-video-manifest-race` --- ### 📝 Commits (2) - [`5c8b70c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5c8b70c34ca0f4da581322c96363d6495b17a0c3) fix(conversation-calls): a finished call video never reads as missing (1.1.8) - [`de8b57f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/de8b57fa5354483eac11a4bff4b81a988b6570c0) Merge branch 'staging' into fix/calls-video-manifest-race ### 📊 Changes **16 files changed** (+202 additions, -117 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/conversation-calls-1.1.8.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/conversation-calls/CHANGELOG.md` (+4 -0) 📝 `packages/conversation-calls/client.js` (+46 -38) 📝 `packages/conversation-calls/manifest.json` (+5 -5) 📝 `packages/conversation-calls/server.mjs` (+38 -38) 📝 `packages/conversation-calls/src/engine/packages/server/src/services/conversation/call-character-videos.service.ts` (+6 -2) 📝 `scripts/build-feature-packages.mjs` (+2 -1) 📝 `scripts/vendored-engine-baseline.json` (+0 -1) 📝 `tests/calls-swarmui-video.regression.mjs` (+58 -7) 📝 `tests/conversation-calls-summary.regression.mjs` (+1 -1) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #2132 ## Why this change `tests/calls-swarmui-video.regression.mjs` failed once in CI with `'missing' !== 'ready'`. It turned out to be a real race in Conversation Calls, not a flaky test. `getConversationCallCharacterVideoManifest` read `manifest.json` first and only then checked whether a generation job held its lock. When the job finished during that read, the poll got the old `"generating"` entry and found no lock. It then reported `generating: false` with the clip `missing`. In the app, the client stops polling once `generating` is false. A call's video tile could then stay on "missing" until something else made it refresh. Under load the unmodified test failed 5 times in 300 runs, and 16 in 500 in a second stress loop. ## What changed - **conversation-calls 1.1.8** (rebuilt `server.mjs`, `client.js`, manifest, artifact and catalog entries). - **The fix:** `getConversationCallCharacterVideoManifest` now reads the manifest and builds its answer under the per-character manifest lock (`withManifestLock`). A job writes its final clip entry under that same lock before it releases its generation lock, so the read and the generation state can't disagree. - **No deadlock:** the lock's only other user is `updateDiskManifest`. All six internal callers call the getter after their update has finished. - **Moved into Calls' own tree:** the service is now at `packages/conversation-calls/src/engine/packages/server/src/services/conversation/call-character-videos.service.ts`. - `sources/engine` is a pinned vendored snapshot, and its baseline may only shrink. Calls 1.1.2 took over `conversation-call-command-runtime.ts` the same way (`6f4c190b8`). - The path is added to `conversationCallsOwnedSourcePaths`, and its baseline line is removed. - The Engine's own file is only a proxy to this capability service, so the Engine needs no change. - **Regression:** `tests/calls-swarmui-video.regression.mjs` imports the moved file and adds a deterministic overlap case. It holds one manifest read open while the job finishes, then asserts the answer says either still generating or `ready`. - The new case fails 10/10 against the old service and passes 10/10 with the fix. - **`client.js` changed** although no client source did. The rebuild picks up the Engine's newer lucide-react, which other packages' bundles already carry. `server.mjs` without this fix rebuilds byte-identical. - **Docs and release:** CHANGELOG 1.1.8. ## Package and security impact - Affected package IDs: `conversation-calls` - Engine compatibility impact: none - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify in a call with character videos that a clip that just finished generating shows as ready without reopening the call. Agent-run checks: - **Stress:** 10 workers × 25 runs of the real test under full CPU load: 250 runs, 0 failures. - **Calls regressions:** `calls-swarmui-video`, `calls-playback`, `calls-speech-to-text`, `calls-mic-segments`, `calls-character-call`, `conversation-calls-summary`, all passing. - **Other checks:** `npm run typecheck:packages`, `npm run check`, `validate-catalog`, `validate-package-locales`, `validate-package-locale-keys`, `catalog-release-notes`, `test-catalog-lanes`, `vendored-engine.regression.mjs` and `git diff --check`, all passing. - **`validate-vendored-engine.mjs` fails, but not because of this PR.** It reports 165 "Unbaselined drifted" errors against current Engine staging, and unmodified Agents staging gets the identical 165. The Noodle browser job on staging already fails on this check (163 errors on 2026-11-05). This PR removes one drifted file and adds none. - The Calls browser job was not run locally; CI runs it. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#2136
No description provided.