Repository navigation
feat(client-contract): add entity_choice and per-row entity_refs, re-record at apis 99e62038c - #26
Merged
Merged
Conversation
…record at apis 99e62038c served/openapi.json and SOURCE.json come from dfo-apis 99e62038c. NoDataOption and SentenceToken carry entity_choice, the index into no_data.ambiguous_entities of the group an option settles or a slot asks, ParsedEntity carries an optional name, and Part.entity_refs has one entry per restatement row. The 32 recorded scenarios are recorded at that commit, including search-place-ambiguous-twice, two entity_ambiguous groups of one text. The long-build questions move to 1964 and 1965, which dev had not built, and the poll-pacing derivation cycles its waits over any recorded build of three or more running polls. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The served document and every recorded scenario now come from dfo-apis 99e62038c, the dev deploy of DevelopmentFinanceObservatory/apis#119.
NoDataOption.entity_choiceandSentenceToken.entity_choicegive the index intono_data.ambiguous_entitiesof the group an entity_ambiguous option settles or a slot token asks, so a client groups each place menu by it when two groups share one text.ParsedEntitygains an optionalname, an unpinned row's identity apart from its words; an entity's identity is its dcid, else its name, else its text, and a name beside a dcid refusesrequest_invalid.Part.entity_refshas one entry perrestatement.entitiesrow.The new
search-place-ambiguous-twicescenario records "aid from Congo to Congo": one no_data part with two "Congo" groups, options carryingentity_choice0, 0, 1 and 1, and slot tokens carrying 0 on the origin and 1 on the destination.Three recorded answers changed beyond the new fields, from dfo-apis changes since the last capture at 0ba344270, chiefly DevelopmentFinanceObservatory/apis#132, which binds a constraint slot a reply leaves open.
fetch-spec-narrowed,fetch-spec-entity-reboundandfetch-spec-entity-droppednow bind one cooperation modality and one finance type, so their shape label names "core support to non-governmental organisations, ..., standard grant".resubmit-candidates-siblingholds emittedThing at "Carbon Dioxide (CO2)". The slot labels "FinancialActivities" and "CarbonDioxide" read "Financial activities" and "Carbon Dioxide (CO2)", and three scenarios' slot filter provenance readsbinderwhere it readmeasure_elected.tools/capture_client_contract.pymoves the long-build questions to 1964 and 1965, since dev had built the earlier years and answered 200 where the scenarios need a 202._pacing_changesderivesfetch-spec-poll-pacing-changesfrom any recorded build of three or more running polls, cycling 2,500, 4,000 and 1,000 ms over them, because a live build's poll count varies with load.Testing:
tools/validate_client_contract.pyreports the contract valid with 121 scenarios. The client-contract tests passed (78),pytest tools/testspassed (526), and ruff check and format are clean.Co-authored-by: Claude noreply@anthropic.com