Repository navigation
fix(cli): resolve the GitHub repo and host from the project, not the working directory - #88
Merged
Merged
Conversation
…working directory A github-backed project now records the host it was initialised against in project.toml, alongside the repo. Reads resolve the host from the project (recorded host, else the git remote resolved in the project root, never the invocation directory), so `wayful --project <github project>` works from an unrelated checkout or a non-git directory. `wayful init` also checks for existing local state before touching the remote, and now reports the backend, repository, and host it bound to. Adds `wayful doctor`: resolves repository, host, credential source, wayful labels, and the rate-limit budget for a project, or names the piece that is wrong. Filesystem projects report what applies without failing. Closes #79
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.
Closes #79.
A GitHub-backed project now always talks to the repository and host it was initialised against, no matter which directory the CLI is invoked from.
--projectis the flag agents use, so this lands squarely on the agent path.What changed
wayful init --backend githubrecords the resolved host inproject.toml(hostis a new optional key;format_versionis unchanged). Reads resolve the host from the project: the recorded host wins, and a project that predates the key falls back to the git remote resolved in the project root — never the process working directory — then togithub.com.initis safe to repeat. It checks for existing local state before resolving credentials, verifying access, or creating labels, so a repeat run no longer touches the remote and then fails.initsays what it bound to. It now reports the backend and, for GitHub, the repository and host.wayful doctor. One command resolves the repository, host, credential source, wayful label set, and current rate-limit budget, and names whichever piece is wrong. Filesystem projects report what applies without failing for absent GitHub configuration.User-facing change (changelog)
wayful --project <github project> map listfrom an unrelated checkout / non-git dirwayful init --backend githubwhere a project already existsWayful state already exists; refusing to overwrite it.(remote untouched)wayful initoutputInitialized Wayful project.wayful doctor(GitHub)wayful doctor(filesystem)Before / after examples
initbound to an enterprise host, invoked from an unrelated checkout whoseoriginisgithub.com:Before:
After:
init --backend githubin a directory that already holds a project:Before:
After:
initreporting what it bound to:Before:
After:
wayful doctoron a healthy GitHub-backed project:wayful doctorwith an unusable credential:wayful doctoron a filesystem project:Validation
bun check(lint + typecheck + test): CLI 341 pass / 1 skip / 0 fail, UI 49 pass / 0 fail.MapStore), fallback resolves in the project root (asserted via the git child processcwd), credential-source reporting,initrefusing an existing project (and a subdirectory of one) before any remote work, theinitreport, and thedoctordiagnosis + rendering.