Skip to content

logging

LoFi edited this page Jan 26, 2026 · 1 revision

LoFi Gate Logging

πŸ“ Location

The log file is always located adjacent to the lofi_gate.py script:

./verification_history.md

Note

For Humans, Not Machines This log is designed for Human Readability. It uses Markdown formatting, emojis, and interactive HTML elements found in GitHub-flavored Markdown. It is not intended to be parsed by CI tools (use the standard console exit codes for that).

This file is a "Append-Only" log that tracks the history of your verification runs. It automatically rotates (keeps the last 200 lines) to prevent bloat.

πŸ“ The Format

Each entry is a highly readable Markdown list item:

- **[TIMESTAMP]** [COMMAND] βœ… **Label**: STATUS (Duration) (Metrics)
  • TIMESTAMP: When the check ran.
  • COMMAND: The exact command executed (e.g., [npm test], [cargo audit]).
  • Label: Functional name of the check (e.g., "Test Suite").
  • STATUS: PASS or FAIL.

πŸ” Smart Error Truncation

When a test fails, LoFi Gate captures the error output but truncates the middle section if it's too long. This saves thousands of tokens when an agent reads the log.

To keep the log clean, these errors are wrapped in Interactive Dropdowns:

πŸ” View Truncated Error
Error: Something exploded in the core reactor.
...
... [Truncated 12,000 chars] ...
...
Final memory dump: 0xDEADBEEF

Click the arrow to expand the details only when you need them.

πŸ“Š The "Sticky" Footer

At the bottom of the log file, you will always find the Cumulative Metrics:

πŸ“Š Total Token Size: 3625 | πŸ’° Total Token Savings: 2996

  • Total Token Size: The amount of text (tokens) generated by your tools currently in the log.
  • Total Token Savings: The amount of text avoided (deleted) by the Smart Truncation engine. This number represents "noise" that did not pollute your Context Window.

Clone this wiki locally