Skip to content

docs(#669): verify API contracts per code path in code skill#1231

Open
ifireball wants to merge 2 commits into
fullsend-ai:mainfrom
ifireball:agent/669-api-contract-guidance
Open

docs(#669): verify API contracts per code path in code skill#1231
ifireball wants to merge 2 commits into
fullsend-ai:mainfrom
ifireball:agent/669-api-contract-guidance

Conversation

@ifireball
Copy link
Copy Markdown
Contributor

@ifireball ifireball commented May 20, 2026

Summary

  • Add step 8 item Verify API contracts per code path to the code-implementation skill so the code agent checks external API requirements for each code path before removing or emptying parameters.
  • Add TestCodeImplementationSkillAPIContractGuidance to lock the guidance into the scaffold.

Context

Retro from PR #657: the code agent removed commentURL and used empty review bodies for all GitHub review event types. That works for APPROVE but breaks REQUEST_CHANGES and COMMENT (422). The submitFormalReview bug is already fixed in postreview.go; this PR addresses the process gap.

Test plan

  • go test ./internal/scaffold/... -run TestCodeImplementationSkillAPIContractGuidance
  • make lint

Closes #669

Add step 8 planning guidance so the code agent checks external API
requirements for each code path before removing or emptying parameters.
Regression test locks the guidance into the scaffold.

Closes fullsend-ai#669

Co-authored-by: Cursor <[email protected]>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

Site preview

Preview: https://35169dc3-site.fullsend-ai.workers.dev

Commit: 96decb3abcd5018f30fa1bd465cd586e7e494f3e

@ifireball ifireball changed the title docs(#669): verify API contracts per code path in code-implementation skill docs(#669): verify API contracts per code path in code skill May 20, 2026
@fullsend-ai-review
Copy link
Copy Markdown

fullsend-ai-review Bot commented May 20, 2026

Review

Findings

No findings.

Previous run

Review

Findings

No findings.

Previous run (2)

Review

Findings

No findings.

Previous run (3)

Review

Findings

No findings.

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label May 20, 2026
@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge and removed ready-for-merge All reviewers approved — ready to merge labels May 20, 2026
@ifireball ifireball marked this pull request as draft May 20, 2026 09:58
@ifireball ifireball changed the title docs(#669): verify API contracts per code path in code skill docs: API contract skill (#669) and synchronous dispatch ADR 0039 May 20, 2026
@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge and removed ready-for-merge All reviewers approved — ready to merge labels May 20, 2026
@ifireball ifireball force-pushed the agent/669-api-contract-guidance branch from 4bdfb25 to 96decb3 Compare May 20, 2026 10:21
@ifireball ifireball changed the title docs: API contract skill (#669) and synchronous dispatch ADR 0039 docs(#669): verify API contracts per code path in code skill May 20, 2026
@ifireball ifireball marked this pull request as ready for review May 20, 2026 10:24
@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge and removed ready-for-merge All reviewers approved — ready to merge labels May 20, 2026
Copy link
Copy Markdown
Contributor

@waynesun09 waynesun09 left a comment

Choose a reason for hiding this comment

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

Review squad (10 agents) — 2 findings requiring changes:

  1. CRITICAL — Merge conflict: main already has step 8 ("Search for old literal values"). Rebase needed, renumber to step 9.
  2. MEDIUM — Guidance scope ("removes or empties") is narrower than the bug class and the code-review skill's equivalent wording ("modifies"). Consider broadening.

3 additional LOW findings (test substring assertions, "or" ambiguity, empty retrigger commit) noted but not blocking.

Comment on lines +310 to +313
8. **Verify API contracts per code path** — if the fix removes or empties
a parameter sent to an external API, check the API documentation or
test each code path that uses the function. Different operations
(e.g., approve vs request-changes) often have different required fields.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Merge conflict — duplicate step 8 numbering

The PR branch predates commit 4f39be1 on main which added step 8 ("Search for old literal values when changing constants or defaults") at this same position. The PR is currently in a CONFLICTING merge state with two items numbered 8.

A rebase onto current main is needed, and this item should be renumbered to step 9. The ordering (risk assessment → literal value search → API contract verification) reads naturally.

Flagged by 4/10 review agents

changed behavior needs updated tests.
7. **Assess risk** — will this change affect other callers? Does it change a
public interface? Could it break downstream consumers?
8. **Verify API contracts per code path** — if the fix removes or empties
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Guidance scope narrower than the bug class it targets

The trigger "removes or empties" covers the PR #657 incident but the broader class of API contract violations also includes changing a parameter value or adding a default that is invalid for some code paths.

The code-review skill's equivalent guidance (line 65) already uses the broader "modifies parameters" wording. Consider aligning:

Suggested change
8. **Verify API contracts per code path** — if the fix removes or empties
8. **Verify API contracts per code path** — if the fix removes, empties,
or changes a parameter sent to an external API, check the API documentation
and trace each call site to verify the parameter is valid for that operation.
Different operations (e.g., approve vs request-changes) often have different
required fields.

Flagged by 5/10 review agents

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.

Code agent should verify API behavior empirically when removing required-looking parameters

3 participants