Skip to content

fix(skill): tell agents a fare total comes before any payment fee (PET-503) - #117

Open
ahsan-amin-wego wants to merge 4 commits into
mainfrom
fix/PET-503-payment-fee-assumption
Open

ahsan-amin-wego wants to merge 4 commits into
mainfrom
fix/PET-503-payment-fee-assumption

Conversation

@ahsan-amin-wego

@ahsan-amin-wego ahsan-amin-wego commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

PET-503. Skill half of the change; the API half is wego/wego-ai#2136.

A flight fare's total from the API is priced with no payment method selected, so checkout can add a payment fee depending on how the traveller pays. wego.com preselects popular methods and can show a higher figure for the same fare. The skill never said this, so agents quoted the total as the final price.

  • skills/wego/SKILL.md → "Quote live results": one rule for both paths. A fare whose price.paymentBasis reads no_method_selected is before any payment fee; say so, and never add or estimate the fee.
  • skills/wego/references/cli.md → flights trip: what paymentBasis, includesFees: false, paymentFeeUsd: 0 and paymentFees mean, and to name the lowest-fee method rather than average.

Measured on production upstream (wego/wego-ai#2136 has the full table): in SA, MasterCard carries no fee while Visa, MADA and Tabby add about 5% (up to 10%) of the total.

Notes:

  • The fields ship with the wego-ai API contract 0.20.0. contract/openapi.json here is not refreshed in this PR; that follows the API promote per CONTRIBUTING.md "When the API changes". Until then the CLI passes the API JSON through, so the fields reach agents once production serves them.
  • The commit is not GPG-signed locally; a squash merge on GitHub signs it.

🤖 Generated with Devin

Open in Devin Desktop: https://app.devin.ai/desktop/session/a4abd26961f547779157df0fc4facd10?variant=devin
Requested by: @ahsan-amin-wego


🟢 Devin Review found nothing to fix · View findings

Devin Review

Summary by CodeRabbit

  • Documentation
    • Clarified that flight fare totals may exclude payment fees, which can vary by payment method and may be added at checkout.
    • Guidance now tells assistants to disclose when fees are excluded, avoid estimating or adjusting them, and identify the lowest-fee payment method when fee information is available.

…T-503)

Co-Authored-By: ahsan.amin@wego.com <ahsan.amin@wego.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Original prompt from Ahsan.amin

Implement PET-503: https://wego.atlassian.net/browse/PET-503

Read the ticket in Jira. It is the source of truth, including the "Done when" checks.
Follow wego/wego-ai's AGENTS.md (apps/api, and the agent skill under apps/cli if the SKILL.md item lives there; if the published skill lives in wego/cli, open a second PR there).

  • Re-checked 2026-11-29 on wego-ai main: includesFees is still a hardcoded true (apps/api/src/flights/normalize.ts:234, schema.ts:434) and nothing reads paymentFee data.
  • Keep paymentMethodIds out of the upstream search body (Book-on-Wego inventory guard).
  • Branch: fix/PET-503-payment-fee-assumption off the latest main. Name PET-503 in every PR.
  • Run the API on main and on your branch locally, and post a main vs PR table in the PR: the fare price fields for a few routes, Book-on-Wego fares per search, and the MENA sizing. Keep analytics away from production.
  • Open the PR as ready for review, not as a draft. Put the evidence for each "Done when" item in the PR description.
  • Do not merge or promote, and do not edit Jira or post in Slack.
  • If the ticket is unclear, or the work needs anything outside its boundaries, stop and ask.

When done or blocked, reply with the PR URL and one line per "Done when" item.

@devin-ai-integration devin-ai-integration Bot added the devin Authored by Devin label Nov 29, 2026
@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: wego/cli
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 8cf691f
  • Layers: Repository YAML
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: f6135b93-e533-443e-9253-98933e108566

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Walkthrough

The flight quote and trip inspection guidance now explains that fare totals exclude payment fees. It directs readers not to estimate or add fees and, when per-method fees are listed, to name the method with the lowest fee.

Changes: Flight fare payment-fee guidance

Layer / File(s) Summary
Payment-fee disclosure guidance
skills/wego/SKILL.md, skills/wego/references/cli.md
Quote guidance says fares with paymentBasis set to no_method_selected exclude checkout payment fees. Trip inspection guidance states that totals exclude fees and provides the related price fields. Both sections say not to estimate or add fees; trip inspection guidance also says to name the lowest-fee method when per-method fees are listed.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • wego/cli#112: Reorganizes the skill guidance and moves CLI-specific content into references/cli.md, where this PR adds payment-fee guidance.
  • wego/cli#111: Splits the skill into separate CLI and MCP references; this PR updates the root skill and CLI reference.

Suggested labels: devin

Merge Risk: Low · previous review fc22d

This adds guidance that fares are priced before any payment fee. Until the matching API change is live, agents could describe current totals inaccurately. Condition the disclosure on the returned paymentBasis field, or merge after the API promotion.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the Conventional Commits form with type fix, scope skill, and an imperative lowercase subject. It names the change accurately: agents are told that a fare total is priced before any pay…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title uses the Conventional Commits form with type fix, scope skill, and an imperative lowercase subject. It names the change accurately: agents are told that a fare total is priced before any payment fee. The PET-503 key is included. Its scope matches the 'skill' scope in the repo's list, and the changed files are under skills/wego. The title is specific and matches the main change.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@devin-ai-integration devin-ai-integration Bot left a comment

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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 3 commits November 29, 2026 15:29
…asis (PET-503)

Co-Authored-By: ahsan.amin@wego.com <ahsan.amin@wego.com>
…PET-503)

Co-Authored-By: ahsan.amin@wego.com <ahsan.amin@wego.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devin Authored by Devin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant