Skip to content

feat(cache): allow explicit software packet storage selection - #827

Merged
superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
orut34iop:codex/feat-software-packet-cache-storage
Oct 21, 2026
Merged

superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
orut34iop:codex/feat-software-packet-cache-storage

Conversation

@orut34iop

Copy link
Copy Markdown
Contributor

A host cannot currently select a disk packet cache on tvOS or a memory packet cache on other platforms without replacing the platform policy. Add LoadOptions.softwarePacketCacheStorage (automatic, disk, memory) and carry it through the existing load/rebuild path.

automatic retains the policy introduced in #776: purgeable memory on tvOS and disk elsewhere. Explicit disk retains volume/multi-session safeguards and direct playback on cache-initialization failure. Explicit memory keeps the existing forward/history bounds and reclaimable played history. Local direct-file reads, live DVR and native HLS remain unchanged. This is an opt-in host control, not a proposal to revert the measured tvOS default.

The internal factory is the production construction path; tests exercise real stores, disk failure/claim release, default selection and reload-option accounting. Public contract and changelog are included. Byte-budget controls are a separate contribution.

Validation on an Apple Silicon Mac (Mac17,3), macOS 26.7.1 / Swift 6.4:

  • swift build --build-tests passed; executables signed and verified with a valid Apple Development identity.
  • Strict cooperative-pool focused run: 15 tests passed.
  • Full default-traits suite, serial: 795 XCTest (one pre-existing skip), 4,619 Swift Testing tests across 634 suites passed.
  • Documentation links and git diff --check passed.

The default matrix's tvOS leg is conditional test coverage for a tvOS runner; it was not executed by the macOS host run. Platform builds and all-traits tests remain subject to upstream CI. No new device/media performance acceptance is claimed; #776's flash-contention evidence is why the automatic default stays unchanged.

@superuser404notfound superuser404notfound left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against current main: merges clean, full suite green on the merged tree (780 XCTest, 4,716 Swift Testing). The automatic default keeps the #776 tvOS policy untouched, and the factory is a faithful move of the old inline block. Thanks @orut34iop. A small follow-up lands on main: the explicit memory bounds now share one constant with the tvOS default, and the changelog entry is in house style.

@superuser404notfound
superuser404notfound merged commit e60cc82 into superuser404notfound:main Oct 21, 2026
4 checks passed
superuser404notfound pushed a commit that referenced this pull request Oct 21, 2026
…ngelog for #827

`.memory` repeated the tvOS default's 96 / 128 MB literals, so a retune of one would leave the
other behind. Both now read `memoryPacketStoreBounds`. The changelog entry is in house style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
@superuser404notfound

Copy link
Copy Markdown
Owner

Follow-up on main in e0203fc: .memory and the tvOS default now read one memoryPacketStoreBounds constant, so a retune cannot leave one behind, and the changelog entry is in house style. Behaviour is unchanged. Thanks again @orut34iop.

superuser404notfound pushed a commit that referenced this pull request Oct 21, 2026
…changelog for #829

A prepared commit rebuilt the primary takeover by hand and skipped three things the ordinary
external select does: it left a running OCR worker armed, logged nothing (a commit was invisible
in the diagnostic log), and did not re-assert the native rendition while the picture is off this
device (Sodalite#156). Preparation and commit also refused a session mid-seek as stale, although
`loadGeneration` already catches teardown; `.seeking` now counts as the same session.

The AVERROR_EOF literals read `FFmpegErr.eof`, and the intent counter no longer sits between
`loadGeneration` and its doc comment. The #819 and #827 changelog entries had landed under
7.40.0 and move to Unreleased with the #829 one, now in house style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
superuser404notfound pushed a commit that referenced this pull request Oct 21, 2026
Conflicts against #827 (packet store factory), #829 and #348 resolved:
the requested byte budget now reaches makePacketStore's disk branch,
and the AE#348 prepare/serve split stops with .loadFailed like start().
@superuser404notfound

Copy link
Copy Markdown
Owner

Released in 7.45.0 (52802af).

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