Skip to content

feat(mcp): ingest GitHub CI status hints for local branches #102

Description

@JSONbored

Parent roadmap: #82

Background

A local branch may already have GitHub CI/check/review state. Pulling that metadata can make Gittensory guidance more concrete.

Goal

Use GitHub metadata to enrich local branch analysis with checks, approvals, review requests, and failing contexts when available.

Current Behavior

Local branch analysis mainly uses git metadata and API context, not full GitHub check/review status for the current branch.

Desired Behavior

MCP explains whether a branch is failing checks, pending review, approved, needs author, or blocked by stale CI.

Implementation Requirements

  • Resolve current branch PR when possible.
  • Fetch check/review metadata through GitHub-safe APIs.
  • Keep auth failures nonfatal.
  • Bound fetched metadata.
  • Feed CI hints into branch blockers and PR packet.

Public/Private Output Boundaries

MCP may return private scoreability and risk context to authenticated users. It must never upload source contents by default, and public-safe packet output must exclude private score/reward/trust/reviewability details.

Acceptance Criteria

  • Existing PR branch gets CI/review hints.
  • No PR branch falls back cleanly.
  • Failing checks appear as next steps.
  • Approved PR can feed pending scenario assumptions when private.

Testing Requirements

  • npm run test:ci must pass.
  • Global coverage must remain at or above 97% for lines, statements, functions, and branches.
  • Aim for 98%+ branch coverage locally to avoid CI variance.
  • Add tests for every new branch, fallback path, sanitizer rule, and regression.
  • Add invariant/property-style tests when behavior depends on sorting, gating, scoring, queue pressure, source-upload safety, public/private boundaries, or upstream drift.
  • Public GitHub output must be tested against forbidden language: wallet, hotkey, raw trust score, payout, reward estimate, farming, private reviewability, and public score estimate.
  • MCP/local tooling must prove source contents are not uploaded.

Additional Test Scenarios

  • PR found fixture.
  • No PR fixture.
  • Failing check fixture.
  • Approved review fixture.
  • GitHub API failure fallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions