Skip to content

API: PR readiness answers for repositories the instance does not monitor; repository filters are case-sensitive; goals expose host paths #3618

Closed

Description

@integry

Problem

  1. GET /api/pull-requests/1/readiness?repository=facebook/react returns 200 with a full readiness document for a repository the instance does not monitor (the sibling GET /api/repository-events?repository=facebook/react returns 404 REPOSITORY_NOT_ACCESSIBLE). Any member can spend the instance's GitHub quota on arbitrary public repositories. The response also echoes a wrong name ("repository":"react/react").
  2. Repository filters are case-sensitive on some endpoints and silently return nothing: GET /api/stats/cost?period=7d&repository=integry/PROPR returns zero rows (733 executions with the lowercase name); GET /api/tasks?repository=INTEGRY/PROPR returns total 0; GET /api/pull-requests/3583/scores?repository=INTEGRY/propr returns empty scores. Readiness, repository-events and the handoff detail are case-insensitive.
  3. An unknown repository returns 200 with zeros or empty lists on /api/stats/dashboard, /api/stats/review-scores, /api/dashboard/*, /api/repos/todos, /api/repos/media, /api/planner/drafts, while repository-events and task-submission-extensions return 404 REPOSITORY_NOT_ACCESSIBLE.
  4. GET /api/goals returns "worktreePath":"/tmp/git-processor/worktrees/…" to members; a comment in followupHandoffRoutes.ts says host paths must never appear on member routes.
  5. GET /api/goals without a limit returns everything (131 KB, 1.5–2 s) and GET /api/tasks?limit=1000 returns 1 MB.

Expected / acceptance criteria

  • 1: readiness is served only for repositories configured on the instance and visible to the caller; otherwise 404 REPOSITORY_NOT_ACCESSIBLE; the echoed repository name is the canonical configured name.
  • 2: every repository query/body filter is matched case-insensitively against configured repositories and normalized to the canonical name before use (one shared helper).
  • 3: the listed endpoints return 404 REPOSITORY_NOT_ACCESSIBLE for a repository that is not configured or not visible (the value all keeps working).
  • 4: worktreePath and any other host path are removed from member-visible goal responses (keep them for instance administrators only if an admin screen needs them).
  • 5: GET /api/goals has a default limit of 50 and a maximum of 200; /api/tasks maximum limit is 200. Check that the web UI and CLI pass explicit paging and still work.
  • Tests for each point.

Implementation

Add one repository-scope helper in packages/api and use it in the stats, dashboard, tasks, scores, todos, media, planner draft list and readiness routes. Goal serialization is in the goals routes/services.

Notes

ProPR runs on SQLite only: do not add code or tests for other databases. Use COLLATE NOCASE comparisons or normalize the input; do not rewrite stored names.

Activity

  1. propr-dev commented on Nov 17, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3618/claude-opus-5-5-api-pr-readiness-answers--20261117-0149-a7q
    • Base Branch: 3616-epic-0-9-d8b
    • Worktree: issue-3618-20261117-0149-claude-opus-5-5-a7q

    🔍 Track Task Execution

  2. added a commit that references this issue on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions