feat(std/json-schema): assert the idn-hostname format #834
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!834
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/831-idn-hostname-format"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #831
Step 4b-2 of #80.
What changes
idn-hostnameis asserted instd/json-schema/src/formats.trbon top ofDomainName.tryFrom, with the two checkstryFromleaves out: no trailing full stop (also U+3002, U+FF0E, U+FF61, asidn-email) and no hyphen in the third and fourth position of a non-ASCII label (RFC 5891 section 4.2.3.1). A plain ASCII name,ab--cd.exampletoo, stays valid as forhostname.formatFailureanswers a failure for it; the doc comments and the Format section ofdocs/standard-library/json-schema.md(and itsskills/copy) say what is asserted and what waits for #365.json-schema.test.trb: Hangul name, itsxn--form, leading hyphen, trailing dot, 64-byte label, valid andformatfailure withassertFormat: true, annotation only by default.optional/format/idn-hostname(51 cases) andoptional/format/unknown(7 cases; the issue says 13, the file of release 23.1.0 has 7), regenerated from 23.1.0 and run withassertFormat: true.Differences
The 20 cases of
idn-hostnamethat need the rules of #365 (DISALLOWED code points, a leading combining mark, CONTEXTO, CONTEXTJ) are indifferences()with a reason each; none is skipped, and each flips when #365 lands. No verdict could be closed without a table, and the rules of #365 are not copied.Checked
torb testofstd/json-schema/tests/json-schema.test.trb(86 passed) andsuite.test.trb(1663 passed) on the VM;torb format --checkon the touched files;docs skill --check,docs index --check,doc --checkofstd/json-schema.sh tools/gates.sh aruns in forge CI.formatassertion for idn-hostname and the fileunknown(step 4b-2 of #80) #831Review of
153f271: approved.json-schema.test.trbcover a Hangul name, itsxn--form, a leading and a trailing hyphen, trailing dot (and U+3002/FF0E/FF61), the 63/64-byte label and 253-byte name limits, the U-label hyphen rule, and annotation-only by default. Suite part 18 (optional/format/idn-hostnameplusunknown) runs withassertFormat: true; the case count 1601 + 58 = 1659 matches. CI is green on this head, including gates, pdisc and conformance.isIdnHostnameisDomainName.tryFromplus the two table-free checks the issue asks for, with no second grammar. The hyphen check applies only to non-ASCII labels, soab--cd.examplestays valid as forhostname.endsWithFullStopis shared withisIdnDomain, and the refactor keeps its behavior.differences()entries each name the missing rule and #365, and none is skipped.skills/copy are in sync. The formats.trb header and the suite-cases header are updated.Non-blocking: the
suite-cases.trbheader comment has one line over the 120-column wrap (The files \format` and ...`). It is a doc-comment layout nit only.formatassertion for idn-hostname and the fileunknown(step 4b-2 of #80) #831