Skip to content

Open the interface for review approval: expose the gating knobs as harness env variables #2047

Open

Description

@rh-hemartin

What happens

Review approval gating — which finding severities block, which need human judgment, when risk or confidence refuses approval — is hardcoded in the post-script and risk-assessment sub-agent behavior. The only knobs a consumer can turn today are REVIEW_FINDING_SEVERITY_THRESHOLD and REVIEW_RISK_ASSESSMENT_ENABLED. A consumer that wants different gates must fork the post-script, because the policy is not exposed.

fullsend-ai/fullsend#9422 (ADR 0162) lets an agent entry in config.yaml carry a harness: block with env.runner and env.sandbox, so gating can now be configured per repository without a harness file. But the mechanism only works for variables the harness already declares — and the approval knobs do not exist yet.

What should happen

Increase the surface of the options: declare the approval-gating knobs as harness env variables, so they become settable through the new agents[].harness.env config key. Candidates:

  • Blocking severities (which severities request changes).
  • Human-judgment severities (which severities downgrade to a comment).
  • Risk thresholds that refuse approval.
  • Confidence thresholds that refuse approval, and the confidence cap on incomplete reviews.
  • Category exclusions from blocking (e.g. a category that should never block on its own).

Each variable needs a documented default equal to today's behavior, so setting nothing changes nothing.

Acceptance criteria

  • Every approval-gating decision the post-script makes is driven by a declared, documented env variable.
  • A consumer can change approval gating from config.yaml via the harness.env block, with no harness file and no forked script.
  • Defaults preserve today's behavior, verified by existing behaviour tests.

Context

Activity

  1. fullsend-ai-triage commented on Nov 16, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 9:50 AM UTC · Completed 9:53 AM UTC

    Commit: 0869ded · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.27

  2. fullsend-ai-triage commented on Nov 16, 2026

    @fullsend-ai-triage

    Triage notes:

    • No duplicate or in-flight work. No open PR addresses this. Consumers must fork whole review scripts to customize any behavior #2048 is the umbrella for the broader problem of consumers forking review scripts, and this issue is one concrete way to reduce that.
    • Dependency, not a blocker. Setting these variables from config.yaml relies on the harness env block from feat(#8143)!: let agents entries carry a harness: block (ADR 0162) fullsend#9422, which is still open. Declaring and documenting the variables in this repo does not depend on it. Only the end-to-end acceptance check (changing gating purely from config.yaml) does.
    • Scope guidance. The variable list in the issue is a set of candidates. During implementation, inventory every approval decision in the post-script so the 'every gating decision is env-driven' criterion can be checked. Defaults must reproduce current behavior. Safety-critical categories such as protected-path and sub-agent-failure findings should stay non-excludable unless maintainers decide otherwise. This is an open design question for maintainers.
    • Conventions. Declare defaults as static literals in harness/review.yaml, as AGENTS.md describes. Document them in docs/review.md. After editing scripts/post-review.src.sh, regenerate the bundle with make script-build and verify with make check-bundle.

    Proposed test case: with no new variables set, existing post-review tests must pass unchanged. For each new variable, a non-default value must change exactly the decision it controls, and invalid values must fail closed.

    This is categorized as a feature, so it is not auto-promoted to ready-to-code. A maintainer can promote it once the knob list is agreed.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions