Skip to content

framesieve 0.4.0: reference diff mode - #1

Merged
Jncch merged 1 commit into
mainfrom
feat/reference-diff-mode
Jul 22, 2026
Merged

framesieve 0.4.0: reference diff mode#1
Jncch merged 1 commit into
mainfrom
feat/reference-diff-mode

Conversation

@Jncch

@Jncch Jncch commented Jul 22, 2026

Copy link
Copy Markdown
Owner

framesieve 0.4.0 - reference diff mode

Adds a third, opt-in diff mode so the gate can drop transient changes and only forward ones that stick.

What

  • New diff.mode: "reference" (default stays "previous"): compares each frame against the last emitted frame instead of the previous one. A change that appears then reverts to that baseline before it persists is dropped (a hover tooltip that comes and goes); a change that stays for the new policy.referencePersistMs (default 3000) is emitted and becomes the new baseline (text typed, a panel that opens and stays).
  • Detection is now two orthogonal axes, documented in the README: what to measure (diff.algorithm: downsample/pixel/edge) x what to compare against (diff.mode: previous/reference).
  • A temporal filter, not a semantic one: whether a persistent change matters stays the caller's/VLM's job.

How

  • Two-mask design: the adaptive weight is driven by frame-to-frame motion (BlockGrid.step takes score + motion masks; DiffEngine returns both), the gate by baseline divergence - so a held overlay keeps a high score and emits, while a chronically moving region is still down-weighted.
  • diff.commit() advances the reference on emit (prime/threshold only, never keepalive), synchronously in recordEmit so an async transform cannot desync it.

Backward compatibility

  • Default "previous" mode decides identically to 0.3.0: existing fixtures and examples/meeting/timeline.jsonl are byte-for-byte unchanged (goldens regenerate with no diff). New fixture tooltip-blip pins the transient-drop on real PNG frames.

Coordinated release

  • core 0.4.0; adapters 0.3.0 and cli 0.2.0 bump their framesieve range to ^0.4.0 (no adapter/CLI code change); redact ranges bumped (still unpublished).

Verification

  • npm run build && npm test && npm run lint && npm run smoke:pack all green (133 tests). Clean install resolves with no nested framesieve copies.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WyitJEKkrbE4VYXnk2buwA

… adaptive)

New opt-in diff.mode "reference" (default stays "previous", fully
backward compatible): compares each frame against the last EMITTED frame
instead of the previous one, so a transient change that reverts to that
baseline is dropped and only a change that persists for the new
policy.referencePersistMs (default 3000) is emitted. A deterministic
temporal filter for "important changes only" (a hover tooltip that comes
and goes vs text that is typed and stays); judging whether a persistent
change matters stays the caller's/VLM's job.

Two-mask design: the adaptive weight is now driven by frame-to-frame
motion (BlockGrid.step takes score + motion masks; DiffEngine returns
both), while the gate keys off baseline divergence - so a held overlay
keeps a high score and emits, and a chronically moving region is still
down-weighted. diff.commit() advances the reference on emit (prime and
threshold only, never keepalive) and runs synchronously in recordEmit so
an async transform cannot desync it.

Default "previous" mode decides identically to 0.3.0: existing fixtures
and examples/meeting/timeline.jsonl are byte-for-byte unchanged (verified
by regenerating goldens with no diff). New fixture tooltip-blip pins the
transient-drop behavior on real PNG frames.

Coordinated release: adapters 0.3.0 and cli 0.2.0 bump their framesieve
range to ^0.4.0 (no adapter/CLI code change); redact peer/dev ranges
bumped for workspace consistency (still unpublished).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WyitJEKkrbE4VYXnk2buwA
@Jncch
Jncch merged commit 3cac158 into main Jul 22, 2026
4 checks passed
@Jncch
Jncch deleted the feat/reference-diff-mode branch July 22, 2026 07:09
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