While deep, heavily formatted diagnostic reports are amazing for isolating complex bugs, they are far too verbose for high level monitoring. If a developer is running a massive test suite or watching a real time stream of hundreds of transactions, printing a 50 line diagnostic report for every single transaction will completely flood the terminal buffer and make the stream illegible. The core engine currently lacks a succinct, one liner abstraction for its error types.
Issues/what to fix
Every single HostError and DiagnosticReport variant must implement or update their summary() method/field. This is an architectural requirement for "Tier 1" display modes.
The implementation must distill the complex error down into an ultra concise, maximum 80 character string. For example, instead of outputting the entire resource matrix, the updated summary() for a budget error must simply output: [BUDGET] CPU Exceeded (105%). Instead of a massive stack trace for a contract panic, it must output: [CONTRACT] Panicked at C...A12: 'Insufficient Funds'. This requires careful string manipulation and truncation logic to ensure the critical context is preserved without ever exceeding the character limits.
Note: HostError already has a summary() method, but it needs to be rewritten to adhere to this new 80 character limit.
Files to create / modify
Modify: crates/core/src/decode/host_error.rs
Modify: crates/core/src/types/report.rs
Modify: crates/core/src/decode/contract_error.rs
Modify: crates/core/src/decode/mod.rs
Expected result
Developers running high throughput automation scripts will be able to utilize Grat's brief or summary modes to monitor thousands of transactions in real time. The succinct, tightly aligned one liners will make scanning for anomalies as easy as reading a standard web server access log.
Contributor telegram group
https://t.me/+sII7WPhll2liMGNk
While deep, heavily formatted diagnostic reports are amazing for isolating complex bugs, they are far too verbose for high level monitoring. If a developer is running a massive test suite or watching a real time stream of hundreds of transactions, printing a 50 line diagnostic report for every single transaction will completely flood the terminal buffer and make the stream illegible. The core engine currently lacks a succinct, one liner abstraction for its error types.
Issues/what to fix
Every single HostError and DiagnosticReport variant must implement or update their summary() method/field. This is an architectural requirement for "Tier 1" display modes.
The implementation must distill the complex error down into an ultra concise, maximum 80 character string. For example, instead of outputting the entire resource matrix, the updated summary() for a budget error must simply output: [BUDGET] CPU Exceeded (105%). Instead of a massive stack trace for a contract panic, it must output: [CONTRACT] Panicked at C...A12: 'Insufficient Funds'. This requires careful string manipulation and truncation logic to ensure the critical context is preserved without ever exceeding the character limits.
Note: HostError already has a summary() method, but it needs to be rewritten to adhere to this new 80 character limit.
Files to create / modify
Modify: crates/core/src/decode/host_error.rs
Modify: crates/core/src/types/report.rs
Modify: crates/core/src/decode/contract_error.rs
Modify: crates/core/src/decode/mod.rs
Expected result
Developers running high throughput automation scripts will be able to utilize Grat's brief or summary modes to monitor thousands of transactions in real time. The succinct, tightly aligned one liners will make scanning for anomalies as easy as reading a standard web server access log.
Contributor telegram group
https://t.me/+sII7WPhll2liMGNk