Skip to content

Playback: a foreground Load refused while the plaintext grants return is claimed again - #1018

Merged
GLinnik21 merged 3 commits into
plxnative:mainfrom
tiper:upstream/resume-refused-load
Oct 25, 2026
Merged

GLinnik21 merged 3 commits into
plxnative:mainfrom
tiper:upstream/resume-refused-load

Conversation

@tiper

@tiper tiper commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

The DID foreground edge withdraws every plaintext grant (grant::network_changed) and claims the parked Load in the same breath, so a server reached over a consented plaintext grant refused it ('stream: refused insecure credential transport'). The re-discovery minted the grant back a moment later and nothing claimed the Load again: the film stayed on a still frame after an app switch. The frame step now claims the refused Load again when the grant revision moves, up to three times.

tiper and others added 3 commits October 24, 2026 21:50
… is claimed again

The DID foreground edge withdraws every plaintext grant (grant::network_changed) and claims
the parked Load in the same breath, so a server reached over a consented plaintext grant
refused it ('stream: refused insecure credential transport'). The re-discovery minted the
grant back a moment later and nothing claimed the Load again: the film stayed on a still
frame after an app switch. The frame step now claims the refused Load again when the grant
revision moves, up to three times.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…wake

- retry_refused_foreground repeated the drive_foreground / finish_foreground_launch /
  idle::invalidate body of claim_press_after_decoder_release; both now call one
  claim_parked_foreground(app, input). The retry claims with ForegroundInput::DidForeground
  directly (wake_input(Wake, _) is that input for any saved clock).
- Drop the awaiting_load() half of the guard: claimable_clock() is Some only for Suspended and
  Prepared, both of which awaiting_load() already covers.
- Spell the retry countdown as (left > 1).then_some((now, left - 1)).
- Move the retry call above the plaintext-upgrade comment it had been spliced into, with its own
  one-line comment.

Behaviour identical.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit c923526 into plxnative:main Oct 25, 2026
20 of 22 checks passed
@GLinnik21

Copy link
Copy Markdown
Collaborator

Thanks @tiper, a still frame after an app switch is a nasty one to track down to the grant withdrawal. Merged.

What I changed before merging, behaviour the same:

  • the claim (drive the foreground, finish the launch, invalidate idle) is one claim_parked_foreground step, shared by the decoder-release wake and your new retry_refused_foreground.
  • dropped the awaiting_load() half of the retry guard, since claimable_clock().is_none() already covers it, and wrote the countdown as (left > 1).then_some(..).
  • main merged in clean.

FYI the first CI run died on a free(): invalid pointer abort in a plx_media hostsim test, which this PR doesn't touch. The re-run was green, and I'm tracking the flake separately.

@tiper

tiper commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Glad I could help, and thanks for tidying it up before merging.

GLinnik21 added a commit that referenced this pull request Oct 26, 2026
…ecycle's alone; the ladder owns refusals observed after the call returned

The pump's failed-open ladder and the foreground lifecycle both acted on a synchronous
refusal of a foreground-resume Load (StartFailed + load_failed): the pump set Error, then the
lifecycle settled the same refusal as #1018's retry and retired the Engine.

Split by who observes the refusal. The foreground actuator marks the Engine whose exact Load
attempt it follows (Engine::foreground_follows_load, set where it starts or takes over following
an attempt). The pump decides before stepping the machine: a failed Load on a followed Engine
whose route_start_status is Failed is the Load call's own result, so it returns and the
lifecycle's Failed settlement owns it. A refusal seen after the call returned, and a fresh play's
synchronous refusal (no lifecycle behind it), stay the ladder's.

The step-0 SYNC test is flipped to the desired behaviour (red first: the pump left Error), the
ASYNC test is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tiper added a commit to tiper/fin-native that referenced this pull request Oct 26, 2026
The maintainer pushed "Simplify:" commits onto every PR of ours he merged (plxnative#839, plxnative#937, plxnative#1018,
plxnative#1034), behaviour unchanged each time. The skill writes down what he changed (reuse the existing
path, one owner per state, values over globals, one named step for a repeated sequence, no
redundant guards, docs kept true) and the steps to take before opening an upstream PR so he does
not have to.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@tiper
tiper deleted the upstream/resume-refused-load branch October 26, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants