Skip to content

inbox-notify: a deferred item never returns, a quoted reply always releases, a failed poll resends the text every tick #700

Open

Description

@mboiman

Follow-up to #699 (merged). Review findings on skills/inbox-notify/scripts/inbox_notify.py that came in after the merge. The first two change what reaches a person, so they matter most.

1. A deferred item never comes back to the phone

A vote for defer writes notify decided defer via <channel> (L477). When the defer runs out, the item is open again, but tick() skips it because poll_of() still finds the old poll (L495). A vote on that old poll hits is_settled() and only terminates it (L451). From then on the item is silent on this channel, which is the opposite of "later".

https://github.com/bks-lab/open-bridge/blob/f99138a24/skills/inbox-notify/scripts/inbox_notify.py#L400-L402
https://github.com/bks-lab/open-bridge/blob/f99138a24/skills/inbox-notify/scripts/inbox_notify.py#L495

Expected: after the defer runs out, the item is announced again with a new poll. One way: on defer, note the poll as closed instead of decided, and let tick() announce an open item whose last poll is older than its last defer. No test covers defer today.

2. Any quoted reply releases the answer

Every quoted reply to a poll on an item with approve runs approve --text <reply> (L455-L461). A reply like "wait, not yet" or a question back would go out as the agent's answer to the other side.

https://github.com/bks-lab/open-bridge/blob/f99138a24/skills/inbox-notify/scripts/inbox_notify.py#L455-L461

Expected: an explicit marker before the reply counts as a release (for example a configurable prefix such as send:). Everything else is logged, or answered with one line saying how to release.

3. The text is sent again on every tick when the poll fails

When send_text succeeds and send_poll fails (signal-cli older than 0.14.5, or an item whose actions leave no known verb so the option list is empty), nothing is noted. The next tick sends the text again, every 120 s with the shipped workload.

https://github.com/bks-lab/open-bridge/blob/f99138a24/skills/inbox-notify/scripts/inbox_notify.py#L377-L382

Expected: a note after the text alone, or a retry cap, so a broken poll produces one text and one log line, not a stream. An item without any known verb should not be selected at all.

4. Smaller points

  • The docstring promises exit 1 on a transport failure, tick() always returns 0 (L504). A subprocess.TimeoutExpired in send_text, send_poll or terminate_poll is not caught. If it fires after the poll went out, the note is missing and the next tick announces the item a second time.
  • is_settled() matches via <channel> as a substring (L208), so a channel signal also matches notes of signal-bot.
  • After tick --all only the newest poll is indexed. Earlier polls stay live on the phone, and votes on them are logged as unknown.

Found in review, not reproduced live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:skillsTouches the skills/ directorybugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions