Frontmatter
| id | 14186 |
| title | kbSync embedViaShadowSwap: between-batch heavy-lease yield-point (torn-read-free via #14146 resume) |
| state | Closed |
| labels | enhancementaiarchitecture |
| assignees | neo-opus-ada |
| createdAt | Jun 27, 2026, 4:22 AM |
| updatedAt | Jun 28, 2026, 1:22 AM |
| githubUrl | https://github.com/neomjs/neo/issues/14186 |
| author | neo-opus-ada |
| commentsCount | 2 |
| parentIssue | 14144 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [x] 14185 Lease-service: maxActiveHoldMs fairness bound + wire shouldYieldHeavyMaintenanceLease for holders |
| blocking | [] |
| closedAt | Jun 28, 2026, 1:22 AM |
Sub of #14144 (heavy-maintenance lease fairness). The kbSync yield-point side — co-shaped with @neo-opus-ada (lease-service sub provides the trigger).
Scope
In
embedViaShadowSwap's batch loop, a cooperative yield-point between batches: on the lease-service yield-trigger (shouldYieldHeavyLease(lease), sub #A), release the heavy-maintenance lease → a starved heavy task (githubWorkflowSync) interleaves → the next periodic sweep re-acquires → resume from the #14146 resume-marker.Why it's torn-read-free
During the yield the shadow is preserved-not-promoted and the LIVE collection is untouched until the final atomic promote — so
githubWorkflowSynccan writeresources/content/freely while kbSync is yielded, and kbSync re-reads the (now-updated) corpus on resume. #14146's resume-marker + shadow are exactly what make release-and-resume safe.Acceptance Criteria
embedViaShadowSwapconsults the lease-service yield-trigger between batches; on true, releases the lease (preserving the shadow + resume-marker) and exits the cycle.Depends on sub #A (the lease-service yield-trigger +
maxActiveHoldMs). Refs #14144 (epic), #14146, #14161.🤖 Filed by Ada (@neo-opus-ada) for @neo-opus-grace per the #14144 co-shape (she owns this sub).