fix: keep install and doctor non-interactive for cookie channels#266
Draft
0xWinner98 wants to merge 1 commit intoPanniantong:mainfrom
Draft
fix: keep install and doctor non-interactive for cookie channels#2660xWinner98 wants to merge 1 commit intoPanniantong:mainfrom
0xWinner98 wants to merge 1 commit intoPanniantong:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keep
installand cookie-backed channel health checks non-interactive by default.Problem
On macOS,
agent-reach installandagent-reach doctorcan route into browser-cookie scanning or interactive status commands for cookie-backed channels.In practice this can trigger repeated Keychain / password prompts when the underlying CLI scans multiple browsers for cookies. It also makes passive health checks hang or retry in places where the user only asked for install or doctor output.
Changes
installAGENT_REACH_AUTO_IMPORT_COOKIES=1--dry-runmessaging aligned with the non-interactive defaulttwitter~/.config/xfetch/session.json, or~/.config/bird/credentials.envtwitter status/bird checkduring doctor-style checksxiaohongshuxhs statusduring doctor-style checksreddit~/.config/rdt-cli/credential.jsonrdt status --jsonduring doctor-style checksWhy this shape
installanddoctorare passive flows. They work better when they only inspect local state and leave login / browser-cookie import to explicit configuration steps.That keeps health checks fast, avoids repeated Keychain prompts, and still preserves the existing explicit login/configure workflows.
Validation
python3 -m py_compile agent_reach/channels/twitter.py agent_reach/channels/xiaohongshu.py agent_reach/channels/reddit.py agent_reach/cli.py.venv/bin/pytest tests/test_twitter_channel.py tests/test_channels.py tests/test_cli.py -q.venv/bin/pytest tests/test_doctor.py -q.venv/bin/pytest -qFull test run result:
86 passed in 18.83s