Skip to content

fix(producer): attribute and stop oversized plans early#2773

Open
jrusso1020 wants to merge 1 commit into
mainfrom
fix/plan-size-breakdown
Open

fix(producer): attribute and stop oversized plans early#2773
jrusso1020 wants to merge 1 commit into
mainfrom
fix/plan-size-breakdown

Conversation

@jrusso1020

Copy link
Copy Markdown
Collaborator

What

  • add an exact, symlink-safe plan-size breakdown with fixed or hashed component labels
  • reject oversized plans after the compiled tree stabilizes, before video extraction
  • reject again after artifact promotion but before the full freeze/hash read
  • retain the exact post-freeze ceiling check and existing PLAN_TOO_LARGE contract/message prefix
  • remove only freeze-owned stale metadata before the preliminary check when callers reuse a plan directory

Why

The existing ceiling only runs after a multi-GiB plan has been fully materialized and hashed. Production examples range from roughly 3 GiB to 12.6 GiB. This gives us enough attribution to design Plan v2 from real data while avoiding obviously wasted extraction and hashing work.

Compatibility and rollout

  • no v1 plan artifact or plan.json format changes
  • no queue, routing, retry, worker-count, or steady-state render changes
  • under-limit plan bytes/hashes remain governed by the existing freeze path
  • intended for the candidate sidecar and canary lane before broader rollout

This does not interrupt a single FFmpeg extraction once it is running. A canaried extraction-budget monitor is a separate follow-up.

Validation

  • focused distributed-plan tests: 54 passed
  • full producer unit lane: 31 Vitest files / 384 tests plus all classified Bun lanes passed
  • typecheck, lint, format, Fallow, tracked-artifact checks passed
  • independent code review approved

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