Repository navigation
Conversation
A task whose field set had no listed contract was stopped at begin: the generator wrote at most 64 sets per kind, and a create only the demonstrated sets, their subsets and one added optional field. Each kind in the manifest now lists the fields a set may hold. For a set of those that isn't listed, choose builds its contracts the way propose builds the listed ones, from the same demonstrations, answers and schema (pinned by digest in the manifest), checked by the SQL guard and a dry read. A left-out field must stay as it was or be empty, as before. Changed inputs, an open question, an unplaced field, or a column that would be left unchecked without the person's answer refuse the set. QUESTIONS.md also lists the parameters no demonstration placed, so a person can record them up front.
This branch has not been deployed
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.
Item 3 of #1677. A task whose field set had no listed contract was stopped at begin. On one held-out app that blocked 22 correct writes. The generator wrote at most 64 field sets per kind, and for a create only the demonstrated sets, their subsets and sets with one optional field added.
What changed
manifest.yamllists the fields a set may hold (fields): an update's identity fields and the fields it may change, or a create's required and optional fields.choose, for a set of those fields that the manifest doesn't list, callspropose(only=(kind, fields, lists)). That builds the set'screate/updateandfoundcontracts the way the listed ones are built, from the same demonstrations, answers and schema, checks them with the SQL guard and a dry read, and writes them underfield_sets/. So a task's field set doesn't need its own demonstration.field_sets: the demonstrations' digest, the schema's digest, the answers, the kinds, the read connection without secrets).chooserefuses, and the write stops, when:Unpinned, the same guard as Generator refuses joins and pins the demonstrations can't tell apart #1682).QUESTIONS.mdlists, per kind, the parameters no demonstration gave and no column is named like (not_placedinreport.json). A person can then record those demonstrations up front instead of finding out at a blocked task.Docs:
GENERATE_CONTRACTS.md(Field sets), CAPABILITIES.md.Tests
tests/test_generate_verify_contract.py, real PostgreSQL:choosebuilds it. The built contract equals the listed one document for document. A correct write under it is CONFIRMED, and a wrong done ratio is stopped.Real-app evidence
Running on a held-out app (instance 1) once the shared VM has room; this section will hold the commands and outputs.