Skip to content

fix(shell): preserve task origin in job snapshots - #40

Open
zhuowp wants to merge 1 commit into
Pinvou:pinvou3-cleanfrom
zhuowp:fix/shell-task-origin-pinvou-v0.9.5
Open

fix(shell): preserve task origin in job snapshots#40
zhuowp wants to merge 1 commit into
Pinvou:pinvou3-cleanfrom
zhuowp:fix/shell-task-origin-pinvou-v0.9.5

Conversation

@zhuowp

@zhuowp zhuowp commented Sep 4, 2026

Copy link
Copy Markdown

No-Issue: backport of the independently tracked upstream fix for the Pinvou v0.9.5 maintenance branch.

Summary

  • stamp shell work with its originating tool-call and turn identities
  • preserve those identities in job snapshots, completion events, runtime handoff, and evidence artifacts
  • keep legacy serialized jobs compatible through optional fields

Why

Background shell jobs outlive the tool call that created them. Without stable origin identity, an embedding host can attach a late failure from an earlier command to a newer tool card, especially when commands are identical or a wait call observes multiple jobs.

Scope

This is the Pinvou v0.9.5 fork backport of the reusable upstream fix proposed in Hmbown#5869. It deliberately does not add a revision counter or origin fields to generic tool-result metadata, because a wait result can summarize jobs from multiple origins.

Verification

  • cargo check -p codewhale-tui --lib --locked
  • focused origin, completion-event, runtime-handoff, legacy-JSON, and evidence tests
  • cargo fmt --all
  • git diff --check

Upstream: Hmbown#5869

Signed-off-by: zhuowp <zwp-1989@qq.com>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Thanks @zhuowp for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant