Skip to content

Add tim80411/line-connect (Community Fix) v0.10.0 - #2839

Open
tim80411 wants to merge 2 commits into
langgenius:mainfrom
tim80411:add-line-connect-community-fix
Open

Add tim80411/line-connect (Community Fix) v0.10.0#2839
tim80411 wants to merge 2 commits into
langgenius:mainfrom
tim80411:add-line-connect-community-fix

Conversation

@tim80411

@tim80411 tim80411 commented Aug 8, 2026

Copy link
Copy Markdown

Plugin Submission

Plugin information

Submission type

  • New plugin
  • Version update

What changed

Community fork of DomT00T/line-connect (MIT, attribution preserved in LICENSE/README) — a LINE Official Account ↔ Dify bridge endpoint plugin. This fork fixes the recurring "conversation resets to the greeting message" bug (upstream issue #1, reproduced again on 2026-08-05 on the latest upstream v0.9.7; upstream has had no commits for ~4 months):

  1. Early conversation_id persistence — the cid is saved to plugin storage the moment the first SSE chunk reveals it, instead of after the full response. An interrupted stream no longer orphans the Dify conversation.
  2. Error-classified retry — transient failures (network errors, 5xx) retry over the blocking transport and keep the conversation ID; the ID is dropped only when Dify explicitly responds Conversation Not Exists (4xx). Upstream dropped the cid after any two consecutive errors, silently resetting the conversation.
  3. Per-event-key webhook dedup — one existset storage key per webhook event replaces the shared read-modify-write JSON list, removing the race under LINE webhook redelivery.

All other functionality (admin dashboard, media, auto-reply, i18n) is unchanged from upstream v0.9.7.

Risk level

  • Low risk
  • Medium risk
  • High risk

Required checks

  • I have read and followed the Marketplace submission requirements.
  • I have read and comply with the Plugin Developer Agreement.
  • I tested this plugin on Dify Community Edition and Dify Cloud, or documented any limitation below.
  • The package contains only files needed at runtime.
  • The package does not contain secrets, local credentials, .env files, .git directories, virtual environments, caches, logs, or IDE files.
  • The package does not contain executables or bundled binaries, or I explained why they are required below.
  • The plugin README includes setup steps, usage instructions, required APIs or credentials, connection requirements, and the source repository link.
  • The plugin includes PRIVACY.md or a hosted privacy policy, and manifest.yaml references it.
  • All user-facing text is primarily in English, with any localized README files following the i18n guidance.

Security and privacy notes

Same surface as upstream v0.9.7: handles LINE webhook events (user messages, media) and forwards them to the configured Dify app; verifies X-Line-Signature (HMAC-SHA256); credentials are provided only via endpoint settings. No command/code execution, no SQL, no arbitrary URL fetching. PRIVACY.md updated with this fork's contact. No new data collection compared to upstream.

Local validation

  • Packaged with dify-plugin-darwin-arm64 v0.6.10: plugin packaged successfully (4.0 MB, 41 files; verified no .git/tests/state files included).
  • Behavior tests (mocked transports) 6/6 pass: transient error → blocking retry with same cid; double transient → raise with cid kept; Conversation Not Exists → new conversation; on_cid fires on first SSE chunk; on_cid silent when cid unchanged; on_cid survives a cut stream with partial answer.
  • py_compile + endpoint import check against dify_plugin==0.2.4 (Python 3.12) pass.

Reviewer notes

  • Testing limitation (per the checks above): the three fixes are logic-level changes validated by the mocked-transport tests listed under Local validation; this exact build has not yet been run end-to-end on Dify Cloud/CE with a live LINE channel. The base (upstream v0.9.7) is already listed on the Marketplace.
  • Known limitation inherited from the runtime: the webhook is still processed synchronously before acking LINE, so LINE's 2-second-timeout notice can still appear for slow Dify apps. Documented in README and CHANGELOG.
  • Naming: label is "LINE Connect (Community Fix)" and the description marks it as a community fork, to keep it clearly distinguishable from the original DomT00T/line-connect listing. Happy to rename if reviewers prefer a different convention for forks.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BPwktbNWybDa1easvkqoEu

@github-actions github-actions Bot added the risk: low Low-risk Marketplace submission label Aug 8, 2026

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Request Changes

Decision: Request changes

Failed Checks

Check Status Detail Required action
README language ❌ Fail README.md CJK ratio=0.1% (zh=5, en=7914, allowed_zh<=0); Chinese characters are not allowed. Use multilingual README guidance: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
Dependency install ❌ Fail Command failed (1): /var/folders/c5/ssq8b54n0rj6rbmghy7_2xdm0000gn/T/pr-review-helper-ftj3dmo4/.venv/bin/pip install -r /var/folders/c5/ssq8b54n0rj6rbmghy7_2xdm0000gn/T/pr-review-helper-ftj3dmo4/unpacked_plugin/requirements.txt error: subprocess-exited-with-e… Ensure requirements.txt installs successfully in a clean environment.
dify_plugin version ❌ Fail dify_plugin must be installed and >= 0.9.0, but it was not found. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ❌ Fail Command failed (1): /var/folders/c5/ssq8b54n0rj6rbmghy7_2xdm0000gn/T/pr-review-helper-ftj3dmo4/.venv/bin/python /var/folders/c5/ssq8b54n0rj6rbmghy7_2xdm0000gn/T/pr-review-helper-ftj3dmo4/toolkit/validator/test-plugin-install.py -d /var/folders/c5/ssq8b54n0rj6… Fix the plugin so test-plugin-install.py passes.

Full Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=3550, ignored_zh=0, allowed_zh<=0) None.
Project structure ✅ Pass All expected files present: manifest.yaml, README.md, PRIVACY.md. _assets/: yes. None.
Manifest author ✅ Pass author is valid. None.
Icon validation ✅ Pass icon exists: _assets/icon.svg None.
Version check ✅ Pass version 0.10.0 is available. None.
README language ❌ Fail README.md CJK ratio=0.1% (zh=5, en=7914, allowed_zh<=0); Chinese characters are not allowed. Use multilingual README guidance: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
PRIVACY.md ✅ Pass PRIVACY.md exists and is non-empty. None.
Dependency install ❌ Fail Command failed (1): /var/folders/c5/ssq8b54n0rj6rbmghy7_2xdm0000gn/T/pr-review-helper-ftj3dmo4/.venv/bin/pip install -r /var/folders/c5/ssq8b54n0rj6rbmghy7_2xdm0000gn/T/pr-review-helper-ftj3dmo4/unpacked_plugin/requirements.txt error: subprocess-exited-with-e… Ensure requirements.txt installs successfully in a clean environment.
dify_plugin version ❌ Fail dify_plugin must be installed and >= 0.9.0, but it was not found. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ❌ Fail Command failed (1): /var/folders/c5/ssq8b54n0rj6rbmghy7_2xdm0000gn/T/pr-review-helper-ftj3dmo4/.venv/bin/python /var/folders/c5/ssq8b54n0rj6rbmghy7_2xdm0000gn/T/pr-review-helper-ftj3dmo4/toolkit/validator/test-plugin-install.py -d /var/folders/c5/ssq8b54n0rj6… Fix the plugin so test-plugin-install.py passes.
Packaging test ✅ Pass packaging check passed. None.

Next steps

Please address these issues and push an update.

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Request Changes

Decision: Request changes

Failed Checks

Check Status Detail Required action
README language ❌ Fail README.md CJK ratio=0.1% (zh=5, en=7914, allowed_zh<=0); Chinese characters are not allowed. Use multilingual README guidance: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
dify_plugin version ❌ Fail dify_plugin version must be >= 0.9.0; found 0.2.4. Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Full Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=3550, ignored_zh=0, allowed_zh<=0) None.
Project structure ✅ Pass All expected files present: manifest.yaml, README.md, PRIVACY.md. _assets/: yes. None.
Manifest author ✅ Pass author is valid. None.
Icon validation ✅ Pass icon exists: _assets/icon.svg None.
Version check ✅ Pass version 0.10.0 is available. None.
README language ❌ Fail README.md CJK ratio=0.1% (zh=5, en=7914, allowed_zh<=0); Chinese characters are not allowed. Use multilingual README guidance: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
PRIVACY.md ✅ Pass PRIVACY.md exists and is non-empty. None.
Dependency install ✅ Pass requirements installed successfully. None.
dify_plugin version ❌ Fail dify_plugin version must be >= 0.9.0; found 0.2.4. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ✅ Pass plugin install test passed. None.
Packaging test ✅ Pass packaging check passed. None.

Next steps

Please address these issues and push an update.

