Skip to content

Separate account preferences from shared agent configuration (DRU-504) - #494

Open
czpython wants to merge 4 commits into
mainfrom
codex/shared-execution-defaults
Open

Separate account preferences from shared agent configuration (DRU-504)#494
czpython wants to merge 4 commits into
mainfrom
codex/shared-execution-defaults

Conversation

@czpython

@czpython czpython commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Default execution appeared in both Agents and Preferences. A personal edit could also freeze an account's execution choices and prevent later shared changes from applying. Execution defaults now live only in Settings → Agents and apply to every account.

  • InstallationSettings holds shared execution choices and the notification default for new accounts. Druks commits the singleton at startup before settings requests can run. Shared agent overrides and declared timeout priorities remain intact.
  • Account stores personal timezone and gate notification destination directly. New accounts copy the installation defaults once. Changing the notification default does not affect existing accounts; its API-only control is documented. Preferences works without execution catalogs.
  • Top-level timezone in druks.toml controls schedules and operational day boundaries. Process and dotenv TIMEZONE values are ignored, including when TOML omits the key. Both setup and the development example include the timezone. /settings/general redirects to Preferences. Personal edits do not reschedule workflows. Setup and environment filtering share one set of top-level TOML keys.
  • Agent.get_config() returns the temporary AgentConfig. Platform callers, tests, and the author guide use the same name. It has no database table.

Accounts retain their own subscriptions, MCP grants, and run attribution. Unattended runs use the default account.

Closes DRU-504.

Upgrade

Three forward-only migrations move existing preferences onto accounts, remove personal execution copies, and enforce one installation settings row. Existing personal values take priority; accounts without personal values receive the previous installation defaults.

Before upgrading a non-UTC installation, set timezone = "Europe/Madrid" (or its current schedule timezone) at the top of druks.toml, before any table. The default is UTC. The database migration cannot update the deployment file.

get_profile() is replaced by get_config() without an alias. /api/settings no longer accepts or returns timezone or account scope. /api/settings/personal returns only timezone and gate notification destination and rejects execution fields.

The environment filter uses the env_vars mapping from pydantic-settings for both process and dotenv sources. Regression tests cover this dependency. Nested JSON environment inputs keep their current behavior.

Verification

  • Backend Ruff lint and format checks passed, including the three migration files.
  • Backend tests: 1,764 passed, including the independently packaged proof app, account isolation, TOML-only timezone, committed startup seed, schedule timezone, and gate notification tests. The suite emitted six SQLAlchemy cleanup/transaction and dependency deprecation warnings.
  • Node 22: frontend lint, 400 tests, and production build passed.
  • The complete Alembic history and populated upgrade passed in a separate Postgres test database. Focused migration tests also cover empty settings and personal notification choices.
  • Playwright checks of the built SPA with API fixtures passed at 1440×1000 and 390×844. Checks covered preference saves, shared defaults, navigation, browser errors, and horizontal overflow. Screenshots were inspected.

No deployment. Live provider execution was not tested.

@mintlify

mintlify Bot commented Sep 9, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
druks 🟢 Ready View Preview Sep 9, 2026, 3:06 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@czpython czpython changed the title Share execution defaults across accounts (DRU-504) Separate account preferences from shared agent configuration (DRU-504) Sep 9, 2026
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