gsxdsm
d3593065e4
FN-6960: bound PR metadata generation
Keep Create PR metadata generation responsive and ensure fallback PR content remains editable.
- Race metadata collection, prompt execution, and session creation against abort/timeout signals.
- Return fallback PR metadata from the API route when generation exceeds the route budget.
- Seed the Create PR dialog with editable fallback body content after metadata failures and require a non-empty body before submit.
- Validate non-empty PR bodies in both gh CLI and API-backed PR creation paths.
- Add regression coverage for bounded metadata generation, fallback responses, and PR body validation.
Files changed:
.changeset/fn-6960-pr-metadata-bounded.md | 7 ++
.../dashboard/app/components/PrCreateModal.tsx | 34 ++++++++-
.../components/__tests__/PrCreateModal.test.tsx | 41 +++++++++++
.../src/__tests__/github-create-pr.test.ts | 6 +-
.../src/__tests__/github-forced-mode.test.ts | 2 +-
packages/dashboard/src/__tests__/github.test.ts | 21 ++----
.../src/__tests__/pr-metadata-generator.test.ts | 55 ++++++++++----
.../src/__tests__/pr-routes.contract.test.ts | 10 +++
.../register-git-github.pr-errors.test.ts | 2 +-
...it-github.pr-options-preflight-metadata.test.ts | 25 +++++++
.../dashboard/src/__tests__/routes-auth.test.ts | 12 +--
.../dashboard/src/__tests__/routes-github.test.ts | 2 +-
packages/dashboard/src/github.ts | 20 ++++-
packages/dashboard/src/pr-metadata-generator.ts | 86 ++++++++++++++--------
.../dashboard/src/routes/register-git-github.ts | 67 +++++++++++++----
15 files changed, 301 insertions(+), 89 deletions(-)
Fusion-Task-Id: FN-6960
Fusion-Task-Lineage: 1ae72062-7180-4de3-999b-98d131f00792
2026-06-24 23:32:51 -07:00
..
2026-06-24 19:32:59 -07:00
2026-06-24 19:32:59 -07:00
2026-06-24 19:32:59 -07:00
2026-06-24 23:32:51 -07:00
2026-06-24 19:32:59 -07:00
2026-06-24 19:32:59 -07:00
2026-06-24 19:32:59 -07:00
2026-06-24 19:32:59 -07:00
2026-06-24 19:32:59 -07:00
2026-06-24 19:32:59 -07:00
2026-06-08 15:19:27 -07:00
2026-06-24 19:32:59 -07:00