#11110: fix(line): false 'not configured' warnings when tokenSource=file
channel: line
stale
Cluster:
Webhook Configuration and Resilience
## Summary
Fixes #11094.
`collectStatusIssues` in the LINE channel plugin checked `account.channelAccessToken` and `account.channelSecret` on `ChannelAccountSnapshot`, but those properties do not exist on the snapshot type. When credentials are loaded from files (`tokenSource: "file"`), the resolved account has the token but the snapshot only carries a `configured` boolean — so the check always evaluated to `undefined`, producing false warnings.
## Root Cause
`collectStatusIssues` receives `ChannelAccountSnapshot[]` (not `ResolvedLineAccount[]`). The snapshot type has `configured`, `tokenSource`, `running`, etc. but **not** `channelAccessToken` or `channelSecret`. The existing code accessed non-existent properties, which always returned `undefined`, causing warnings regardless of actual credential state.
## Fix
Replace the `account.channelAccessToken?.trim()` / `account.channelSecret?.trim()` checks with `account.configured`, matching the pattern already used by feishu, tlon, and other channel plugins.
## Changes
- `extensions/line/src/channel.ts`: use `account.configured` in `collectStatusIssues`
- `extensions/line/src/channel.collectStatusIssues.test.ts`: regression tests covering config, file, none token sources
- `CHANGELOG.md`: add entry
## Testing
- `pnpm build` ✅
- `pnpm test` ✅ (all 5028 tests pass; 14 pre-existing feishu failures unrelated)
- New test file covers: configured via config, configured via file, not configured, undefined configured, multiple accounts
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR fixes LINE `status`/`doctor` reporting by updating `linePlugin.status.collectStatusIssues` to use the snapshot’s `configured` flag rather than reading credential fields that aren’t present on `ChannelAccountSnapshot`.
It also adds a vitest regression suite for `collectStatusIssues` covering configured vs not configured (including credentials loaded from files) and updates the changelog to document the behavior change.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change is narrowly scoped to status/doctor issue collection for LINE, replacing access to non-existent snapshot fields with the snapshot’s `configured` flag. The update matches the existing snapshot-building logic in the plugin, and the new tests cover the previously-broken file-based credential scenario plus a few edge cases.
- No files require special attention
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#12803: fix(line): avoid false 'not configured' warnings for file/env token...
by puritysb · 2026-02-09
87.3%
#10487: fix(line): use snapshot configured flag in collectStatusIssues
by mcaxtr · 2026-02-06
81.7%
#23621: fix(LINE): keep startAccount promise alive to prevent auto-restart ...
by ttakanawa · 2026-02-22
75.8%
#21271: fix(commands): pass channel/capabilities/shell/os to runtime in com...
by evansantos · 2026-02-19
75.1%
#13881: fix: Address Greptile feedback - test isolation and channel resolution
by trevorgordon981 · 2026-02-11
75.0%
#4878: fix: string/type handling and API fixes (#4537, #4380, #4373, #4547...
by lailoo · 2026-01-30
74.7%
#17182: security(line): fail closed when webhook token/secret are missing
by davidahmann · 2026-02-15
74.1%
#14488: Fix Telegram default account listing and CLI cache-write usage mapping
by abdulbb · 2026-02-12
73.9%
#18966: fix(config): downgrade unknown bundled plugin references to warnings
by moxunjinmu · 2026-02-17
72.9%
#23727: Fix Telegram channel resolution drift across announce + message sen...
by SmithLabsLLC · 2026-02-22
72.6%