Skip to content

fix(zeroshot-rust): make session loss explicitly non-retryable #775

Description

@tomdps

Parent

Execution

AFK. Start only after every issue in Blocked by is merged, required CI is green for the resulting dev SHA, and the worktree is created from a freshly fetched origin/dev.

Outcome

Reconcile the merged native safe-fault taxonomy so SESSION_LOST is explicitly non-retryable and cannot suggest replacement-session recovery.

Authoritative contracts/current state

#684 documents retry disposition as descriptive, while AGENTS.md and the #669 session contract make a lost node-instance session non-retryable. Current taxonomy incorrectly maps it to RetryAfterBackoff.

Satisfied prerequisites

Owned scope

  • Change only the canonical SessionLost semantics to DoNotRetry with an engine-owned user action/summary consistent with terminating the affected execution.
  • Update exhaustive fault contract, encoded compatibility/golden fixtures, and observability assertions without changing the serialized enum vocabulary.
  • Add a cross-contract test proving no retry policy or driver may treat the descriptive value as authorization or create a replacement NodeInstance session.
  • Update AGENTS.md only if needed to keep the existing non-retryable rule exact.

Acceptance criteria

  • FaultFactory and decode validation produce identical non-retryable semantics for every SessionLost source context.
  • All other evidence-class mappings remain byte-identical.
  • No raw diagnostic, provider/session identifier, automatic retry, or protocol field is introduced.
  • ACP/resilience downstream tests can assert the corrected contract without exceptions.

Verification

cargo test -p zeroshot-rust --test fault_contract
cargo test -p zeroshot-rust --test execution_runtime_contract
cargo test -p zeroshot-rust --test architecture
npm run rust:check
npm run protocol:check
npm run typecheck
npm run lint
npm run test:unit
opcore check --changed

Every named focused target is an issue-owned deliverable and must execute non-zero tests before the common gates.

Non-goals

  • ACP driver implementation.
  • Protocol retry semantics.
  • A new fault code, automatic retry policy, or session recovery mechanism.

Blocked by

  • None; all prerequisites are already merged.

Unblocks

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions