Refinements become versioned specs refining another spec #12
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thierryade/backend#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Replace the
Refinementlink model by refinement specs: a refinement is a regular, versionedSpeclocated at a direct child place, with a FK to the spec it refines.Model
Refinement(parent version, child place, target version or explicit absence).Spec.refines: nullable FK to the refinedSpec(null for root-place specs). Must be located atplace.parent.SpecVersion.refines_versions: M2M to versions ofspec.refines— one refinement version can cover several versions of the refined spec (e.g. parent v2, v3, v4 when the parent changed without the refinement needing to).SpecVersion.is_absence: absence is a property of a refinement version, not of the spec. An absent version's content is its mandatory justification. It needs no refinements of its own and is vacuously implemented. A refinement can be "deleted" (new absent version) and later come back (new non-absent version), history kept.R-*code as an alias, still resolved by the coverage upload; no newR-*codes are issued.Reopen cascade
When a spec (or a refinement spec) goes back to draft, every refinement spec covering the reopened version is reopened too, recursively down the tree, each with a pending decision:
is_absence(with justification).A project version cannot be validated while any decision is pending.
Data migration
Refinement→ setsrefineson the target spec and adds the parent version to the target version'srefines_versions; the refinement's code becomes an alias, its attachments and automatic tests move to the target spec/version.is_absence=True(validated if the parent version was), content =absence_reason, code alias = theR-*code.refinesFK.Impact
thierryade-specsscripts.