10. Install and verify
Run the install flow for Linear and GitHub, then verify the round-trip with a test ticket.
Now that webhooks are pointed at your API, install the apps against your tenant and verify the round-trip.
1. Install Linear
Open the install flow URL in your browser:
<APP_BASE_URL>/install/linearYou'll be redirected to Linear, prompted to authorize the app against your workspace, then sent back. Sinatra creates a Tenant row keyed by your Linear organizationId.
2. Install GitHub
From the same install screen, click Connect GitHub. You'll be redirected to GitHub to install the GitHub App on your account or organization. Pick the repos you want Sinatra to work in.
3. Verify
Two ways to verify the wiring:
Option A — Trigger from a Linear ticket
- Create a Linear ticket in your workspace (any title and a one-line description is enough).
- Assign it to the agent (or
@sinatrain a comment). - Watch the API logs — you should see the webhook arrive, signature verify, and a Temporal workflow start.
- Open the Temporal UI (
http://localhost:8233for dev, your Temporal Cloud UI for production) — there should be a new workflow.
Option B — Inspect webhook deliveries
Both GitHub and Linear show delivery history per webhook:
- GitHub: App settings → Advanced → Recent Deliveries.
- Linear: App settings → Webhooks → Recent deliveries.
A successful delivery shows 200 OK. A 401 typically means a webhook-secret mismatch. A 404 means the URL is wrong. A 530 from Cloudflare means your tunnel is down.
Where the workflow runs
Once a webhook arrives:
- The API verifies the signature.
- Looks up the tenant by
organizationId. - Emits a
Thoughtactivity to Linear (acknowledgement). - Starts a Temporal workflow scoped to
tenantId. - The worker picks it up and runs the agent inside a sandbox.
- The PR opens; Linear ticket is updated.
You should see a comment from the agent on the Linear ticket within a few seconds, and a PR appear in the target repo within a few minutes.
Done
If you got here, you have a working self-hosted Sinatra. Some next steps:
- Set up a
.sinatrarcin your target repo to control engine, model, and CI behavior — see Reference /.sinatrarc. - Tune sandbox setup commands (
pre_clone,post_clone) for repos with non-trivial install requirements. - Read Configuration / Environment variables for per-tenant overrides.
If something didn't work, check the troubleshooting page →