Skip to content

drive lease: §13 Global settings scope (default expiry, backup-dir, auth policy, headless opt-out) and env-var layer #1677

Description

@newhoggy

Summary

ADR-0080 §13 designs three settings scopes for the Drive write lease (#1664): Global (machine-wide policy), per-account (DriveAccountSettings), and per-rule (FolderPermissionRule.require_lease). Only the per-account and per-rule scopes shipped — the per-account lease_backup_folder_id setting exists in settings.json today, and require_lease is wired per folder-permission rule. The Global scope was deliberately deferred and never landed.

What's missing

Per §13, Global settings should cover:

  • Default lease expiry — today --expiry-minutes is a required-or-defaulted CLI flag only (src/cli/drive/lease.rs), with no settings.json default to fall back to.
  • Local backup directory default — today the backup directory has a hardcoded default baked into the CLI, not a configurable machine-wide setting.
  • Authentication policy (§7: deviceOwnerAuthentication vs. biometrics-only) — today --biometrics-only is CLI-flag-only.
  • Headless/off-macOS opt-out (§8) — no config surface exists for this today; presumably also worth an env-var equivalent for CI/automation contexts.

None of these have an env-var layer either, unlike other machine-wide config in this codebase (e.g. OMNI_DEV_MODEL, OMNI_DEV_AI_BACKEND).

Suggested shape

Mirror how ADR-0071 §5 scopes write_permissions-adjacent settings: a new top-level section in settings.json, sibling of drive, holding the four Global fields above. Resolution order should probably follow this codebase's existing convention (explicit CLI flag → env var → settings.json → hardcoded default), matching resolve_model's precedent in src/claude/backend.rs.

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions