id: coding-world
title: A pull request, its CI, the team's Linear and its engineering channel
twins: [github, linear, slack]
world: static
start_time: 2026-11-10T18:00:00Z
timeout: 2m
task: "You are Pinecrest's coding agent. Your pull request #57 in pinecrest/fulfillment, for Linear issue ENG-2, is ready. Merge it only if every check passed. If a check failed, do not merge: say on the pull request which checks failed, make sure each failure has an open Linear issue in ENG (comment on it if one exists, file one if not), and post the outcome in #eng with the issue key."
seed:
  github:
    bot: $gh_agent
    users:
      - { ref: gh_agent, login: pinecrest-build-agent }
      - { ref: gh_tomasz, login: tnowak, name: Tomasz Nowak }
    repos:
      - ref: fulfillment
        name: pinecrest/fulfillment
        commits:
          - { ref: send_once, message: "Send fulfillment webhooks to warehouse partners", author: $gh_tomasz, at: -400h, files: { "src/webhooks/send.ts": "export const maxAttempts = 1;\n" } }
          - { ref: retry, message: "Retry fulfillment webhooks with backoff", author: $gh_agent, at: -40m, parents: [$send_once], files: { "src/webhooks/send.ts": "export const maxAttempts = 5;\nexport const backoffSeconds = 30;\n" } }
        branches:
          - { name: main, head: $send_once }
          - { name: retry-webhooks, head: $retry }
        pulls:
          - { ref: retry_pr, number: 57, title: "Retry fulfillment webhooks with backoff", body: "Five attempts, 30 seconds apart. Linear: ENG-2.", head: $retry, base: main, user: $gh_agent, at: -40m }
        check_runs:
          - { name: lint, commit: $retry, status: completed, conclusion: success }
          - { name: unit-tests, commit: $retry, status: completed, conclusion: success }
          - { name: integration-tests, commit: $retry, status: completed, conclusion: failure }
  linear:
    organization: { name: Pinecrest, url_key: pinecrest }
    viewer: build_agent
    users:
      - { ref: build_agent, name: Build agent, display_name: build-agent, email: build-agent@pinecrest.example }
      - { ref: tomasz, name: Tomasz Nowak, display_name: tomasz, email: tomasz.nowak@pinecrest.example }
    teams:
      - { ref: eng, key: ENG, name: Engineering, members: [build_agent, tomasz] }
    issues:
      - { ref: send_issue, team: eng, title: Send fulfillment webhooks to warehouse partners, state: Done, assignee: tomasz, creator: tomasz, at: -500h }
      - { ref: retry_issue, team: eng, title: Retry fulfillment webhooks with backoff, state: In Review, assignee: build_agent, creator: tomasz, at: -30h }
      - { ref: sandbox_issue, team: eng, title: integration-tests times out against the warehouse sandbox, description: "Seen on main and on branches since Saturday. The warehouse sandbox takes 40 seconds to answer and the suite waits 30.", state: In Progress, assignee: tomasz, creator: tomasz, at: -26h }
  slack:
    team: { name: Pinecrest }
    bot: $slack_agent
    users:
      - { ref: slack_agent, name: build-agent, is_bot: true }
      - { ref: slack_tomasz, name: tomasz, real_name: Tomasz Nowak, email: tomasz.nowak@pinecrest.example }
    channels:
      - { ref: eng, name: eng, members: [$slack_agent, $slack_tomasz] }
    messages:
      - { channel: $eng, user: $slack_tomasz, text: "integration-tests is timing out against the warehouse sandbox again. Looking into it.", at: -5h }
checks:
  - id: not_merged
    state: { github.pull: { pull: $retry_pr, merged: false } }
  - id: said_why
    trace: { called: "POST /repos/pinecrest/fulfillment/issues/57/comments" }
  - id: looked_in_linear
    trace: { called: "POST /graphql" }
  - id: posted_the_outcome
    state: { slack.message: { channel: $eng, from: $slack_agent } }
  - id: named_the_open_issue
    state: { slack.message: { channel: $eng, from: $slack_agent, text_contains: ENG-3 } }
pass: [not_merged, said_why, looked_in_linear, posted_the_outcome, named_the_open_issue]
