#12803: fix(line): avoid false 'not configured' warnings for file/env token sources
channel: line
channel: voice-call
gateway
commands
size: S
Cluster:
Webhook Configuration and Resilience
## Problem
`collectStatusIssues`, `isConfigured`, and `describeAccount` only checked `channelAccessToken`/`channelSecret` string fields directly. When credentials were provided via `tokenFile`, `secretFile`, or environment variables (`tokenSource: "env"`/`"file"`), the status check falsely reported them as "not configured".
## Fix
Check `tokenFile`, `secretFile`, and `tokenSource` in addition to the direct string fields across all three functions:
- `isConfigured`
- `describeAccount`
- `collectStatusIssues`
## Changes
- **1 file changed**: `extensions/line/src/channel.ts`
Fixes #11094
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Fixes false "not configured" warnings when LINE credentials are provided via file or environment variables instead of direct config values. The PR updates `isConfigured`, `describeAccount`, `collectStatusIssues`, and `buildAccountSnapshot` to check `tokenSource` in addition to the direct string fields.
However, the fix has a **critical flaw** in `collectStatusIssues` (line 595-596): it assumes `tokenSource !== "none"` guarantees both token and `channelSecret` are available, but `tokenSource` only tracks where the **token** came from. The token and `channelSecret` are resolved independently via separate files (`tokenFile`/`secretFile`) or separate environment variables. If only the token source is configured but the corresponding auth credential source is missing, this will incorrectly suppress the "channel secret not configured" warning.
The existing comment thread correctly identifies this issue. The `account.channelSecret` field is already populated by the account resolution logic, so the check should rely on that field directly rather than inferring availability from `tokenSource`.
<h3>Confidence Score: 2/5</h3>
- This PR has a logical error that could suppress important configuration warnings
- The PR addresses a real issue (false warnings for file/env token sources) but introduces a bug in the `collectStatusIssues` function that conflates token availability with auth credential availability. This could hide legitimate configuration errors where users have configured a token source but not the corresponding auth credential source. The logic needs correction before merge.
- Pay close attention to `extensions/line/src/channel.ts` lines 595-596 in `collectStatusIssues`
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#11110: fix(line): false 'not configured' warnings when tokenSource=file
by lailoo · 2026-02-07
87.3%
#10487: fix(line): use snapshot configured flag in collectStatusIssues
by mcaxtr · 2026-02-06
73.7%
#13881: fix: Address Greptile feedback - test isolation and channel resolution
by trevorgordon981 · 2026-02-11
73.0%
#21271: fix(commands): pass channel/capabilities/shell/os to runtime in com...
by evansantos · 2026-02-19
72.1%
#11048: fix: address repository issues (env, author, CI comments, security ...
by cavula · 2026-02-07
71.9%
#17182: security(line): fail closed when webhook token/secret are missing
by davidahmann · 2026-02-15
71.7%
#4878: fix: string/type handling and API fixes (#4537, #4380, #4373, #4547...
by lailoo · 2026-01-30
71.2%
#23175: feat(security): runtime safety — transcript retention, tool call bu...
by ihsanmokhlisse · 2026-02-22
70.9%
#19885: test(gateway,browser): isolate tests from ambient OPENCLAW_GATEWAY_...
by NewdlDewdl · 2026-02-18
70.6%
#13486: fix: allow Slack HTTP mode without app token
by SepehrShapouri · 2026-02-10
70.5%