Repository navigation
Description
Parent
What to build
A github-backed project always talks to the repository and host it was initialised against, no matter which directory the CLI is invoked from.
Today the owner/name comes from the project's configuration but the host is resolved by asking git for the origin remote of the process working directory. Running wayful --project <a github-backed project> from inside an unrelated checkout therefore resolves the wrong host, looks for a credential for that host, and reports a sign-in error that has nothing to do with the real problem. --project is precisely the flag agents use, so this is squarely on the agent path.
Record the host alongside the repository at init. Keep the current format_version — the project is in preview with no users to migrate, so a new optional key is enough. Where a project predates the key, fall back to the git remote resolved in the project root, never the working directory.
Two smaller fixes to the same command while it is open:
wayful init --backend githubverifies access and creates labels on the remote before checking whether a project already exists locally, so a repeat run touches the remote and then fails.wayful initreports only that it initialised a project, saying nothing about the backend, repository, or host it bound to.
Ships wayful doctor: one command that resolves everything a github-backed project needs and names whichever piece is wrong, so the common first-run failures stop presenting as an opaque HTTP status.
Acceptance criteria
- From a working directory that is a git checkout whose
originpoints at a different host,wayful --project <github-backed project> map listlists the project's maps. - From a directory that is not a git repository at all, the same command succeeds.
-
wayful init --backend githubin a directory that already holds a project fails without creating or modifying anything on the remote. -
wayful init --backend githubreports the backend, repository, and host it bound to. -
wayful doctoron a healthy github-backed project reports the resolved repository, the host, where the credential came from, the wayful label set, and the current rate-limit budget, and exits 0. -
wayful doctorwith an unusable credential exits non-zero and names the credential as the problem. -
wayful doctoron a filesystem-backed project reports what it can and does not fail for absent GitHub configuration.
Blocked by
None (can start immediately).
Activity