fix(dns plugin): shorten long record values in the default table - #107
Merged
Conversation
A zone with a DKIM key was hard to read. tabwriter sizes a column to its widest cell, so one 400-byte TXT value indents STATUS across every row in the zone — the cost of one long value is paid by every short one. The default table now shortens a value to 56 columns and reports how many it shortened, pointing at `-o wide` and `-o json`, which are unchanged and still carry the value in full. Nothing is cut silently. The width is measured rather than guessed. Across real zones the values people actually read in a table — addresses, hostnames, SPF records, ACME challenge tokens — bunch up below the mid-fifties, with a clean gap above them: at 48 columns a third of a typical zone's rows get cut, while at 56 it is one in a hundred and the long TXT values this exists for are still shortened. Truncation counts runes rather than bytes, so a multi-byte value is never cut mid-character, and the ellipsis is inside the budget, so the column never exceeds the width. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 26, 2026
`--managed` could only answer half the question. It showed the records Datum writes for you, but there was no way to ask the opposite — what did I put here — and in a zone where another system writes most of the records, that is the more useful view. `--no-managed` is that view. It is the spelling people reach for, and a negated flag reads better in a script than a value on a positive one. `--managed=false` means the same thing. It already parsed before this filter existed, where it silently meant "no filter", so someone who typed the intuitive thing got the unfiltered list back and no indication their flag had done nothing. Leaving it inert now would be the more surprising choice. Passing both flags is a usage error rather than a precedence puzzle resolved silently, and an absent flag still means no filter, which is what separates it from `--no-managed`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Excluding the records Datum manages fixed one zone's width but not the general case: any system that writes into DNS puts an encoded identifier in the owner name, and Datum does not label a third party's records as managed. Names split cleanly into two populations. The ones people write are conventions with fixed shapes — @, www, _dmarc, _acme-challenge, a DKIM selector — and run to about twenty characters. The ones machines write carry an identifier and start around thirty-two: a hex digest at 32, a UUID at 36, or the 52 characters a base32-encoded 256-bit key costs. 40 sits in the gap, so a hand-written name is shown whole and an encoded one is cut. Cutting a name costs more than cutting a value, because a name is an argument: `record describe` and `record delete` take one. The footer now counts names separately from values and points at the output that carries them in full, and `-o name` — which exists to turn a row back into something you can pass to those commands — is never shortened. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JoseSzycho
previously approved these changes
Aug 26, 2026
kevwilliams
previously approved these changes
Aug 26, 2026
fix(dns plugin): shorten machine-written names in the default table
feat(dns plugin): add --no-managed to list only your own records
kevwilliams
approved these changes
Aug 26, 2026
This was referenced Aug 26, 2026
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.
A zone with a DKIM key was hard to read.
tabwritersizes a column to its widest cell, so a single 400-byte TXT value indents STATUS across every row in the zone — the cost of one long value is paid by every short one.The default table now shortens a value to 56 columns and says how many it shortened:
-o wide,-o jsonand-o yamlare unchanged and still carry the value in full. Nothing is cut silently.Related
Three readability fixes for
datumctl dns record list, reviewed and merged bottom-up:main)--no-managedto hide records another system writesAll three follow #102, which added the plugin, and are UX fixes found while using it against real staging zones. The plugin ships from #106's release plumbing and is installed via datum-cloud/datumctl-plugins#22.
This is the base of the stack. #109 supersedes part of its "note" section: the NAME column is bounded there.