Skip to content

[P0][Plan 1] SF-002 — Mark review stale when generation inputs change #16

Description

@Ankit6149

Confirmed problem

After a campaign is generated, changing notes, audience, links, repository, uploaded source text, selected destinations, provider, model, or endpoint does not invalidate the existing review. Users can unknowingly review, export, or publish drafts produced from an older source.

Scope

  • Define a normalized source snapshot and stable fingerprint.
  • Store the fingerprint on every generation run.
  • Recompute it whenever a generation-relevant field changes.
  • Keep old output visible but mark it as generated from an older snapshot.
  • Block final export and publishing while stale unless an explicitly designed archival action is used.

Acceptance criteria

  • Source A is generated, then changing to Source B immediately marks the campaign stale.
  • A persistent warning remains visible in Review; a temporary toast is insufficient.
  • Stale drafts cannot be published or exported as current work.
  • Regenerating from the current source clears the stale state.
  • The comparison is deterministic across save/reopen.

Required verification

  • Reducer/domain tests for every generation-relevant field.
  • Save/reopen regression test.
  • UI integration test for stale banner and blocked actions.
  • Frontend tests and production build must pass.

Dependency

Start after the minimal canonical CampaignState, SourceSnapshot, and GenerationRun contracts exist.

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