Skip to content

feat(review): wire bot-generated visual captures into screenshotTableGate #4110

Description

@JSONbored

Part of #3607 (visual-capture convergence epic).

Context

src/review/screenshot-table-gate.ts's evaluateScreenshotTableGate (as of 2026-07-07: input: { config, prBody, prLabels, changedFiles }, no bot-capture input) is a deterministic, presence-only check on the PR BODY text — it has no way to be satisfied by an automated bot-rendered before/after capture, even when the visual-capture pipeline (src/review/visual/capture.ts/shot.ts) successfully produced one. A bot-rendered before/after currently CANNOT satisfy this gate; only a hand-authored markdown table in the PR body can.

Separately: ScreenshotTableGateConfig's action: "request_changes" | "comment" values are fully typed/validated but have ZERO runtime effect — src/queue/processors.ts (~line 2787-2795 as of 2026-07-07) is the only reader of the gate's result and only branches on === "close". This is dead config surface that should either be wired up for real or removed.

Requirements

  • Add a source: "bot" | "contributor" (or similar) input to evaluateScreenshotTableGate so a successful automated capture (from the visual-capture pipeline, when it ran for this PR) can satisfy the gate instead of requiring a hand-authored table.
  • Wire this through src/settings/agent-actions.ts's screenshotTableMatch handling (~line 668-689 as of 2026-07-07) so a successful bot capture doesn't sit as a purely decorative comment section alongside a gate that still demands manual evidence.
  • Resolve the dead request_changes/comment actions: either give them real runtime effect in processors.ts, or remove them from ScreenshotTableGateConfig as unused surface — do not leave them silently inert either way.
  • Consider whether src/signals/focus-manifest.ts's pre_merge_checks/manifestPolicy mechanism could serve as a cheaper interim "screenshot present" requirement ahead of full gate integration, if that turns out simpler than extending the gate directly.

Deliverables

  • evaluateScreenshotTableGate accepts and correctly evaluates a bot-capture-result input
  • agent-actions.ts wiring updated
  • request_changes/comment either wired to real effect or removed, with the decision documented
  • Tests: bot capture satisfies the gate; contributor-authored table still satisfies it; absence of both still triggers the configured action; both branches of every new predicate

Expected outcome

The gate can be satisfied by either a hand-authored table OR a successful automated bot capture — not manual evidence only — and no config field silently does nothing.

Effort

M — touches the gate evaluator, its config type, and the agent-actions wiring; re-verify current file:line citations before implementing, this repo moves fast.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.visualUI/web visual work — owner-led, NOT for Gittensor contributors (extensions excepted)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions