Skip to content

feat!: Migrate to Arcanist-compatible configuration#174

Merged
holmboe merged 1 commit intomasterfrom
feat/arcconfig-migration
Mar 8, 2026
Merged

feat!: Migrate to Arcanist-compatible configuration#174
holmboe merged 1 commit intomasterfrom
feat/arcconfig-migration

Conversation

@holmboe
Copy link
Contributor

@holmboe holmboe commented Mar 8, 2026

Summary

  • Read .arcconfig from git repo root for PHAB_URL (via phabricator.uri)
  • Setup wizard (phabfive user setup) now writes credentials to ~/.arcrc in Arcanist-compatible JSON format instead of ~/.config/phabfive.yaml
  • Deprecate PHAB_URL/PHAB_TOKEN in ~/.config/phabfive.yaml with DeprecationWarning guiding users to migrate
  • When PHAB_URL is missing, offer to create .arcconfig instead of running the full ~/.arcrc setup wizard
  • Env-var PHAB_URL is peeked at before .arcrc loading so multi-host ~/.arcrc works with env overrides

Backwards incompatibility

This is not a breaking change in the strict sense — existing configurations continue to work. However it is backwards incompatible in these ways:

  • phabfive user setup now writes to ~/.arcrc (JSON) instead of ~/.config/phabfive.yaml (YAML). Users who re-run setup will get credentials in the new location.
  • Users with PHAB_URL/PHAB_TOKEN in ~/.config/phabfive.yaml will see deprecation warnings on stderr.
  • The error message for missing PHAB_URL now suggests creating .arcconfig instead of editing phabfive.yaml.

New config precedence

1. Hard-coded defaults
2. /etc/phabfive.yaml
3. /etc/phabfive.d/*.yaml
4. ~/.config/phabfive.yaml         (PHAB_URL/PHAB_TOKEN deprecated, warns)
5. ~/.config/phabfive.d/*.yaml     (same)
6. .arcconfig in git root          (provides PHAB_URL)      [NEW]
7. ~/.arcrc                        (provides PHAB_TOKEN)
8. Environment variables           (override everything)

Test plan

  • uv run pytest — 330 tests pass
  • uv run ruff check — clean
  • Manual: PHAB_URL=... phabfive user whoami works in empty directory with multi-host ~/.arcrc
  • Manual: phabfive user setup creates/updates ~/.arcrc in correct JSON format
  • Manual: Place .arcconfig in a git repo root, verify phabfive reads phabricator.uri
  • Manual: Put PHAB_URL in ~/.config/phabfive.yaml, verify deprecation warning appears

Closes #171, closes #172, closes #173

🤖 Generated with Claude Code

Read .arcconfig from git repo root for PHAB_URL, write credentials to
~/.arcrc instead of phabfive.yaml, and deprecate PHAB_URL/PHAB_TOKEN
in ~/.config/phabfive.yaml with warnings guiding users to migrate.

When PHAB_URL is missing, offer to create .arcconfig instead of
running the full ~/.arcrc setup wizard. Env-var PHAB_URL is peeked
at before .arcrc loading so multi-host .arcrc works with env overrides.

Closes #171, closes #172, closes #173

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@holmboe holmboe force-pushed the feat/arcconfig-migration branch from 671d2e3 to 3d52710 Compare March 8, 2026 21:06
@holmboe holmboe merged commit 87e62e6 into master Mar 8, 2026
17 checks passed
@holmboe holmboe deleted the feat/arcconfig-migration branch March 8, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant