Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/positional-pop-to-fixtures.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@rundown-org/core': patch
'@rundown-org/core': major
---

# Move the positional pop out of product reach
Expand Down
8 changes: 5 additions & 3 deletions packages/core/src/runbook/session-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1953,9 +1953,11 @@ export class SessionService {
/**
* Release a runbook from an in-memory session (no IO, no transaction).
*
* Pure in-place mutation so composite operations — {@link releaseRunbooks},
* {@link popRunbookIfActive} — can release several runbooks against one
* session snapshot and commit once, instead of round-tripping per runbook.
* Pure in-place mutation so a caller can release against a session snapshot
* it already holds and commit once, instead of round-tripping per release.
* {@link releaseRunbooks} needs that to put several runbooks under a single
* commit; {@link popRunbookIfActive} releases exactly one, folded into the
* same transaction that decides whether the run is still the top.
*
* @param session - Session to mutate in place.
* @param runbookId - Runbook id to release from session targeting structures
Expand Down
9 changes: 5 additions & 4 deletions packages/core/src/testing/session-fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,11 @@ export async function stashRunbookUnverified(
* @param manager - State manager whose store holds the runs and the session;
* take the caller's own instance so the fixture shares one store with the
* test.
* @returns The new top-of-stack run id, or null when the stack was empty or the
* release removed nothing. Refused `execution_in_progress` or
* `recovery_required` instead when the popped run is execution-owned or
* awaiting recovery; the value is absent then.
* @returns The new top-of-stack run id, or null when no run remains on the
* stack — either because it was already empty and nothing was released, or
* because the run just popped was the last entry. Refused
* `execution_in_progress` or `recovery_required` instead when the popped run
* is execution-owned or awaiting recovery; the value is absent then.
*/
export async function popTopOfStackUnverified(
manager: RunbookStateManager,
Expand Down
Loading