@crazywoola
crazywoola dismissed stale reviews from themself August 10, 2026 09:56

Superseded by a fresh full review of all open PRs on 2026-08-10.

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Request Changes

Decision: Request changes

Failed Checks

Check Status Detail Required action
README language ❌ Fail README.md CJK ratio=0.1% (zh=5, en=7914, allowed_zh<=0); Chinese characters are not allowed. Use multilingual README guidance: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
dify_plugin version ❌ Fail dify_plugin version must be >= 0.9.0; found 0.2.4. Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Full Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=3550, ignored_zh=0, allowed_zh<=0) None.
Project structure ✅ Pass All expected files present: manifest.yaml, README.md, PRIVACY.md. _assets/: yes. None.
Manifest author ✅ Pass author is valid. None.
Icon validation ✅ Pass icon exists: _assets/icon.svg None.
Version check ✅ Pass version 0.10.0 is available. None.
README language ❌ Fail README.md CJK ratio=0.1% (zh=5, en=7914, allowed_zh<=0); Chinese characters are not allowed. Use multilingual README guidance: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
PRIVACY.md ✅ Pass PRIVACY.md exists and is non-empty. None.
Dependency install ✅ Pass requirements installed successfully. None.
dify_plugin version ❌ Fail dify_plugin version must be >= 0.9.0; found 0.2.4. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ✅ Pass plugin install test passed. None.
Packaging test ✅ Pass packaging check passed. None.

Next steps

Please address these issues and push an update.

@crazywoola

Copy link
Copy Markdown
Member

Hi @tim80411 — thanks for preparing this community fix! Two small blockers remain: the root README.md contains 5 Chinese characters, which should follow the multilingual README guidance, and the package uses dify_plugin 0.2.4 instead of the required >=0.9.0. Please update and repack the plugin, and we will be happy to re-review it. 🙏

@tim80411

Copy link
Copy Markdown
Author

@crazywoola thanks for the review. I'll update it ASAP

- Root README.md is now English-only; translations moved to
  readme/README_zh_Hans.md, readme/README_ja_JP.md, readme/README_th_TH.md
  per the Dify multilingual README layout.
- requirements.txt: dify_plugin>=0.9.0,<0.11.0 (was ~=0.2.1), with
  Werkzeug>=3.1.8 and requests>=2.33.1 to satisfy the SDK's floors.
  Verified against dify_plugin 0.10.2 on Python 3.12.
- Package no longer carries .pytest_cache/, .gitignore or .difyignore.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WC5ZZrs3jEosnP1Ecxm3Jy

Copy link
Copy Markdown
Member

Hi @tim80411 — here is the current CI summary for commit e64459f.

❌ Blocking errors

  • The secret scanner flags assignments at:

    • core/line_api.py:42,71
    • core/admin_api.py:96,97,105,114,128,132,930,991
    • endpoints/line.py:70,71
    • endpoints/dashboard/app.js:106

    Please verify whether these are false positives; otherwise remove embedded secrets or avoid propagating credential values through ordinary assignments.

  • manifest.yaml is missing the required repo and contact fields.

⚠️ Warnings / review items

  • Add the recommended meta.minimum_dify_version field.
  • Possible secret-field references need review:
    • core/line_api.py:34,71,78,94,108,122,137,159,169
    • core/admin_api.py:24,99,102,107,111,124,129,373
    • core/dify_api.py:46
    • endpoints/line.py:126,191,263,341,401,575
    • endpoints/dashboard/app.js:361,443,449
    • docs/admin-login.png was skipped because it exceeds 1 MiB.
  • Werkzeug>=3.1.8 and requests>=2.33.1 have lower-bound-only constraints.
  • Sensitive-capability review:
    • Filesystem reads at endpoints/admin.py:11,13,15.
    • Arbitrary network requests at core/line_api.py:80,96,110,125,150,160,172 and core/dify_api.py:113,169.
  • Python-safety review: credential-like values may be returned at core/admin_api.py:121 and core/dify_api.py:69,77,87,89.
  • The financial-activity scanner flagged core/storage.py:24 because the text contains “without transactions”; this looks like a likely false positive, but it still needs review.
  • Workflow infrastructure warning (not caused by this PR): checkout/setup-python still target deprecated Node.js 20 and are being forced onto Node.js 24.

Open the failed pre-check-plugin job

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

Labels

risk: low Low-risk Marketplace submission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants