Skip to content

refactor(artifacts): share GPU and media asset layout rules - #15150

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/shared-asset-layout
Nov 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/shared-asset-layout

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

GPU and media asset readers now share the layout rules that classify declared extents, retain complete regions in declaration order, and describe bytes outside the file. Both readers use the same positional read callback, which clips a request to the admitted extent and preserves the integrity failure if the source ends early. The change removes 43 lines.

Contract and scope

Each format keeps its decoder, typed region roles, admission limits, and coverage decisions. The shared implementation retains the existing diagnostic text, including Bink’s filtering of trailing-byte diagnostics. PR #14975 changes Opus channel mapping in the same media layout file.

Validation

Ran the formatter, Node 24.22.1 syntax checks on six files, and git diff --check. Compared both previous implementations against the shared code in 44 cases covering extent classification, region identity and ordering, clipped reads, EOF, cancellation, short reads, and malformed diagnostics. The read comparisons used a simulated file handle. Hosted CI passed all 96 GPU and media reader/layout tests at 47c4feb24. The complete selected shard passed 425 tests with one skipped.

@vincentkoc
vincentkoc marked this pull request as ready for review November 30, 2026 04:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T04:47:01.948705Z 47c4feb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · This refactor appears safe to merge; no actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This refactor appears safe to merge; no actionable issues were found.

Summary

GPU and media readers now share layout types, extent checks, malformed-input errors, and bounded positional reads.

  • GPU and media asset readers share layout rules.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  GPU[GPU reader] --> Read[Shared bounded read]
  Media[Media reader] --> Read
  GPU --> GPUFormat[GPU layouts]
  Media --> MediaFormat[Media layouts]
  GPUFormat --> Shared[Shared extent checks and errors]
  MediaFormat --> Shared
Loading

Reviews (1) · Last reviewed commit: "refactor(artifacts): share GPU and media..." · Reviewed by Greptile

@vincentkoc
vincentkoc merged commit c83031b into main Nov 30, 2026
42 checks passed
@vincentkoc
vincentkoc deleted the refactor/shared-asset-layout branch November 30, 2026 05:48
vincentkoc added a commit to xu91102/rea that referenced this pull request Nov 30, 2026
* commit '4ccc685dd5ed028bc625fdd8760539ce5a492d8d': (228 commits)
  test(asar): verify cleanup on the original file handle (morluto#15155)
  fix(ubi): bound smaller-grid probe memoization (morluto#15168)
  fix(artifacts): distinguish content from containment changes (morluto#15165)
  fix(bflt): retain complete text when data is truncated (morluto#15160)
  refactor(domain): reuse graph projection and validation helpers (morluto#15173)
  fix(iso9660): read a directory record's data length from its little-endian half (morluto#14801)
  test(ghidra): wait for each fixture spawn before expiring startup (morluto#15172)
  test(beam): reuse the CLI Evidence reader (morluto#15171)
  test(oci): share descriptor budget refusal assertions (morluto#15159)
  refactor(audit): share byte framing for offline audit logs (morluto#15162)
  refactor(evidence): reuse observed file reports for binary metadata (morluto#15161)
  fix(doctor): omit package-runner cache shims from installations (morluto#15059)
  refactor(packages): share package inspection budget contracts (morluto#15158)
  refactor(desktop): share completed command answer recovery (morluto#15156)
  refactor(views): share page byte reservations (morluto#15152)
  refactor(artifacts): share GPU and media asset layout rules (morluto#15150)
  fix(setup): name the detected host when Hopper setup does not apply (morluto#14449)
  fix(iso9660): read a directory record whose identifier padding byte is not zero (morluto#15020)
  fix(windows): report the ACE count a private DACL check observed (morluto#14450)
  fix(artifacts): read Ogg Opus channel mapping tables (morluto#14975)
  ...
vincentkoc added a commit to liziye627-design/rea that referenced this pull request Nov 30, 2026
* commit 'e18ed55bac14191010efe91ba61489cab1d2ba55': (137 commits)
  fix(artifacts): report macOS package bundle release versions (morluto#14860)
  test(asar): verify cleanup on the original file handle (morluto#15155)
  fix(ubi): bound smaller-grid probe memoization (morluto#15168)
  fix(artifacts): distinguish content from containment changes (morluto#15165)
  fix(bflt): retain complete text when data is truncated (morluto#15160)
  refactor(domain): reuse graph projection and validation helpers (morluto#15173)
  fix(iso9660): read a directory record's data length from its little-endian half (morluto#14801)
  test(ghidra): wait for each fixture spawn before expiring startup (morluto#15172)
  test(beam): reuse the CLI Evidence reader (morluto#15171)
  test(oci): share descriptor budget refusal assertions (morluto#15159)
  refactor(audit): share byte framing for offline audit logs (morluto#15162)
  refactor(evidence): reuse observed file reports for binary metadata (morluto#15161)
  fix(doctor): omit package-runner cache shims from installations (morluto#15059)
  refactor(packages): share package inspection budget contracts (morluto#15158)
  refactor(desktop): share completed command answer recovery (morluto#15156)
  refactor(views): share page byte reservations (morluto#15152)
  refactor(artifacts): share GPU and media asset layout rules (morluto#15150)
  fix(setup): name the detected host when Hopper setup does not apply (morluto#14449)
  fix(iso9660): read a directory record whose identifier padding byte is not zero (morluto#15020)
  fix(windows): report the ACE count a private DACL check observed (morluto#14450)
  ...
vincentkoc added a commit to viniciusdsandrade/rea that referenced this pull request Nov 30, 2026
* commit '76cb6645be39cf3844f7a8bb4568b02d8a713595': (95 commits)
  fix(macos-pkg): retain cpio hard-link contents (morluto#15157)
  fix(artifacts): report macOS package bundle release versions (morluto#14860)
  test(asar): verify cleanup on the original file handle (morluto#15155)
  fix(ubi): bound smaller-grid probe memoization (morluto#15168)
  fix(artifacts): distinguish content from containment changes (morluto#15165)
  fix(bflt): retain complete text when data is truncated (morluto#15160)
  refactor(domain): reuse graph projection and validation helpers (morluto#15173)
  fix(iso9660): read a directory record's data length from its little-endian half (morluto#14801)
  test(ghidra): wait for each fixture spawn before expiring startup (morluto#15172)
  test(beam): reuse the CLI Evidence reader (morluto#15171)
  test(oci): share descriptor budget refusal assertions (morluto#15159)
  refactor(audit): share byte framing for offline audit logs (morluto#15162)
  refactor(evidence): reuse observed file reports for binary metadata (morluto#15161)
  fix(doctor): omit package-runner cache shims from installations (morluto#15059)
  refactor(packages): share package inspection budget contracts (morluto#15158)
  refactor(desktop): share completed command answer recovery (morluto#15156)
  refactor(views): share page byte reservations (morluto#15152)
  refactor(artifacts): share GPU and media asset layout rules (morluto#15150)
  fix(setup): name the detected host when Hopper setup does not apply (morluto#14449)
  fix(iso9660): read a directory record whose identifier padding byte is not zero (morluto#15020)
  ...
vincentkoc added a commit to ShuaixinHuang/rea that referenced this pull request Nov 30, 2026
* commit '6c7dffc59b970fcfae023af3171d92ee0ac50f94': (137 commits)
  fix(json): classify JSON input heap headroom and string-ceiling refusals (morluto#14949)
  fix(macos-pkg): retain cpio hard-link contents (morluto#15157)
  fix(artifacts): report macOS package bundle release versions (morluto#14860)
  test(asar): verify cleanup on the original file handle (morluto#15155)
  fix(ubi): bound smaller-grid probe memoization (morluto#15168)
  fix(artifacts): distinguish content from containment changes (morluto#15165)
  fix(bflt): retain complete text when data is truncated (morluto#15160)
  refactor(domain): reuse graph projection and validation helpers (morluto#15173)
  fix(iso9660): read a directory record's data length from its little-endian half (morluto#14801)
  test(ghidra): wait for each fixture spawn before expiring startup (morluto#15172)
  test(beam): reuse the CLI Evidence reader (morluto#15171)
  test(oci): share descriptor budget refusal assertions (morluto#15159)
  refactor(audit): share byte framing for offline audit logs (morluto#15162)
  refactor(evidence): reuse observed file reports for binary metadata (morluto#15161)
  fix(doctor): omit package-runner cache shims from installations (morluto#15059)
  refactor(packages): share package inspection budget contracts (morluto#15158)
  refactor(desktop): share completed command answer recovery (morluto#15156)
  refactor(views): share page byte reservations (morluto#15152)
  refactor(artifacts): share GPU and media asset layout rules (morluto#15150)
  fix(setup): name the detected host when Hopper setup does not apply (morluto#14449)
  ...
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.

1 participant