refactor: use project-named state file and store prompt/params directly
- State filename now derives from config: cards.bulkgen.yaml produces .cards.bulkgen-state.yaml instead of .bulkgen.state.yaml - Store resolved prompt text and extra params directly in state file instead of hashing them, making state files human-readable - Only file input contents remain hashed (SHA-256) - Thread project_name through builder and CLI - Remove hash_string() and _extra_hash() helpers - Update .gitignore pattern to .*.bulkgen-state.yaml
This commit is contained in:
parent
870023865d
commit
0ecf1f0f9e
7 changed files with 98 additions and 82 deletions
|
|
@ -147,6 +147,7 @@ async def _build_single_target(
|
|||
async def run_build(
|
||||
config: ProjectConfig,
|
||||
project_dir: Path,
|
||||
project_name: str,
|
||||
target: str | None = None,
|
||||
on_progress: ProgressCallback = _noop_callback,
|
||||
) -> BuildResult:
|
||||
|
|
@ -171,7 +172,7 @@ async def run_build(
|
|||
raise ValueError(msg)
|
||||
graph = get_subgraph_for_target(graph, target)
|
||||
|
||||
state = load_state(project_dir)
|
||||
state = load_state(project_dir, project_name)
|
||||
generations = get_build_order(graph)
|
||||
target_names = set(config.targets)
|
||||
|
||||
|
|
@ -209,7 +210,7 @@ async def run_build(
|
|||
)
|
||||
|
||||
_process_outcomes(outcomes, config, project_dir, state, result, on_progress)
|
||||
save_state(state, project_dir)
|
||||
save_state(state, project_dir, project_name)
|
||||
|
||||
return result
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue