Repository navigation
feat(ledger): structure audited failure outcomes - #2212
Conversation
|
🟠 [major] Exclude revision 29 from the no-wipe error-identity upgrade guarantee An operator upgrading to revision 29 is still told that no persisted value encoding changes and existing entries remain verifiable after restarting all nodes. The revision-29 protocol documentation explicitly replaces persisted message/context and message/metadata fields with code/facts. Retaining pre-29 failures under this guarantee leaves incompatible state; a coordinated restart does not convert it. The intentional pre-release replacement is acceptable, but deployment instructions must not promise preservation. Suggestion: Explicitly exclude revision 29 from the no-wipe guarantee and document its supported state replacement/recovery procedure. Keep the coordinated-restart-only guidance scoped to error-identity changes that preserve the persisted representation. |
BREAKING CHANGE: FailureDetails variants now require every fact and use distinct codes for contextual error shapes. Service protocol revision 34 requires fresh v3 state.
|
Fixed the high-review and CI findings in f70f500. The order UTF-8 scan now walks protobuf messages iteratively, so valid nested requests are no longer rejected with |
|
Separated internal proposal rejections from audited business failures in 7deae00 and 08e181c:
The full local PR gate passed Go race tests and business/cluster E2E tests. Its Schemathesis step reported a connection reset on |
paul-nicolas
left a comment
There was a problem hiding this comment.
R2 — [P2][blocking] Update the Numscript ErrorInfo contract and example
Location: docs/technical/architecture/subsystems/api/grpc-api.md:665–667, 698–699
Evidence: The table promises diagnostic details/detail fields, and the example reads Metadata["details"]. This PR removes those fields: parse failures have empty facts, while compile/execution failures expose variant-specific facts.
Impact: Clients following the example display an empty script-error explanation.
Resolution: Update the table and example to use the current facts or rendered status message.
|
Addressed both points in 4fbab16. The audit-chain docs, protobuf comment, and related audit manifests now distinguish definitive business outcomes from |
What changed
Persist each definitive audited business failure as one typed
FailureDetailsvariant. Its oneof arm determines the stablecode, and itsfailure_reasonannotation determines the coarsereason. Audit, frozen idempotency outcomes, and skipped-order logs no longer store separate copies of either identifier. The FSM checks that a producer's reason agrees with its variant before persistence; the checker validates replayed details against the hash-bound audit entry.Keep technical and retryable failures outside the definitive business-failure audit path. Map exported Numscript v0.2.0 interpreter, VM, and compiler failures to Ledger-owned typed variants. Structured facts have a fixed presence-checked shape; diagnostic prose stays out of persisted outcomes and public error metadata.
The request's
skippable_reasonswhitelist still uses coarse reasons. HTTP, JSON, events, and gRPCErrorInfocontinue to exposereason,code, and facts derived from the typed variant. The service protocol is revision 39. Ledger v3 is unreleased, so this changed persisted and gRPC shape requires fresh development state and matching revision-39 clients and servers.Validation
go test -race ./...passed.POST /v3/{ledgerName}/indexeshad a connection reset on both runs. The same endpoint had produced this local network error before this commit; its server log is available in/tmp/schemathesis-server.txt.8dd7b3988with no actionable findings.Review focus