Skip to content

fix(#1300): add explicit trigger_source mapping to fix agent#1308

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/1300-fix-agent-schema-validation
Open

fix(#1300): add explicit trigger_source mapping to fix agent#1308
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/1300-fix-agent-schema-validation

Conversation

@fullsend-ai-coder
Copy link
Copy Markdown

The fix agent's TRIGGER_SOURCE env var contains a GitHub username (e.g. "orgname-review[bot]" or "alice"), but the fix-result.json schema requires trigger_source to be the enum "bot" or "human". The skill and agent definition never explicitly instructed the agent to map the username to the enum value, so the LLM would copy the raw username into the JSON — causing schema validation to reject the output (5 of 8 recent failures).

Changes:

  • agents/fix.md: add explicit mapping instruction in the trigger
    modes section — if username ends in [bot] use "bot", else
    "human"
  • skills/fix-review/SKILL.md step 1: instruct the agent to
    derive the normalized trigger type early
  • skills/fix-review/SKILL.md step 9: add schema compliance
    section covering additionalProperties: false, the
    trigger_source enum constraint, and per-action-type required
    fields (description for fix, reason for disagree)

Note: make lint could not run in sandbox (Go toolchain permission denied). Pre-existing infrastructure issue unrelated to this change.


Closes #1300

Post-script verification

  • Branch is not main/master (agent/1300-fix-agent-schema-validation)
  • Secret scan passed (gitleaks — 33244271743c5a6ab9af8038f2bd69e8d1610ab7..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

The fix agent's TRIGGER_SOURCE env var contains a GitHub username
(e.g. "orgname-review[bot]" or "alice"), but the fix-result.json
schema requires trigger_source to be the enum "bot" or "human".
The skill and agent definition never explicitly instructed the
agent to map the username to the enum value, so the LLM would
copy the raw username into the JSON — causing schema validation
to reject the output (5 of 8 recent failures).

Changes:
- agents/fix.md: add explicit mapping instruction in the trigger
  modes section — if username ends in [bot] use "bot", else
  "human"
- skills/fix-review/SKILL.md step 1: instruct the agent to
  derive the normalized trigger type early
- skills/fix-review/SKILL.md step 9: add schema compliance
  section covering additionalProperties: false, the
  trigger_source enum constraint, and per-action-type required
  fields (description for fix, reason for disagree)

Note: make lint could not run in sandbox (Go toolchain
permission denied). Pre-existing infrastructure issue unrelated
to this change.

Closes #1300

Signed-off-by: fullsend-code <[email protected]>
@github-actions
Copy link
Copy Markdown

Site preview

Preview: https://de731e5e-site.fullsend-ai.workers.dev

Commit: 2f20fc56028d638a73b69d3e7d09b1bdf5316cfb

@fullsend-ai-review
Copy link
Copy Markdown

Review

Findings

No findings.

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix agent consistently fails schema validation (5 of 10 recent runs)

0 participants