feat(twitch): coordinate persistent upstream leases - #808
Merged
Conversation
Serph91P
marked this pull request as ready for review
August 22, 2026 06:58
This was referenced Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #783
Threat model
This changes user-controlled process starts, credentials, authorization, process-group ownership, recovery fencing, persistent state, and denial-of-service limits. The implementation stores no command line, OAuth value, proxy credential, signed URL, header, or playback token in a lease. Live stops require the stored LIVE owner, generation, and process identity. Reused PIDs and stale generations are rejected.
Rollout
Migration 040 is additive. New starts reserve durable leases before child creation. Existing recordings are not restarted or terminated during deployment. Reconciliation releases only expired leases whose exact process identity is no longer live.
Rollback
Do not downgrade while active lease rows exist. Drain or reconcile leases first. Migration 040 rejects a downgrade while STARTING, ACTIVE, ROTATING, or RECOVERING rows are present.
RED/GREEN evidence
336ac0024e8280ce087c7b3de52c02ffc37fdcf5: the new Live activation-failure regression observed activation without start time/fingerprint, and the Recording regression observed the assumed PID as PGID with no complete identity; each failed before production edits.baa1fe6e21fb426fc500a47eb566084372381fa6: both activation-failure regressions pass and require exact child reaping before the real SQLite-backed durable release.Verification
ruff check app/andruff format --check app/python -m app.migrations_initnpm ci,npm run lint,npm run lint:tokens,npm run type-check,npm run buildstreamvault:issue-783-localgit diff --check; tracked changed-file Unicode dash scan