Skip to content

fix(R3): Native LINE handler + exec allowlist + automated regression tests#2

Merged
Piboonsak merged 5 commits intomainfrom
fix/r3-line-exec-native-handler
Feb 28, 2026
Merged

fix(R3): Native LINE handler + exec allowlist + automated regression tests#2
Piboonsak merged 5 commits intomainfrom
fix/r3-line-exec-native-handler

Conversation

@Piboonsak
Copy link
Owner

R3 Production Fixes - All 6 Root Causes Resolved

Root Causes Fixed

RC Issue Fix Applied
RC-1 Exec blocked ("Approval required") askFallback: "allowlist" + deploy.sh applies exec config
RC-2 HTTP 499 on LINE webhooks Nginx /line/ → port 18789 (native async handler)
RC-3 No embeddings (memorySearch unavailable) Added memorySearch.provider: "openai" config
RC-4 Session bloat 837KB/232 entries deploy.sh clears LINE sessions >50KB
RC-5 Container restart killed responses Stabilized deploy sequence with post-deploy steps
RC-6 Native handler running but unused Same as RC-2 — Nginx routes to native handler

Changes (3 commits, 7 files)

Commit 1: fix(r3): native LINE handler, exec allowlist, embeddings config

  • config/openclaw.prod.json5: askFallback: "allowlist" + memorySearch section
  • docker/nginx/openclaw.conf: /line/ → 18789, /line-bridge/ → 5100 (fallback)
  • docker/deploy.sh: Post-deploy: clear sessions, apply exec/embeddings config, update nginx, increase flask timeout

Commit 2: test(r3): add 17-check automated regression test suite

  • tests/r3-regression-tests.sh: Deterministic checks (config values, exec smoke tests, LINE webhook, nginx routing, session cleanup)

Commit 3: ci(r3): GitHub Actions pipeline with 3-retry auth, automated tests

  • .github/workflows/docker-build-push.yml: 3-retry Docker Hub auth with actionable error
  • .github/workflows/deploy-vps.yml: SCP test scripts, run 22 automated checks, upload artifacts on failure
  • docs/CI-CD-WORKFLOW.md: Full GitHub Actions pipeline documentation

Automated Verification (22 checks)

All checks run automatically in deploy-vps.yml:

  • 6 checks: Exec config (security, askFallback, safeBins, host)
  • 1 check: Embeddings provider (openai)
  • 2 checks: Exec smoke tests (date, whoami)
  • 1 check: LINE webhook HTTP 200
  • 2 checks: Nginx routing (/line/ → 18789, /line-bridge/ → 5100)
  • 1 check: Session cleanup (no files >50KB)
  • 1 check: Flask bridge health
  • 8 checks: Infrastructure (volumes, config, env vars, timezone, health, errors)

Deployment Flow

  1. Merge PR → main
  2. docker-build-push.yml auto-builds + pushes piboonsak/openclaw:latest
  3. deploy-vps.yml auto-deploys to VPS
  4. Post-deploy: clear sessions, apply configs, reload nginx, update flask
  5. Run 22 automated regression tests
  6. ✅ Pipeline green = all fixes verified

Related

  • Investigation report: D:\01_gitrepo\Openclaw\docs\R3-investigation-report.md
  • Test results: R3 test (6/6 FAILED) → All root causes identified with evidence

…-B requirement

- copilot.instructions.md: replace §9 with full Fix Execution Protocol (§9.1-9.6)
  including Tier-0 log gate, pre-code-review declaration, test-fail loop, plan-B mandate
- tiered-debug-sop.md: add §1.5 Tier-0 Mandatory Log Snapshot + Pre-Code-Review Gate;
  §6.2 pre-code-review step; §8.1a Test-Fail Loop; §8.6 version bump to 1.1.0
- CI-CD-WORKFLOW.md: add Pre-Deploy Debug Gate section with pre-merge checklist
  and Auto-Test Failure Protocol; update Change Log

Closes repeat-issue root causes: no log review before fix, no Plan B defined,
test failures not looped back to log investigation.
Require all secrets/API keys to be confirmed available during Plan Mode
before any implementation begins. Prevents mid-execution blocking on
missing DOCKER_HUB_TOKEN, SSH key, OPENROUTER_API_KEY, LINE secrets, etc.

Rule: ASK ONCE (consolidated) during planning — never mid-implementation.
@Piboonsak Piboonsak merged commit c5dd526 into main Feb 28, 2026
2 of 9 checks passed
@Piboonsak Piboonsak deleted the fix/r3-line-exec-native-handler branch February 28, 2026 15:50
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