Freeze supplier, search-result, policy-evaluation, and near-miss contracts
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- Avg merge
- 8h 21m
- Merged PRs (30d)
- 2
Description
Outcome
Adapters and agent-facing tools agree on factual inventory, provider completeness, candidate-local policy evidence, asynchronous result semantics, and execution-time authority.
Scope
- Version AirSupplier and LodgingSupplier ports, normalized immutable offers, repricing, state-changing idempotency/lookup, read-only retry observations, and PII execution context.
- Define deterministic finite AirStub and SimHotel inventory independent of mandate values; soft preferences never suppress inventory.
- Reject malformed/unsupported typed requests, including non-USD, before provider effects with stable factual request violations.
- Define
complete,no_matching_offers, andtemporarily_unavailableas provider-completeness outcomes rather than trip decisions. - Put exact offer facts, monetary projections, rule results, freshness, and
autonomous|approval_required|prohibitedpolicy snapshots on each candidate in neutral mechanical order. - Make
search_tripplan provider work and return a durable operation/search ID; expose eventual facts throughget_search_resultwithout rewriting the command receipt. - Define factual near-miss payloads without Farewright-generated advice or silent relaxation; policy prohibition is not missing inventory.
- Define non-authorizing
CandidateSelectedevidence and require completed immutable reprice observations plus atomic execution revalidation of exact selection, request, mandate, access, ledger, and remaining selected-plan commitments. - Define displayed attempt order and symmetric partial-success behavior for independent air and lodging orders; do not promise unsupported voluntary cancellation.
Acceptance
- Unsupported request/non-USD rejects before provider work; provider outage cannot be represented as no inventory or budget failure.
-
completehas at least one matching candidate and no provider failure;no_matching_offershas no candidate/provider failure and factual no-match evidence;temporarily_unavailablehas no bookable candidate and at least one sanitized provider failure. - Every candidate carries offer/version/expiry/material facts, projections, named mandate/ledger snapshot, exact rule results, freshness, and one deterministic policy status.
- Candidate status is
prohibitedon any hard-rule failure,approval_requiredwhen no rule fails but at least one action exceeds threshold, andautonomousotherwise. - Candidate/offer ordering is replay-stable and mechanical, with no score, ranking, recommendation, preferred alternative, or selection from Farewright.
- Each approval requirement states immutable offer/version, action class, gross amount/currency, threshold, and reason without creating approval or authority.
-
CandidateSelectedrecords an eligible current exact selection and attempt order but creates no reservation/effect; prohibited/stale snapshots and material reprice changes require a new confirmed selection. - Booking consumes completed reprice observations and atomically checks the selected plan's remaining gross commitments so one affordable order cannot bypass a known over-cap combination.
- Search-time
autonomousevidence cannot override changed offer, request, mandate, access, or ledger state at execution. - Stub price/inventory rules cannot inspect cap or approval threshold, and soft preferences do not filter candidates.
- Near misses contain observed hard-request facts only and are sufficient for a host agent to form a new proposal.
- State-changing provider effects have idempotency/lookup proof or remain stub-only; read-only retries create a fresh immutable observation and never masquerade as a lost response.
- Supplier execution PII is ephemeral and never enters events, effects, receipts, logs, projections, or MCP responses.
- Either first-order success is retained honestly if the second order fails; retry/stop behavior does not fabricate rollback or cancellation.
Dependencies
- #6 resolved spec inconsistencies.
Review
Mandatory independent contract-gate review, including agent/core boundary, stale-selection, over-cap plan bypass, no-match, outage, and partial-success examples.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points; start by reading resolved issue #6 and mapping the contract boundaries implied by the Scope. Done requires satisfying the Acceptance checklist and completing the mandatory independent contract-gate review, including the listed edge cases.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100