Result: done
Files: packages/yaml/src/main.nika packages/yaml/nikaia.contracts packages/yaml/nikaia.derived packages/yaml/nikaia.lock packages/yaml/nikaia.proofs packages/yaml/tests/anchors_tags_aliases.nika packages/yaml/tests/directives.nika packages/yaml/tests/directives.stdout packages/yaml/tests/explicit_keys.nika packages/yaml/tests/explicit_keys.stdout packages/yaml/tests/limits_depth_and_size.nika packages/yaml/tests/limits_depth_and_size.stdout
Commit: yaml: explicit keys, directives and limits (y2b, ADR-yaml-1 D8)
Body: Both steps in one commit, taken over from the stopped builder’s diff and checked. Explicit keys ? k / : v in block and flow, a collection as a key, an empty implicit key (: c, suite 2JQS). %YAML of major 1 (others refused by a guard), %TAG for its document only, a reserved directive ignored, a directive needs ---; a named handle no %TAG declares is a parse error. Tags stay as written on the node (ADR-yaml-1 D6: the tree keeps tags, load resolves); the document’s %TAG prefixes decide what a tag means for the kind (%TAG !! tag:example.com,2000: makes !!int no integer, example 6.19). Limits { depth, alias_nodes, bytes }, default_limits() (128, 10000, 4 GiB - 1), parse(input; limits:) hands it to the entry rule (#1041); depth is a level parameter left with a guard on each collection, behind a cut where a block collection surely begins so the limit, not a scalar error, is reported; bytes checked before the parse. The flow rules read a key once (FlowTail): the old FlowPair-then-FlowAny re-read every nested key, exponential, so 24 nested flow sequences never finished on develop and 129 could not be tested. anchors_tags_aliases.nika now declares !e! with a %TAG (its .stdout unchanged). Long grammar lines are broken by hand: nikaia fmt breaks a line between a rule call and its */+.
Part: #928
Pushed: c2ef29e0 (pushed by drive.nika)
Tests: nikaia test –project packages/yaml 14 passed (3 new); fmt::every_nika_file ok; scripts/pre-push-check.sh ok; cache target/nikaia-project-tests 6.4G, disk 7.0G free, no new entry over 100 MB; new tests are features, not fixes; the depth test hangs on develop (exponential flow parse, ruled out by n=20..26 probes)
Gate: green
Deviation: none
Found: (1) nikaia fmt breaks a long grammar rule line between an element and its postfix */+ (rest:SeqMore(..)\n\t\t* -> {), and inside an if condition before ==; probe: the y2b main.nika before its lines were hand-broken. (2) a guard passing an optional label to a Node? parameter, t:FlowTail(..)? if(pair_fits(left, k, t), ..), reaches rustc as “closure only implements FnOnce”; ref Node? compiles; a 20-line probe with a small struct did not reproduce, the failing file is the committed main.nika with t: ref Node? -> t: Node?. (3) peek("-" Gap) (a sequence in peek) passes nikaia check in the package but reaches rustc as “expected )”; a named rule works.
Needs: supervisor rebase and push of c2ef29e0; commit.nika would paste the brief’s “Earlier attempt” section (after Attribution:) into the message, so committed by hand with git
Changelog: none
Owner: none
Rs2nika: none
Disk freed: 0.2 GB (scratch probe targets)