fabro/lib
Bryan Helmkamp 9ede01698c
refactor(server): narrow RunPrInputs to goal; drop PullRequestGithubContext.{owner,repo}
Two code-reuse findings from the simplify review:

1. PullRequestGithubContext carried owner/repo String fields obtained by
   re-parsing record.html_url, even though PullRequestRecord already
   carries typed non-optional owner/repo fields. Dropped the redundant
   fields; the 3 PR handlers read via &ctx.record.owner /
   &ctx.record.repo instead. The incidental non-github.com URL
   rejection is preserved as an explicit one-line host-validation
   call (documented by the rejects_non_github_record_url tests).

2. RunPrInputs held run_spec: &RunSpec purely to read goal()
   downstream. Narrowed to goal: &str stored directly; the server
   handler passes inputs.goal to OpenPullRequestRequest::from_run_state,
   which no longer needs the full RunSpec. Fewer fields, clearer
   dependency at the call site.

Also tightened the from_run_state doc comment (was narrating peer
callers' behavior rather than the method's contract).

Verified: workspace fmt clean, clippy --all-targets -D warnings clean,
cargo nextest run --workspace 4581 passed, 182 skipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 10:38:55 -04:00
..
crates refactor(server): narrow RunPrInputs to goal; drop PullRequestGithubContext.{owner,repo} 2026-04-24 10:38:55 -04:00
packages/fabro-api-client Merge remote-tracking branch 'origin/main' 2026-04-24 00:01:09 -04:00