Skip to content

Add opt-in Xquik publishing backend - #180

Open
kriptoburak wants to merge 1 commit into
fabston:masterfrom
kriptoburak:codex/add-xquik-twitter-backend
Open

Add opt-in Xquik publishing backend#180
kriptoburak wants to merge 1 commit into
fabston:masterfrom
kriptoburak:codex/add-xquik-twitter-backend

Conversation

@kriptoburak

@kriptoburak kriptoburak commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • Add an opt-in Xquik backend through TWITTER_BACKEND=xquik.
  • Preserve Tweepy as the default and accept the existing twitter alias.
  • Read the Xquik API key and connected-account selector from the environment.
  • Reuse the existing Twitter text cleanup for both publishing backends.
  • Send a unique Idempotency-Key for every automatic Xquik post.
  • Document setup and the current create-tweet API reference.
  • Add focused regression tests for both publishing paths.

Why

The bot already routes TradingView alerts to several destinations, including Twitter through Tweepy. The Xquik backend adds an optional API-key path for connected X accounts without changing existing installations. A unique idempotency key is required by the current Xquik write contract and prevents accidental request replay within an API call.

Validation

  • Installed the exact requirements.txt on Python 3.9.18
  • python -m unittest discover -s tests -p 'test_*.py' -v (5 tests)
  • black --check tests/test_handler.py
  • flake8 --ignore E501 config.py handler.py tests/test_handler.py
  • python -m py_compile config.py handler.py main.py tests/test_handler.py
  • Public Xquik create-tweet contract and links
  • Credential-literal scan
  • git -c core.whitespace=cr-at-eol diff --check
  • Clean rebuild on current master

The current PR is limited to the publishing integration. It does not change webhook proxy trust.

@kriptoburak
kriptoburak force-pushed the codex/add-xquik-twitter-backend branch from 2df7397 to bfcf8cb Compare July 20, 2026 00:51
@kriptoburak kriptoburak changed the title Add optional Xquik Twitter backend Add Xquik publishing and harden webhook proxy trust Jul 20, 2026
@github-actions

Copy link
Copy Markdown

It looks like this PR has been idle a while, so I am marking it as stale. Remove the label or comment if this is still being worked on.

@kriptoburak
kriptoburak force-pushed the codex/add-xquik-twitter-backend branch from bfcf8cb to 2a0d9c4 Compare August 19, 2026 02:23
@kriptoburak kriptoburak changed the title Add Xquik publishing and harden webhook proxy trust Add opt-in Xquik publishing backend Aug 19, 2026
@kriptoburak

Copy link
Copy Markdown
Author

This PR remains active. Current head 2a0d9c4 supersedes the earlier scope and is rebuilt on current master.

The unrelated proxy-trust changes and MCP copy are removed. The focused integration now includes the required unique Idempotency-Key, preserves Tweepy by default, and adds 5 passing tests for configuration, request shape, text cleanup, and both backend routes.

@kriptoburak

Copy link
Copy Markdown
Author

This contribution is still active. Current head 2a0d9c4c is mergeable/clean and includes the opt-in backend, README setup, and 5 focused regression tests. The documented Python 3.9 unit, Black, Flake8, compile, contract, secret-literal, and diff checks pass. Please remove the stale no-activity label when the automation rechecks it.

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