-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Fallback
to LogEntry
#3657
Add Fallback
to LogEntry
#3657
Conversation
2e02a73
to
048b328
Compare
048b328
to
db8439b
Compare
Rewrite
logs
033fad6
to
fc5aa93
Compare
|
fc5aa93
to
209a03f
Compare
Pull-out `Depth` into its own `Kore.JsonRpc.Types.Depth` module
Rewrite
logsFallback
to LogEntry
@@ -46,7 +48,8 @@ data LogRewriteResult | |||
|
|||
data LogEntry | |||
= Rewrite | |||
{ result :: LogRewriteResult | |||
{ originalTerm :: Maybe KoreJson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need the original term? the intention for the rewrite trace was to be used when debugging proofs with single step turned on in pyk, so we already have the originalTerm
anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let's drop it after all.
| -- | Indicates a fallback of an RPC-server to a more powerful, but slower backup server, i.e. Booster to Kore | ||
Fallback | ||
{ originalTerm :: Maybe KoreJson | ||
-- ^ state before fallback | ||
, rewrittenTerm :: Maybe KoreJson | ||
-- ^ state after fallback | ||
, reason :: Text | ||
-- ^ fallback reason | ||
, ruleIds :: NonEmpty Text | ||
-- ^ rules applied during fallback, the first rule is the one that caused the fallback | ||
, recoveryDepth :: Depth | ||
-- ^ depth reached in fallback, must be the same as (length ruleIds) | ||
, origin :: LogOrigin | ||
-- ^ proxy server the log was emitted from | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good. should have all the info we need :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (Changes many of the same places as #3658 ... let's get it in and move on)
…alls back to Kore (#313) Closes #295 Needs runtimeverification/haskell-backend#3657 Note that the `Fallback` entry changes its level of detail in presence of `logSuccessfulRewrites`/logFailedRewrites`: * If only `logFallbacks` is supplied, then the log entry will only contain the pre- and post-state * If `logFailingRewtires` is given too, the log entry will additionally contain the rule id that caused the fallback and the fallback reason * If `logSuccessfulRewrites` is given too, the log entry will additionally contain the the rule log in Kore
…alls back to Kore (#313) Closes runtimeverification/hs-backend-booster#295 Needs #3657 Note that the `Fallback` entry changes its level of detail in presence of `logSuccessfulRewrites`/logFailedRewrites`: * If only `logFallbacks` is supplied, then the log entry will only contain the pre- and post-state * If `logFailingRewtires` is given too, the log entry will additionally contain the rule id that caused the fallback and the fallback reason * If `logSuccessfulRewrites` is given too, the log entry will additionally contain the the rule log in Kore
…alls back to Kore (#313) Closes runtimeverification/hs-backend-booster#295 Needs #3657 Note that the `Fallback` entry changes its level of detail in presence of `logSuccessfulRewrites`/logFailedRewrites`: * If only `logFallbacks` is supplied, then the log entry will only contain the pre- and post-state * If `logFailingRewtires` is given too, the log entry will additionally contain the rule id that caused the fallback and the fallback reason * If `logSuccessfulRewrites` is given too, the log entry will additionally contain the the rule log in Kore
…alls back to Kore (#313) Closes runtimeverification/hs-backend-booster#295 Needs #3657 Note that the `Fallback` entry changes its level of detail in presence of `logSuccessfulRewrites`/logFailedRewrites`: * If only `logFallbacks` is supplied, then the log entry will only contain the pre- and post-state * If `logFailingRewtires` is given too, the log entry will additionally contain the rule id that caused the fallback and the fallback reason * If `logSuccessfulRewrites` is given too, the log entry will additionally contain the the rule log in Kore
This PR modifies the
LogEntry
type inkore-rpc-types
in two ways:origianlTerm
intoRewrite
log entry constructor (and emit Nothing for now in Kore to retain the current behavior. This change is not necessary at the moment, but we may need to log these terms in future.Fallback
constructor toLogEntry
to enablekore-rpc-booster
to emit a trace when it falls back from Booster to Kore.