fix(app): resolve ConfigFileSync path via XDG fallback (#1981)#1985
Merged
fix(app): resolve ConfigFileSync path via XDG fallback (#1981)#1985
Conversation
`start_with_options` hard-coded `$CWD/config.yaml` for the `ConfigFileSync` watch target while `AppConfig::new` already supported the XDG global file as a fallback. When CI ran in a directory without a local config (the exact arrangement `e2e.yml` set up via `XDG_CONFIG_HOME` after PR #1948), `AppConfig::new` succeeded but `ConfigFileSync::new` panicked at "Failed to initialize config file sync: No such file or directory". `e2e.yml` shipped already broken: 18 consecutive `failure` runs since `a89d4f87`. Extract a private `resolve_config_path()` helper that mirrors `AppConfig::new`'s precedence (local CWD override → XDG global) and use it from both call sites so they cannot drift again. Wrap the `ConfigFileSync::new` error with the resolved path so an operator reading the panic can identify which file is missing without re-deriving the precedence rules. Also extend `init.sh`'s Agenda section with one warn-only check that flags red `e2e.yml` runs on `main`. Surfaces the silent-red failure mode that produced this bug at session start. Re-lands the inline fix originally authored on the abandoned `issue-1850-live-e2e-in-ci` branch (commit `4f1e7f8b`, never merged) as a shared helper. Mentioned in code comments + here so the next #1850-shaped accident (a feature PR ships a workflow change that depends on a code change still in someone's draft) is harder to repeat. Closes #1850, #1981
This was referenced Apr 28, 2026
Closed
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
start_with_optionshard-coded$CWD/config.yamlforConfigFileSync, whileAppConfig::newalready supported XDG global as a fallback. The mismatch causede2e.ymlto fail 18 consecutive runs since 2026-04-27 (XDG_CONFIG_HOMEset by PR fix(ci): e2e config render fails with permission denied on $HOME/.config #1948 but watcher panicked on missing CWD file).resolve_config_path()helper used by both call sites so the precedence (local CWD → XDG global) cannot drift again.ConfigFileSync::newerrors with the resolved path so operators can identify which file is missing without re-deriving paths.init.shagenda with a warn-onlye2e.ymlred-state check (gh-gated,timeout 5) so red CI surfaces at session start.Salvages the abandoned branch
issue-1850-live-e2e-in-ci(4f1e7f8b) which contained the same fix never merged.Closes #1850, #1981
Test plan
agent-spec lint78% passagent-spec lifecycle4/4 pass🤖 Generated with Claude Code