Guides
Repair API contract drift
Align checked-in server, schema, client, fixture, and generated API artifacts without silently changing the public contract.
Answers: use a coding agent to fix API contract drift · Updated
Use this finite shift only when the repository already identifies an authoritative API source and an established comparison command. Nightshift repairs objective, non-breaking artifact drift and stages every potentially breaking choice for owner review.
Establish authority before changing artifacts
Identify the source the repository already treats as authoritative: an OpenAPI or GraphQL definition, protobuf schema, server routes, consumer-contract suite, or equivalent. Run the configured generation, diff, compatibility, or contract command before editing.
- Record the authoritative source and exact comparison command.
- Compare server routes, schemas, generated clients, fixtures, and contract tests as applicable.
- Do not add contract tooling or guess which artifact wins.
Separate drift from breaking policy
A regenerated non-breaking artifact can follow the established source. Removal, narrowing, renaming, required fields, status codes, and compatibility policy remain owner decisions.
- Repair one coherent non-breaking cluster per commit.
- Park potentially breaking mismatches with affected consumers and rollback evidence.
- Review generated output semantically instead of accepting a clean diff as proof.
End on the repository’s contract check
The shift finishes when the configured comparison reports no actionable non-breaking drift and every breaking question is staged for review.
Run the API contract drift ready shift. Use the repository's established contract source and comparison command; never choose a breaking API change unattended.Start with a bounded prompt
This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.
Run the API contract drift shift using this repository's established source and comparison command. Repair only non-breaking artifact drift and park breaking choices.What this workflow does not claim
- The shift requires both an authoritative contract source and an existing comparison command.
- Breaking removals, renames, required fields, and compatibility policy remain owner decisions.
Evidence and sources
These links support the released behavior, public outcomes, or problem language described on this page.