Repository navigation
fix(errors): end each refusal with what to write - #165
Merged
Merged
Conversation
Each refusal's detail() now ends with what to write and an example that the field accepts, such as "Write an address, such as DS1." A hex Math gives hex examples, such as DH1 + 2h, and a pointer into SC or SD gives a writable address, such as SC50 or SD29. Numbers show without quotes. read_csv names a quoted keyword as oneshot="1" and says to write oneshot=1. tests/test_refusal_details.py checks that every refusal has a short() and a detail(), that every .field is Class.field or Class.field[i], that every Code raised as a FieldError is reached, and that each "such as" example is accepted when put back into its field. Each allowlist there can only shrink. The .code, .field, .fields and click_id of every refusal, and its exception class, are unchanged. Co-Authored-By: Claude Opus 5.5 <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.
Every refusal's
detail()now ends with what to write, plus an example the field accepts. For example:Coil.operand: 'out' is not a CLICK address. Write an address, such as Y001.The.code,.field,.fields,click_idand exception class of every refusal stay the same. That was checked across 78,695 collected refusals.Messages
detail()now ends with what to write for each listed code. Pointer refusals end "Write an address, such as DS1." or name the field's own bank.DH1 + 2handDH1 * ( -2h ). A function the formula's mode refuses names the other mode's registers.5 is …. Text keeps its quotes, so'1'and1stay distinct.read_csvnames a quoted keyword exactly, for examplecopy: oneshot="1" is in quotes; write oneshot=1.New checks (tests/test_refusal_details.py)
short()and adetail(). TheNO_DETAILallowlist may only shrink..fieldand.fieldsitem readsClass.fieldorClass.field[i].Coderaised at a FieldError site is reached by a collected refusal.EXAMPLE_NOT_SUBSTITUTEDallowlist may only shrink.Known gaps, next branch
19 allowlist entries are marked "the example comes from the field's banks, not from the other end or the other operand". These are odd inputs, such as
Coil("Y001", range_end="$41"), that suggest Y001. A follow-up branch will build those examples from the partner field. It will also:Checks
messagelines changed, regenerated bymake editor-grids.Gate
make lint: passed.make docs-build: passed.editor_grids.py --check: passed.make test: 19105 passed, 139 skipped.