feat(opencode): publish structured native-driver diagnostics - #362
Merged
schickling-assistant merged 1 commit intoAug 27, 2026
Merged
Conversation
Persist one typed current diagnostic across version/API/SSE/seed/delivery and read-back boundaries, with stage-local recovery clearing and earliest failure precedence. Expose the shared model in roster and Doctor; emit bounded spans/events/counter attributes without identities, paths, messages, or raw versions in metric labels. Delivery/retry/archive semantics remain unchanged. Includes the user-confirmed full VRS contract and decision amendment. agent-identity: unknown agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.3 agent-runtime: OMP 18.0.3 tooling-profile: dotfiles@e4789b0
schickling-assistant
deleted the
schickling-assistant/2026-08-27-opencode-driver-diagnostics
branch
August 27, 2026 17:27
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.
Problem
Managed OpenCode native delivery can fail at version, API, SSE/seed, submission, or read-back boundaries. st2 currently exposes many failures only on stderr, so Fractal/Doctor cannot explain why native delivery or exact observation is unavailable, and telemetry cannot measure recovery.
Goal
Publish one typed current driver diagnostic with stable bounded vocabulary, stage-local recovery, roster/Doctor exposure, and privacy/cardinality-safe telemetry—without changing OpenCode delivery/retry/archive behavior or introducing launcher vocabulary.
Design
Durable per-agent record:
{ "schema":"st2.driver-diagnostic.v1", "driver":"opencode", "stage":"versionGate|apiGate|sse|seed|delivery|readBack", "reason":"<closed enum>", "source":"<closed enum>", "support":"supported|unsupported|unknown", "observedAt":1787830000000, "recovery":"clearsOnStageRecovery" }driverDiagnostic; Doctor emits actionable advisorydriver_diagnostic_transitions_totaluses only bounded stage/reason/source/support/outcome axesVerification
nix build .#default --no-link: green (/nix/store/nmk0d7lcyqfg992qybq36vnb4kn4apsx-st2-0.1.0).Complexity
One generic typed diagnostic core plus OpenCode boundary adapters. The generic reader/telemetry does not branch on Axe or launcher identity. Delivery state machine is unchanged.
Concerns
The current reason vocabulary is intentionally closed. New provider failure classes must extend schema/tests deliberately rather than leak error strings. Raw producer version remains roster/drawer data but is excluded from metric labels.
References
Posted on behalf of @schickling
agent_identityagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile