Skip to content

feat(telegram): guest mode deliver_<token> media flow - #3

Closed
elphamale wants to merge 1 commit into
feat/guest-two-phase-reply-cleanfrom
feat/guest-media-delivery-clean
Closed

feat(telegram): guest mode deliver_<token> media flow#3
elphamale wants to merge 1 commit into
feat/guest-two-phase-reply-cleanfrom
feat/guest-media-delivery-clean

Conversation

@elphamale

Copy link
Copy Markdown
Owner

Summary

Test plan

  • New tests/tools/test_guest_mode_tool.py — token mint/resolve/expiry coverage
  • Extended tests/gateway/test_telegram_guest_reply.py with media-button OPC, valid-token, and expired-token branch tests
  • Updated the three _make_adapter() test helpers for the new _guest_turn_media/_guest_file_id_cache instance attributes
  • Full tests/ -k telegram suite passes with no new regressions vs. a clean main baseline

🤖 Generated with Claude Code

Stacked on the two-phase reply foundation. Adds a token-backed staging
flow for media in guest chats: native send_* wrappers stage files to
TELEGRAM_HOME_CHANNEL to mint a Telegram file_id, on_processing_complete
mints a short-lived deliver_<token> and edits the stub with a "tap to
receive" button, and a new deliver_<token> query branch in
_handle_guest_message_update answers immediately with the cached media
(or a "something went wrong" result if the token is invalid/expired).

tools/guest_mode_tool.py holds the token store (mint_token/resolve_token,
10-minute TTL, non-consuming resolve so repeat taps still work).
@elphamale

Copy link
Copy Markdown
Owner Author

Reopening directly against NousResearch/hermes-agent:main instead — stacking via a fork-internal base branch wasn't necessary. See replacement PR.

@elphamale elphamale closed this Jul 1, 2026
elphamale pushed a commit that referenced this pull request Jul 25, 2026
…d curator

The skill-authoring guide and curator prompt both reference
descriptions as the primary discovery mechanism but never mentioned
the 57-char system prompt truncation. Add explicit guidance:

- Authoring guide: frontmatter docs, template comment, size limits,
  pitfall #3 with good/bad examples, verification checklist
- Curator prompt: parenthetical noting the 57-char window when
  writing umbrella skill descriptions
elphamale pushed a commit that referenced this pull request Aug 3, 2026
… (re-review #3)

The last_activity_at/description/provenance columns already live in
SCHEMA_SQL and the column reconciler; existing DBs heal via the
reconciler, but the version stamp must advance so downgrade/upgrade
tooling sees the new layout. No version-literal test assertions exist
(tests compare against the imported constant).
elphamale pushed a commit that referenced this pull request Aug 20, 2026
…age_id)

Live-canary finding #3 (Alice, staging): the relay inbound leg is
at-least-once. On WS re-handshake the connector replays its durable
per-instance buffer; a long multi-tool turn (60-100s) straddling a quiet
socket drop got its ORIGINAL inbound replayed after the turn finished,
re-running the entire turn — the user saw the final answer posted 2-5x
(each a separate execution, hence slightly different texts). Receipts:
same msg text at history=0 in back-to-back sessions 121647/121840, no
Slack-side retry on the connector (envelope dedupe never fired).

Consumer-side idempotency: bounded FIFO seen-set (512) keyed by platform
message identity; events without a message_id never dedupe (fail-open —
dropping a real message is worse than rerunning one). No wire change;
contract v1 untouched.

Transplanted-from: victor-fork/feat/relay-slack-live-cards@73ce04ae75 (extracted for the rc.4 relay-fixes train; tests moved to a standalone file with no live-cards dependencies)
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