fix(api): bound local branch scenario inputs#614
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 32416d1 | Commit Preview URL Branch Preview URL |
Jun 13 2026, 05:37 AM |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 5 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
|
@JSONbored the source looks fine from this pass, but the PR title needs to be fixed before merge. A few notes:
Required changes:
Validation expected:
|
37f5445 to
ef05cc6
Compare
Motivation
scenariofrom local branch metadata that could violate the stricter scenario model limits (branch/ref length and linked issues), causingZodErrorto be thrown and propagate as a server error for otherwise schema-accepted API/MCP inputs.Description
src/scenarios/input-model.ts(SCENARIO_MAX_*) and use them for scenario schemas and validation bounds.scenarioInputFromLocalBranchMetadatato avoid throwing duringbuildScenarioInput/normalizeScenarioInput.src/api/routes.tsandsrc/mcp/server.tsforrepoFullName,branchName/baseRef/headRef, andlinkedIssueslimits.test/unit/scenario-input-model.test.tsandtest/unit/local-branch.test.ts).Testing
npm test -- test/unit/scenario-input-model.test.ts test/unit/local-branch.test.tsand observed all unit tests pass (55 passed).npm run typecheck(tsc --noEmit) and the typecheck completed successfully.git diff --checkto ensure no whitespace/errors in diffs before committing.Codex Task