Spun out of #422 item 2 (the triage there explicitly deferred this to its own design issue). This is the structural fix for the recurring parallel-PR conflict, as opposed to the discipline (PR #489) and the merge=union debate.
Problem
Every PR that files a REQ appends to the single artifacts/requirements.yaml, so any two in-flight PRs collide on its EOF. Documented + mitigated (PR #489), but the conflict is structural: one append-only file shared by all authors. It has recurred on REQ-184/185, 195/196, 206 (#487), … — a standing tax on the dogfooding loop.
Proposed direction
Let an artifact source be a directory of per-id files in addition to a single file — e.g. artifacts/requirements/REQ-NNN.yaml (one artifact per file), loaded by globbing the dir. Two PRs adding REQ-207 and REQ-208 then touch different files → zero conflict, ever.
Sketch / open questions for design:
This is behaviour-changing for the artifact layout, so it wants a design pass before code. Filing as the tracked design issue #422 asked for; not implementing unilaterally. Found via the hourly dogfooding loop (the heaviest generator of these conflicts).
Spun out of #422 item 2 (the triage there explicitly deferred this to its own design issue). This is the structural fix for the recurring parallel-PR conflict, as opposed to the discipline (PR #489) and the
merge=uniondebate.Problem
Every PR that files a REQ appends to the single
artifacts/requirements.yaml, so any two in-flight PRs collide on its EOF. Documented + mitigated (PR #489), but the conflict is structural: one append-only file shared by all authors. It has recurred on REQ-184/185, 195/196, 206 (#487), … — a standing tax on the dogfooding loop.Proposed direction
Let an artifact source be a directory of per-id files in addition to a single file — e.g.
artifacts/requirements/REQ-NNN.yaml(one artifact per file), loaded by globbing the dir. Two PRs adding REQ-207 and REQ-208 then touch different files → zero conflict, ever.Sketch / open questions for design:
load_artifactsalready walks sources; allow a sourcepath:to be a directory of*.yaml(each a single-artifact or small-list doc). Likely small — the YAML collector already handles multiple files.rivet add: when the target source is a directory, write…/REQ-NNN.yamlinstead of appending to a file.mutate::append_artifact_to_filebecomes "write new file" for dir-sources.rivetcommand (or one-shot) to explode an existingrequirements.yamlinto per-id files, and/or keep both layouts supported so adoption is opt-in per project.This is behaviour-changing for the artifact layout, so it wants a design pass before code. Filing as the tracked design issue #422 asked for; not implementing unilaterally. Found via the hourly dogfooding loop (the heaviest generator of these conflicts).