Skip to content

[P3 follow-up] keyframe validation/real-pass counter divergence at degenerate scale (>2000 rules) #58

Description

@project820

Follow-up from PR #56 delta review (SHIP; non-blocking).

registerCssKeyframes validates frames in an isolated context (counters from 0), while real emission charges the shared document context. When model CSS exceeds CSS_MAX_RULES (2000) or CSS_MAX_DECLARATIONS (20000) before a registered @Keyframes, the real pass strips the definition while animation:he-kN references were already rewritten → silently inert animation (bounded; no crash/data loss). Twin cosmetic case: keyframes whose only decls are animation-* can emit as an orphan definition.

Fix direction: two-phase emission (drop dead names before reference rewrite) or exempt registered survivors' frames from shared counters so both passes see identical budgets.

Source: architect delta review on b0eefcd (src/main/html-export-css-sanitize.ts:424-440).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions