Skip to content

RemoveObject does not advance the COS mutation counter, so live-view caches miss removals #302

Closed

Description

@michaelstonis

Parent

#87 → #33 Spec: Broadside v1

What is wrong

Found by #298: CosMutation.Epoch (#156) now advances on dictionary, array and stream-data edits, but PdfDocument.RemoveObject (#145) does not. Caches keyed on the counter (structure indexes, outline views, shown-items for reading order, content cache) can keep serving results that depend on a removed object until some unrelated edit advances the counter.

Spec clauses

ADR 0004 (live views); CLAUDE.md thread-safety contract

Notes

Builds on #156, #286 and #298.

Acceptance criteria

  • RemoveObject (and AddObject if a cache can depend on absence) advances the mutation counter.
  • Tests: build a structure index / outline view / reading order, RemoveObject an object they read, re-read, and see the removal.
  • No allocation regression on the live-view allocation tests.

Blocked by

Deliverables (every ticket)

  • A failing test first that reproduces the defect, through the public seam
  • XML docs citing clauses on public types touched
  • Conformance map rows updated in the same PR
  • PublicAPI.Unshipped.txt updated if the public surface changes

Activity

  1. added a commit that references this issue on Oct 14, 2026
  2. added
    integratedMerged into the spec integration branch; closes when the integration PR merges
    and removed
    in-progressClaimed and being worked on
    on Oct 14, 2026
  3. michaelstonis commented on Oct 16, 2026

    @michaelstonis
    OwnerAuthor

    Done: implemented, tested and merged into the integration branch spec/33-broadside-v1 (full gate green). It reaches main with PR #277.

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

Metadata

Metadata

Assignees

Labels

area:cosArea: cosbugSomething isn't workingintegratedMerged into the spec integration branch; closes when the integration PR mergesphase:4Phase 4ready-for-agentTriaged: an agent can pick this up without further clarificationtrack:4A-canvasTrack 4A-canvas

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions