Skip to content

feat(github-app): add command response previews #103

Description

@JSONbored

Parent roadmap: #82

Background

Maintainers should know exactly what Gittensory would post before enabling visible command responses.

Goal

Add preview endpoints/tools for sanitized @gittensory command responses without posting comments.

Current Behavior

Mention commands can respond, but previewing public output before enabling or invoking commands is limited.

Desired Behavior

Maintainers can preview help/preflight/blockers/duplicate-check/miner-context/next-action output for sample PRs.

Implementation Requirements

  • Add preview API for installed repo maintainers/admins.
  • Render command-specific public-safe responses.
  • Show skip/comment/label/check decision.
  • Include missing permission diagnostics.
  • Never post during preview.

Public/Private Output Boundaries

Public GitHub output must stay quiet-by-default and sanitized. It must not include private reviewability, scoreability, reward/risk, raw trust, wallet/hotkey, or public score estimates.

Acceptance Criteria

  • Preview does not create comments, checks, or labels.
  • Confirmed miner preview differs from non-miner skip.
  • Missing permissions are explained.
  • Output passes sanitizer tests.

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

  • Confirmed miner preview.
  • Non-miner preview.
  • Maintainer author preview.
  • Missing Issues write fixture.
  • Forbidden-language regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions