Repository navigation
docs(tasks): a comment in an empty container used as a key is dropped - #29
Merged
adammharris merged 1 commit intoNov 7, 2026
Conversation
adammharris
deleted the
agent/backlog-file-a-comment-in-an-empty-key-container-is-dropped
branch
November 7, 2026 06:42
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.
Files a task for a defect in the canonical form. Nothing else changes: no code, and the task stays open for a fix on its own branch.
What
In canonical text, a line comment after the opening bracket of an empty container that is a mapping key is lost:
The parser makes that comment the key's trailing comment. An inline container leaves its trailing comment to whoever writes its line, and for an entry that is the value's anchor, so nothing prints it.
{[//\n]:1}is the smallest input, and it failsfig_fuzz::canonical_round_trip.Why it is worth a task
Reach is narrow: canonical text is opt-in, YAML keeps the comment (on the value), and the JSON family refuses such a key. It is filed because a comment is lost silently, which is what
canonical_round_tripexists to catch, and because this input may be the next nightlyFuzzfailure on #13. That part is a guess, and the task says so.How it was verified
canonical_round_tripand through the CLI built with--features canonical.cargo test -p fig-core(215 passed) andcargo test -p fig-fuzzpassed, and 427 million more mutations found nothing. The full gate was not run against it.prov checkreports nothing for the new task. Its remaining findings are all in.config/prov.yaml, which this PR does not touch.