R164 Let one task at a time change a repository’s lock file

On by default

Where work is divided among agents the way Agent Fleet does, let only one task at a time change a repository’s dependency lock file.

Reason

Two tasks that change a lock file at the same time nearly always conflict at the merge, and the conflict is hard to resolve by hand: the dependencies have to be resolved again. Whoever splits the work keeps such colliding changes apart (Art. V §2(2)).

Verification

This rule is for the jurisdictions of rule 28. A lock file is the file a package manager writes with the exact versions of the dependencies, for example Cargo.lock, uv.lock, package-lock.json or go.sum. A task changes it from the first commit of its branch that changes it until the branch is merged or abandoned. The agent responsible for the job puts the tasks that change a lock file one after another; a worker that finds it must change a lock file while another task of its job is changing one tells the agent responsible for its job first and waits until that agent has ordered them.

Violated when the branches of two tasks both change a lock file of the same repository at the same time, neither of them yet merged or abandoned.

Provisions of the constitution it cites

Relations

Parent
R78 Agent Fleet
Requires
none
Conflicts with
none

Metadata

ID
164
Revision
3
Kind
rule
Status
trial
Slug
one-task-per-lock-file
Default level
project
Constitution revisions
>=1
Check
none
Default
on
Uses
Instructions instructions
Original language
English en
Translations
Chinese zh