Skip to content

fix(mentions): present and callable is still not working - #848

Merged
lilyshen0722 merged 1 commit into
mainfrom
fix/cue-covers-silent-empty-reader
Aug 5, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
fix/cue-covers-silent-empty-reader

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

The read cue handles two states — you have no reader, or the call fails. There is a third, and it's the one that makes an agent say something specific and false.

Evidence

Probed against the gateway deployed today (934df6de), after the rebuild that finally put the extractors in the image:

markitdown probe.ts   → exit 0, correct content
markitdown real.png   → exit 0, ZERO bytes      (valid PNG, magic bytes asserted)

The image runs pip3 install markitdown pypdf with no extras, so there is no image converter and markitdown succeeds at producing nothing. Nothing throws, nothing is missing, the status code is 0.

An agent handed "" does not conclude "I can't read images." It concludes the image is blank, and reports that confidently to whoever uploaded it.

The change

-on openclaw runtimes. If you have neither, or the call fails, you have no working reader
-here: say so and ask whoever posted it to paste the content inline, rather than hunting
-for another name.
+on openclaw runtimes. If you have neither, or the call fails, or it returns nothing, you
+have no working reader here: say so and ask whoever posted it to paste the content inline,
+rather than hunting for another name or reporting the file as empty.

The second clause is doing real work. "you have no working reader" alone does not stop an agent that believes it succeeded — it has to be told that the specific conclusion "the file is empty" is the wrong one.

Cost, stated: a genuinely-empty attachment now gets a false "I couldn't read it." Deliberate trade — an empty upload is rare, a format outside the extras is not, and only one of those two errors is silent.

Scope

The other half is upstream: pip3 install markitdown[all] in the openclaw Dockerfile. That needs a PR there plus a pin bump, so it inherits the whole lineage problem documented in CLAUDE.md. This half protects agents while that is outstanding, and is worth having regardless — extras will never cover every format either.

Method note

The first run of this probe used random bytes as the .png — an invalid fixture that could itself explain an empty result. Discarded and re-run with a base64 1×1 PNG asserting magic bytes in the probe. The result held.

Test

agentMentionService + guard   87 pass
verify:moltbot-tools          exit 0 — 6 required, all declared at 70bd82b8

Two assertions added to the existing skip-clause test (returns nothing, reporting the file as empty), alongside the or the call fails one from #842.

Not verified: whether markitdown[all] would extract anything useful from a real screenshot versus EXIF noise. I tested a 1×1 pixel, which proves the empty-return path exists and says nothing about extraction quality.

🤖 Generated with Claude Code

The read cue handles two states — you have no reader, or the call fails. There
is a third, and it is the one that produces a confident false statement.

Probed against the deployed gateway (934df6d) after today's rebuild:

  markitdown probe.ts   exit 0, correct content
  markitdown real.png   exit 0, ZERO bytes

The image runs `pip3 install markitdown pypdf` with no extras, so there is no
image converter and markitdown succeeds at producing nothing. Nothing throws,
nothing is missing, the status code is 0. An agent handed "" does not conclude
"I cannot read images" — it concludes the image is blank, and says so.

So the cue now reads "or it returns nothing" and, specifically, "rather than
hunting for another name or reporting the file as empty". The second clause
names the actual false statement being prevented; a vaguer "you have no reader"
does not stop an agent that believes it succeeded.

Cost: a genuinely-empty attachment gets a false "I could not read it". That
trade is deliberate — an empty upload is rare, a format outside the extras is
not, and only one of the two errors is silent.

The other half of the fix is upstream: `pip3 install markitdown[all]` in the
openclaw Dockerfile, which needs a PR there plus a pin bump and so inherits the
lineage problem. This half protects agents while that is outstanding.

First probe of this used random bytes as the .png — an invalid fixture that
could itself explain an empty result. Discarded and re-run with a base64 1x1
PNG asserting magic bytes; the result held.

Co-Authored-By: Claude Opus 5 <[email protected]>
@lilyshen0722
lilyshen0722 merged commit 4e57aa8 into main Aug 5, 2026
11 checks passed
@lilyshen0722
lilyshen0722 deleted the fix/cue-covers-silent-empty-reader branch August 5, 2026 20:30
lilyshen0722 added a commit that referenced this pull request Aug 5, 2026
AX audit entry 16. Investigating silent-empty extraction turned up three
failure shapes that all return ok: true, escalating in how much each
resembles success — and each defeating the guard the previous one suggests.

The finding that matters came from the control, not the probe. officecli
emits a per-paragraph XPath prefix unconditionally, so the empty-document
output was the ordinary format with nothing after it. extracted reaches
`text` unmodified: every successful Office read has returned structural
markup interleaved with content since the feature shipped.

Also records why #848's cue cannot cover this, so the next person does not
reach for a fourth edit to that line.

Refs #851, #846.

Co-authored-by: Claude Opus 5 <[email protected]>
lilyshen0722 added a commit that referenced this pull request Aug 5, 2026
…#853)

* docs(ax): a deployed cue fix does not reach the events already queued

AX audit entry 17. #848 was confirmed three ways — ancestor check, the string
in the running backend's dist/, and a peer reading the new wording in their own
delivered frame. All three correct, and a redelivered event still arrived
carrying the original text.

payload.content is composed at enqueue and persisted, so the cue an agent reads
is the code as of enqueue time. Bucketing 400 chat.mention events found four
generations of the same instruction live at once, and 6 of 10 pending events
still carrying the pre-fix version after the deploy verified clean. The rolling
update also produced a 5.5-minute window where two replicas composed different
cue text concurrently.

Records the verification consequence: ancestor check + consumer receipt + a
queue scan for older generations, because the first two cannot see the tail.

Refs #848, #842.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(ax): calibrate entry 17 — the queued tail was incomplete, not wrong

All ten pending events were G2 or G3; none were G1. G2 already carries #842's
no-working-reader instruction and lacks only the `or it returns nothing`
clause, so tonight's stale tail delivered incomplete guidance rather than
false guidance.

The mechanism is the finding and it stands unchanged. Saying so keeps a real
structural discovery from borrowing urgency it hasn't got — the case to defend
against is the next fix that is a correction.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
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.

1 participant