Repository navigation
Исправления оплаты, бота, подписок и кабинета / Payment, bot, subscription and cabinet fixes - #4
Open
reelsmaker2026 wants to merge 11 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Русский · English
Проверенный коммит / Verified commit:
aa006670a1f06014c7f43bcf70725d995dd7cdd3.Русский
Итог передачи — 10.10.2026
Готовые исправления и регрессионные тесты опубликованы в этом PR и переданы для ревью. Этап подготовки и передачи текущего пакета завершён; проверенный кандидат остаётся
aa006670a1f06014c7f43bcf70725d995dd7cdd3. Результаты bot/worker/node и восстановления прежнего QA-бота сохранены ниже с границами проверки.Остальные работы сохранены отдельным списком «На потом» в форке: 22 пожелания, незавершённые части багов, решения о правилах и внешняя приёмка. Они не входят в объём этой передачи; новая разработка не начинается. Ограничения ниже остаются открытыми, а не объявляются исправленными.
PR открыт для рассмотрения разработчиком. Слияние и выпуск — отдельные действия; production не изменялся.
Проблема
На исходной базе STEALTHNET
747c9da358264cb912f3ea49cd632978f7762dedнекоторые состояния оплаты, бота, подписки и кабинета показывают пользователю неверную информацию или теряют выбранное действие. Например: возврат после веб-оплаты ведёт в настроенную Mini App вместо кабинета; точная сумма19.99000000отклоняется; у завершённого счёта остаются действия оплаты; текст обращения, изменённый во время отправки первого сообщения, может потеряться.Предложение содержит полный проверенный кандидат: 27 файлов исходников и тестов. Первые шесть коммитов сохранены; добавлены пять коммитов по компонентам. Исправления относятся к upstream. Специфичные для PAVLINK изменения HWID, настройки SSH/umask и исправления тестовой обвязки сюда не входят.
Что изменилось
В кандидате есть исправления 19 зарегистрированных багов и ограниченные изменения ещё для двух. Независимость напоминаний и их дедупликация остаются нерешёнными: исправлен только текст даты и оставшихся дней. Отдельная метрика CPU utilization и её проверка при CPU/I/O-нагрузке Linux остаются открытыми: уточнены только подписи существующей нормализованной нагрузки. Правила периода, валюты и согласия для регулярных платежей, а также длительность подтверждения тревог и хранение их промежуточного состояния не изменялись. Проверка RollyPay sandbox отложена. Отдельный список пожеланий не входит в этот PR.
Связанные предложения в upstream
Прежние предложения автора форка остаются отдельными: upstream PR #2 и upstream PR #3. При сравнении их полных патчей на коммитах
9901a9ccc9901a8c908941842e246cfdbaad3ad9и7cb82a0c792f5e41213d2f3b65096f122d98ca85с этим кандидатом не найдено дублирующих исправлений, которые нужно исключить.web/app/app.js,web/app/customer-en.jsиweb/app/customer-ui.js. При интеграции необходимо сохранить и бесплатную активацию, и текст кнопки ручного счёта; оба набора переводов; отображение даты/года и поведение при отсутствии тарифа/переходе в помощь. Изменения общих файлов подписки, worker и справки находятся в разных участках.web/p-nodes.jsотличаются от уточнения подписей нагрузки в другом участке того же файла. Пробное объединение прошло без текстовых конфликтов; это не проверка совместной работы.Этот PR не включает, не заменяет и не объединяет эти предложения и не объявляет их проверенными. Опубликованный коммит кандидата и проверенные хеши исходников сохраняются; любая совместная интеграция требует отдельного ревью и тестирования.
Проверки
Финальный кандидат проверен в изолированных облачных окружениях 10 октября 2026 года. Это результаты отдельных запусков, а не утверждение о зелёном GitHub CI. Перед публикацией каждый изменённый файл побайтно сопоставлен с проверенным upstream-кандидатом; в копии для публикации повторно успешно выполнены 70 Node-тестов и 20 проверок Reality на синтетических данных. Отдельный стенд Reality остался локальным; в diff включены регрессионные тесты Rust и Node.
Проверялись указанная upstream-база и, отдельно для совместимости, PAVLINK
5c7e93e6d3593bfd2ed242a909b64c2bad6678dd:--include-ignored --test-threads=1; все 17 тестовых целей, требующих явного включения, действительно выполнены.devtools/tests/*.test.cjs: 70 успешно, 0 пропусков.make test-releaseтакже прошёл 72 Python-проверки, включая настоящее восстановление кабинета; его 16 Node-тестов профилей уже входят в 70 и повторно не суммируются.В этих финальных облачных тестах транспорт провайдера и Telegram имитировался на loopback: настоящих оплат и сообщений не было. Браузерные профили устройств не являются нативными iOS/Android WebView. Внешний checkout RollyPay, нативные VPN-клиенты и реальный VPN-трафик остаются отдельной приёмкой. PAVLINK использован только для проверки совместимости, не как база этого PR или источник дополнительных изменений.
Дополнительные проверки после установки
Те же финальные release-артефакты установлены в отдельный QA-слот с синтетическими данными на Ubuntu 24.04/PostgreSQL 16.15 после резервирования и фактического пробного восстановления. После установки прошли readiness и авторизованный доступ; подписанные локальные уведомления продлили доступ один раз, а три одновременных повтора не продлили его снова; 54 проверки Chromium подтвердили вход/сессию/возврат с сохранением исходного счёта; восемь состояний узкой вёрстки Firefox RU/EN и два сценария гонки отправки обращения с настоящим backend прошли успешно. Отдаваемые файлы кабинета совпадают с финальными исходниками. Один запрос с инструкциями приложений, соответствующий неизменённой финальной реализации
show_apps, принят Telegram для явно разрешённого тестового аккаунта; в том первоначальном проходе новый poller бота не запускался. Это не доказывает нативное VPN-подключение, внешний checkout провайдера или совместимость с другими ожидающими upstream-предложениями.Полный цикл bot/worker/node и восстановление QA-бота — 10.10.2026
Отдельный облачный QA-проход с синтетической БД закрыл семь ранее заблокированных сценариев с настоящим финальным ботом и действиями разрешённого тестового аккаунта в Telegram Web. Проверен кандидат
aa006670a1f06014c7f43bcf70725d995dd7cdd3: хеши фактически запущенных API/bot/worker/node соответствовали финальным release-артефактам и повторно сверены после перезапуска. Код и 27 опубликованных файлов не менялись./startобработан финальным ботом. Бесплатный тариф активирован настоящей кнопкой: один успешный счёт с нулевой суммой, один срок подписки и синтетический пользователь в конфигурации настоящего node, полученной через API./subи переход в поддержку.answerCallbackQueryи дваeditMessageText. Это подтверждение только этих двух callback, а не общая гарантия exactly-once.active → expired, node исключил пользователя из конфигурации, бот показал истечение. Совместный перезапуск лабораторных API/bot/worker/node сохранил число счетов, срок и expired; повторного события синхронизации не было. Подтверждены API health, авторизованный bootstrap node (HTTP 200) и свежий heartbeat.Итог нового прохода: 9 PASS / 0 FAIL / 2 BLOCKED, включая семь функциональных сценариев, передачу polling и восстановление. Отдельно выполнены 22/22 проверки доказательств. В совокупной функциональной матрице — 28 PASS и 2 BLOCKED: 21 прежний PASS сохранён как исторический результат, добавлены семь новых. Полный Rust/Node-набор и release-сборка в этом проходе заново не выполнялись; эти результаты не являются статусом GitHub CI.
Старый QA-бот восстановлен и проверен. Защитный таймер восстановления был включён до временной остановки. Старый poller остановлен до запуска финального; очередь не очищалась. После проверки финальный poller остановлен, обработанный offset передан обратно, прежний бот запущен с исходными executable, окружением и командами. Новый
/startполучил живой ответ; подтверждены свежий polling heartbeat и ровно один процесс бота с этим токеном. Защитный таймер отключён только после успешного возврата. Остальные прежние QA-службы не останавливались; проверки готовности кабинета и подписок вернули HTTP 200. Временные процессы API/bot/worker/node остановлены, тестовая сессия закрыта. Production не подключался и не изменялся.Что остаётся непроверенным:
QUEUE-SUCCESS-AMBIGUOUS: успешная/неопределённая доставка групповых уведомлений, включая потерю ответа после возможной доставки. Нужны отдельно разрешённая тестовая группа и управляемый транспорт; гарантия exactly-once не заявляется. Прежние проверки ошибок очереди и перезапуска не выдаются за повторённые.NATIVE-VPN: VPN-движок был локальным mock. Настоящий node/API подтверждает управление доступом и конфигурацией, но не реальный VPN-трафик, Xray или нативные мобильные/VPN-клиенты.pay_urlне проверялось заново ручным счётом; для него остаются только прежние регрессионные доказательства.Повторение опубликованных регрессий
Полный набор opt-in требует явно настроенных изолированных фикстур; обычный
cargo testпропускает ignored-тесты.SN_TEST_DATABASE_URLдолжен указывать на отдельную БДsn_audit_*с применёнными миграциями и синтетическими записями. Составному тесту Hosted также нуженSN_COMBINED_FIXTUREс локальными адресами API/кабинета и синтетическими ID аккаунта/тарифа в БДsn_audit_r3_web_*. Перед запуском проверьте защитные условия фикстур в каждом тесте. Не направляйте их в рабочую БД или к настоящему провайдеру. Обычная release-цель не запускает автоматически все добавленные Node-тесты; используйте явную маску файлов выше.Действия при обновлении
Миграции, Cargo.lock, установка и настройки не меняются. После ревью обновляйте затронутые бинарники и веб-ресурсы вместе штатным процессом выпуска. Этот PR не разворачивает изменения в production. Частичные исправления и перечисленные ограничения внешней приёмки остаются открытыми.
Скриншоты и состав публикации
Скриншоты приватных сессий и сырые журналы исключены. PR содержит только исходники и регрессионные тесты с синтетическими данными: без бинарников, архивов, баз данных, учётных данных, env-файлов, сессий, приватных аудитов и внутренних реестров.
English
Delivery status — 2026-10-10
The completed fixes and regression tests are published in this PR for maintainer review. Preparation and handoff of this package are complete; the verified candidate remains
aa006670a1f06014c7f43bcf70725d995dd7cdd3. The bot/worker/node results and restoration of the previous QA bot are preserved below with their verification boundaries.Further work is saved in the separate deferred backlog in the fork: 22 feature requests, incomplete bug work, behavior decisions and external acceptance. These are outside this handoff; no new implementation is being started. The limitations below remain open and are not being reported as fixed.
The PR remains open for maintainer review. Merging and releasing are separate actions; production was not changed.
Problem
On upstream
747c9da358264cb912f3ea49cd632978f7762ded, several payment, bot, subscription and cabinet states produce misleading messages or lose the user's intended next action. Examples include returning a web payment to the configured Mini App instead of the account, rejecting the exact amount19.99000000, offering payment actions for finished invoices, and losing a support draft edited while its first message is being sent.This updates the existing proposal to the complete tested candidate: 27 source/test files. The original six commits are retained, with five additional commits grouped by component. These are upstream fixes; PAVLINK-only HWID changes, SSH/umask configuration and test-harness fixes are not included.
Resulting behavior
This candidate contains code fixes for 19 reported bugs and limited changes for two others. Reminder independence/deduplication remains unresolved (only date/day wording is fixed). A separate CPU-utilization metric and Linux CPU/I/O acceptance remain unresolved (only labels for existing normalized load are corrected). Recurring-payment period/currency/consent policy and alert confirmation-duration/state policy are not changed. RollyPay sandbox validation is deferred. The separate wishlist is outside this PR.
Related upstream proposals
Existing proposals by this fork author remain separate: upstream PR #2 and upstream PR #3. Comparing their complete file patches at
9901a9ccc9901a8c908941842e246cfdbaad3ad9and7cb82a0c792f5e41213d2f3b65096f122d98ca85against this candidate found no duplicate fix to remove.web/app/app.js,web/app/customer-en.jsandweb/app/customer-ui.js. In particular, preserve both free-total activation and manual-invoice wording in the checkout button, both translation sets, and both date/year handling and no-plan/help behavior when integrating. Shared subscription, worker and help-file changes occupy distinct hunks.web/p-nodes.jsdiffers from this PR's normalized-load labels elsewhere in that file. The merge simulation is textually clean; it is not combined runtime acceptance.Neither proposal is included, superseded, merged or declared tested by this PR. The candidate's published commit and verified source hashes remain unchanged; any combined integration needs its own review and tests.
Validation
Final candidate checks completed in isolated cloud environments on 10 October 2026. These are local verification results, not a claim about GitHub CI. Before publication, every changed file was checked byte-for-byte against the tested upstream candidate; the publication copy also reran all 70 Node tests and 20 synthetic Reality assertions successfully. The standalone Reality harness remains local; committed regression tests are the Rust and Node tests in this diff.
On each tested base (upstream above, plus compatibility-only PAVLINK
5c7e93e6d3593bfd2ed242a909b64c2bad6678dd):--include-ignored --test-threads=1run; all 17 opt-in targets actually executed.devtools/tests/*.test.cjs: 70 passed, 0 skipped.make test-releasealso passed its 72 Python checks, including real cabinet recovery; its 16 Node profile tests are already included in the 70.Provider and Telegram transports were loopback mocks; no real payments or messages were sent by these final checks. Browser device profiles are not native iOS/Android WebViews. RollyPay external checkout, native VPN clients and actual VPN traffic remain separate acceptance work. PAVLINK is compatibility evidence only, not this PR's base or a source of extra changes.
Additional installed-candidate checks
The same final release artifacts were then installed in a separate synthetic QA slot on Ubuntu 24.04/PostgreSQL 16.15 after a verified backup and actual restore test. After installation: readiness and authenticated access passed; signed local notifications extended access once and three concurrent repeats did not extend it again; 54 Chromium login/session/return checks preserved the original invoice; eight Firefox RU/EN narrow-layout states and two real-backend support race scenarios passed. Served cabinet assets match the final source. One app-instruction payload from the unchanged final
show_appsimplementation was accepted by Telegram for the explicitly authorized test account; no new bot poller was started in that initial pass. This does not establish native VPN connectivity, external provider checkout, or compatibility with the other pending upstream proposals.bot/worker/node lifecycle and QA bot restoration — 10 October 2026
A separate cloud QA run with a synthetic database closed seven previously blocked scenarios using the actual final bot and actions from the authorized test account in Telegram Web. Candidate
aa006670a1f06014c7f43bcf70725d995dd7cdd3was checked: hashes of the running API/bot/worker/node executables matched the final release artifacts and were rechecked after restart. Source code and the 27 published files were unchanged./start. A real callback activated the free tariff: one successful zero-amount invoice, one subscription end date, and the synthetic user in the real node configuration fetched through the API./suband support navigation still worked afterward.answerCallbackQueryand twoeditMessageTextcalls were recorded. This is evidence for those two callbacks only, not a general exactly-once guarantee.active → expiredtransition, the node excluded the user from its configuration, and the bot displayed expiry. Restarting the laboratory API/bot/worker/node together preserved the invoice count, end date and expired state without a duplicate synchronization event. API health, authenticated node bootstrap (HTTP 200) and a fresh heartbeat were confirmed.New run: 9 PASS / 0 FAIL / 2 BLOCKED, comprising seven functional scenarios, polling handoff and restoration. Separately, 22/22 evidence assertions passed. The combined functional matrix is 28 PASS and 2 BLOCKED: 21 earlier passes retained as historical evidence plus seven new passes. The full Rust/Node suites and release build were not rerun during this pass; these results are not a GitHub CI status.
The previous QA bot was restored and verified. A recovery timer was armed before the temporary stop. The previous poller stopped before the final poller started; the queue was not cleared. After validation, the final poller stopped, the processed offset was handed back, and the previous bot restarted with its original executable, environment and commands. A fresh
/startreceived a live reply; a fresh polling heartbeat and exactly one bot process for that token were confirmed. The recovery timer was disabled only after successful restoration. Other existing QA services were not stopped; cabinet and subscription readiness returned HTTP 200. Temporary API/bot/worker/node processes were stopped and the test session was closed. Production was neither accessed nor changed.Still unverified:
QUEUE-SUCCESS-AMBIGUOUS: successful/indeterminate group-notification delivery, including a lost response after possible delivery. This needs a separately authorized test group and a controllable transport; no exactly-once guarantee is claimed. Earlier queue-failure/restart checks are not presented as rerun.NATIVE-VPN: the VPN engine was a local mock. The real node/API verifies access and configuration management, not actual VPN traffic, Xray or native mobile/VPN clients.pay_url; that still has only earlier regression evidence.Repeating the committed regressions
The full opt-in suite needs explicitly configured isolated fixtures; normal
cargo testskips ignored tests.SN_TEST_DATABASE_URLmust point to a separately migratedsn_audit_*database with synthetic fixture records. The combined Hosted test additionally requiresSN_COMBINED_FIXTUREwith local API/cabinet URLs and synthetic account/tariff IDs in asn_audit_r3_web_*database. Consult each test's fixture guards before running. Never target a live database or provider. The ordinary release target does not automatically run all added Node tests; use the explicit glob above.Upgrade actions
No migrations, Cargo.lock changes or installation/configuration changes. After review, update the affected binaries and web assets together using the normal release process. This PR does not deploy or modify production. The partial fixes and external acceptance limits above remain open.
Screenshots and publication contents
Private session screenshots and raw logs are omitted. The PR contains source and synthetic regression tests only: no binaries, archives, databases, credentials, environment files, session data, private audit reports or internal tracking tables.