Atomic evolution: insert new version + deactivate old version. **FIXED** — Same-name skill fix: - ``new_record.name`` is the same as parent - ``new_record.path`` is the same as parent - parent is set to ``is_active=False`` - ``new_record.is_active=Tru
(
self,
new_record: SkillRecord,
parent_skill_ids: List[str],
)
| 482 | await asyncio.to_thread(self._record_analysis_sync, analysis) |
| 483 | |
| 484 | async def evolve_skill( |
| 485 | self, |
| 486 | new_record: SkillRecord, |
| 487 | parent_skill_ids: List[str], |
| 488 | ) -> None: |
| 489 | """Atomic evolution: insert new version + deactivate old version. |
| 490 | |
| 491 | **FIXED** — Same-name skill fix: |
| 492 | - ``new_record.name`` is the same as parent |
| 493 | - ``new_record.path`` is the same as parent |
| 494 | - parent is set to ``is_active=False`` |
| 495 | - ``new_record.is_active=True`` |
| 496 | |
| 497 | **DERIVED** — New skill derived: |
| 498 | - ``new_record.name`` is a new name |
| 499 | - parent is kept ``is_active=True`` (it is still the latest version of its line) |
| 500 | - ``new_record.is_active=True`` |
| 501 | |
| 502 | In the same SQL transaction, guaranteed by ``self._mu``. |
| 503 | |
| 504 | Args: |
| 505 | new_record : SkillRecord |
| 506 | New version record, ``lineage.parent_skill_ids`` must be non-empty. |
| 507 | parent_skill_ids : list[str] |
| 508 | Parent skill_id list (FIXED exactly 1, DERIVED ≥ 1). |
| 509 | For FIXED, parent is automatically deactivated. |
| 510 | """ |
| 511 | await asyncio.to_thread( |
| 512 | self._evolve_skill_sync, new_record, parent_skill_ids |
| 513 | ) |
| 514 | |
| 515 | async def deactivate_record(self, skill_id: str) -> bool: |
| 516 | """Set a specific record's ``is_active`` to False.""" |
no outgoing calls
no test coverage detected