Repository navigation
feat: render masked diagnostics for a task result - #663
Merged
Merged
Conversation
A task read in a state that owns its whole collection, `set` or `clear`, now reports `exists` true whenever the read succeeds, with the empty collection as observed, across `ReadTask`, `ReadAddress`, `PlanResult.Exists` and the `Exists` an apply returns. The additive states keep reporting whether the members they name are there, and a missing app or service is still an `ObjectMissingError`, so `docket read` exits 0 rather than 2 for an empty collection.
josegonzalez
force-pushed
the
647-masked-diagnostics
branch
from
October 22, 2026 02:37
a0dad55 to
58cd8a1
Compare
josegonzalez
changed the base branch from
main
to
639-empty-collection-exists
October 22, 2026 02:37
`sdk.Diagnostics` turns a plan result, a task's output state or a read error into masked error and warning entries, each with a stable reason, a short summary and a detail carrying the command's output, so an embedder no longer masks each field or formats each error type itself. The CLI's plan and apply output, human and JSON, now render every task error and warning through the same helper, and print exactly what they printed before. `WarnReasonServiceOptionDrift` is now exported to the sdk.
josegonzalez
force-pushed
the
647-masked-diagnostics
branch
from
October 22, 2026 02:58
58cd8a1 to
2801941
Compare
josegonzalez
changed the base branch from
639-empty-collection-exists
to
main
October 22, 2026 03:10
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.
sdk.Diagnosticsturns a plan result, a task's output state or a read error into masked error and warning entries, each with a stable reason, a short summary and a detail carrying the command's output, so an embedder no longer masks each field or formats each error type itself. The CLI's plan and apply output, human and JSON, now render every task error and warning through the same helper, and print exactly what they printed before.WarnReasonServiceOptionDriftis now exported to the sdk.There is no visible change to CLI output: the plan and apply lines, the apply continuation lines, and the JSON
error,stdout,stderr,exit_code,reasonandmessagefields are byte-identical, and a new test pins that for a failed command, an ssh failure, a version refusal, a missing app, an unreadable state and a generic error. The JSON event schema is unchanged.Decisions:
WarnReasonServiceOptionDriftis exported because a warning diagnostic carries its reason as the key to branch on, and an embedder needs every key it can receive.SSHErrorstays unaliased: thesshdiagnostic reason gives an embedder the transport-failure branch without the type, and the type's fields hold unmasked text thatDiagnosticsexists to keep out of view. A transport failure is classified before a version error, so a version that could not be read because ssh failed reports as an ssh failure, which matches the CLI's long-standingssh:label. Diagnostics masks every string it returns, summaries included, since it cannot tell server text from recipe values; the CLI's own--appand path arguments never pass through it. Errors come before warnings in the returned list, and an unsupported input type returns a single error diagnostic naming it rather than nothing.Closes #647