Skip to content

T-KMPU-pr-subject-lease-for-sessions-with-no-task-behind-them

State: closed/superseded · Impact: medium · Complexity: medium

The Router’s Subject type is {kind:'task'} or {kind:'pr'}, but only the task lease (refs/sdlc/tasks/<id>) exists today. A PR with no task behind it — a hand-opened PR, or one whose task already closed — has nowhere for the Router to record or reserve a serving session. simple-dispatch-interfaces.html’s Session lifecycle section proposes a refs/sdlc/prs/<n> lease as the second subject kind.

  1. Extend the lease subject kind alongside the existing task lease (lib/services/lease/) with a pr kind at refs/sdlc/prs/<repo>/<n>, reusing the same CAS/heartbeat/steal-on-expired machinery.
  2. Make the Router acquire this lease itself when a PR subject has no task lease, per the “Fresh open” step in simple-dispatch-interfaces.html’s Router section.
  3. Keep the lease system pluggable by subject kind so a third kind can be added later with no Router change.
AreaNote
solutions/ontological/lib/services/lease/New pr subject kind
solutions/ontological/lib/services/dispatch/Router’s fresh-open step acquires it
  • AC-1: A PR lease can be claimed, heartbeated and released through the same ops as a task lease.
  • AC-2: The Router acquires a PR lease automatically on first delivery to a task-less PR.
  • AC-3: Two Router instances racing the same task-less PR resolve to one lease holder.
  • UI/CLI surface for listing PR leases (leave to session list/attach, T-QMGC)
  • T-BT9H

T-BT9H


← Back to Tasks