Repository navigation
Name the real config in generated hash steps and headers - #21
Merged
Merged
Conversation
ndbroadbent
force-pushed
the
providers/config-path
branch
2 times, most recently
from
December 4, 2026 01:10
1d6667e to
8dbbdc2
Compare
Both providers ran `cigen hash --config .cigen`, so a cigen.yml project failed at the hash step, and the GitHub header always named `.cigen/workflows/` and a `cargo run` command. The core now sends the config's path from the project root (`CigenSchema.config_file`). Generated commands add `--config` only when cigen wouldn't find the config by itself, and the header names the config and the `cigen generate` command to rerun. A `.cigen/` holding only CI state (the binary and caches the skip flow keeps there) beside a cigen.yml is no longer taken for a second layout; the new mockci scenario for a cigen.yml project hit exactly that.
… of CI state (PR #21)
ndbroadbent
force-pushed
the
providers/config-path
branch
from
December 4, 2026 01:34
8dbbdc2 to
de0b4ae
Compare
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.
STATUS known problems 14 and 15: the coordinator's items (a) and (b). Rebased onto
main(after #15, #19, #13, #20, #22 and #24).(b) shares (a)'s plumbing (the provider has to know the config's name for both), so I did them together rather than coming back to it after the install step.
What changed
CigenSchema.config_file, the config's path from the project root as written after--config(cigen.yml,.cigen,ci.yml).cigen generatefills it from the config path's file name;WorkflowOrchestrator::executetakes it explicitly.cigen::plugin::config_file::config_flag, shared by both providers: no flag forcigen.ymlor.cigen(cigen hashfinds those by itself),--config <name>otherwise, and an error for a name that isn't safe in a shell command (or an empty one).cigen hashand the header use it. The header now reads# Source: <config>/# Regenerate with: cigen generate[ --config <name>].cigen hashcommands use it..cigen/directory besidecigen.ymlcounts as a second layout only if it holds config files (config.yml,config/,commands/orworkflows/). The new scenario found this: the skip flow keeps its binary and caches in.cigen/(bin/,cache/,skip-cache/), so after the first step everycigen.ymlproject "had both layouts" and the hash step failed. Item 5 (the install step) will move the binary out of.cigen/, but a.cigen/of CI state shouldn't break loading either way.Testing
skip_scenarios::a_cigen_yml_project_skips_and_runs(mockci) failed before the change and passes now. The first run executes, an unchanged tree skips, and a changed input runs.config_layouts::a_cigen_dir_of_ci_state_beside_cigen_yml_is_not_a_second_layout.github_provider::the_header_and_hash_step_name_the_real_config:cigen.ymlgets no--config;ci.ymlgets it in the header and the hash step.config_flagand the CircleCI hash steps..github/workflows/regenerated: only the header lines and the dropped--config .cigen. Golden fixtures unchanged (no fixture declaresinputs, so none has a hash step).task cigreen.README: the Status sentence no longer lists
cigen.ymlprojects as unable to skip in CI.Docs
The site pages (
docs/src/content/docs/): the skipping example has no--config, a note says when the hash step passes it, providers says what the header names, and configuration and cli say a.cigen/of CI state is not a second layout.