130 · T115 — the TOML loader, profile layering, and the file precedence tier - #140
Merged
Merged
Conversation
…the file tier The new cli suite (config_file_and_profiles.rs) drives the ticket's Test plan end to end — four-tier precedence, profile layering and loud unknown-profile failure, discovery (explicit > ./dagr.toml > none, missing explicit path a hard error), the pool-pin tri-state through the file tier, loud failures naming file/profile/key with the EnvParseError exit-code split, reserved dagr.profile/dagr.config flags, and byte-identity with an empty [default]. It references the not-yet-existing dagr_cli::config_file API and the grown resolver signatures, so the target fails to compile — the suite's red state. The core purity addition (assembly_is_unaffected_by_a_config_file_in_the_cwd) is a GREEN guard by design, like T114's byte-identity guard: it pins that a dagr.toml present in the assembly cwd leaves the artifact and both fingerprints byte-identical, and must stay green once the loader lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…edence tier Implements ADR 128: a new dagr-cli module (config_file) owns discovery (--dagr.config explicit path, missing => hard error > ./dagr.toml > none — no user-level path, no parent walk), profile selection (--dagr.profile > DAGR_PROFILE > the default table, flag-wins-without-reading-env), key-by-key layering over [default], and a closed 13-key set mirroring the run bootstrap's knobs — no file-only knob, no graph-describing key. The whole file is validated at load; malformed TOML, an unknown key, a wrong-shaped value, an unknown profile, and a selected-profile-with-no-file each fail loudly naming the file, profile, and key through EnvParseError's existing exit-code split (file/profile/key ride in the detail until T116's source discriminator). The file tier is inserted beneath the environment in resolve/resolve_opt (and every knob resolver over them), preserving flag-wins-without-reading -env and the pool pins' tri-state: a file that mentions no pool leaves it detected, and a file with no pool keys leaves sizing disengaged. The run path (registry run_selected_flow) loads the file once at bootstrap — the assembly verbs never reach the loader — and run_to_store honours the same tiers with an empty flag tier. dagr.profile / dagr.config are reserved flags and in flag_takes_value; DAGR_PROFILE joins the env-name constant test. The parser is toml v1 (parse/serde/std only, no serde derive), the same version trybuild already locked; every licence resolves to MIT under the existing deny.toml allow-list. Also corrects the tests-first commit's headroom arithmetic in one expectation (headroom is subtracted slack: 8 cores at 0.25 keep 6). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n resolutions check-feature-matrix.sh now forbids toml in every dagr-core resolution (the resolution-level form of ADR 128 §6's 'dagr-core never reads the file') and asserts the cli's default leg DOES reach toml, so the prohibition stays non-vacuous. The ticket file records the resolved open questions: no user-level path, no parent-directory walk, toml v1 parse-only with the licence audit, the 13-key first-cut key set (blob/pod-launch keys deferred to T117's canonical table as loud unknown-keys), same-value-grammar-as-env, loud selected-profile-with-no-file, shadowed-tiers-not-parsed, no pod-side load, and the absence of tasks.md Q items for T115. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…fixes load_file_tier_from delegates to select_profile / discover / parse_profiles (too_many_lines, single-pattern-match); test doc comments gain backticks and the registry helper's binding is renamed away from similar_names. Behaviour unchanged: both suites stay green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ll called the 3-arg build_run_sink; pass an empty FileTier The default-features local gate never compiles crates/cli/tests/metastore_live_tee.rs (gated behind the off-by-default metastore feature), so the T115 signature change to build_run_sink — the new fourth &FileTier parameter — broke its four call sites only in the CI feature jobs (E0061 on macos/ubuntu test + feature-matrix). The tests predate the file tier and exercise the no-file path, so &FileTier::empty() preserves their semantics exactly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Ticket: T115 — docs/implementation/130-T115-toml-loader-and-file-tier.md
Summary
Adds the
dagr.tomlloader and named-profile layering in dagr-cli, and inserts thefileprecedence tier beneathenvinresolve/resolve_opt(flag > env > file > default; tri-state and flag-wins semantics preserved). The run path andrun_to_storeare wired through the file tier;dagr.profile/dagr.configare reserved. A first-cut 13-key set is supported, with blob/pod-launch keys deferred to T117 surfacing as loud unknown-key diagnostics; file values parse with each knob's env grammar.check-feature-matrix.shnow forbidstomlin dagr-core and proves the assertion non-vacuous via the cli leg.Tests-first
Confirmed — failing tests committed first in ac01b88.
Definition of done
config_file.rs)filetier inserted beneathenvinresolve/resolve_opt; flag > env > file > default; tri-state and flag-wins preserveddriver,registry,run_flow,metastore_tee) wired through the file tier;dagr.profile/dagr.configreserveddagr.tomlin cwd leaves artifact and both fingerprints byte-identical (core test)tomldependency confined to dagr-cli; feature-matrix script asserts core unreachability non-vacuouslyOpen questions resolved
All recorded in docs/implementation/130-T115-toml-loader-and-file-tier.md §Open questions: no user-level path; no parent-dir walk;
tomlv1 (parse/serde/std, no serde derive, MIT-resolved, no deny.toml change); 13-key first-cut key set (blob/pod-launch keys deferred to T117 as loud unknown-keys); file values use each knob's env grammar; selected-profile-with-no-file is loud; shadowed tiers not parsed; no pod-side load; tasks.md has no T115 Q: items.Deviations
None.