Skip to content

fix: bug(gateway) - anchor startup error check to container start time#21

Merged
Piboonsak merged 1 commit intomainfrom
fix/issue-11
Mar 13, 2026
Merged

fix: bug(gateway) - anchor startup error check to container start time#21
Piboonsak merged 1 commit intomainfrom
fix/issue-11

Conversation

@Piboonsak
Copy link
Copy Markdown
Owner

Summary

Fixes gateway health check false positives from rolling log window.

Root Cause

The Gateway status check (no startup errors) test used docker logs --since=5m (a rolling 5-minute window from execution time). After each deploy/restart, the gateway logs 2 benign startup messages that contain Error substrings:

  1. allowPathPositionals — yargs CLI startup config warning
  2. Unknown config keys — openclaw config validation warning

These 2 lines caused the check to fail with Expected 0, Got 2 in CI immediately after container restart.

Fix

  • Replace --since=5m (rolling window) with --since=$keyword_since (anchored to container start time, consistent with existing KI-035 checks)
  • Add grep -v 'allowPathPositionals' and grep -v 'Unknown config keys' to exclude known false-positive startup patterns
  • Apply same $keyword_since anchor to No missing environment variable errors check

Files Changed

  • tests/regression-tests.sh — Gateway Health section updated

Fixes #11

Root cause: The 'Gateway status check (no startup errors)' test used
docker logs --since=5m (a rolling 5-minute window), which captures
normal gateway startup messages that contain 'Error' substrings
(specifically allowPathPositionals config warning and Unknown config
keys validation message). These 2 benign startup messages caused the
check to fail with 'Expected 0, Got 2'.

Fix:
- Use $keyword_since (container start time, already computed for
  KI-035 checks) instead of rolling --since=5m anchor
- Add grep -v exclusions for known false-positive startup patterns:
  * allowPathPositionals (yargs startup config warning)
  * Unknown config keys (openclaw config validation warning)
- Apply same fix to 'No missing environment variable errors' check

Fixes #11
@Piboonsak Piboonsak merged commit aa83bfa into main Mar 13, 2026
2 of 9 checks passed
@Piboonsak Piboonsak deleted the fix/issue-11 branch March 23, 2026 14:14
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.

bug(gateway): Investigate 2 startup errors during health check

1 participant