Repository navigation
feat(cli): load and validate .tole/config.toml via tole config check - #342
Merged
Merged
Conversation
Part 1 of 3 of #208: strict loader (deny_unknown_fields, secret-key pre-check at any depth, 64 KiB bounded read, trust presets validated by the shared expand_trust) and the `tole config check` subcommand. The file is NOT applied to sessions yet. The trust preset table and expand_trust move from main.rs to a lib module so the flag and the loader share one source of truth (no behavior change). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Oct 9, 2026
Merged
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.
What
Part 1 of 3 of the project config file:
tole config checkloads and validates<cwd>/.tole/config.toml(or--config <path>) and prints every key that is set with its source label. The file is NOT applied to sessions; no flag, env or runtime behavior changes.Why
Part of #208 (design settled in the 2026-10-08 grilling). Staging: (1) load + validate + check, (2) trust store + prompts, (3) precedence applied everywhere. A strict, tested loader lands first so later parts build on it.
Changes
tole-clionly: newtomldep (default-features off;std,parse,display,serde) and workspaceserde;tole-coreuntouched.config.rs: strict schema (deny_unknown_fields, flat snake_case keys +[mission]), 64 KiB bounded read, spanned pre-check rejecting any key containingsecret/password/token/api_keyat any depth (exact exemption:mission.max_tokens), errors aspath:line:col: message.trust.rs:TRUST_PRESETSandexpand_trustmoved out ofmain.rsunchanged, so the--trustflag and the loader share one rule.tole config check [--config <path>](ConfigActionenum for later variants); handled before any session/env state and without the update banner.Testing
deny_unknown_fieldsfails the unknown-key test; removing the secret pre-check fails the secret test.--helpof all existing commands byte-identical; onlyconfigis added to the top-level list.-D warnings,cargo test --workspace, bare/shell-toolschecks,cora review --staged(no issues),cargo audit(no new advisories).Part of #208
🤖 Generated with Claude Code