Skip to content

id(world): capability requests in wants re-execute unattributed after a world reopen #839

Closed

Description

@dezren39

handled_requests lives in memory only (pkgs/id/src/world/actor.rs:208) and starts empty after a reopen. So every capability request still listed in the guest's wants runs again on the first pass after a restart. With no acting participant, it runs as permitted (actor_permits). For a non-idempotent provider (chat.say today; F12.5 kv, http.fetch and notify), a restart can repeat a side effect with world authority. The comment near actor.rs:400 calls delivery at-least-once, but the restart case is not documented or tested.

Proposed: write down the restart semantics and add a test. Consider journaling handled request ids, or refusing un-attributed re-execution after a reopen. The F13.7 design refuses with actor_denied, reason restarted.

Found while writing the F13.7 design (#789).

Acceptance criteria

  • The restart semantics for capability requests still listed in a guest's wants after a world reopen are written down in the code/docs
  • A test covers the reopen case: a non-idempotent request (e.g. chat.say) is not silently re-executed unattributed, or its at-least-once re-execution is explicitly asserted as intended
  • If the chosen semantics refuse re-execution, the refusal uses the documented code (actor_denied, reason restarted, per the F13.7 design)

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    source/humanFiled directly by a human
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 26, 2026
  2. dezren39 commented on Oct 26, 2026

    @dezren39
    MemberAuthor

    Intake review

    Still live: verified on current main (a2eef6f) — handled_requests in pkgs/id/src/world/actor.rs is still an in-memory BTreeSet re-initialised empty on open (and cleared at line ~1215); no journaling or restart refusal found.

    Related: #789 (F13.7 design proposes refusing with actor_denied / reason restarted), #840 (the sibling attribution gap — input carries no session identity).

    Notes / risks: this is the highest-risk item in this batch: a restart can repeat a non-idempotent side effect (chat.say today; kv / http.fetch / notify under F12.5) with world authority and no acting participant. The fix is a semantics decision first, code second.

    Suggested approach: decide journal-handled-ids vs refuse-unattributed-on-reopen, write the semantics into the module docs, then add the reopen regression test named in the acceptance criteria.

    🤖 Fleet monitor intake enrichment — acceptance criteria appended to the body, labels normalized and meta/enriched applied this pass.

  3. added
    mode/onlineFully doable remotely: design, config, code, cloud
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  4. 151 remaining items

  5. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Agent note - MID-SHIFT FALLBACK - lane code-b, task 14750 (issue #839, PR #4677).

    The broker heartbeat for task 14750 returns not-claimed (exit 5) roughly 15 minutes after a successful claim and checkpoint - the third identical mid-shift claim loss this lane has hit this shift (tasks 14211 and 12995 before it), which points at a lease/sweeper fault in the queue backend rather than anything task-local. Per runbook section 0b this task switches to the GitHub fallback: fallback claim on issue #839 as repo-worker-code-b, terminal via fallback release. Work state at switch: PR #4677 branch refreshed with current main in worktree fleet/14750, targeted wants tests running on the laptop. Next: test result, then merge PR #4677 if green.

  6. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-code-b — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-b posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  7. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-b: targeted_tests_running: wants tests compiling on laptop

  8. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-b: targeted_tests_running: still compiling

  9. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-b: targeted_tests_running: linking phase

  10. added a commit that references this issue on Nov 11, 2026
  11. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Agent note - done (fixed_merged) - lane code-b, task 14750 (pr_shepherd, PR #4677, issue #839).

    PR #4677 is MERGED (merge commit 652f470). It implements the refusal option this issue proposed: pre-restart wants are refused at reopen instead of being re-executed unattributed, with the semantics written down and three new tests. Verified this shift: current main was merged into the branch (head 43dcdb9) and the targeted tests pass on the laptop - cargo test -p id --lib with the wants filters: 3 passed, 0 failed (reopened_wants_are_refused_not_reexecuted, spawn_restored_refuses_open_time_wants, stale_wants_capture_reads_the_current_wants). No Codex findings existed on the PR. Closing issue #839 as completed by PR #4677. (Terminal recorded via the GitHub fallback after the third broker claim loss this shift - see the MID-SHIFT FALLBACK note.)

  12. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Released by repo-worker-code-b (outcome: done). task 14750 fixed_merged: PR #4677 merged 652f470, wants-refusal tests 3 passed locally, issue #839 closed as completed by the PR

  13. added
    priority/lowNice to have; do when convenient
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    priority/highImportant and time-sensitive
    on Nov 11, 2026
  14. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    state: done
    task: 14475
    lane: any-b
    worker: repo-worker-code

    Triage of #839 complete — already handled. PR #4677 "fix(id): refuse pre-restart wants on reopen (#839)" is MERGED (2026-11-11T00:24:44Z, merge commit 652f470), implementing the refusal semantics this issue proposed (pre-restart wants refused at reopen rather than re-executed unattributed, with tests), and the issue was closed as completed by that PR (lane code-b, task 14750). Verified fresh this claim; nothing left to route. Task 14475 completes with outcome already_done.

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmode/onlineFully doable remotely: design, config, code, cloudpriority/lowNice to have; do when convenientsource/humanFiled directly by a humantask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions