Repository navigation
fix(cli): no panic on a malformed strand header; explain lists wrapped readings - #95
Draft
BitmapAsset wants to merge 6 commits into
Draft
BitmapAsset wants to merge 6 commits into
BitmapAsset wants to merge 6 commits into
Conversation
This branch has not been deployed
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.
Two fixes to how
probbit live verifyandprobbit explainanswer damaged or unusual strands, a test that damages astrand one place at a time, and the documented exit codes of
explain. No change to strand formats, digests or theoutput for a healthy strand.
Stacked on #94 (
fix/plugin-checkpoint-tail).probbit-persona/src/persona.rs). When a state'spersona.digestdoesnot match the persona, the error message showed its first 19 bytes. A digest with a multi-byte character at that
offset (for example ten
é) madelive verifyandexplainpanic (exit 101). The message now cuts bycharacters; both commands exit 1 and name the mismatch (
live verifyandexplain --jsonprint it as a JSONdocument). This was in 0.14.0 too.
probbit-cli/tests/damaged.rs). The test writes a small strand with the engine (thesensed example's first 3 events, a checkpoint after the 2nd: 5 lines) and makes every variant with one damage: each
string value of each line set to ten
é, to""and to"x", and each line cut in the middle. That is 467variants; each goes through
live verify,explain --event 1andexplain --event 3(1,401 runs, about 7 secondson a debug build). Every run must exit 0, 1, 2 or 5 with one JSON document on stdout; a run that panics, dies of a
signal or takes longer than 20 seconds fails the test. The variant count is capped at 600 with an even stride. With
the digest fix reverted the sweep reports exactly three failures, all the panic above; with it, none.
explainlists wrapped Boolean sense readings (probbit-cli/src/explain.rs). A reading may be bare(
"tool_fail": true) or wrapped ({"v": true, "src": "env:runner"}, docs/persona.md section 2.11;vandsrcarethe only keys the engine accepts).
explainlooked for a keyvalue, so a wrapped Boolean was missing fromflags. It readsvnow; a test checks both forms and fails without the fix.explain's exit codes as they behave (CHANGELOG, docs/CHEATSHEET.md).1: the selected event, or a line beforeit, does not recompute, as
live verifyreports it (a changed digest, a broken chain, inputs of an earlier eventthat the engine rejects, a damaged copy of the sealing line in a segment file).
2: a bad flag or out-of-range--event, an unreadable file, a line that is not JSON or an event line without its fields, or inputs of theselected event that the engine rejects. The behaviour is unchanged; the text said "1 differs, 2 bad input". The
command's help lists no exit codes, so the help and the man page are unchanged.
Validation on the host (macOS arm64), run on this branch's Rust code and tests before its last rebase (the rebase
changed only the plugin below it, in #94):
cargo test --offline -p probbit-cli: 308 passed, 0 failed, 3 ignored (305 before; 3 new tests).cargo test --offline -p probbit-persona: 81 passed, 0 failed, 1 ignored (at the commit with the digest fix;later commits touch no persona code).
npm testagainst this branch's release build: 165 tests (from fix(openclaw): read a strand's tail past checkpoint lines; pause a sealed lane #94); the only failures seen were the known 500 msspawn-budget timing tests.
scripts/generate_llms_full.py --checkpasses.