Repository navigation
feat(settings): share one operator settings file between the CLI and server - #158
Conversation
…server
PatchulaServer.pkl becomes PatchulaSettings.pkl. Shared settings
(concurrency, recheck and an http section for host limits and freshness
floors) sit at the top level; the server-only fields move under `server`.
The CLI reads --settings, then PATCHULA_SETTINGS, then
patchula/settings.pkl in the user config directory. The server now
applies the http section too, rebuilding an installation's engine when
it changes.
BREAKING CHANGE: --host-concurrency, --registry-freshness-secs and
--go-freshness-secs are removed in favour of the http section;
PATCHULA_SERVER_SETTINGS is now PATCHULA_SETTINGS; config server-schema
and config check-server are now config settings-schema and
config check-settings; server fields move under `server { }`.
Refs #157
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Rust | Nov 2, 2026 10:04p.m. | Review ↗ | |
| JavaScript | Nov 2, 2026 10:04p.m. | Review ↗ | |
| Shell | Nov 2, 2026 10:04p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
1 issue found and verified against the latest diff
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/src/content/docs/reference/settings.mdx">
<violation number="1" location="docs/src/content/docs/reference/settings.mdx:10">
P2: The CLI still validates the `server` section: `Settings::load` rejects invalid values such as `server.batchSize = 0`, so a server-only typo can block local CLI commands. Clarify that the CLI does not use these values but still validates the whole file.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
|
||
| Operator settings, in a Pkl file that amends the bundled `PatchulaSettings.pkl`. | ||
| The CLI (`run`, `lookup`, `apply`, `tui`) and [`patchula serve`](/guide/server/) | ||
| read the same file; only the server reads the `server` section, and the CLI |
There was a problem hiding this comment.
P2: The CLI still validates the server section: Settings::load rejects invalid values such as server.batchSize = 0, so a server-only typo can block local CLI commands. Clarify that the CLI does not use these values but still validates the whole file.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/src/content/docs/reference/settings.mdx, line 10:
<comment>The CLI still validates the `server` section: `Settings::load` rejects invalid values such as `server.batchSize = 0`, so a server-only typo can block local CLI commands. Clarify that the CLI does not use these values but still validates the whole file.</comment>
<file context>
@@ -0,0 +1,72 @@
+
+Operator settings, in a Pkl file that amends the bundled `PatchulaSettings.pkl`.
+The CLI (`run`, `lookup`, `apply`, `tui`) and [`patchula serve`](/guide/server/)
+read the same file; only the server reads the `server` section, and the CLI
+ignores it. Print the schema with `patchula config settings-schema` and check a
+file with `patchula config check-settings <path>`. Secrets are never settings.
</file context>
There was a problem hiding this comment.
1 existing issue remains and no new issues found across 31 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Docs7 for sweepies/count-patchula
Commit |
- Every installation GitHub client, not only the engine's, takes the api.github.com limit from the settings. - --settings keeps a run on this machine, like --config, and is refused with --remote instead of being silently ignored. - A relative XDG_CONFIG_HOME is ignored, as for the cache directory. - defaultHostConcurrency errors point at their own field. - Docs: the CLI still checks the server section; the Action input needs a checkout and falls back to PATCHULA_SETTINGS. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 622f560 | Commit Preview URL Branch Preview URL |
Nov 02 2026, 10:03 PM |
First step toward #157 (private registries). Registry credentials will be operator settings, so the CLI and
patchula servenow read one settings file. This PR adds no credentials yet.What changes
PatchulaServer.pklbecomesPatchulaSettings.pkl:concurrency,recheck, and anhttpsection withdefaultHostConcurrency,hostConcurrency,registryFreshnessSecsandgoFreshnessSecs.server { … }. The CLI ignores that section.run,lookup,applyandtuiread--settings, thenPATCHULA_SETTINGS, thenpatchula/settings.pklin the user config directory if it exists, and the defaults otherwise.--concurrencyoverrides the file.--remoteignores the local file.httpsection (before, it always used the defaults). Whenhttpchanges on reload, the server rebuilds an installation's engine before its next batch. The installation GitHub client keeps its limit of 4 unlessapi.github.comis set.settingsinput.reference/server-settingsbecomesreference/settings. The server guide, environment, sources, cache and GitHub Actions pages are updated. The CLI reference and the help snapshot are regenerated.Breaking (hard cutover)
--host-concurrency,--registry-freshness-secsand--go-freshness-secsare removed; use thehttpsection instead.PATCHULA_SERVER_SETTINGSis renamed toPATCHULA_SETTINGS.config server-schemaandconfig check-serverare renamed toconfig settings-schemaandconfig check-settings.server:schemamise task is renamed tosettings:schema.server { }.The Docker Hub variables stay for now. They fold into the registry credentials in the next PR.
Testing
mise run test:unit,mise run lintandmise run docs:buildpass on the dev VM. A new CLI integration test covers reading settings from the flag, the environment and the config directory.🤖 Generated with Claude Code