Skip to content

feat(gemini): --skip-trust default + /at trigger_source follow-up (rc6, #471 + #271)#472

Merged
Nathan Schram (nathanschram) merged 2 commits into
devfrom
feature/471-gemini-skip-trust
May 4, 2026
Merged

feat(gemini): --skip-trust default + /at trigger_source follow-up (rc6, #471 + #271)#472
Nathan Schram (nathanschram) merged 2 commits into
devfrom
feature/471-gemini-skip-trust

Conversation

@nathanschram
Copy link
Copy Markdown
Member

Summary

Two changes bundled for 0.35.3rc6 staging:

feat(gemini): --skip-trust by defaultcloses #471

  • Gemini CLI rejects runs from any directory not in ~/.gemini/trustedFolders.json — even with --approval-mode yolo — and there is no interactive prompt path in headless usage, so projects outside the trust list silently failed before any agent output.
  • Untether already runs Gemini with yolo for the same "always headless" reason; --skip-trust extends the same precedent.
  • GeminiRunner.skip_trust (default True) is the runtime switch; opt out per deployment with [gemini] skip_trust = false in untether.toml.
  • Tested via build_runner + build_args integration: argv with default config = [..., '--approval-mode', 'yolo', '--skip-trust', '--prompt=...']; argv with skip_trust = false drops the flag.

fix(at): stamp trigger_source on /at runs#271 follow-up

  • Closes the gap noted in the 2026-04-25 Codex sweep comment on feat: trigger visibility — indicators, discovery, and run history #271/at fires were the only trigger source whose footer was indistinguishable from a regular user-initiated run.
  • at_scheduler.schedule_delayed_run now wraps the captured chat context (or a fresh RunContext if unmapped) with trigger_source = "at:<token>" via dataclasses.replace.
  • runner_bridge.handle_message's icon-prefix tuple extends from ("cron:",) to ("cron:", "at:") so the alarm-clock icon renders for both — semantically /at is a one-shot delayed cron.
  • record_run's existing triggered=bool(context and context.trigger_source) gate picks up /at runs in the /stats triggered/manual breakdown automatically.

Staging

  • Bumps version to 0.35.3rc6 for TestPyPI staging.
  • All 0.35.3 milestone issues are now actioned in code with this PR landing.

Test plan

  • Unit: tests/test_build_args.py::TestGeminiBuildArgs::test_skip_trust_default_includes_flag
  • Unit: tests/test_build_args.py::TestGeminiBuildArgs::test_skip_trust_opt_out_omits_flag
  • Unit: tests/test_at_command.py::TestAtCommand::test_handle_stamps_trigger_source_on_mapped_chat
  • Unit: full tests/test_build_args.py (51 tests) + tests/test_at_command.py (38 tests) + tests/test_gemini_runner.py (29 tests) — 118 passed
  • Lint: ruff format --check + ruff check clean on modified files
  • Live: untether-dev restarted on lba-1, picks up new code without crash
  • Live (post-CI): user-driven test via @untether_dev_bot Gemini chat from a project dir not in ~/.gemini/trustedFolders.json

🤖 Generated with Claude Code

Mirror the cron:<id> / webhook:<id> footer markers added in #271 (rc4)
and Tier 2/3 (rc5) so /at-scheduled runs also show provenance.

at_scheduler.schedule_delayed_run wraps the captured chat context (or a
fresh RunContext when the chat is unmapped) with trigger_source =
"at:<token>" via dataclasses.replace. runner_bridge.handle_message's
icon-prefix tuple extends from ("cron:",) to ("cron:", "at:") so the
alarm-clock icon renders for both — semantically /at is a one-shot
delayed cron. record_run's existing triggered=bool(context and
context.trigger_source) gate picks up /at runs in the /stats
triggered/manual breakdown automatically.

Tests: 1 new in test_at_command.py
(test_handle_stamps_trigger_source_on_mapped_chat); the existing
test_handle_captures_global_default_when_unmapped extended to assert
the trigger_source-only RunContext path; existing
test_run_delayed_forwards_captured_context_and_engine updated since
the captured context is no longer reference-equal to the original.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Gemini CLI rejects runs from any directory not in
~/.gemini/trustedFolders.json — even with --approval-mode yolo — and
there is no interactive prompt path in headless usage, so projects
outside the trust list silently failed before any agent output.

Untether already runs Gemini with yolo for the same "always headless"
reason, so passing --skip-trust extends the same precedent.
GeminiRunner.skip_trust (default True) is the runtime switch; opt out
per deployment with [gemini] skip_trust = false in untether.toml
(security-conscious operators who want Gemini's project-local
extension/MCP trust gate enforced).

Bump to 0.35.3rc6 for staging.

Tests: 2 new in test_build_args.py::TestGeminiBuildArgs
(test_skip_trust_default_includes_flag,
test_skip_trust_opt_out_omits_flag).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e7a2bcc9-97fb-413f-9355-d23827c2854e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/471-gemini-skip-trust

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nathanschram Nathan Schram (nathanschram) merged commit 6eaded5 into dev May 4, 2026
21 checks passed
@nathanschram Nathan Schram (nathanschram) deleted the feature/471-gemini-skip-trust branch May 4, 2026 06: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