Skip to content

feat(inbox-notify): an urgent inbox item reaches the phone as a Signal poll, the vote runs its verb - #699

Merged
mboiman merged 2 commits into
bks-lab:mainfrom
avondiel-dev:contrib-inbox-notify-20261119
Nov 20, 2026
Merged

mboiman merged 2 commits into
bks-lab:mainfrom
avondiel-dev:contrib-inbox-notify-20261119

Conversation

@avondiel-dev

Copy link
Copy Markdown
Contributor

Closes the engine half of #449 (poll-first approval over Signal). The field report with the vote JSON and the three parallel implementations is in the issue comment of 2026-11-19.

Contribution

  • skills/inbox-notify/ (scope core): a notifier for the inbox. Each tick announces every open item with urgency now and a non-empty actions list once, as one text and one Signal poll whose options are the item's own actions, reads the channel, runs the vote through scripts/inbox.py (approve, reject, drop, close, defer), notes the result on the item and terminates the poll. A quoted reply to the poll releases the quoted text as the edited answer. A poll whose item was decided elsewhere (cockpit, terminal) is terminated. The only state is a note on the item.
    • scripts/inbox_notify.py (tick [--dry-run|--all], test, show), assets/channel.yaml and assets/workload.yaml (templates for infra/channels/<slug>.yaml and workflow/workloads/inbox-notify.yaml), references/setup.md (six steps and the trap list), tests/ (23 hermetic tests, signal-cli is a fake on PATH), run-tests.sh.
  • .github/workflows/validate.yml: runs that suite.
  • docs/commands.md, docs/where-things-live.md, docs/inbox.md (§ Who reads), docs/channels.md: one row or paragraph each.

Why

A held answer of a Bridge-Agent (inbox-approve.py: urgency now, actions approve/reject) waited unseen in the inbox until it expired. Three notifiers grew in three instances for the same gap; this is the generic one. Transport and config are the only instance-specific parts: the channel file carries the handles, labels and texts (English by default, any language per instance), the workload declaration the cadence.

Design points worth a look:

  • receive consumes: the tick is the account's only reader and holds a lock; a second tick exits 0. The workload template sets single_flight: true.
  • sendPollCreate refuses the positional u:<name>; the engine passes -u <name>.
  • Only a vote from the recipient the poll went to counts (uuid in the note). Unknown polls, withdrawn votes, other identities and already decided items do nothing but log.
  • inbox-approve.py maps a close to reject, so the poll always offers the item's real verbs.

Verified live today on signal-cli 0.14.5: the test item was announced at 22:30:13 local and the owner's vote executed at 22:30:51 in the same tick (approve event, both notes, poll terminated, confirmation sent).

Checklist

  • No absolute paths (the workload asset uses /path/to/bridge placeholders the setup replaces)
  • No secrets or credentials (handles only, optionally as file:// or env:// references)
  • No org-specific terms
  • Leak scanner clean (scripts/no-scrub-leak.py incl. own roster, 12 files)
  • Theme-compatible (no themed vocabulary; labels and texts come from the channel file)
  • YAML frontmatter has required fields (validate-skill-scope.py --check: 43 core skills valid)
  • check-commands-doc.py, check-where-things-live.py, test_scope_docs.py, measure-context.py green on this branch
  • DCO sign-off on the commit

🤖 Generated with Claude Code

…l poll, the vote runs its verb (bks-lab#449)

The inbox holds what needs a person, but nothing in it rings: a held answer of a
Bridge-Agent (inbox-approve.py, urgency now, actions approve/reject) waited unseen
until it expired, and three instances built three notifiers. This is the generic one.

- skills/inbox-notify (scope core): engine, channel and workload templates, setup.
  Each tick announces every open item with urgency `now` and a non-empty `actions`
  list once (one text, one poll whose options are the item's own actions), reads
  the channel, runs the vote through inbox.py (approve, reject, drop, close, defer),
  notes the result on the item, terminates the poll. A quoted reply releases the
  quoted text as the edited answer. A poll whose item was decided elsewhere is
  terminated. The only state is the note on the item.
- Transport signal-cli (polls from 0.14.5, render in a direct chat; `u:<name>` is
  passed as `-u <name>`, the positional form is refused by sendPollCreate).
  `receive` consumes, so the tick is the account's only reader and holds a lock.
- Config from infra/channels/<slug>.yaml, slug from inbox.notify_via; labels and
  texts overridable per channel, English by default.
- 23 hermetic tests with a fake signal-cli on PATH; CI step; docs rows.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Axel von Dielingen <avd@reinvent-it.de>
…949 files, skills 846)

check-figure-counts.py --write; the seven new files are skills/inbox-notify.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Axel von Dielingen <avd@reinvent-it.de>
@mboiman
mboiman merged commit f99138a into bks-lab:main Nov 20, 2026
20 checks passed
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.

2 participants