Skip to content

feat(tools): fuel surcharge calculator, price alert dry run, service status (#195) - #197

Closed
karlwaldman wants to merge 2 commits into
mainfrom
feat/mcp-tools-tools-1110
Closed

karlwaldman wants to merge 2 commits into
mainfrom
feat/mcp-tools-tools-1110

Conversation

@karlwaldman

Copy link
Copy Markdown
Member

Summary

Tools for three operations ledger v8 deferred, each verified live on 2026-11-10.

Tool Operation Gate
opa_calculate_fuel_surcharge GET /v1/fuel-surcharge/calculate any key
opa_test_price_alert POST /v1/alerts/{alert_id}/test any key, own alerts; metered
opa_get_service_status GET /v1/status none (keyless)
  • Fuel surcharge: percent or per_mile method, the seven EIA regions, 1-52 weeks. The tool checks each method's required inputs before spending a request, relays the API's 400 text, and warns when the API marks the index stale.
  • Alert test: read scope, automation category, readOnlyHint. The API sends nothing and changes nothing. The description says the call is metered. Ids are numeric (live alert id 134), so the schema accepts digits only. The live price-alert lifecycle now dry-runs the synthetic alert through the real handler.
  • Service status: keyless, core category, capability entitlement: none. A 503 (snapshot missing or 15 or more minutes old) is reported as health unknown and is not retried. include_commodities lists only series that are not healthy or not current.
  • Ledger v9: three rows flipped to exposed. Families fuel-surcharge, price-alerts and data-quality are now fully exposed. Tool counts 40 -> 43 (read 36 -> 39). The core profile gains opa_get_service_status.
  • Noticed, not changed: opa_delete_price_alert's schema text calls alert ids UUIDs, but the API returns integers.

Verification (local, 2026-11-10, rebased on main 124c1de)

  • npm test: all suites pass (see per-PR counts in the commit).
  • npm run build, npm run check:readme-tools, npm run smoke:live-contract-matrix, npm run smoke:package: pass.
  • npm run check:capability-ledger: OK v9 against the live OpenAPI contract (136 operations), rerun after rebasing onto 124c1de (fix(ci): unblock main - npm audit fix (qs), ledger v8 for 18 new API operations, relative test date #193).
  • npm run test:live with the production smoke key (Scale) and SMOKE_WRITE_CONTRACTS=1: every contract PASSED, including the new tools; 0 failed, 0 cannot-check.
  • Plan-gated 403 paths were not observable live: both available test keys are on the same Scale account. They are covered by mocked tests against the documented 403 bodies.

Merge notes

Refs #195.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B3sTPV81755NVtvVwb9Cd8

…status (#195)

Exposes three operations ledger v8 deferred, each verified live on
2026-11-10:

- opa_calculate_fuel_surcharge: GET /v1/fuel-surcharge/calculate. Percent or
  per-mile schedule on the EIA weekly diesel index, seven regions, 1-52
  weeks. Checks per-method required inputs before spending a request and
  states when the API marks the index stale.
- opa_test_price_alert: POST /v1/alerts/{alert_id}/test. Read scope,
  automation category; a dry run that sends nothing, described as metered.
  Covered in the live price-alert lifecycle on the synthetic alert.
- opa_get_service_status: GET /v1/status. Keyless, core category,
  entitlement none. A 503 (stale snapshot) is reported as health unknown
  and not retried.

Ledger v9 (families fuel-surcharge, price-alerts, data-quality now
exposed), live-contract catalog entries, README rows, tool counts 43/39.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B3sTPV81755NVtvVwb9Cd8
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7ea197a1-aac2-419a-b73d-1cb55a3ddabe
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

The public-claims smoke bans hard-coded plan names in source and packed
surfaces, so plan gates are stated as entitlement gates (HTTP 403).
smoke:docker asserts the container's default read inventory, which still
read 36.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B3sTPV81755NVtvVwb9Cd8
@karlwaldman

Copy link
Copy Markdown
Member Author

Superseded by #200.

@karlwaldman
karlwaldman deleted the feat/mcp-tools-tools-1110 branch November 10, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:elevated Elevated: auto-merges after an adversarial review APPROVE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant