Skip to content

fix(hooks): a fold does not make the signal partial - #780

Merged
fajarhide merged 2 commits into
mainfrom
fix/775-partial-signal-is-the-distillers-claim
Sep 4, 2026
Merged

fix(hooks): a fold does not make the signal partial#780
fajarhide merged 2 commits into
mainfrom
fix/775-partial-signal-is-the-distillers-claim

Conversation

@fajarhide

@fajarhide fajarhide commented Sep 4, 2026

Copy link
Copy Markdown
Owner

The second half of #775. [Partial signal] says the pipeline recognised some of the output
and not all of it, which is a claim about the distiller, and it was being read off a route
computed from final_out after the ledger has folded it.

So a payload the distiller never touched could reach Soft on the strength of a fold and
collect a banner over an answer nothing was lost from.

Reproduced, after three earlier attempts failed. The failures were the useful part:
both my first fixtures folded the whole payload, which lands in Keep, so the banner
never fired. The condition needs a partial fold. Sixteen of forty lines seen earlier:

[OMNI: 16 lines already shown from tail -16 app.log, omni retrieve 5b3d90904b481957]
2026-09-04T10:16:00Z INFO  worker 16 finished batch 112 in 27ms
... 23 more lines, verbatim ...

[Partial signal]

The fold is announced and retrievable, the other 24 lines are present, and the reply calls
itself partial.

route is left exactly as it is: it describes the delivered reply, which is what the
accounting that reads it wants. Only the banner moves to the ratio it is a claim about.

The other door was checked rather than assumed. hooks::pipe runs its ledger at
pipe.rs:364, after the banner at :328, so its ratio is already the distiller's and it
never had this. That is written into the changelog so the next person does not go looking.

Verification: make ci green, smoke_test.sh 70/70, and the reproduction re-run against
the release binary, where the banner is gone and the fold survives. Break-tested: putting
the delivered route back fails the new test with the full reply printed.

Closes #775

Greptile Summary

This PR makes the post-tool partial-signal banner depend on the distiller’s pre-ledger compression ratio rather than the delivered reply’s post-fold ratio.

  • Separates banner classification from ledger-fold routing.
  • Adds a regression test for a partially folded 40-line response.
  • Documents the corrected behavior and why the pipe path is unaffected.

Confidence Score: 5/5

The PR appears safe to merge, with no actionable correctness or security issues identified.

The banner now reflects the distiller’s own reduction rather than a later ledger fold, while the existing delivered-route, guardrail, recovery, and passthrough behavior remains intact.

Important Files Changed

Filename Overview
src/hooks/post_tool.rs Correctly derives the partial-signal decision from the distiller output while preserving delivered-route accounting and adds focused regression coverage.
changelog.d/775b.fixed.md Accurately documents the false partial-signal condition, the fix, and the unaffected pipe path.

Reviews (1): Last reviewed commit: "docs(changelog): record the partial-sign..." | Re-trigger Greptile

…distiller

[Partial signal] says the pipeline recognised some of the output and not all of
it. That is a statement about the distiller, and it was being read off a route
computed from final_out, which the ledger has already folded.

So a payload the distiller never touched could land in Soft on the strength of
a fold and collect a banner over an answer nothing was lost from. Reproduced:
16 of 40 lines seen earlier, the fold announced with a handle, 24 lines
verbatim, and [Partial signal] underneath.

route is left alone. It describes the delivered reply and that is right for
the accounting that reads it. Only the banner moves to the ratio it is about.
@fajarhide
fajarhide merged commit 9456b1d into main Sep 4, 2026
14 checks passed
@fajarhide
fajarhide deleted the fix/775-partial-signal-is-the-distillers-claim branch September 4, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A ledger-folded payload gets an omitted-count on top of folds that already account for all of it, and a [Partial signal] banner over a complete answer

1 participant