Repository navigation
Expose the lifecycle journal over RPC and in the console - #342
Merged
Merged
Conversation
An interrupted start, stop or delete left a durable row nobody could read: the projection existed, the CLI could list it, and the console showed a server that appeared stuck with no explanation. OperationService lists, reads and releases journal rows, scoped by the server id that is also the RBAC object id, so a scoped grant reads one journal and an empty id stays an admin action. Resolving a lock records an operator note, writes an audit entry and nudges the reconciler instead of waiting for the safety-net sweep. The projection now distinguishes an operation that is genuinely still in flight (running) from one that stopped reporting (unknown), and a recovered row reads as settled rather than as an unrecognised phase.
athNdev
force-pushed
the
feat/operation-journal-rpc
branch
from
November 4, 2026 04:21
7b334e8 to
8df8ef1
Compare
protobuf-es v2 timestamps are plain {seconds, nanos} messages with no
toDate() method, so the shared formatTime helper fell through to
new Date(object) and printed Invalid Date on the audit log, the backup
list and the new lifecycle journal.
formatTimestamp uses timestampDate from @bufbuild/protobuf/wkt and is
unit tested, so the three copies of the broken helper are gone.
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
An interrupted start, stop or delete left a durable journal row that nothing could read. The projection from #336 existed and the CLI could list it, but the console showed a server that appeared stuck with no explanation, and there was no supported way to release the lock from the UI.
What changed
OperationService(proto/carbonpanel/v1/operation.proto):ListOperations— a server's journal, newest first, with an optional outcome filter and per-outcome counts.GetOperation— one row, refusing a server that does not own it.ResolveOperation— releases a lifecycle lock, records the operator note, writes an audit entry and nudges the reconciler.Every call carries
server_id, which is the RBAC object id. A scoped grant reads exactly one server's journal; omittingserver_idbecomes*and stays an admin action.Projection accuracy.
DescribegainedDescribeAtand now distinguishes:executing, advanced recentlyunknown/ resolverunning/ waitexecuting, pastExecutionStaleAfterunknown/ resolveunknown/ resolverecoveredunknown/ contact_operatorunknown/ nonerecoveredwas previously falling through to the unrecognised-phase branch and telling operators to contact support about a row that was already settled.Console. A "Lifecycle operations" panel above the audit log on the Activity tab: outcome tags, what happened, the safe next step, the redacted error text, and a "Release lock" action — offered only when the server is actually blocked. A running row polls; a settled journal does not.
Verification
go build ./...,go vet ./...,go test ./...greenserver_iddoes not widen the queryknowledge-lint: 30 concepts, 10/10 queries, indexes currentbun run check0 errors,bun run test67 passRefs OSS-245