Skip to content

T27_SESSION_NEVER_DIES_01: durable checkpoints at meaningful step boundaries #12895

Closed

Description

@gHashTag

Goal

Make the Session Continuity Contract durable at every meaningful step boundary so a long-running session can resume from its last known-good checkpoint instead of restarting or dying silently.

Boundary

  • specs/runtime/session_continuity_contract.t27
  • specs/runtime/session_checkpoint_save.t27
  • .trinity/seals/session_continuity_contract.json
  • .trinity/seals/session_checkpoint_save.json
  • NOW.md

User Scenarios

  • Given a long-running session with a durable checkpoint at step 12, when step 13 completes and its checkpoint write fails, then the session keeps the checkpoint from step 12, reports the failed write, and never claims that step 13 is durable.
  • Given a provider response committed at a meaningful boundary, when the session is interrupted after the checkpoint, then resume starts from that committed checkpoint instead of restarting from zero.
  • Given a tool call, subtask, artifact write, or provider response reaches a meaningful boundary, when the checkpoint policy runs, then it requires a durable checkpoint for that boundary.

Requirements

  • FR-001: specs/runtime/session_continuity_contract.t27 MUST define the versioned checkpoint contract, meaningful boundaries, durable and failed states, and last-known-good resume selection with test and invariant blocks.
  • FR-002: specs/runtime/session_checkpoint_save.t27 MUST define the session-checkpoint-save skill with test, invariant, and bench blocks.
  • FR-003: A checkpoint MUST carry the goal, plan, completed steps, tool results, decisions, provider route, evidence links, and idempotency references needed by another agent instance to continue the session.
  • FR-004: A durable checkpoint MUST be required after a tool call completes, a subtask finishes, an artifact is written, and a provider response is committed.
  • FR-005: A failed checkpoint write MUST preserve the previous known-good checkpoint, MUST make the failure visible, and MUST NOT report the new step as durable.
  • FR-006: Resume selection MUST choose the latest valid completed checkpoint and MUST never fall back to zero when a valid earlier checkpoint exists.
  • FR-007: The implementation MUST be spec-first; generated output MUST NOT be hand-edited.
  • FR-008: The two specs MUST remain traceable to this issue and MUST not claim Doctor watchdog, retry, approved fallback, degraded continuation, or recovery drills, which belong to later slices.

Success Criteria

  • ./scripts/tri parse specs/runtime/session_continuity_contract.t27 returns exit 0.
  • ./scripts/tri parse specs/runtime/session_checkpoint_save.t27 returns exit 0.
  • ./scripts/tri test specs/runtime/session_continuity_contract.t27 returns exit 0.
  • ./scripts/tri test specs/runtime/session_checkpoint_save.t27 returns exit 0.
  • specs/runtime/session_continuity_contract.t27 and specs/runtime/session_checkpoint_save.t27 each contain test, invariant, and bench blocks.
  • 0 hand-edited files under gen/.

Definition of Done

  • The contract and save skill parse and generate through the official tri pipeline.
  • Generated tests pass.
  • Seals exist for both modules.
  • The pull request closes this issue.

Non-goals

  • Slice 02: Doctor watchdog and user-visible status events.
  • Slice 03: bounded retry and idempotency execution.
  • Slice 04: approved funded-route fallback.
  • Slice 05: degraded continuation.
  • Slice 06: recovery drills.

Existing runtime evidence

DeepSeek Harness already has session-checkpoint-policy barriers before model dispatch, before top-level tool dispatch, and at agent/pre-step. This issue specifies the T27 contract against that seam without weakening fail-closed durability or unknown-outcome handling.

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 30, 2026
  2. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor

    Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.

    • missing: ## Boundary -- list every file this task may touch, one per line (- specs/x.t27); without it the Queen reserves nothing and no bee can take the issue
    • missing: ## User Scenarios -- at least one Given/When/Then scenario
    • missing: ## Requirements -- numbered obligations, FR-001: ... MUST ...
    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
  3. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor

    Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.

    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
  4. removed
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 30, 2026
  5. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec exists: specs/runtime/session_continuity_contract.t27 (covers durable checkpoints at meaningful step boundaries, owned by T27_SESSION_NEVER_DIES_01).

  6. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.

  7. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec exists and passes typecheck + tests. M5 milestone complete.

  8. gHashTag commented on Nov 18, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 spec was created but no production implementation, integration test, or CI verification exists. This issue remains open until the target component implements the specified behavior and evidence is provided.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions