Repository navigation
feat(cli): check the setup a run needs with chartula doctor - #295
Merged
Merged
Conversation
This was referenced Sep 30, 2026
goldbarth
added a commit
that referenced
this pull request
Oct 1, 2026
…s a run (#305) Follows #295 and #286, which gave a user `chartula doctor` and `chartula --version` to report from. - **Why:** the bug report asked for the .NET version, which a user of a release binary does not have, and for nothing a maintainer needs to run the case again: not the command, the install method, the platform, the model, or what the run printed. The feature request asked for a user story and acceptance criteria, which is a maintainer's job, and not for the workaround or who is affected. - **The bug report is a form** (`bug_report.yml`), in the order a reporter has the answers: what happened, the command, the output of `chartula --version`, the install method, the platform as the eight binaries of `docs/install.md` plus a build from source, provider and model, the output of `chartula doctor`, the lines before the first step, and the error or the run summary. No .NET version. - **`doctor` and the header lines are optional, the rest required.** A bug in `doctor` itself has no `doctor` output to paste; a run that stopped at a usage error has no header. Both say why they help, so they are filled in anyway. - **The header field asks for every line up to `Range:`,** not only `Model:` and `GitHub:`: a real run prints the announced `--tag` and `--repo` defaults first, and those name the release the run worked on. Its placeholder is copied from that run, with `thinking provider-default` as `EndpointNotice.cs` prints it. - **The form says its output is safe to paste,** since Chartula names variables and never their values, and asks to replace a private repository's name instead of withholding the report. - **The feature request is a form** (`feature_request.yml`): the problem, the current workaround, who is affected, all required; a proposal, optional. It links `ROADMAP.md`, so a planned point is found before it is requested again, and Discussions for a question. - **Alpha feedback:** the version placeholder no longer names `0.1.0-preview.3` with its commit, which aged with the next release; one sentence says the alpha is the time before 1.0.0 and its releases carry "preview" in the version, linking `versioning.md`. - **`config.yml` links the Q&A category of Discussions** for questions, above the security link. Blank issues stay enabled. - The template file names `alpha-feedback.yml` and the chooser URL in `troubleshooting.md` are unchanged, so every link to them still resolves; nothing linked the two Markdown templates. **Verified:** - All four files validate against the SchemaStore schemas for issue forms and the template chooser config (script, with a negative test). - The header lines and their order are from a real `preview` with the binary built from `main`, against an unreachable GitHub endpoint on 127.0.0.1; the error field's "last progress line and the message below it" matches what that run printed. - The labels `type:bug` and `type:feature` exist, and the Q&A category's slug is `q-a` (GitHub API). Tests: none, issue templates only.
goldbarth
added a commit
that referenced
this pull request
Oct 6, 2026
…hartula.yaml (#329) Follows #295, which added `chartula doctor` (#254), and replaces the planned `chartula init`. - **Why:** a user who installed the binary has no copy of the repository, so `chartula.example.yaml` existed for them only if they knew where to look. `doctor` already said that no `chartula.yaml` was found and the defaults apply; it now also says where the template is. - **No `chartula init`:** what it would have set up is covered already. `doctor` names a missing `chartula.yaml`, `docs/providers.md` gives the `export` lines per provider, and the endpoint and key variable may not go into the file anyway (ADR 0003). All that `init` could still write is `llm.model`, which is not worth a command. - **The link points at this version's tag, not at `main`:** an unknown key in `chartula.yaml` is refused, and `main` may already list a key the installed version does not know. A dev build between a version bump and its tag links a tag that does not exist yet; that only affects contributors. - **Docs:** the sample `doctor` output in `getting-started.md` and `troubleshooting.md` shows the new line. **Verified:** - The built CLI, run as `doctor` in a fresh checkout without `chartula.yaml`, prints the line under `config`; the linked URL for `v0.1.0-preview.3` answers 200. - With a `chartula.yaml`, the line is absent. Tests: `DoctorCommandTests` gains one test for the link and one assertion that a present file gets no hint; 19 of 19 pass.
goldbarth
added a commit
that referenced
this pull request
Oct 7, 2026
Follows #344. Step 1 of `docs/development/releasing.md`. - **Why now:** the launch points are merged, and the binary people install is still `0.1.0-preview.3`, which has none of them. The announcement needs a release that holds what the README and the docs on `main` describe. - **What ships since preview.3,** 63 commits: - a first run: `chartula doctor` (#295, grouped in #341), `chartula --version` (#286), a free `preview` (#292), progress while a run works (#297, with a spinner and `--plain` in #340), a first tag from the first commit with a confirmation for a large range (#282); - what a release contains: commits without a pull request (#291), issue numbers at every depth (#293), a sentence for a release with nothing for developers (#307 in #333); - checks and prompts: pull request text quoted and bounded (#338), no false flag for a wrapped phrase or a fenced block (#336), flags set apart from the entries (#331); - publishing: the token checked before the first model call (#285), a published release not replaced unless asked (#335); - the files: `changelog.json` without descriptions and readable as text (#294, #332). - **Breaks to state in the notes,** as `docs/versioning.md` asks of a preview: - `changelog.json` is schema version 2: a change's `description` is gone (#294). The run record is schema version 3 and holds the complete facts. - `generate` stops on a tag whose release is already published; `--replace-published` restores the old behaviour (#335). - An option a command does not take stops the run (#301), and `--whole-history` is gone (#282). - The terminal output changed form (#340 to #342): the summary's first line, audience headings in place of `--- Technical ---`, and `doctor`'s last line. A script that reads those lines needs a look; exit codes and the files are unchanged. - The csproj `Version` is the single source; nothing else carries the number. **After merge:** tag the merge commit on `main` with `v0.1.0-preview.4` and push it; `release.yml` builds the draft, `chartula generate --tag v0.1.0-preview.4` writes the notes into it, and publishing runs `install.yml`. The pinned `v0.1.0-preview.3` in `docs/ci.md` and `docs/install.md`, and the template link in the `doctor` samples, move to the new tag once the release exists, with the changelog pull request of step 6. **Verified:** the built CLI prints `chartula 0.1.0-preview.4+<commit>`. Tests: no test changed. Full suite 1,010 passing, build without warnings.
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 #254
chartula doctorchecks everything a run needs, one line per check, before anything is spent.chartula doctor: check the setup before the first run #254: a subcommand; the endpoint check sends a minimal model request; the install scripts check with--versionand point todoctor; "recent" is the last 30 merged pull requests;chartula initis its own issue.ReleaseTargetfor tag and repository,ChartulaConfigurationplusProgram.BuildServicesfor every setting, the key check ofAddChartulaLlm, the model client with the messages from An answer the SDK cannot read is reported as an endpoint that could not be reached #263, the pull requests of the tag's commit as the first GitHub request of a run, andEnsureCanWriteAsyncfromgeneratefinds out the token cannot publish only after every model call #262. So a failed check prints the message the run would print, and a later change to a run's checks reaches doctor without a second copy.ok,warn,fail,skip:failis what stops a run: git, checkout (not one, or shallow), tag, repository, configuration, a missing Anthropic key, the endpoint, reading the repository.warnis what limits it: no token, a token that may not publish (preview and--no-publishstill run), titles without a prefix. A check whose prerequisite failed shows asskip, so one missing piece does not bury the report under follow-on errors.0when nothing failed,1otherwise, so a CI job can run it beforegenerate.generate-notes, which stores nothing.ConventionalCommitCategorizer.HasKnownPrefixcounts a prefix whose type maps to a category, sowip:counts as no prefix, the way the categorizer reads it. Up to three titles without one are quoted.Programalready usesGitCliRepositoryReader. Added:GitCliRepositoryReader.IsCheckoutAsync,IsShallowAsync,ReadCommitAsync;GitHubPullRequestReader.EnsureCanReadAsync,ReadRecentMergedTitlesAsync; a transport parameter onGitHubHttpClientFactory.CreateandCreateChatClient;ReleaseTarget.ResolveTagAsyncandResolveRepositoryAsync, split out ofResolveAsyncwith its messages unchanged.--versionand print it. A release pinned withCHARTULA_VERSIONfrom before--versionfalls back to--helpand is told to start withpreview, since it has nodoctor. The closing message names Anthropic as the default, linksdocs/providers.mdfor the others, and ends withchartula doctor.docs/cli.mddescribes the command.docs/getting-started.mdbuilt around it is roadmap step 2.9, next.CallValidity.cs).Verified end to end with the binary from this branch, model on a local Ollama (
qwen3:14b-ctx24k), no token spent:Also run: without a token (
warnon read and write, exit 0), outside a checkout, an Anthropic setup without a key,chartula.yamlandchartula.ymlside by side, an unknown model id (the #263 message,404 Not Found for model 'nope:1b'), a repository GitHub does not show, and a shallow clone. Each failed where a run would, with the run's message, and exited 1.The install scripts were not run locally:
install.ymlrunsinstall.shin fresh containers against served binaries, andpwshis not available here.Tests:
DoctorCommandTests(18: a ready setup, secrets and nothing written, one capped call per model, a thorough check on its own model, no git, not a checkout, shallow clone, no tag, a tag the checkout lacks, a configuration error, the file that is read, Anthropic without a key, an endpoint that does not serve the model, an unreadable repository, a token that may not publish, no token, titles without a prefix, closed pull requests not counted), with git real and GitHub and the model as handlers. Full suite passing, build without warnings,dotnet formatclean.