Skip to content

[Context] Accept, reuse, correct and withdraw context without losing good history #2124

Open

Description

@sswiftdrtv

Parent epic: #2116

Priority and sequence

P0 within the Context Engine epic · CE08. Required for the first two-song/two-brief checkpoint.

Customer journey

A manager corrects an artist detail or removes a private source. Future briefs reflect the change, unrelated good research remains useful, and a slow older job cannot overwrite the correction.

Customer value and architecture

Make the engine improve over time instead of accumulating conflicting or stale text.

Scope

  • Validate each topic independently for schema, identity, evidence, coverage and readiness; an HTTP 200 or raw-string parse fallback is not acceptance.
  • Select compatible reusable results by source version/fingerprint, topic, recipe/schema version, coverage and authorized scope.
  • Publish current documents using input/revision checks; stale completions remain historical and partial failure preserves the last accepted version.
  • Implement scoped corrections, source withdrawal/deletion and targeted invalidation through recorded input relationships; suppress affected derived reads immediately and handle recomputation within authorized budget.
  • Keep roster removal separate from canonical artist deletion. Preserve dependency manifests while honoring removal/retention of private content; do not promise immutable content after deletion.
  • Expose freshness and gaps; no unrequested paid recurring refresh, global era authority or automatic identity merge/split.

Acceptance criteria

  • An old job cannot replace context based on newer evidence or a customer correction.
  • Failed/partial topics cannot erase accepted unrelated topics or be reused as complete knowledge.
  • Withdrawn/private sources disappear from future authorized reads and derived briefs; stale cached/exported service responses are invalidated within a documented bound.
  • Roster removal does not delete shared canonical history; customer deletion follows documented scoped retention rules.
  • Duplicate articles and creative proposals cannot be treated as independent factual corroboration.
  • Lifecycle, retention, readiness and reuse tests pass before using real private sources.

Blocking dependencies

These are completion prerequisites, mirrored by native GitHub blocked-by links. Contracts, fixtures and independent scaffolding may begin earlier.

Execution gates

Required before accepting and reusing real adapter output. Live retention/removal settings must be explicit.

Validation

Full-versus-preview races, recipe changes, correction-vs-completion, source withdrawal across dependent briefs/caches, last-roster removal, private reuse denial and partial-results tests.

Owning implementation

API topic acceptance/reuse/lifecycle domain operations

Delivery conventions

Shared API business logic serves HTTP, MCP and workers; clients do not duplicate it. Validate input with Zod and use the existing Supabase access layer. Database changes go through database-repository migrations and PRs. Use Vercel Workflows for new durable work. Reuse existing credits and record costs without exposing credentials or private traces. Every owning repository uses a feature branch and PR; distinguish fixture, local, merged and deployed verification.

Activity

  1. added
    enhancementNew feature or request
    priority:P0Required for the first shared Sites and external Widgets release
    on Sep 20, 2026
  2. sidneyswift commented on Nov 6, 2026

    @sidneyswift
    Collaborator

    Partly done. Source versions and results are immutable, older fetches cannot overwrite newer snapshots, withdrawn evidence is excluded from briefs, and saved snapshots report superseded or unavailable (recoupable/database#72, recoupable/database#78, recoupable/api#921). Catalog cases redact withdrawn sources from history (recoupable/database#120).

    Still open: scoped customer corrections, source withdrawal over HTTP/MCP (recoupable/api#1008, recoupable/database#102, unmerged), document version history (recoupable/database#99), and a documented invalidation bound for cached or exported responses.

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

    enhancementNew feature or requestpriority:P0Required for the first shared Sites and external Widgets release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions