Move the claim family onto Claim and Checkpoint #1619

Closed
opened 2026-11-06 20:06:23 +00:00 by jared · 3 comments
Owner

Problem

checkout fetches the ticket again at each step, which makes about ten reads per claim. Its rules are spread across checkout, bounce, and validate-template.

Approach

Follow the ticket claim walk in section 3 of the design record. One find loads the ticket, and each object uses it. Owned rules: inventory 1.3 and 1.4. Keep ## Bounced as the heading, so old tickets still match. Keep the claim behavior for a ticket that another agent holds. Refusal is #335, after this slice.

Required work:

  1. Add Claim and the new Checkpoint — check: present class Claim in plugins/os-backlog/lib/backlog/**/*.rb
  2. Add Ticket#settle_readiness, Ticket#claim, and Ticket#return_to_queue — check: present def return_to_queue in plugins/os-backlog/lib/backlog/**/*.rb
  3. Route checkout, bounce, and validate-template through them.
  4. Fix inventory defects 7, 8, and 9.

Acceptance criteria

  1. Given a ticket with both readiness labels, when it is claimed, then ready-for-human wins and a comment states this.
  2. Given a ready-for-agent ticket that fails the checkpoint, when it is claimed, then the ticket returns to the queue with the failures.
  3. Given a passing ticket, when it is claimed, then ## Start is posted before the assignee is set, and the output holds the ticket, the Spec, and the decision children.
  4. Given a claim, when it runs, then the tracker receives one ticket read for the claimed ticket.
  5. Given a second return, when bounce runs, then the output does not print a question that was not posted.
  6. Given an empty --approach or --question, when the command runs, then it refuses.
  7. Given one unfetchable Blocked-by reference, when the checkpoint runs, then the failure prints once.

Owner sketch

class Backlog::Claim
  def initialize(ticket, checkpoint)
  def call(approach)
class Backlog::Checkpoint
  def failures(ticket)
class Backlog::Ticket
  def settle_readiness
  def claim(approach)
  def return_to_queue(question)

Non-goals

Do not rename a command before slice 9. Do not change ## Resolution, **Follow-ups:**, the body headings, the check form, the label names, or the issue-show JSON keys. Do not make a behavior change that this ticket does not name.

Blocking edges

Blocked by #1618

Origin

  • Trigger: port plan, section 5 of docs/system-design-format/proof/2026-11-06-os-backlog-domain-objects.md, slice 6
  • Improvised this session: none
  • Chain: os-backlog code has no domain objects ← commands own their own reads and writes ← DESIGN (ADR-0307, plugins/os-backlog/CONTEXT.md)
  • Root candidate: none found; searched checkout, bounce, Checkpoint, validate-template
  • Where: plugins/os-backlog/lib/backlog/checkout.rb, plugins/os-backlog/lib/backlog/checkout/bounce.rb, plugins/os-backlog/lib/backlog/checkout/checkpoint.rb
  • Session: 9d8c2e15-00c1-4dec-b177-e749fa05ec67
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/9d8c2e15-00c1-4dec-b177-e749fa05ec67.jsonl

VERDICT: CREATE

## Problem `checkout` fetches the ticket again at each step, which makes about ten reads per claim. Its rules are spread across `checkout`, `bounce`, and `validate-template`. ## Approach Follow the `ticket claim` walk in section 3 of the design record. One `find` loads the ticket, and each object uses it. Owned rules: inventory 1.3 and 1.4. Keep `## Bounced` as the heading, so old tickets still match. Keep the claim behavior for a ticket that another agent holds. Refusal is #335, after this slice. Required work: 1. Add `Claim` and the new `Checkpoint` — check: present `class Claim` in `plugins/os-backlog/lib/backlog/**/*.rb` 2. Add `Ticket#settle_readiness`, `Ticket#claim`, and `Ticket#return_to_queue` — check: present `def return_to_queue` in `plugins/os-backlog/lib/backlog/**/*.rb` 3. Route `checkout`, `bounce`, and `validate-template` through them. 4. Fix inventory defects 7, 8, and 9. ## Acceptance criteria 1. Given a ticket with both readiness labels, when it is claimed, then `ready-for-human` wins and a comment states this. 2. Given a `ready-for-agent` ticket that fails the checkpoint, when it is claimed, then the ticket returns to the queue with the failures. 3. Given a passing ticket, when it is claimed, then `## Start` is posted before the assignee is set, and the output holds the ticket, the Spec, and the decision children. 4. Given a claim, when it runs, then the tracker receives one ticket read for the claimed ticket. 5. Given a second return, when `bounce` runs, then the output does not print a question that was not posted. 6. Given an empty `--approach` or `--question`, when the command runs, then it refuses. 7. Given one unfetchable Blocked-by reference, when the checkpoint runs, then the failure prints once. ## Owner sketch ```ruby class Backlog::Claim def initialize(ticket, checkpoint) def call(approach) class Backlog::Checkpoint def failures(ticket) class Backlog::Ticket def settle_readiness def claim(approach) def return_to_queue(question) ``` ## Non-goals Do not rename a command before slice 9. Do not change `## Resolution`, `**Follow-ups:**`, the body headings, the check form, the label names, or the `issue-show` JSON keys. Do not make a behavior change that this ticket does not name. ## Blocking edges Blocked by #1618 ## Origin - Trigger: port plan, section 5 of `docs/system-design-format/proof/2026-11-06-os-backlog-domain-objects.md`, slice 6 - Improvised this session: none - Chain: os-backlog code has no domain objects ← commands own their own reads and writes ← DESIGN (ADR-0307, `plugins/os-backlog/CONTEXT.md`) - Root candidate: none found; searched checkout, bounce, Checkpoint, validate-template - Where: plugins/os-backlog/lib/backlog/checkout.rb, plugins/os-backlog/lib/backlog/checkout/bounce.rb, plugins/os-backlog/lib/backlog/checkout/checkpoint.rb - Session: 9d8c2e15-00c1-4dec-b177-e749fa05ec67 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/9d8c2e15-00c1-4dec-b177-e749fa05ec67.jsonl VERDICT: CREATE
Author
Owner

Work started on branch ticket-1619.

Work started on branch ticket-1619.
Author
Owner

Dropped follow-up (ticket-skeptic, depth-1 rule): the leftover Checkout objects (Result, Claimant, IssueBody, TemplateValidator) and the duplicated Blocked-by failure text have no security, data-loss, or validation impact. uniq at checkpoint/findings.rb:12 meets AC 7. Treat placement as a note for the next structure pass.

Dropped follow-up (ticket-skeptic, depth-1 rule): the leftover Checkout objects (Result, Claimant, IssueBody, TemplateValidator) and the duplicated Blocked-by failure text have no security, data-loss, or validation impact. uniq at checkpoint/findings.rb:12 meets AC 7. Treat placement as a note for the next structure pass.
Author
Owner

Resolution

Done: checkout, bounce, and validate-template run through Claim, Checkpoint, and Ticket::Claiming. One find loads a claimed ticket. Checkout is now a module with no root file. Defects 7, 8, and 9 are fixed.

Evidence: Implementation 255 complete, 20 dispatches, 34 min 17 s. main f7973712: os-backlog 508 runs, os-sdlc 3508 runs, ticket-takedown 623 runs, 0 failures. Lens: A2, A11, A12 challenged as code defects; A11 work added to #1621.

Follow-ups: none. Skeptic dropped the placement follow-up; the reason is on this ticket.

## Resolution **Done:** checkout, bounce, and validate-template run through Claim, Checkpoint, and Ticket::Claiming. One find loads a claimed ticket. Checkout is now a module with no root file. Defects 7, 8, and 9 are fixed. **Evidence:** Implementation 255 complete, 20 dispatches, 34 min 17 s. main f7973712: os-backlog 508 runs, os-sdlc 3508 runs, ticket-takedown 623 runs, 0 failures. Lens: A2, A11, A12 challenged as code defects; A11 work added to #1621. **Follow-ups:** none. Skeptic dropped the placement follow-up; the reason is on this ticket.
jared closed this issue 2026-11-07 07:07:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1619
No description provided.