Skip to content

feat(#2095): add verified/unchecked variable fields to review findings schema - #446

Open
ben-alkov wants to merge 9 commits into
mainfrom
agent-2095-structured-variable-enumeration
Open

feat(#2095): add verified/unchecked variable fields to review findings schema#446
ben-alkov wants to merge 9 commits into
mainfrom
agent-2095-structured-variable-enumeration

Conversation

@ben-alkov

@ben-alkov ben-alkov commented Jul 24, 2026

Copy link
Copy Markdown
Member

Cloned from fullsend-ai/fullsend#2363 (CLOSED)
Original author: @app/fullsend-ai-coder | Created: 2026-07-15T00:00:00Z
Source PR: fullsend-ai/fullsend#2363


Add required verified_variables and unchecked_variables array fields to the finding object in review-result.schema.json. These fields force the review agent's security sub-agent to structurally enumerate which variables it verified as sanitized and which it did not, preventing blanket safety claims from partial verification.

Changes:

  • review-result.schema.json: add both arrays (string items, minLength 1)
    to the finding definition under additionalProperties: false
  • security.md (sub-agent): update verification methodology step 3 to
    require populating the new structured fields instead of prose
  • code-review/SKILL.md: update exhaustive security-control verification
    guidance to reference the new fields
  • agents/review.md: add new fields to the finding object documentation
    table
  • validate-output-schema-test.sh: add three test cases (partial
    coverage valid, full coverage valid, empty-string variable rejected)
    and update the allowed-properties assertion

Pre-commit could not run (shellcheck install failed due to network restrictions in the sandbox). The post-script runs pre-commit authoritatively.


Closes fullsend-ai/fullsend#2095

Post-script verification

  • Branch is not main/master (agent/2095-structured-variable-enumeration)
  • Secret scan passed (gitleaks — 32f73a4f93301493d2c31be3970aa4c51a26acc7..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Original PR metadata
Field Value
State CLOSED (not merged)
Base main ← agent/2095-structured-variable-enumeration
Review decision CHANGES_REQUESTED
Labels security. Skipped (not in target): agent/review
Milestone none
Assignees ben-alkov
Reactions none
Closing issues fullsend-ai/fullsend#2095
Files changed 10 source → 9 ported (+1 script ported separately; internal/cli/postreview.go omitted — no equivalent in agents)

@ben-alkov
ben-alkov requested a review from a team as a code owner July 24, 2026 21:27
@ben-alkov ben-alkov self-assigned this Jul 24, 2026
@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @github-actions[bot] on 2026-06-16T20:04:24Z (source)

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @github-actions[bot] on 2026-06-16T20:05:48Z (source)

Site preview

Preview: https://43bfc712-site.fullsend-ai.workers.dev

Commit: 837e95fe362cf46411321af17de167e8137bba19

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-review[bot] on 2026-06-16T20:07:52Z (source)

🤖 Finished Review · ✅ Success · Started 8:07 PM UTC · Completed 8:20 PM UTC
Commit: a34d13c · View workflow run →

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @codecov[bot] on 2026-06-16T20:12:16Z (source)

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-review[bot] on 2026-06-16T20:19:58Z (source)

Review

Findings

Critical

  • [breaking-schema-change] internal/scaffold/fullsend-repo/schemas/review-result.schema.json:56 — The schema makes verified_variables and unchecked_variables required on every finding (additionalProperties: false), but multiple consumer templates and the Go struct have not been updated. Specifically: (1) Three finding templates in SKILL.md (lines 380–389, 405–412, 537–544) omit the fields. (2) The meta-prompt.md template (lines 14–24) injected into every sub-agent's system prompt omits them. (3) The challenger.md template (lines 48–59) omits them. (4) The review-result-label-actions-test.sh test at line 72 constructs a finding without the fields and expects validation to pass. (5) The Go ReviewFinding struct in internal/cli/postreview.go:166-174 lacks both fields. After this PR merges, all agents following any of these templates will produce findings that fail schema validation, triggering harness retry loops per ADR 0022.
    Remediation: Either (a) make the two new fields optional (remove from required array) and rely on documentation/instructions to ensure security sub-agents populate them, or (b) update ALL consumers atomically in this PR: add the fields to all three SKILL.md templates, meta-prompt.md, challenger.md, the label-actions test, and the Go struct.
Previous run

Review

Findings

Critical

  • [breaking-schema-change] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — Adding verified_variables and unchecked_variables as required fields (combined with additionalProperties: false) breaks all consumers that produce findings without these fields. Multiple template files within the same scaffold (SKILL.md, meta-prompt.md, challenger.md) and the label_actions test file construct findings without the new required fields. The Go ReviewFinding struct in internal/cli/postreview.go also lacks these fields. After this PR merges, deployed review agents will produce findings that fail schema validation, triggering harness retry failures.
    Remediation: Either make the new fields optional rather than required, or update ALL consumers atomically in this PR (SKILL.md templates, meta-prompt.md, challenger.md, label-actions-test.sh, and the Go struct).

High

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md:380 — The standard finding format template (lines 380–389) and the sub-agent failure finding templates (lines 405–412 and 537–544) do not include verified_variables or unchecked_variables. Agents following these templates will produce findings that fail schema validation.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to all three finding templates in SKILL.md.

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/meta-prompt.md:15 — The meta-prompt finding format template (lines 14–24) is injected into every sub-agent's system prompt and does not include the new required fields. Sub-agents following this template will produce findings missing the required fields.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to the finding template in meta-prompt.md.

Medium

  • [consumer-completeness] internal/scaffold/fullsend-repo/schemas/review-result-label-actions-test.sh:72 — The label_actions test file constructs a finding (lines 72–77) without the new required fields. This test expects validation to pass but will fail after this PR merges.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to the finding object.

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/challenger.md:48 — The challenger sub-agent's adjudicated_findings output format template does not include the new required fields. The challenger reshapes findings and may drop these fields if the template doesn't show them.
    Remediation: Add the fields to the adjudicated_findings template.

Previous run

Review

Findings

Medium

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md:380 — The standard finding format template (lines 380–389) and the sub-agent failure finding template (lines 405–412) do not include verified_variables or unchecked_variables. After this PR merges, the schema requires both fields on every finding (additionalProperties: false). Sub-agents and the orchestrator following these templates will produce findings that fail schema validation, triggering harness retry iterations.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to both finding templates.
Previous run (2)

Review

Findings

Low

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/challenger.md:48 — The challenger sub-agent's output format template does not include verified_variables or unchecked_variables. The challenger passes through input findings and the orchestrator strips only challenger-specific fields, so data is not lost in practice. Updating the example would improve documentation completeness.

  • [incomplete-doc] internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md:378 — The finding object format example in SKILL.md step 5 omits verified_variables and unchecked_variables. Sub-agents that need these fields already have explicit instructions in their own skill files.

  • [incomplete-doc] internal/scaffold/fullsend-repo/skills/pr-review/meta-prompt.md:12 — The output format section in meta-prompt.md does not include verified_variables and unchecked_variables. Sub-agents that need these fields receive explicit instructions in security.md and code-review/SKILL.md.

  • [requirement-escalation] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/security.md — Documentation states both arrays "must be present" in certain contexts while the schema marks them as optional. This is a deliberate pattern: schema-level optionality with documentation-level requirements for specific contexts.

  • [consumer-completeness] internal/cli/postreview.go:159 — The Go ReviewFinding struct does not include verified_variables or unchecked_variables fields. json.Unmarshal will silently discard them. No current logic uses these fields.


Labels: PR modifies review agent schema and security sub-agent verification methodology

Previous run

Review

Findings

Critical

  • [breaking-schema-change] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — Adding verified_variables and unchecked_variables as required fields (combined with additionalProperties: false) breaks all consumers that produce findings without these fields. Multiple template files within the same scaffold (SKILL.md, meta-prompt.md, challenger.md) and the label_actions test file construct findings without the new required fields. The Go ReviewFinding struct in internal/cli/postreview.go also lacks these fields. After this PR merges, deployed review agents will produce findings that fail schema validation, triggering harness retry failures.
    Remediation: Either make the new fields optional rather than required, or update ALL consumers atomically in this PR (SKILL.md templates, meta-prompt.md, challenger.md, label-actions-test.sh, and the Go struct).

High

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md:380 — The standard finding format template (lines 380–389) and the sub-agent failure finding templates (lines 405–412 and 537–544) do not include verified_variables or unchecked_variables. Agents following these templates will produce findings that fail schema validation.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to all three finding templates in SKILL.md.

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/meta-prompt.md:15 — The meta-prompt finding format template (lines 14–24) is injected into every sub-agent's system prompt and does not include the new required fields. Sub-agents following this template will produce findings missing the required fields.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to the finding template in meta-prompt.md.

Medium

  • [consumer-completeness] internal/scaffold/fullsend-repo/schemas/review-result-label-actions-test.sh:72 — The label_actions test file constructs a finding (lines 72–77) without the new required fields. This test expects validation to pass but will fail after this PR merges.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to the finding object.

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/challenger.md:48 — The challenger sub-agent's adjudicated_findings output format template does not include the new required fields. The challenger reshapes findings and may drop these fields if the template doesn't show them.
    Remediation: Add the fields to the adjudicated_findings template.

Low

  • [missing-struct-fields] internal/cli/postreview.go:159 — The Go ReviewFinding struct does not include the new fields. json.Unmarshal will silently discard them. No current logic uses these fields, so this is data loss only — not a runtime error.

  • [misleading-label] internal/scaffold/fullsend-repo/schemas/review-result.schema.json:56 — The PR body describes the fields as "optional" but the schema adds them to the required array. The implementation correctly matches issue Review agent: require structured enumeration of verified vs unchecked variables in sanitization findings fullsend#2095's requirement; the PR description is imprecise.

Info

  • [tier-classification] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — PR uses feat(fullsend-ai/fullsend#2095) prefix. Adding new required fields to an output schema is reasonably classified as a feature.

  • [test-adequacy] internal/scaffold/fullsend-repo/scripts/validate-output-schema-test.sh:197 — Tests cover empty-string rejection for verified_variables but not unchecked_variables. Both arrays share identical JSON Schema constraints, so validation is identical.

  • [test-coverage-completeness] internal/scaffold/fullsend-repo/scripts/validate-output-schema-test.sh — Test additions follow established patterns and are thorough.

Previous run (2)

Review

Findings

Medium

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md:380 — The standard finding format template (lines 380–389) and the sub-agent failure finding template (lines 405–412) do not include verified_variables or unchecked_variables. After this PR merges, the schema requires both fields on every finding (additionalProperties: false). Sub-agents and the orchestrator following these templates will produce findings that fail schema validation, triggering harness retry iterations.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to both finding templates.

Low

  • [misleading-label] internal/scaffold/fullsend-repo/schemas/review-result.schema.json:54 — The PR body describes the fields as "optional" but the schema adds them to the required array. The PR body also says "force," creating an internal contradiction. The implementation correctly matches issue Review agent: require structured enumeration of verified vs unchecked variables in sanitization findings fullsend#2095's requirement for mandatory structured enumeration; the description is imprecise rather than a scope violation.

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/challenger.md:48 — The challenger sub-agent's output format template does not include verified_variables or unchecked_variables. Data is not lost in practice because the challenger passes through input findings and the orchestrator strips only challenger-specific fields.

  • [consumer-completeness] internal/cli/postreview.go:159 — The Go ReviewFinding struct does not include verified_variables or unchecked_variables fields. json.Unmarshal will silently discard them. No current logic uses these fields.

  • [incomplete-doc] internal/scaffold/fullsend-repo/skills/pr-review/meta-prompt.md:14 — The output format section in meta-prompt.md does not include verified_variables and unchecked_variables. This template is composed into every sub-agent's spawn prompt. Sub-agents that need these fields (security) already have explicit instructions in their own definitions.

Info

  • [test-adequacy] internal/scaffold/fullsend-repo/scripts/validate-output-schema-test.sh:197 — Tests cover empty-string rejection for verified_variables but not unchecked_variables. Both arrays share identical JSON Schema constraints, so validation is identical.

  • [tier-classification] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — PR uses feat(fullsend-ai/fullsend#2095) prefix. Adding new required fields to an output schema is reasonably classified as a feature.

  • [architectural-coherence] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — Schema change aligns with ADR 0022 (harness-level output schema enforcement) and is additive/backward-compatible at the schema level.

  • [requirement-escalation] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/security.md:173 — Documentation now states both arrays "are required on every finding," matching the schema's required constraint. This resolves the previous discrepancy between documentation-level and schema-level requirements.

Previous run (3)

Review

Findings

Medium

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md:380 — The standard finding format template (lines 380–389) and the sub-agent failure finding template (lines 405–412) do not include verified_variables or unchecked_variables. After this PR merges, the schema requires both fields on every finding (additionalProperties: false). Sub-agents and the orchestrator following these templates will produce findings that fail schema validation, triggering harness retry iterations.
    Remediation: Add "verified_variables": [] and "unchecked_variables": [] to both finding templates.

Low

  • [misleading-label] internal/scaffold/fullsend-repo/schemas/review-result.schema.json:54 — The PR body describes the fields as "optional" but the schema adds them to the required array. The PR body also says "force," creating an internal contradiction. The implementation correctly matches issue Review agent: require structured enumeration of verified vs unchecked variables in sanitization findings fullsend#2095's requirement for mandatory structured enumeration; the description is imprecise rather than a scope violation.

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/challenger.md:48 — The challenger sub-agent's output format template does not include verified_variables or unchecked_variables. Data is not lost in practice because the challenger passes through input findings and the orchestrator strips only challenger-specific fields.

  • [consumer-completeness] internal/cli/postreview.go:159 — The Go ReviewFinding struct does not include verified_variables or unchecked_variables fields. json.Unmarshal will silently discard them. No current logic uses these fields.

  • [incomplete-doc] internal/scaffold/fullsend-repo/skills/pr-review/meta-prompt.md:14 — The output format section in meta-prompt.md does not include verified_variables and unchecked_variables. This template is composed into every sub-agent's spawn prompt. Sub-agents that need these fields (security) already have explicit instructions in their own definitions.

Info

  • [test-adequacy] internal/scaffold/fullsend-repo/scripts/validate-output-schema-test.sh:197 — Tests cover empty-string rejection for verified_variables but not unchecked_variables. Both arrays share identical JSON Schema constraints, so validation is identical.

  • [tier-classification] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — PR uses feat(fullsend-ai/fullsend#2095) prefix. Adding new required fields to an output schema is reasonably classified as a feature.

  • [architectural-coherence] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — Schema change aligns with ADR 0022 (harness-level output schema enforcement) and is additive/backward-compatible at the schema level.

  • [requirement-escalation] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/security.md:173 — Documentation now states both arrays "are required on every finding," matching the schema's required constraint. This resolves the previous discrepancy between documentation-level and schema-level requirements.

Previous run (4)

Review

Findings

Low

  • [consumer-completeness] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/challenger.md:48 — The challenger sub-agent's output format template does not include verified_variables or unchecked_variables. The challenger passes through input findings and the orchestrator strips only challenger-specific fields, so data is not lost in practice. Updating the example would improve documentation completeness.

  • [incomplete-doc] internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md:378 — The finding object format example in SKILL.md step 5 omits verified_variables and unchecked_variables. Sub-agents that need these fields already have explicit instructions in their own skill files.

  • [incomplete-doc] internal/scaffold/fullsend-repo/skills/pr-review/meta-prompt.md:12 — The output format section in meta-prompt.md does not include verified_variables and unchecked_variables. Sub-agents that need these fields receive explicit instructions in security.md and code-review/SKILL.md.

  • [requirement-escalation] internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/security.md — Documentation states both arrays "must be present" in certain contexts while the schema marks them as optional. This is a deliberate pattern: schema-level optionality with documentation-level requirements for specific contexts.

  • [consumer-completeness] internal/cli/postreview.go:159 — The Go ReviewFinding struct does not include verified_variables or unchecked_variables fields. json.Unmarshal will silently discard them. No current logic uses these fields.

Info

  • [test-adequacy] internal/scaffold/fullsend-repo/scripts/validate-output-schema-test.sh:173 — Tests cover empty-string rejection for verified_variables but not unchecked_variables. Both arrays share identical JSON Schema constraints, so validation is identical.

  • [tier-classification] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — PR uses feat(fullsend-ai/fullsend#2095) prefix. Adding new optional fields to an output schema is reasonably classified as a feature.

  • [documentation-consistency] internal/scaffold/fullsend-repo/agents/review.md:253 — New table rows use longer descriptions than existing rows because the fields require more context about conditional requirements.

  • [schema-evolution] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — Schema change is additive and backward-compatible.

  • [architectural-coherence] internal/scaffold/fullsend-repo/schemas/review-result.schema.json — Change aligns with ADR 0022 (harness-level output schema enforcement).

@ben-alkov

Copy link
Copy Markdown
Member Author

Review: APPROVED by @fullsend-ai-review[bot] on 2026-06-16T20:19:59Z (source)

@ben-alkov

Copy link
Copy Markdown
Member Author

Code review threadscripts/validate-output-schema-test.sh (was internal/scaffold/fullsend-repo/scripts/validate-output-schema-test.sh) line 173 [resolved]

@@ -173,6 +173,24 @@ run_test_custom_filename "review-finding-additional-property-rejected" \

"${REVIEW_SCHEMA}" \

@fullsend-ai-review (2026-06-16T20:19:59Z):

[info] test-adequacy

Tests cover empty-string rejection for verified_variables but not for unchecked_variables. Both arrays use identical JSON Schema constraints, so schema validation is identical.

@ben-alkov

Copy link
Copy Markdown
Member Author

Code review threadagents/review.md (was internal/scaffold/fullsend-repo/agents/review.md) no line [resolved] [outdated]

@@ -250,6 +250,8 @@ fields such as `outcome`, `summary`, `prior_review_sha`, or

| description | string | yes | Finding description (min 1 char) |
| remediation | string | no | Suggested fix |
| actionable | boolean | no | When true on low/info findings in an approve result, marks the finding for future follow-up issue creation (temporarily disabled; see #1137) |
+| verified_variables | array | no | Variables confirmed as having the security control applied. Required in findings that identify a sanitization or security control function. |

@fullsend-ai-review (2026-06-16T20:19:59Z):

[info] documentation-consistency

New table rows use longer descriptions than existing rows because the fields require more context about conditional requirements.

@ben-alkov

Copy link
Copy Markdown
Member Author

Review: CHANGES_REQUESTED by @ralphbean on 2026-06-16T21:06:39Z (source)

I think this needs a couple changes before we can merge. See inline.

@ben-alkov

Copy link
Copy Markdown
Member Author

Code review threadschemas/review-result.schema.json (was internal/scaffold/fullsend-repo/schemas/review-result.schema.json) line 69 [unresolved]

@@ -61,6 +61,16 @@
     "actionable": {
       "type": "boolean",
       "description": "True when this non-blocking finding should be tracked as a follow-up issue if the review approves."
  •    },
    
  •    "verified_variables": {
    
  •      "type": "array",
    

@ralphbean (2026-06-16T21:06:39Z):

[medium] These fields aren't in the finding's required array, so an agent can omit them on a sanitization finding and pass validation. The prose in security.md and SKILL.md says "both arrays must be present" — but the schema doesn't enforce it, and category is free-text so there's no way to key a conditional required off "this is a sanitization finding."

I think the simplest fix is making both fields unconditionally required, with [] as the valid value for non-security findings. That way the agent always has to consciously decide — and the schema actually catches omissions instead of silently accepting them.

@ben-alkov

Copy link
Copy Markdown
Member Author

Code review threadagents/review.md (was internal/scaffold/fullsend-repo/agents/review.md) no line [unresolved] [outdated]

@@ -250,6 +250,8 @@ fields such as `outcome`, `summary`, `prior_review_sha`, or

| description | string | yes | Finding description (min 1 char) |
| remediation | string | no | Suggested fix |
| actionable | boolean | no | When true on low/info findings in an approve result, marks the finding for future follow-up issue creation (temporarily disabled; see #1137) |
+| verified_variables | array | no | Variables confirmed as having the security control applied. Required in findings that identify a sanitization or security control function. |

@ralphbean (2026-06-16T21:06:39Z):

[moderate] The jq templates below (lines 289–298) are what the agent copy-pastes to build its output. They don't include verified_variables or unchecked_variables. If the fields become required, these templates produce invalid JSON that fails validation and burns a retry iteration.

Worth updating the request-changes/reject template to include them — and the findings array structure if there's an inline example of that too.

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @ralphbean on 2026-06-18T15:28:19Z (source)

/fs-fix address those findings

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-coder[bot] on 2026-06-18T15:32:23Z (source)

🤖 Finished Fix · ✅ Success · Started 3:32 PM UTC · Completed 3:40 PM UTC
Commit: 4e21a60 · View workflow run →

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-coder[bot] on 2026-06-18T15:40:09Z (source)

🔧 Fix agent — iteration 1 (human-triggered)

Made verified_variables and unchecked_variables unconditionally required in the finding schema (with [] valid for non-security findings). Updated jq templates in review.md to include the new fields. Updated all test fixtures and documentation prose to match.

Fixed (4):

  1. make verified/unchecked variables unconditionally required in schema (internal/scaffold/fullsend-repo/schemas/review-result.schema.json): Added verified_variables and unchecked_variables to the finding required array so agents must always populate them (using [] for non-security findings)
  2. update jq templates to include verified/unchecked variable fields (internal/scaffold/fullsend-repo/agents/review.md): Updated the approve-with-findings and request-changes/reject jq templates to include verified_variables and unchecked_variables, and updated the finding table to mark both fields as required
  3. update tests for new required fields (internal/scaffold/fullsend-repo/scripts/validate-output-schema-test.sh): Added verified_variables/unchecked_variables to existing test fixtures that include findings, and added a new test case verifying that findings missing the required arrays are rejected
  4. update prose in security.md and SKILL.md (internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/security.md): Updated security.md and SKILL.md prose to reflect that both arrays are unconditionally required on every finding, not just security findings

Tests: passed

Updated by fullsend fix agent

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-review[bot] on 2026-06-18T15:44:07Z (source)

🤖 Finished Review · ❌ Failure · Started 3:44 PM UTC · Completed 3:58 PM UTC
Commit: 455ec0c · View workflow run →

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @ben-alkov on 2026-06-18T19:03:48Z (source)

/fs-review

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-review[bot] on 2026-06-18T19:08:13Z (source)

🤖 Finished Review · ✅ Success · Started 7:08 PM UTC · Completed 7:22 PM UTC
Commit: 4e21a60 · View workflow run →

@ben-alkov

Copy link
Copy Markdown
Member Author

Review: CHANGES_REQUESTED by @fullsend-ai-review[bot] on 2026-06-18T19:22:41Z (source)

See the review comment for full details.

@ben-alkov

Copy link
Copy Markdown
Member Author

Code review threadschemas/review-result.schema.json (was internal/scaffold/fullsend-repo/schemas/review-result.schema.json) line 56 [resolved]

@@ -53,7 +53,7 @@

"$defs": {
"finding": {
"type": "object",

  •  "required": ["severity", "category", "file", "description"],
    
  •  "required": ["severity", "category", "file", "description", "verified_variables", "unchecked_variables"],
    

@fullsend-ai-review (2026-06-18T19:22:41Z):

[low] misleading-label

The PR body describes the fields as optional but the schema adds them to the required array. The implementation correctly matches issue fullsend-ai/fullsend#2095; the PR description is imprecise.

@ben-alkov

Copy link
Copy Markdown
Member Author

Code review threadscripts/validate-output-schema-test.sh (was internal/scaffold/fullsend-repo/scripts/validate-output-schema-test.sh) line 197 [resolved]

+run_test_custom_filename "review-finding-missing-required-variables-rejected" \
  • '{"action":"request-changes","pr_number":42,"repo":"owner/repo","head_sha":"abcdef0123456789abcdef0123456789abcdef01","body":"Missing fields.","findings":[{"severity":"high","category":"gha-injection","file":"action.yml","description":"No variable arrays."}]}' \
  • "agent-result.json" \
  • "${REVIEW_SCHEMA}" \
  • "false"

+run_test_custom_filename "review-finding-verified-variables-empty-string-rejected" \

  • '{"action":"request-changes","pr_number":42,"repo":"owner/repo","head_sha":"abcdef0123456789abcdef0123456789abcdef01","body":"Bad var.","findings":[{"severity":"high","category":"gha-injection","file":"action.yml","description":"Bad.","verified_variables":[""],"unchecked_variables":["source"]}]}'
    "agent-result.json"
    "${REVIEW_SCHEMA}" \

@fullsend-ai-review (2026-06-18T19:22:41Z):

[info] test-adequacy

Tests cover empty-string rejection for verified_variables but not unchecked_variables. Both arrays share identical JSON Schema constraints, so validation is identical.

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-review[bot] on 2026-06-24T12:48:52Z (source)

🤖 Finished Review · ✅ Success · Started 12:48 PM UTC · Completed 1:09 PM UTC
Commit: c7bbe6f · View workflow run →

@ben-alkov

Copy link
Copy Markdown
Member Author

Code review threadschemas/review-result.schema.json (was internal/scaffold/fullsend-repo/schemas/review-result.schema.json) line 56 [unresolved]

@@ -53,7 +53,7 @@

"$defs": {
"finding": {
"type": "object",

  •  "required": ["severity", "category", "file", "description"],
    
  •  "required": ["severity", "category", "file", "description", "verified_variables", "unchecked_variables"],
    

@fullsend-ai-review (2026-06-24T13:09:21Z):

[critical] breaking-schema-change

The schema makes verified_variables and unchecked_variables required on every finding (additionalProperties: false), but multiple consumer templates and the Go struct have not been updated. (1) Three finding templates in SKILL.md (lines 380-389, 405-412, 537-544) omit the fields. (2) The meta-prompt.md template (lines 14-24) injected into every sub-agent system prompt omits them. (3) The challenger.md template (lines 48-59) omits them. (4) The review-result-label-actions-test.sh test at line 72 constructs a finding without the fields and expects validation to pass. (5) The Go ReviewFinding struct in internal/cli/postreview.go:166-174 lacks both fields. After this PR merges, all agents following any of these templates will produce findings that fail schema validation, triggering harness retry loops per ADR 0022.

Suggested fix: Either (a) make the two new fields optional (remove from required array) and rely on documentation to ensure security sub-agents populate them, or (b) update ALL consumers atomically in this PR: SKILL.md templates, meta-prompt.md, challenger.md, the label-actions test, and the Go struct.

@ben-alkov (2026-06-29T19:19:56Z):

/fs-fix Address this finding by updating ALL consumers atomically in this PR: SKILL.md templates, meta-prompt.md, challenger.md, the label-actions test, and the Go struct.


2 comments in thread

@ben-alkov

Copy link
Copy Markdown
Member Author

Review: CHANGES_REQUESTED by @fullsend-ai-review[bot] on 2026-06-24T13:09:22Z (source)

See the review comment for full details.

@ben-alkov

Copy link
Copy Markdown
Member Author

Review: COMMENTED by @ben-alkov on 2026-06-29T19:19:56Z (source)

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @ben-alkov on 2026-06-29T20:08:56Z (source)

/fs-fix Address fullsend-ai/fullsend#2363 (comment) by updating ALL consumers atomically in this PR: SKILL.md templates, meta-prompt.md, challenger.md, the label-actions test, and the Go struct.

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-coder[bot] on 2026-06-29T20:12:01Z (source)

🤖 Finished Fix · ✅ Success · Started 8:12 PM UTC · Completed 8:20 PM UTC
Commit: 104508d · View workflow run →

@ben-alkov

Copy link
Copy Markdown
Member Author

Comment by @fullsend-ai-coder[bot] on 2026-06-29T20:20:30Z (source)

🔧 Fix agent — iteration 2 (human-triggered)

Updated all 5 consumer locations to include the now-required verified_variables and unchecked_variables arrays: 3 SKILL.md templates, meta-prompt.md, challenger.md, label-actions test, and Go struct. All schema validation tests pass. Go code compiles and vets cleanly.

Fixed (5):

  1. SKILL.md finding templates missing verified/unchecked variables (internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md): Added verified_variables and unchecked_variables arrays to all three finding JSON templates (standard finding, sub-agent-failure, challenger-failure)
  2. meta-prompt.md template missing verified/unchecked variables (internal/scaffold/fullsend-repo/skills/pr-review/meta-prompt.md): Added verified_variables and unchecked_variables arrays to the sub-agent output format template
  3. challenger.md template missing verified/unchecked variables (internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/challenger.md): Added verified_variables and unchecked_variables arrays to the adjudicated_findings template
  4. label-actions test finding missing required fields (internal/scaffold/fullsend-repo/schemas/review-result-label-actions-test.sh): Added verified_variables and unchecked_variables arrays to the request-changes test finding so it passes schema validation
  5. Go ReviewFinding struct missing verified/unchecked variable fields (internal/cli/postreview.go): Added VerifiedVariables and UncheckedVariables []string fields to the ReviewFinding struct to match the schema

Tests: passed

Updated by fullsend fix agent

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

🔧 Fix agent — iteration 7 (human-triggered)

Addressed all 3 review findings: added explanatory prose after the SKILL.md finding template, replaced bare [] with descriptive placeholders in meta-prompt.md, and clarified array-union merge rules in challenger.md step 5.

Fixed (3):

  1. SKILL.md: add prose after JSON template explaining required fields (skills/pr-review/SKILL.md): Added explanatory paragraph after the finding JSON template clarifying that both verified_variables and unchecked_variables are required on every finding — security sub-agents populate them with variable names, non-security sub-agents set both to [].
  2. meta-prompt.md: use descriptive placeholders instead of bare [] (skills/pr-review/meta-prompt.md): Replaced bare [] with descriptive placeholders [""] and [""] matching the SKILL.md template style.
  3. challenger.md: clarify merged findings union arrays per step 6b (skills/pr-review/sub-agents/challenger.md): Extended step 5 to clarify that when merging duplicate findings, the challenger should union both findings' arrays per the step 6b rules in SKILL.md (deduplicate verified_variables; deduplicate unchecked_variables and remove entries appearing in merged verified_variables).

Tests: passed

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 20, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:58 PM UTC · Completed 7:40 PM UTC

Commit: f4119d9 · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

ben-alkov pushed a commit that referenced this pull request Aug 20, 2026
…riable fields

- Add verified_variables/unchecked_variables to protected-path and
  short-SHA test fixtures in validate-output-schema-test.sh so they
  test their intended constraint rather than failing on missing fields
- Fix "approve with actionable findings" jq example in review.md to
  use severity:"low" and include actionable:true, matching the
  section heading
- Wire schemas/review-result-label-actions-test.sh into make script-test
  and fix short SHA values in its test data so tests pass
- Add verified_variables/unchecked_variables to the finding format
  example in intent-coherence.md sub-agent

Addresses review feedback on #446

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
ben-alkov pushed a commit that referenced this pull request Aug 20, 2026
- SKILL.md finding-rendering template: add "Unchecked:" line showing
  unchecked_variables when non-empty, so the human-facing review body
  surfaces variable-coverage gaps
- SKILL.md section 6b merge rules: add union semantics for
  verified_variables and unchecked_variables when merging same-category
  findings (deduplicate, drop from unchecked if verified)
- challenger.md: change template placeholders to explicit carry-over
  markers and add procedure step 5 requiring unmodified copy of both
  fields (challenger does not re-derive them)

Addresses review feedback on #446

fixup! 9025f9c

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
ben-alkov pushed a commit that referenced this pull request Aug 20, 2026
Add verified_variables and unchecked_variables arrays to all finding
JSON objects in post-review-test.sh to match the now-required schema
fields. Reorder the finding field table in agents/review.md to list
required fields before optional ones.

Addresses review feedback on #446

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
ben-alkov pushed a commit that referenced this pull request Aug 20, 2026
- Add "Verified:" line to review output format template (intent-alignment)
- Use placeholder notation in generic finding template (api-shape-consistency)

Addresses review feedback on #446

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
ben-alkov pushed a commit that referenced this pull request Aug 20, 2026
- SKILL.md: add explanatory paragraph after finding JSON template
  clarifying that both arrays are required on every finding (security
  sub-agents populate with names; non-security use [])
- meta-prompt.md: replace bare [] with descriptive placeholders
  matching SKILL.md template style
- challenger.md: clarify that merged findings union the arrays per
  step 6b rules rather than copying unmodified

Addresses review feedback on #446

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
@ben-alkov
ben-alkov force-pushed the agent-2095-structured-variable-enumeration branch from f4119d9 to cf6ec32 Compare August 20, 2026 20:38
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 20, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:40 PM UTC · Completed 9:22 PM UTC

Commit: cf6ec32 · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Aug 20, 2026
fullsend-ai-coder Bot and others added 9 commits August 31, 2026 15:55
…s schema

Add optional `verified_variables` and `unchecked_variables` array fields
to the finding object in review-result.schema.json. These fields force
the review agent's security sub-agent to structurally enumerate which
variables it verified as sanitized and which it did not, preventing
blanket safety claims from partial verification.

Changes:
- review-result.schema.json: add both arrays (string items, minLength 1)
  to the finding definition under additionalProperties: false
- security.md (sub-agent): update verification methodology step 3 to
  require populating the new structured fields instead of prose
- code-review/SKILL.md: update exhaustive security-control verification
  guidance to reference the new fields
- agents/review.md: add new fields to the finding object documentation
  table
- validate-output-schema-test.sh: add three test cases (partial
  coverage valid, full coverage valid, empty-string variable rejected)
  and update the allowed-properties assertion

Pre-commit could not run (shellcheck install failed due to network
restrictions in the sandbox). The post-script runs pre-commit
authoritatively.

Closes #2095

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
Make verified_variables and unchecked_variables unconditionally required
in the finding schema so agents must always consciously populate them
(using [] for non-security findings). Update jq templates in review.md
to include the fields, preventing invalid JSON that would burn retry
iterations. Add test for missing required variable arrays.

Addresses review feedback on #2363

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
Update all consumers of the review finding schema to include the now-
required verified_variables and unchecked_variables arrays:

- SKILL.md: three finding templates (standard, sub-agent-failure,
  challenger-failure)
- meta-prompt.md: sub-agent output format template
- challenger.md: adjudicated_findings template
- review-result-label-actions-test.sh: request-changes test finding
- postreview.go: ReviewFinding Go struct

Addresses review feedback on #2363

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
This file exists in fullsend under internal/scaffold/fullsend-repo/schemas/
but was never ported to agents. The source PR (fullsend#2363) modified it; copying the final state from the PR tip.

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
…riable fields

- Add verified_variables/unchecked_variables to protected-path and
  short-SHA test fixtures in validate-output-schema-test.sh so they
  test their intended constraint rather than failing on missing fields
- Fix "approve with actionable findings" jq example in review.md to
  use severity:"low" and include actionable:true, matching the
  section heading
- Wire schemas/review-result-label-actions-test.sh into make script-test
  and fix short SHA values in its test data so tests pass
- Add verified_variables/unchecked_variables to the finding format
  example in intent-coherence.md sub-agent

Addresses review feedback on #446

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
- SKILL.md finding-rendering template: add "Unchecked:" line showing
  unchecked_variables when non-empty, so the human-facing review body
  surfaces variable-coverage gaps
- SKILL.md section 6b merge rules: add union semantics for
  verified_variables and unchecked_variables when merging same-category
  findings (deduplicate, drop from unchecked if verified)
- challenger.md: change template placeholders to explicit carry-over
  markers and add procedure step 5 requiring unmodified copy of both
  fields (challenger does not re-derive them)

Addresses review feedback on #446

fixup! 9025f9c

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
Add verified_variables and unchecked_variables arrays to all finding
JSON objects in post-review-test.sh to match the now-required schema
fields. Reorder the finding field table in agents/review.md to list
required fields before optional ones.

Addresses review feedback on #446

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
- Add "Verified:" line to review output format template (intent-alignment)
- Use placeholder notation in generic finding template (api-shape-consistency)

Addresses review feedback on #446

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
- SKILL.md: add explanatory paragraph after finding JSON template
  clarifying that both arrays are required on every finding (security
  sub-agents populate with names; non-security use [])
- meta-prompt.md: replace bare [] with descriptive placeholders
  matching SKILL.md template style
- challenger.md: clarify that merged findings union the arrays per
  step 6b rules rather than copying unmodified

Addresses review feedback on #446

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
@ben-alkov
ben-alkov force-pushed the agent-2095-structured-variable-enumeration branch from cf6ec32 to 466db30 Compare August 31, 2026 20:09
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 31, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:11 PM UTC · Completed 8:53 PM UTC

Commit: 466db30 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high

@fullsend-ai-review fullsend-ai-review Bot added the risk/elevated PR risk: elevated label Aug 31, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: elevated (3/5)

Details

Elevated risk driven by 9 protected path changes, CI workflow modification, high fix/revert history (13.7 avg per file in 90d), significant multi-author contention (5.1 avg authors), and security/priority-high issue labels with no feature flag for rollback — partially offset by clear acceptance criteria coverage, no dependency changes, and experienced non-bot author.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • scripts/post-review-test.sh (file-level): Line 311 · [medium] test-inadequate

Several test fixture JSON objects are missing the now-required verified_variables and unchecked_variables fields: ACTIONABLE_LOW (line 311), MIXED_ACTIONABLE (line 319), NON_ACTIONABLE_LOW (line 327), ACTIONABLE_REJECT (line 335), inline fixtures at lines 960 and 966, and RISK_RC_RESULT (line 1746). These fixtures represent structurally invalid findings per the updated schema.

Suggested fix: Add "verified_variables":[],"unchecked_variables":[] to each finding object in the affected fixtures.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

Comment thread agents/review.md
@@ -296,14 +302,29 @@ jq -n \

For `request-changes` (including actionable low/info findings) or `reject`:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[high] logic-error

The jq example heading says 'For request-changes (including actionable low/info findings) or reject:' but the jq command uses --arg action "approve". This heading/content mismatch could cause an agent following the first template to emit action: "approve" when it intends to emit request-changes.

Suggested fix: Change the heading at line 303 to 'For approve with actionable low/info findings:' to match the --arg action "approve" in the jq example below it.

"finding": {
"type": "object",
"required": ["severity", "category", "file", "description"],
"required": ["severity", "category", "file", "description", "verified_variables", "unchecked_variables"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] breaking-schema

Adding verified_variables and unchecked_variables to the required array is a backward-incompatible schema change. The companion fullsend PR (#2363) was CLOSED, not merged. AGENTS.md section 6 documents lockstep versioning between repos.

Suggested fix: Open a new companion PR in fullsend-ai/fullsend that updates the Finding Go struct in internal/cli/postreview.go, and link it from this PR's description.

"actionable": {
"type": "boolean",
"description": "When true with a non-empty remediation, routes the verdict to request-changes so the fix agent can address the finding automatically."
"description": "True when this non-blocking finding should be tracked as a follow-up issue if the review approves."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] scope-creep

The PR changes the actionable field's schema description from 'When true with a non-empty remediation, routes the verdict to request-changes...' to 'True when this non-blocking finding should be tracked as a follow-up issue if the review approves.' This semantic change is not authorized by issue #2095.

"description": "<explanation>",
"remediation": "<fix, required for critical/high>",
"actionable": true|false
"actionable": true|false,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] pattern-inconsistency

The meta-prompt finding format template adds the new fields but omits the explanatory paragraph from SKILL.md about how non-security sub-agents should set both to []. Schema validation would catch omissions via retry, but explicit guidance reduces churn.

Suggested fix: Add the explanatory paragraph from SKILL.md after the JSON template.

@@ -0,0 +1,168 @@
#!/usr/bin/env bash

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] naming-convention

Test script placed in schemas/ directory which on the base branch contains only .schema.json files. All existing test scripts reside in scripts/, hack/, eval/scripts/, or .github/scripts/. The test also uses a different validation pattern (Draft202012Validator) than the established harness validator.

Suggested fix: Move to scripts/review-result-label-actions-test.sh and adapt to use the established validation pattern.

"finding": {
"type": "object",
"required": ["severity", "category", "file", "description"],
"required": ["severity", "category", "file", "description", "verified_variables", "unchecked_variables"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] schema-compatibility

The new fields are required rather than optional. Any existing or external producer of findings without them will fail schema validation immediately. Adding as optional would have preserved backward compatibility while allowing producers to adopt at their own pace.

@fullsend-ai-review fullsend-ai-review Bot removed the requires-manual-review Review requires human judgment label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review agent: require structured enumeration of verified vs unchecked variables in sanitization findings

2 participants