Skip to content

Keep Email backup cleanup owned by its parent shell #5824

Closed

Description

@devantler

🤖 Generated by the Agentic Engineer

Description

The Email backup refresh can lose its temporary workspace after stopping its completion watches. This blocks recovery checks and currently fails CI on #5820.

Steps to Reproduce

The native full Go regression in run 41607447333 failed the foreign unfinished-job control: the completion readback could not open its temporary file because its directory had disappeared.

Exercise the actual cleanup handler from a child process in the inherited-handler state, then verify the parent workspace still exists.

Expected Behavior

Only the owning parent shell may stop its watches or remove its workspace. Completed snapshot and mirror proof must remain required.

Actual Behavior

Cleanup has no process-owner fence. A cancelled watch can inherit the parent's exit trap before resetting it, matching the Bash maintainer's documented fork/termination race. The observed CI failure is consistent with that mechanism; a deterministic child-cleanup control is required.

Acceptance Criteria

  • A real child executing the inherited cleanup handler preserves the parent's workspace and watch.
  • Parent cleanup still stops and reaps its watch and removes its workspace.
  • Existing source, owner, completion, mirror and privacy refusals still pass.
  • Full native CI passes and the reviewed repair is delivered.

Related recovery work: #5578.

Activity

  1. added theissue type on Nov 3, 2026
  2. self-assigned this
    on Nov 3, 2026
  3. coderabbitai commented on Nov 3, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #5541 - feat(email): prepare recoverable storage keys with current backups [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  4. added a commit that references this issue on Nov 3, 2026
  5. moved this to 🏃🏻‍♂️ In Progress in 🌊 Project Boardon Nov 3, 2026
  6. moved this from 🏃🏻‍♂️ In Progress to ✅ Done in 🌊 Project Boardon Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Effort

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions