Skip to content

fix(app): resolve ConfigFileSync path via XDG fallback (#1981)#1985

Merged
crrow merged 1 commit intomainfrom
issue-1981-e2e-config-path-fix
Apr 28, 2026
Merged

fix(app): resolve ConfigFileSync path via XDG fallback (#1981)#1985
crrow merged 1 commit intomainfrom
issue-1981-e2e-config-path-fix

Conversation

@crrow
Copy link
Copy Markdown
Collaborator

@crrow crrow commented Apr 28, 2026

Summary

  • start_with_options hard-coded $CWD/config.yaml for ConfigFileSync, while AppConfig::new already supported XDG global as a fallback. The mismatch caused e2e.yml to fail 18 consecutive runs since 2026-04-27 (XDG_CONFIG_HOME set by PR fix(ci): e2e config render fails with permission denied on $HOME/.config #1948 but watcher panicked on missing CWD file).
  • Extracts a private resolve_config_path() helper used by both call sites so the precedence (local CWD → XDG global) cannot drift again.
  • Wraps ConfigFileSync::new errors with the resolved path so operators can identify which file is missing without re-deriving paths.
  • Extends init.sh agenda with a warn-only e2e.yml red-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 lint 78% pass
  • agent-spec lifecycle 4/4 pass
  • Unit tests cover both precedence branches + error-message path
  • CI green
  • e2e.yml flips from 18-consecutive-failure to green

🤖 Generated with Claude Code

`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
@crrow crrow added bug Something isn't working core Core system changes labels Apr 28, 2026
@crrow crrow merged commit 274e189 into main Apr 28, 2026
9 of 11 checks passed
@crrow crrow deleted the issue-1981-e2e-config-path-fix branch April 28, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core Core system changes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

feat(ci): run live Playwright suite against real backend in CI

1 participant