Skip to content

[Epic] Context Engine: reusable music business context across every input #2116

Open
1 of 31 issues completed

Description

@sswiftdrtv

Current delivery status — October 25, 2026

  • Customer result so far: An existing saved assessment was reopened in the real app on October 23. Its reported references matched the retained snapshot; coverage remained partial. The dated acceptance receipt does not establish the same current account or a complete current web/MCP comparison.
  • Latest repair: API #1132 merged as 938943e6. It rechecks access after slow evidence reads and around saving, so revoked access can withhold private output. Independent reviews, 47 focused controlled tests and four final-head CI workflows passed. A denial after a completed write cannot undo that write; these checks do not establish atomic database enforcement or a live customer save.
  • Next owner — Context: Under access #2120, lifecycle #2124 and saved assessments/briefs #2130, establish the intended account and compare the complete saved text and input/source versions through web and MCP. Authorized hosted save/replay, denial and workspace continuation from a fresh authorized client remain separately unverified; controlled fixtures do not satisfy them.
  • Release acceptance: The Context/release owners retain #2134 for intended-environment deployment and customer-journey evidence. The epic remains open, including its downstream enrichment and two-song requirements.

All historical requirements, decisions and child scopes below remain in force.

Outcome

Primary priority: turn the repeatable work discovered through Recoup Records into supported Recoup product capabilities that other music companies can use. Records is the first operating customer, not a one-off consulting deliverable. Every milestone must produce both an evidenced Records business outcome and a reusable product capability; a result trapped in a chat, local script or private dossier does not complete the product milestone.

Artist, songwriter, company, campaign, release, song, catalog and supporting-material inputs become saved, reusable context. URLs, identifiers, files and names are input representations; account/workspace scope is execution context. A second related URL builds on what Recoup already knows instead of duplicating artists, replacing good research, mixing private customer work or repeating compatible paid analysis.

Separate two systems: the Context Engine collects and maintains evidence; Sites and other features select useful context and create outputs from it. A saved context document is not a campaign idea.

Current priority — agreed 2026-10-09

Next milestone: a music company can explain its existing business, show supporting evidence and identify missing information across its roster and related companies. Onboarding and evidence review are the first end-to-end workflow. Sidney agreed to this sequencing after a three-part architecture, source-evidence and implementation audit.

This supersedes the older release-only first slice and two-song/two-brief checkpoint as the immediate priority. Keep their completed engineering and downstream acceptance; do not discard them or keep treating them as gates on basic company onboarding. The canonical private plan is Business226, updated in its existing branch; an open plan PR is not a deployed product feature.

Productization acceptance — agreed 2026-10-09

Use the real task to discover requirements, identify the repeated step, implement it in the owning Recoup repository, and finish the task through that supported capability. Initial manual discovery is allowed; do not build a universal system before understanding the source or operation.

Each milestone must identify and verify:

  • Business result: what the operator learned or completed, supporting source versions, remaining gaps and actual readback.
  • Reusable capability: the input contract, shared human/agent operation, persistent output and documented limits. Examples include publishing onboarding, private source intake, format-specific importers, repertoire matching, discrepancy review and action-result tracking.
  • Repeatability: no Records-specific IDs, paths, credentials or assumptions in product logic. Demonstrate reuse with a distinct authorized case or representative synthetic fixture; distinguish fixture coverage from a second live customer deployment.
  • Continuation: another authorized human or agent can retrieve and continue the saved work through the product without reconstructing this chat or running an undocumented local script.
  • Privacy and authority: customer originals and extracted private facts remain in their authorized scope. Reuse code, parser definitions, schemas and workflow behavior, not private customer content. Product availability does not grant rights, collection authority or spending permission.

For publishing onboarding, the reusable result is a sourced repertoire and party/registration/interest inventory, with conflicts, missing evidence and next actions—not an unsupported promise of royalty recovery. A documented customer upload/export flow is a valid first product capability when a provider has no suitable connection; full autonomous collection is not required.

Prioritize the smallest capability needed by the current business milestone. Defer unrelated infrastructure and speculative generalization. Mark manual discovery, implemented, tested, deployed and live-verified states separately; do not call a documented process a shipped feature.

Ordered company-onboarding milestones

Order Deliverable Completion evidence Existing ownership
1 Company baseline Reuse verified roster/professional identities; represent related companies and business relationships separately from access. Show known music, counterparties, source locations/access, assertions, gaps and intended outcomes across artist, historical-license, creator and publisher cases. #2117/#2118/#2119/#2136/#2137/#2147
2 Linked private evidence intake Register original or authorized durable reference and version; connect one source to multiple relevant subjects. Distinguish available/imported/parsed/reviewed, missing/inaccessible/not-applicable, and preserve page/row/field provenance. #2120/#2121/#2124/#2125/#2140
3 Representative source batches Import an already documented distributor catalog and correction receipts, then a historical-license source batch and a writer/publisher batch. Manual and deterministic parsing first; imported claims are not ownership. #2139/#2140/#2142/#2147
4 Saved current-state assessment Human and agent can read the same authorized inventory, evidence, conflicts, corrections and next-action prerequisites. A new authorized session continues without reconstructing chat history. #2118/#2120/#2124/#2125/#2130
5 One useful authorized action Choose from the assessment; implement only its required policy, partner, spending and outcome checks and verify the real result. Operation-specific acceptance; #2122 and #2105/#2123 where required

Architecture gates for the next milestone

  • Link existing artist accounts, organization professionals and unresolved name inputs to consistent business subjects without replacing account/access IDs or provisioning a workspace per person/company.
  • Preserve person/company, recording/composition/release, roster/catalog and credit/rights/mandate distinctions. Adopt optional evidenced external identifiers where real input lacks them; never invent an ISRC or agreement to satisfy legacy storage.
  • Reuse scoped Context sources, versions, results, corrections and withdrawal. Add typed source-to-subject and evidence-backed assertion links rather than an unstructured second database or a universal node/edge rewrite.
  • Audit and correct research-to-roster side effects before broad catalog import. Discovering a credited collaborator must not enroll it without explicit intent.
  • Keep provider listings and source observations distinct from business releases, accepted identities, delivered files and legal claims. The current Spotify-only release view is not the whole-company model.
  • Private documents use authorized private storage. The legacy permanent Arweave knowledge-base route and artist-only file ownership must not be used as shortcuts for contracts or company records.

Intake acceptance and scope

Register source → preserve version → extract candidate facts → resolve/link subjects → review conflicts → save a useful assessment. Same source/version is recognized; changed input preserves history; failed parsing does not lose the original. Every extracted claim retains its source/page/row/field and review status. Unresolved identities and missing evidence remain visible. Authorization covers links, derived views and exports, not just original files. Source changes invalidate affected reviews; withdrawal/revocation removes protected evidence from future use. Verify real UI and shared HTTP/MCP reads and fresh-session continuation, not just local fixtures.

Inventory all agreed business cases before demanding every document be parsed. Process sources in order of the questions they answer. Basic catalog CSV import and manual source review do not require a paid model, full audio-file identity or a completed royalty-accounting system. Known gaps block only actions that depend on them.

Parallel work and deferrals

#2105/#2123 remain the paid-execution safety lane. Preserve shipped duplicate-charge/recovery work; finish specific reservation/refill/legacy-writer safeguards before paid execution. They are not prerequisites for unpaid source inventory, manual review or deterministic imports. No new spend, pricing, automatic top-up, rights registration, delivery or collection authority is approved by reprioritization.

Defer universal crawling/parsing, complete DDEX exchange, full royalty calculations, graph/search infrastructure, workspace-storage migrations, and separate repositories per party until a selected operation needs them. Do not wait for a fully populated data lake or build downstream action automation over disconnected evidence.

Loop status: active again at Sidney's explicit October 9 request, every ten minutes in bounded, non-overlapping batches. Continue the company-onboarding and productization sequence above. Restarting the loop does not approve outstanding PR merges, paid collection or financial actions. Historical progress entries below remain dated evidence; this section governs the current order.

Downstream enrichment checkpoint — retained

Two Spotify tracks for one artist → saved reusable context → two different briefs, through the real API/MCP.

Deliver a Sites creative-direction brief and a playlist-pitch brief. Prove correct identity, reuse, partial-failure recovery, evidence/coverage, privacy and reconciled costs. Stop for review before generating another website. A separate test harness or a model's own approval does not satisfy this checkpoint. This remains required for the enrichment release, after the company-onboarding priority above.

The complete enrichment release adds a single-video YouTube adapter, retained social images/captions, provisional era context and the real Sites integration.

Customer journeys

  1. First release: paste only a track URL → resolve artist/recording/release → obtain available audio, lyrics, artwork and research → save separately accepted context → see useful results and honest gaps.
  2. Next song: paste another URL for the same artist → reuse the artist and compatible fresh research → add song/release-specific evidence → update only affected topics.
  3. Music video: paste a YouTube video for another song → distinguish uploader from recording artist → retain captions, language and video story → enrich the same artist without overwriting the release or enduring brand.
  4. Different tasks: request a creative-direction brief or playlist-pitch brief → receive different compact context selections from the same saved knowledge; neither task repeats the collection.
  5. Private customer work: two customers share public artist facts → each keeps private files, strategy, corrections and derived work inside their own authorized scope.
  6. Interrupted work: close the browser or lose one provider → reconnect to the durable request → keep successful modules and retry only the missing work within the authorized budget.
  7. Correction/removal: correct a detail or withdraw a private source → affected future documents/briefs change; unrelated good knowledge remains, and older jobs cannot undo the correction.
  8. Actual Sites: paste a release URL into the existing composer → use saved context → create/review a meaningful working experience → explicitly publish. Context quality and finished-experience quality are separate checks.

Architecture decisions

  • API-first and MCP-enabled: one domain implementation handles authorization, persistence, work and billing. Expose it before Sites integration.
  • Use existing foundations: Supabase, current artist/song relationships, Vercel Workflows in API, existing wallet/usage ledger and Recoup provider integrations. No new graph/vector database, scheduler, Trigger.dev jobs or second credit ledger.
  • Shared identity, scoped context: verified public identity/evidence can be reused; private source material, instructions, corrections and derivations remain scoped. Customer overrides do not redefine global identity.
  • Preserve existing recording identity: keep songs.isrc and its current references; retain provider resources, release membership, video identity and credit attribution separately. Unknown matches remain unresolved. Names alone cannot merge artists.
  • Evidence versus interpretation: preserve source facts/observations, estimates, interpretations, customer assertions and creative proposals as distinct kinds. Prior generated campaigns are not independent research.
  • Version and attribute: retain source versions, raw/normalized results, accepted topic documents, input relationships and brief manifests. Preserve publication/event/retrieval/analysis time and precision.
  • Reuse accepted compatible work: key reuse by source version/fingerprint, topic, recipe/schema, coverage and access scope. Deduplicate running work within one owner scope; cross-customer running-job sharing is deferred.
  • Recover per module: persist stable requests before dispatch and completed modules independently. Protect current documents against stale completions. Partial failure must not erase accepted work.
  • Private and removable: access-controlled storage, scoped traces and withdrawal-aware derived documents. Publishing a Site uses an explicit allowed-field projection; it does not publish research or private instructions.
  • Source content is data: scraped text cannot become privileged instructions. Resolve authorized evidence before synthesis.

Song and visual understanding

  • Use existing Music Flamingo catalog_metadata and lyric_transcription presets, with exact resolved prompt/configuration recorded.
  • Produce a neutral song-summary topic. Existing song_description promotional copy must retain its label rather than masquerade as factual analysis.
  • Record actual media identity, language, analyzed range and full/preview/partial coverage. Seek full-song/full-lyrics context where available; missing evidence stays missing.
  • Extract artwork branding before creative concept selection. Keep visible observations separate from visual interpretation and production design choices.
  • Keep enduring artist brand, era, recording meaning, release artwork and video narrative distinct.
  • Use the selected GPT-6 Astra for planned vision/synthesis where available; record actual model/provider/configuration and do not silently substitute.
  • The Sites creative director receives selected branding text and relevant song/artist context, not raw artwork or the whole corpus. Later production stages receive the authorized media they actually need.
  • Trace exact prompts, text/media manifests, provider responses, accepted outputs, timing and cost privately. Include explicit output rationale or provider-supported summaries where available; do not require unavailable internal reasoning.

Enrichment-lane delivery and priority

The following P0/P1 labels describe the retained enrichment release, not the new company-onboarding order above. Priorities within that lane:

  • P0: first two-song/two-brief checkpoint and its correctness, privacy and cost prerequisites.
  • P1: the rest of the initial release: YouTube, visual-era context, Sites and deployed rollout.

Native sub-issues and blocked-by links mirror the table below. Dependencies are completion prerequisites, not a rule against parallel fixture development. CE01/CE02 start together. Live-schema verification gates production constraints, not contracts or mocks. Spend controls gate every paid integration run, not fixture engineering.

Retained enrichment implementation tickets

Order Priority Ticket Direct completion prerequisites
CE01 P0 #2117 — Verify the deployed schema and inventory context identity conflicts None
CE02 P0 #2118 — Define context contracts, ownership rules and acceptance fixtures None
CE03 P0 #2119 — Resolve provider identities and attach artists to the correct workspace #2117, #2118
CE04 P0 #2120 — Enforce context ownership consistently across API, MCP and workers #2118
CE05 P0 #2121 — Persist versioned sources, module results and context document lineage #2117, #2118, #2119, #2120
CE06 P0 #2122 — Run durable context requests with recoverable per-module execution #2121
CE07 P0 #2123 — Authorize context spending and reconcile provider attempts with existing credits #2118, #2121
CE08 P0 #2124 — Accept, reuse, correct and withdraw context without losing good history #2120, #2121, #2122
CE09 P0 #2125 — Expose context requests and lifecycle operations through shared API and MCP #2120, #2122, #2123, #2124
CE10 P0 #2126 — Ingest Spotify track, recording, release and credited-artist evidence #2119, #2122, #2124
CE11 P0 #2127 — Acquire song evidence and run Music Flamingo metadata, lyrics and neutral summary recipes #2123, #2126
CE12 P0 #2128 — Extract reusable artwork branding before creative concept generation #2123, #2126
CE13 P0 #2129 — Enrich artist research with dated sources and incremental reuse #2119, #2122, #2123, #2124
CE14 P0 #2130 — Compile task-specific briefs and pass the two-song accumulation checkpoint #2125, #2126, #2127, #2128, #2129
CE15 P1 #2131 — Add single-video YouTube context with recording and artist attribution #2130
CE16 P1 #2132 — Retain artist social images and build evidence-backed era context #2130
CE17 P1 #2133 — Connect the real Sites pipeline to saved context and selected briefs #2131, #2132
CE18 P1 #2134 — Release the Context Engine with docs, rollback and deployed verification #2133, #2094

Reuse the completed #2117/#2118 baseline and extend only missing contracts. Current company-onboarding order is above; the retained enrichment review checkpoint is #2130. YouTube #2131 and social/era #2132 can run in parallel afterward. Actual Sites integration: #2133. Deployed release gate: #2134.

The context spending ticket #2123 depends on the shared AI-accounting milestone in #2105, not completion of all hosting/top-up work in that larger ticket. This is an evidence gate tracked in the ticket body rather than an inaccurate whole-issue blocking link. All paid calls must pass it.

Relationship to existing work

  • Related product epic: Sites, Fans and Widgets #2093. Context Engine is a reusable platform epic, not a fourth widget type or a replacement for that epic.
  • Sites generation/design/testing #2094 retains ownership of creative concept, implementation, visual critique and bounded repairs. This epic supplies reusable evidence and selected briefs, then integrates them into that flow.
  • Shared billing #2105 owns common AI-accounting infrastructure. Context work adds request/module attribution and uses its AI-accounting milestone; it does not wait for unrelated session/hosting/top-up milestones or create competing billing.
  • Reuse existing song-analysis endpoint billing and presets, including related work in #2061. Prevent double debits when composing paid endpoints.
  • Existing Fans/Widgets services remain the trusted sign-in/player implementation. This epic does not build fan rewards, leaderboards, royalties or an alternative OAuth/player system.

Cost and operating decisions

  • Use existing shared AI credit/accounting rules and established endpoint pricing; no new Context-only multiplier or separate balance.
  • Authorize payer and bounded spend before paid work, using concurrency-safe reservations or equivalent authorization. Use stable attempt and settlement IDs; recover ambiguous acknowledgements without repeating providers.
  • Report provider expense separately from customer debit, including failed/waived work and unconfirmed estimates.
  • No global four-minute workflow cap. Recoverable provider timeouts, bounded retries and spending limits remain required.
  • No unrequested paid refresh, broad backfill, automatic top-up expansion or new price approval.

Before the first paid pilot, configuration must record actual per-request/pilot ceilings, paid-invalid-output and cancellation policy, private trace/media retention/removal, freshness rules and readiness-gap behavior. These are owned by contract/billing/lifecycle tickets; they must not stay buried in prompts or unresolved at launch.

Original enrichment scope boundaries (retained for that lane)

First input contracts support one Spotify track or one YouTube music video. Albums/playlists require later collection and budget semantics; preserve existing supported routes through an explicit legacy path rather than silently removing them.

Do not replace all artist/song tables, automatically clean production identity conflicts, build a universal era taxonomy, introduce continuous crawling, or perform automatic global identity merge/split. Preserve evidence/conflict attribution now so later repair is possible.

Enrichment release definition of done

  • Correct identity or explicit unresolved state; matching workspace attachment for existing/new artists.
  • Source-backed, separately versioned artist/song/release/era context accumulates across URLs.
  • Independent modules survive partial failure, stale completion and response loss.
  • Privacy holds through REST/MCP/workflows and all derived reads; withdrawal removes affected private context from future use.
  • Authorized budgets, stable settlement and provider/customer cost reconciliation pass concurrency and recovery tests.
  • Two different useful briefs come from the same store through actual API/MCP, with exact trace manifests and human review.
  • YouTube and retained social evidence enrich the same subjects without confusing uploader, guest, throwback or current era.
  • Actual Sites uses selected briefs; public output excludes private research; the finished experience is independently tested.
  • Database/API/chat/docs changes follow owning-repository PRs; additive migrations precede dependent code; rollback and deployed paths are verified.

This epic specifies implementation work. Creating the issues does not mean the schema, engine, billing controls or deployments have shipped.

Expanded implementation plan — 2026-09-22

Verified progress and current limits

Historical build order — superseded for immediate priority by October 9

  1. Close API/MCP integration gaps ([Context] Expose context requests and lifecycle operations through shared API and MCP #2125), beginning with catalog request forwarding. Audit allowed database operations, per-record provider ID binding, and permission checks before reuse/save ([Context] Resolve provider identities and attach artists to the correct workspace #2119, [Context] Enforce context ownership consistently across API, MCP and workers #2120).
  2. Connect authenticated request → server-built module plan → dependency-ready durable steps → authorized provider calls → persisted evidence ([Context] Run durable context requests with recoverable per-module execution #2122, [Context] Persist versioned sources, module results and context document lineage #2121). Independent branches may run concurrently; dependent branches wait for saved evidence. Preserve spend authorization, attempt accounting and safe retries ([Context] Authorize context spending and reconcile provider attempts with existing credits #2123).
  3. Implement every input journey below. Build shared identity/access/persistence primitives once; reuse collectors and existing Recoup services. Store unknown values and unavailable sources explicitly.
  4. Complete enrichment and acceptance/correction/withdrawal ([Context] Accept, reuse, correct and withdraw context without losing good history #2124, [Context] Ingest Spotify track, recording, release and credited-artist evidence #2126–[Context] Enrich artist research with dated sources and incremental reuse #2129, [Context] Add single-video YouTube context with recording and artist attribution #2131–[Context] Retain artist social images and build evidence-backed era context #2132), then selected task-specific briefs and the two-song human checkpoint ([Context] Compile task-specific briefs and pass the two-song accumulation checkpoint #2130).
  5. Connect Sites ([Context] Connect the real Sites pipeline to saved context and selected briefs #2133), complete docs, rollback and deployed verification ([Context] Release the Context Engine with docs, rollback and deployed verification #2134). Shared credits remain under [Sites] Meter Sites operations with credit reservations and spending limits #2105; do not duplicate Sites generation or valuation systems.

Additional child tickets

Rules that apply to every input

  • Researching or saving a record does not imply ownership, roster membership or a catalog interest. Those are explicit, separately scoped relationships. A company can retain catalog interests after an artist leaves its frontline roster.
  • Shared public identity/evidence stays separate from private account/workspace material and licensed analytics. Account sign-in does not grant authority to rewrite shared identifiers.
  • Support historical releases and planned/unreleased music; never invent ISRCs, store IDs, rights shares or sources. Track IDs and release IDs retain their provider/resource types.
  • Each completion report links code, tests and traces and distinguishes implemented, connected, fixture-tested and live-verified behavior. The reference model is proposed design, not approval to deploy every table.
  • Every run exposes inputs, outputs, provenance, prompts where applicable, dependencies, timings, reported costs, failures and unresolved gaps for human review.

Integrated music operating platform — 2026-10-08

Direction: connect the music-business model, Context Engine and real operating cases into one platform for humans and agents. A caller should be able to ask: What do we know, what supports it, what depends on it, what may we do next, and did that action work?

This section incorporates the domain/rights, agent-runtime/economics and product council synthesis. It establishes the integrated implementation direction and first operating-case slice. Detailed storage/API proposals still require owning-repository design and tests; no production migration, unrestricted agent authority or paid operation is authorized by this issue.

Canonical references and status

  • Music-business reference model: Business #221, merged at e693f2ec90635d96a465e107a5c295e22ebeddf9. Conceptual SQL remains a proposal, not a production migration.
  • Council architecture and first-build specification: Business #226, open for review as of October 8; head 52c03ded74944361ef6f5a51c98c55afbbe590d0.
  • DDEX evidence library: Business #225. Preserve its research-only source corpus; Recoup mappings and known losses live separately in the reference model.
  • [Context] Maintain the music business reference model and adoption map #2147 owns model adoption; this epic retains implementation coordination. Keep detailed private comparisons in Business and private operating evidence in the customer workspace. Public issues and fixtures use sanitized/synthetic examples.

System boundaries

Layer Responsibility Boundary
Music-business core Parties, assets, agreements, scoped interests, income entitlements, mandates and relationships Credits, copyright, income, collection authority and software access are distinct
Context Engine Capture/version sources and observations, preserve lineage, select evidence and compile bounded explanations Accepted source/context state is not human review, legal correctness or action authority
Operating cases Outcome, selected scope, findings, gaps, review versions and next actions Case state is separate from chat history and task completion
Execution Dependency checks, policy, concrete proposals, approvals when required, durable attempts, receipts and reconciliation Submission, acceptance and verified business outcome are different states
Human UI + HTTP/MCP Different interfaces to shared domain operations Same authorization, validation, business rules and billing
Partner/DDEX adapters Versioned exchange contracts with loss-aware mappings and validation Imported claims do not automatically become accepted ownership
Financial/usage modules Deterministic financial processing and attributable execution cost Royalty income, provider expense, customer charges and recovered cash stay separate
Recoup Records Real customer cases exercising the supported product Its repository is an operating workspace, not a second rights database or privileged backend bypass
flowchart TD
    Human[Human workspace] --> Operations[Shared domain operations: HTTP and MCP]
    Agent[Internal and external agents] --> Operations
    Operations --> Core[Typed music-business records]
    Operations --> Context[Context Engine and versioned evidence]
    Operations --> Execution[Plans, policy, reviews and durable execution]
    Execution --> Partner[Partner APIs and DDEX adapters]
    Partner --> Verification[Receipts and independent readback]
    Verification --> Core
    Execution --> Costs[Existing usage and credit system]
    Records[Recoup Records operating cases] --> Human
Loading

Retain the existing API/Supabase/PostgreSQL/Vercel Workflow foundations and current identifiers. Start with modules in the existing architecture. Introduce additional services or derived graph/search stores only when measured requirements justify them.

Three connected relationship views

  1. Business: people, companies, compositions, recordings, releases, files, agreements, scoped interests and collection routes. Business cycles can be valid.
  2. Evidence derivation: source version → observation → proposed interpretation → reviewed assertion → dependent decision.
  3. Execution: prerequisite checks → authorized operation → attempt → receipt → reconciled outcome. Executable dependency plans require cycle checks and explicit readiness rules.

Expose graph-shaped, typed reads over transactional records. A catalog edge never grants access or business authority. Agents request a relevant neighborhood rather than loading the entire company into a prompt.

The read contract resolves authenticated actor, authorized workspace, selected subjects/case, intended operation, effective date, known-as-of date, permitted relationship types and limits. Return supporting paths, source/review versions, conflicts, missing prerequisites, coverage, pagination and explicit truncation. Enforce access before returning nodes, edges, counts, snippets or existence hints; recheck sensitive reads and commits after permission changes. Shared public identity does not expose private contracts, research history or derived conclusions.

Storage, evidence, review and execution

  • PostgreSQL owns adopted queryable operational state. Authorized object storage owns original contracts, statements, audio, artwork and message payloads with hashes, source/connection scope, versions and retention. Git owns code, skills, plans, instructions and evidence references. Local reports are dated projections.
  • Keep recording identity, audio edition, binary asset version and delivery package separate. An approved master is an exact version, not the newest filename.
  • Preserve creator/company identity without automatically creating a tenant, login, membership or repository. Subject navigation can link people, publishers and music within one operating workspace; access is explicit.
  • A proposal records exact changes, subjects, destination, evidence versions, expected current state and budget. Independently check software permission, business authority, partner capability and spend authorization.
  • Review records bind reviewer authority to exact assertions/proposal, evidence manifest and policy version. Project-task completion is coordination, not rights approval or external-action permission.
  • Material source changes make affected current projections/reviews stale and block actions requiring fresh approval. Preserve authorized historical snapshots; withdrawal/revocation can make protected evidence unavailable. Unrelated valid evidence survives.
  • Use stable operation/attempt/settlement IDs, concurrency/version checks and a dispatch journal/outbox or equivalent mechanism. A potentially accepted external call followed by timeout becomes outcome_unknown; reconcile before retrying. Cancellation cannot erase completed external effects or incurred cost.
  • Agents use bounded domain commands, not arbitrary SQL or broad account credentials as the normal action interface. Routine authorized reads do not require repeated human confirmation.

Financial processing, tokens and business intelligence

  • Extend the existing wallet/usage ledger with organization/case/run/node/attempt/subagent attribution, model/provider, input/cache/output tokens, pricing version, estimated/reserved/actual expense, customer debit and settlement receipts. Do not create a second wallet.
  • Before autonomous paid fan-out, enforce an atomic reservation or equivalent serialized ceiling across child work. Settle once per intended chargeable attempt, reconcile unknown expense and release unused capacity. Failed work may incur provider cost even if customer billing differs. [Sites] Meter Sites operations with credit reservations and spending limits #2105/[Context] Authorize context spending and reconcile provider attempts with existing credits #2123 retain shared ownership.
  • Music accounting requires original statement-line identity, correction/reversal semantics, periods, currencies, allocations, contractual calculations and cash application. Use deterministic versioned calculations. Do not infer balances from an entitlement or repertoire lookup.
  • Connect opportunity → submitted claim → statement line → cash application while preserving each stage. Distinguish estimated opportunity from realized recovery.
  • Define whose economics a metric measures: platform margin or music-company return. Allocate advertising, creative, campaign and platform expense explicitly; avoid counting provider cost and the corresponding customer credit charge twice for the same party.
  • Insights must disclose source dates, coverage, metric definitions and missing inputs. Marketing links campaigns, content versions, permitted music uses, consent, spend and outcomes to the same core.

Publishing, distribution, acquisitions, neighboring rights, accounting, marketing and audience operations are specialized modules with explicit later implementation ownership. This epic establishes their shared context/operation foundations; it does not silently turn the original initial release into a complete royalty/accounting product.

Reuse and blockers found in the council audit

Source-only inspection used API d8a5f934f00b5abcb3a53908b8e17d194e501209, Database 827eed46ef2bd152e64f38531b6c292249be62fe and Chat ee4dbb8bdbabb445d824bd3f2a77022183f2b5fa. These are inspected revisions, not newly verified deployments.

  • Reuse Context's shared operations, scoped evidence, immutable versions, saved briefs and execution records. Source.
  • The current selector keeps one document per subject/topic. A rights view must preserve simultaneous claims, beneficiaries, territories and periods. Build a structured operating projection before compiling an explanation; do not add a single “rights summary” slot and lose conflicts. Source.
  • Module planning and an execution skeleton exist; general paid dispatch remains gated/unconnected. Empty dependency lists do not establish a complete business-operation planner. Connect one validated operation at a time.
  • Before adopting the conceptual rights tables, resolve mandatory asset/agreement scope limitations. Define evidenced basis, target and applicability for explicit assets, immutable schedules, represented parties and unresolved/non-contract bases. Do not fabricate agreements or song rows to satisfy the draft SQL.
  • Reuse tasks for coordination and the current usage UI for cost visibility. Task completion cannot substitute for exact-version review. Existing debit/audit is not proof of atomic reservation and stable per-action settlement.

Retained release-reconciliation slice — follows company baseline

Retain the existing-release case as a downstream consumer of linked evidence, readable and reviewable through human UI, HTTP and MCP. A selected recording exercises recording/composition and creator/publisher links where evidence supports them. The four Records cases test artist operations, former-license history, songwriter/producer activity and a distinct publishing business; private identities, terms and evidence stay in Records.

Provisional operation name: release_metadata_reconciliation. Its inputs are authorized read scope, a selected release and exact-version metadata observations. One source yields partial comparison coverage. Two sources enable comparison but do not establish truth by agreement alone. Unresolved subjects and missing sources remain explicit. Readiness means ready to review this metadata case; unimplemented rights, distribution or collection policies return unsupported.

The case returns existing subject/request references, ordered release/recording observations, supported credits and composition links, structured assertions, field-level discrepancies, simultaneous claims, source manifest, gaps, next-step dependencies, truncation and current review state. Missing contracts or masters block dependent conclusions, not all useful metadata review. Structured comparison requires no paid model call.

First engineering work: define versioned contracts and failing fixtures, then implement the shared authorized projection over existing Context evidence. Add exact-version review persistence through the owning Database PR after the live schema/access baseline; expose HTTP/MCP and the smallest human case view. Reuse project/task links for follow-up. Do not migrate all reference tables to deliver this slice.

Hosted acceptance

  • UI, HTTP and MCP return the same authorized case and discrepancies.
  • Identical intake/key retries do not duplicate identities or evidence; changed inputs conflict explicitly.
  • Every material assertion cites exact evidence or is labeled as a user assertion; differently scoped/conflicting claims coexist.
  • Unknown, zero, failed, uncollected, not applicable and denied stay distinct; denial leaks no private existence clues.
  • Relevant source changes invalidate current readiness/review appropriately; authorized history remains available subject to withdrawal/retention.
  • Review binds exact versions and reviewer authority; task completion does not approve rights or external action.
  • Private data cannot leak through another workspace's direct reads, relationships, summaries, cache, exports or traces.
  • Incurred usage is attributable; unmeasured cost remains unknown.
  • Human review records accuracy, usefulness, correction effort and a next action; hosted readback passes. Local fixtures alone do not pass this milestone.

The first slice performs intake/read/review only. Internal corrections, registrations, deliveries, redirection of collections and payouts need their own command contracts and scoped authority. This checkpoint does not replace or satisfy the original two-song/two-brief checkpoint.

October 8 implementation sequence — superseded by current priority above

Stage Deliverable Ownership / completion gates
Baseline + contracts Current deployed identity/access/storage map and operating-case contract/fixtures, developed in parallel #2117/#2118; missing live access does not block fixtures, but gates production constraints
Shared case + review Release observations, structured projection, exact-version review, API/MCP and human view #2119–#2125/#2130; #2139 for release membership, #2140 for originals, #2146 for inspection
Person/company context Navigate supported professional/company subjects without incidental access or tenant creation #2136/#2137; reuse existing identity and onboarding work
Rights/collection proof One writer/publisher work and a historical-license exception; explicit basis/scope types #2147 adoption mapping and #2142 registry evidence; separate implementation scope before rights/financial mutations
Controlled operation One demonstrated recurring correction with policy, stable attempts, receipts and readback Operation-specific implementation ownership; paid work gated on #2105/#2123
Financial processing Statement corrections, allocation and cash reconciliation Dedicated design/tickets required; not hidden inside Context or claimed complete by this epic
Portfolio operation Bounded agents prioritize catalog, release and marketing work using evidenced cost/outcomes Expand after correctness, privacy, recovery and economics are measured

This map does not mark existing tickets complete or rewrite their native dependency links. Extend their bounded acceptance during implementation, retain historical delivery evidence, and create narrowly scoped missing children when their contracts are defined. Preserve the original Context/Sites release gates separately. No parallel mega-epic, new identity registry, generic JSON rights ledger or unrestricted autonomous agent is required.

Execution progress — 2026-10-08: saved release review foundation

Implementation PRs and their original scope are listed below; current release status is recorded in the latest execution update:

Owning repository PR Implemented scope
Database recoupable/database#86 Additive immutable metadata-review receipts; actor/workspace checks, exact evidence fingerprint, retry handling and authorized history
API / MCP recoupable/api#973 Shared list/read/review/history actions over saved release evidence; no provider/model dispatch
App #2172 Workspace-scoped Release reviews page, source versions, missing coverage, metadata review controls and stale review state

This delivers the saved-evidence review foundation of release_metadata_reconciliation, not the complete operating-case milestone. It projects saved Spotify observations and current ISRC identity candidates. Cross-source field comparisons, simultaneous rights claims, composition/writer/publisher/contract/master linkage, follow-up task links and review-outcome measurement still need implementation. Missing evidence remains explicit; distribution, registration and collection remain unsupported. Releases over 100 positions cannot receive a whole-case review through this bounded view.

Validation at the published commits: 358 API tests passed with eight environment-gated skips; 17 focused app tests passed; disposable PostgreSQL 17 transaction tests passed, including real service-role access, scope denial, retries, stale evidence, withdrawal and revocation. Database CI also passed the new suite on PostgreSQL 16 plus existing onboarding and OAuth suites. Actual app components passed desktop/mobile Chromium checks with synthetic data and mocked auth/API. Lint passed (app-wide existing warnings remain). Full TypeScript diagnostics match unchanged baseline checkouts; this is not a claim that repository-wide TypeScript is green.

Remaining release gates: review and apply the owning database migration through the release process; deploy API then App; verify a real authorized case through hosted HTTP/MCP/UI and private-data denial. The prerequisite production schema/grant audit is now complete (see the audit below); this does not close the wider baseline ticket or hosted acceptance. PR preview readiness does not satisfy hosted business-case acceptance. No production migration, paid collection or production business-data change was performed. All hosted acceptance boxes above and the original two-song/two-brief checkpoint remain unchanged.

Review follow-up — 2026-10-08

The three implementation PRs now include review corrections: null-safe withdrawal assertions and a forward-only cursor migration; independent HTTP/MCP assertions and explicit nested payload types; smaller case UI modules with an empty-state chat link and a controlled expired-session message. Updated focused validation is 358 API tests plus 19 App tests and the disposable PostgreSQL suite. The original PR heads passed all CI; updated-head checks are running separately.

The production baseline was also attempted through the in-app Supabase dashboard. Its session requires sign-in, so that read-only verification is still pending. No production schema/data mutation or merge has occurred; the existing deployment and hosted business-case gates remain open.

Production prerequisite audit — 2026-10-08

Supabase MCP access to Recoup production now works. Read-only inspection confirmed PostgreSQL 15.6, all prerequisite Context migrations, the request composite key, required dependency tables/functions and service-role grants for reads and row locks. Existing Context evidence tables have RLS enabled with browser CRUD access revoked. A transaction using the actual service role confirmed scoped reads and the SHA-256 fingerprint primitive, then rolled back. The new review table/functions are not deployed. This is a narrow prerequisite audit, not a full production security audit.

The existing synthetic transaction suite also passed locally on PostgreSQL 15. Database PR #86 now tests PostgreSQL 15 and 16 in CI. Both versions, existing onboarding/storage suites and Supabase Preview passed on 6b7e959; the initial matrix package-source failure was fixed by using the official PostgreSQL apt repository. API documentation now records this audit at 16785d21; its fresh checks are separate from the previously passing implementation head. App implementation remains in its separate PR.

A workspace without saved release evidence must first collect an authorized release using the supported workflow. Folder scaffolding does not create Context requests. Do not seed fabricated production evidence or copy another tenant's requests to satisfy acceptance. Private dogfood findings stay in the Records case.

The previously reported Supabase preview project returned not found through this connector; that does not prove it was deleted, but its current state was not verified. Keep preview CI evidence separate from production and end-to-end acceptance. No merge, production DDL, provider/model call, paid collection or business-data mutation occurred during this audit.

Scheduled continuation and release progress — 2026-10-08

The user approved the three-PR release and requested a ten-minute continuation in the operating chat. Database PR86 merged at c1d130d1b76baaafd87e74ca8d75cb7bbc5781b6 after all checks passed. The immediate production readback still showed neither new migration nor the review table; merge is not yet verified deployment. Verify/apply through the documented database release process before releasing API973 and App2172.

App2172 now includes non-JSON/empty 401 recovery, action-specific response types, a named request error, localized evidence dates, and split component tests at aa7d4f5e. Eleven focused component tests and scoped lint passed; final-head hosted checks remain to be checked. The interrupted full TypeScript command produced no completed verification and is not counted as a pass. API973 at 16785d21 has passing checks. Keep deployment and real sourced-case acceptance separate; no paid collection or business-row mutation was performed in this batch.

Release continuation — 2026-10-08 19:58 UTC

Production readback confirms migrations 20261008160000 and 20261008160100, the review table with RLS, five security-invoker RPCs accessible only to service_role among the inspected application roles, and receipt SELECT/INSERT without UPDATE/DELETE. Database PR86 is merged and its narrow schema/grant rollout is verified.

API PR973 merged as db4d9a5400805c1354e97363206b5700a4791b12; Vercel reports successful deployment for that commit. Authenticated hosted operation parity and business-case acceptance remain unverified.

App2172 at aa7d4f5e passed its checks. Two subsequent review fixes are staged locally: reset the retry key only after a successful save (retaining it on uncertain failure), and strengthen the organization-switch fixture/assertions. Twelve focused tests, formatting and scoped lint passed. Publishing these fixes is blocked by the configured 1Password Git signing process, which failed before creating a commit. Signing was not bypassed; the user was asked to unlock/approve it. Preserve the staged work in .worktrees/chat/operating-case; wait for the user's signing-unblock response before retrying. App remains unmerged. After successful signing/push, verify the new head's CI, merge under the existing approval, verify deployment and update the parent gitlinks in a separate PR.

Signing blocker cleared — 2026-10-08

The user directed continuation without 1Password. App fixes are committed and pushed at 6300fcd71af9a823588246c40f7808d43dd30627 using a per-command signing override; global Git settings were preserved. The ten-minute continuation is active again. Preview deployment, consent and onboarding checks passed; unit tests and final code review are still pending. Do not merge based on the earlier head's checks.

A production service_role transaction exercised the new release-case list RPC for the authorized Records workspace and returned an empty list, then rolled back. This confirms the database read path, not HTTP/MCP/UI parity or sourced-case acceptance. The in-app browser remains signed in to Records. An isolated parent worktree is prepared at .worktrees/mono/release-case-reference on codex/release-case-reference; no parent references have changed yet. Existing API and Database pins are ancestors of their merged release commits. Next: finish exact-head App checks/review, merge under existing approval, verify live deployment/UI, then publish the scoped parent reference PR.

App ready; explicit merge confirmation pending — 2026-10-08

App2172 head 07e7c76f7d0fb66e9be827ef4d8c5e61fd7050e4 retains the review retry key through successful readback. Thirteen focused tests pass, including save and readback failure cases; all final-head CI and preview checks pass. The last automated code review found no new issues. Older open observations were examined: nested track/identity fields match the database camelCase contract; created_at is timestamptz rather than a date-only field; state factory naming and request response typing were fixed. Review threads were not mutated.

Automatic approval review rejected the app merge because the prior continuation replies were not accepted as explicit authorization for this exact PR. No app merge occurred; the PR is OPEN and CLEAN. The user was asked to explicitly approve merging app#2172 into main. The heartbeat is paused pending that reply and must not retry or circumvent the approval gate. Database/API release facts above remain valid; parent gitlinks and hosted app acceptance remain pending.

App deployed and hosted empty state verified — 2026-10-08

After the user's explicit merge approval, App2172 merged at 2f258a1abc153d4b676fc26689ce4a833d477ce8. Vercel reports successful production deployment. The production /releases page was read while authenticated in the intended workspace: Release reviews loaded successfully and showed the correct empty state with a route to chat. This confirms authenticated hosted list/UI behavior, not a real sourced review, mutation, cross-workspace denial test or MCP parity.

Mono257 is OPEN at 3bcbaa10f86daf0f47724d5c62fc89f55ae6bea6, changing only api/chat/database gitlinks to the three merged release commits. Automatic approval review requires separate explicit approval to merge that parent PR; the user was asked. Do not retry its merge until the reply arrives. The app's production deployment is unaffected by the parent checkout reference. Existing code, migrations and hosted evidence remain preserved. Next: complete the parent PR after approval and collect/verify the authorized first case through supported operations within the existing collection and spending constraints.

Direct locator intake — 2026-10-08

The supported API already separates ingest_release (save an unverified locator) from verify_release (gated workflow dispatch). The released review UI lacks a direct intake control. App2173 adds that bounded control using the existing authenticated API, with workspace-bound state and retry-key reuse. It dispatches no provider verification/collection or model operation.

Implementation head 4bd08f81 in .worktrees/chat/release-locator-intake, branch codex/release-locator-intake: 15 focused component/hook tests, scoped lint, formatting and diff checks pass. Full tsc reports errors outside the touched files (missing Streamdown modules/type mismatch and a Spotify image module); it is not green. Hosted/visual validation and final-head CI/review remain pending. This is an open implementation PR, not deployed behavior, and needs its own explicit merge approval after review. Production Records data was not changed. Mono257 remains awaiting the already-requested separate approval; no retry was attempted.

Direct locator intake review and visual verification — 2026-10-08

App #2173 now has review corrections pushed at 45fe0ac2c71959e2ba1ea28f7f9caaecd2028884. Completed submissions retire the idempotency key; incomplete readbacks retain it for safe retry. Confirmed save plus failed readback is distinguished from a failed save, including non-JSON sign-in recovery. Private case data still clears on readback failure because access may have changed; the suggestion to always preserve the old list was not adopted for this reason. Tests now scope list fixtures to the ingest organization and explicitly target the failed post-ingest list read.

Validation: 17 focused tests, scoped lint, formatting and diff checks pass. Synthetic local desktop/mobile browser verification covers save/list, blocked unverified details with disabled review controls, partial-success messaging and Refresh list recovery. No mobile horizontal overflow or captured browser errors. Local screenshots are synthetic; no production evidence intake ran. Full TypeScript limitations from the preceding checkpoint remain.

State: pushed and locally verified; exact-head CI/reviews/preview are pending. Next action: inspect results for 45fe0ac2, address valid findings, then request explicit App2173 merge approval when reviewable. Mono257 remains under its existing approval request; do not retry its merge without the reply.

Direct locator intake ready for approval — 2026-10-08 21:16 UTC

App #2173, head 45fe0ac2c71959e2ba1ea28f7f9caaecd2028884: all six reported checks pass, including Vercel preview. Cubic reports zero new issues. The remaining outdated retry-key and scope-fixture review threads were checked against the implemented corrections and resolved. Worktree is clean. The prior 17 focused tests and desktop/mobile fixture verification remain applicable; no code changed in this checkpoint.

Ready for explicit user merge approval. Production intake has not run; preview deployment is not production verification. Mono257 remains pending its separately requested approval. This bounded release/intake path now requires user decisions before deployment, so the heartbeat is paused after presenting App2173 for approval. On approval, recheck the exact heads and checks, merge only the approved PRs through normal workflows, verify production deployment, and continue supported Records intake. Do not assume App2173 approval also covers Mono257.

Direct locator intake released and exercised — October 8, 5:44 PM America/New_York

Sidney explicitly approved App2173. The unchanged checked head 45fe0ac2 was merged at 5bd42a3d87cb5788ef9904eec3baaa4004dc8140. Production deployment succeeded. The authenticated production form, save confirmation, saved list, case read and list persistence after a full reload were verified in the authorized private operating workspace.

The first real locator intake is saved. Read-only owner-scoped backend verification confirmed request → attempt → result → source-version lineage, accepted customer-assertion evidence, a successful user-submission receipt and zero confirmed provider cost. Metadata and rights remain unverified; no provider collection workflow was dispatched. Exact source IDs and the screenshot are retained solely in the existing private Records case/PR.

The review projection correctly blocks metadata review for the locator-only case. It currently shows zero evidence versions because its manifest covers saved Spotify observations rather than submitted locator evidence. Future work should assess whether this distinction needs clearer UI coverage. This observation is not proof of missing backend lineage.

Not yet verified: collected release/track evidence, denied cross-scope reads, stale evidence review, review receipts or HTTP/Recoup Context MCP parity. Supabase MCP readback is not Context MCP parity. Next batch: reuse the saved request; inspect the supported collection gate and capabilities without enabling flags or incurring unapproved provider/model costs, then continue only authorized evidence work.

Mono257 was updated to head 9b084f1e367b594349ee7ec60d594d2476cd0c13, still only api/chat/database references; it remains separately unapproved. The recurring work resumes after this completed release batch.

Collection gates and database scope guard — October 8, 6 PM America/New_York

Read-only Vercel inspection confirmed the active production API is READY at db4d9a54. Both Spotify release/track collection flag names are absent from the deployed environment-name list and current production project configuration. The matching released code defaults them off. No settings were changed or provider collection attempted. The release adapter records provider expense as unknown; locator intake's zero-cost receipt must not be generalized to collection.

The saved private operating case was denied by the production database read function under the same actor's personal owner scope (SQLSTATE42501), and read successfully in its authorized organization scope. This verifies the database owner/request guard only. Authenticated HTTP/Recoup Context MCP parity, stale-review behavior and completed review receipts remain unverified. No callable Context MCP tool is exposed to this chat; plugin-directory discovery returned no Recoup result. This is a client capability limitation, not a claim that the API lacks its registered MCP tool.

Next independent work: inspect existing #2123 spending controls and their #2105 AI-accounting/#2061 prerequisites before proposing a bounded pilot. Reuse existing wallet/usage primitives, leave collection flags off, and do not create duplicate intake. Private receipts remain in Records.

Spending prerequisites and uncertain-save correction — October 8

The existing credit preflight is a balance check, not atomic reservation; the shared #2105 AI-accounting milestone remains unproven for #2123. The audit and concrete integration constraints are recorded in #2123. No new wallet, prices, provider calls or production financial mutations were introduced.

API #974, branch codex/context-completion-reconciliation, head 75197774394a5f42f74ca724e838cb85fdb09167, fixes one observed orchestration gap: completion acknowledgement loss becomes needs-reconciliation rather than a persisted failed node, even if the best-effort uncertainty mark also fails. Two regression cases reproduced the false failure before the fix; 35 relevant fixture tests, full lint, scoped formatting and diff checks pass. Worktree: .worktrees/api/context-completion-reconciliation. CI/review is pending; new explicit merge approval is required. This change is not deployed and does not activate collection.

Next: inspect exact-head review/checks for API974 and resolve valid findings; then prepare the scoped PR for approval. Continue the shared reservation audit against existing billing primitives, preserving all collection restrictions.

Reconciliation review checkpoint — October 8, 22:18 UTC

API974 review corrections are pushed at 673f0638: uncertain enrichment claims now stop before provider dispatch; both coordinators preserve uncertainty rather than recording failed outcomes; in-process coordination drains existing work before returning; original RPC causes remain internal. The dependent-dispatch regression now verifies the exact node key. All three review findings are addressed.

45 focused tests across 10 files, full API lint, scoped formatting and diff checks pass. Follow-up head b68cd42d addresses the subsequent maintainability finding by extracting unchanged validation and types; the coordinator is 97 lines. The same 45 tests, full lint, formatting and diff checks pass after extraction. CI/review on this latest head is pending; not merged, deployed or production-verified. Collection stays off and no financial/provider mutations ran. Next: verify this head, address new valid review findings and request explicit API974 merge approval when ready. The accounting prerequisites in #2123 now also cover existing refill and auto-top-up interactions; no second ledger or billing changes were introduced.

Callback validation review checkpoint — October 8, 22:33 UTC

API974 head b68cd42d passed all seven checks, but review identified a malformed callback gap. Follow-up 111bed3f validates prepare before any authorization, preparation or provider work; three regression cases failed before the fix. 48 focused tests across 11 files, full lint, scoped formatting and diff checks pass. Cross-coordinator graph-validation consolidation was explicitly deferred as pre-existing duplication outside this bounded fix. New-head CI/review pending; approval has not yet been requested, and nothing is merged or deployed. Next: verify the latest head and seek explicit API974 approval once ready. No provider calls, spend or production changes.

API974 ready for approval — October 8, 22:41 UTC

Verified head 111bed3fe2e8dd0dac54f6e4beee975425711355: all seven checks pass (format, lint, unit tests, MCP OAuth compatibility, CodeRabbit, Cubic and Vercel preview); no unresolved review threads; worktree clean; PR mergeable. Local evidence remains 48 focused tests. Explicit API974 merge approval is now requested per the owning repository workflow. Not merged or production-deployed. The heartbeat is paused while that decision is pending. After approval, recheck the head/checks, merge this specific PR and verify production deployment. Mono257 retains its separate approval boundary. No paid collection, provider calls or financial changes occurred.

API974 released — October 8, 7:16 PM ET

Sidney explicitly approved merging API974. Rechecked head 111bed3fe2e8dd0dac54f6e4beee975425711355, all seven passing checks and no unresolved threads, then squash-merged at c71e89c07569ac489bf49a01e009f6ff480f22ec. The merged tree matches the tested head. Vercel production deployment dpl_E3rT6BouZhxuGWjDLwKmZBxLUYoQ is READY, and api.recoupable.dev resolves to that exact commit. An unauthenticated list_release_cases request returns HTTP401. This is deployment and authentication smoke evidence, not authenticated HTTP/MCP parity or a production simulation of lost acknowledgements; those fault paths remain fixture-tested. No collectors, paid providers or financial mutations ran.

Mono257 now includes the API merge at head 9e870bfd262c4dcdebd5ddd5cb7e83f38a05e7bc; still only api/chat/database gitlinks, still separately unapproved and unmerged. Next bounded batch: continue useful approved Context accounting-prerequisite engineering from #2123/#2105, checking actual current implementation and ownership first. Reuse the existing wallet; do not activate collection or duplicate the saved Records intake.

Stable charge receipt prerequisite — October 8, 7:29 PM ET

Database87, head dd34cf0d956e5b585a68b864f2936fd08b3b11fa, and API976, head 59c11a2f, implement an opt-in stable charge receipt using the existing wallet and usage log. Same billing owner/work key/normalized payload returns the saved receipt; changed input conflicts. Database tests exercise duplicate/concurrent delivery, rollback and denied browser roles. The API adapter preserves uncertainty without retrying or generating another charge identity. No live caller is changed or connected.

Read-only production schema inspection found that credits_usage has an integer primary key but no unique account index. The new function rejects zero/multiple wallet records and debits the exact locked row ID, instead of calling the legacy account-wide debit. This prevents this operation from debiting multiple records, but does not repair existing records, constrain future legacy creation, or complete wallet identity enforcement. Before reservations, resolve that shared ownership invariant explicitly; do not infer duplicate production rows from a missing constraint. No real balances were read or changed.

Validation: eleven real transaction tests pass on disposable PostgreSQL 15/17; CI receipt checks pass on 15/16. Thirteen new API adapter cases plus eleven existing billing cases, full API lint, scoped format and diff checks pass. Remaining CI/review pending. Neither PR is merged or production-deployed. These receipts depend on retaining audit events unchanged. No new wallet, prices, top-ups, spending flags or provider calls.

This is only the duplicate-charge/reconciliation prerequisite. Remaining shared AI accounting: before-call reservations, request/pilot ceilings, interactions with refill/legacy writers, retained identities, provider-expense versus customer-charge reporting, and approved failure/cancellation policy. Existing debit behavior can still yield a negative balance; the new unused receipt function is not spending authorization. Next batch: inspect exact-head reviews/checks, fix valid findings and prepare explicit approval for these two PRs before rollout.

Receipt review follow-up — October 8, 7:32 PM ET

Database87 head dd34cf0 has passing automated transaction checks and a successful Supabase Preview. Read-only inspection of that preview confirms the new function exists, service_role can execute it, and anon/authenticated cannot. No hosted charge or balance test was run. Cubic review remains pending.

API976 required a current-main update because its protected branch requires up-to-date checks. Merged released API975 into the feature branch without conflicts; new head 7bca633e retains only the receipt feature relative to main. All 24 focused tests, full lint and diff checks pass after the update; fresh CI/review pending. Both worktrees are clean, no unresolved findings at this checkpoint, neither PR merged or production-deployed. Next: inspect exact-head results and request approval only when review-ready.

Charge receipts ready for approval — October 8, 7:40 PM ET

Verified Database87 at dd34cf0d956e5b585a68b864f2936fd08b3b11fa and API976 at 7bca633e17df4e83c254a8d3a01f2b216b9d4ab7: all checks pass, including previews and reviews; no unresolved review threads; both merge states CLEAN and worktrees clean. Local validation remains 11 real database transaction tests and 24 API charge tests. Read-only database preview permissions were verified in the prior checkpoint.

Explicit approval for these two PRs is now requested. The recurring task is paused pending that decision. On approval: recheck exact heads, release Database87 through the normal workflow, verify production function definition/permissions without invoking a charge, then release API976 and verify deployment. These unused primitives do not activate spending, enforce budgets, change legacy callers or complete the shared accounting milestone. Mono257 retains its separate approval boundary.

Charge receipt release verified — October 8, 10:33 PM ET

Sidney explicitly approved Database87 and API976. Database87 merged at f446984ab6933716b8fcc0aae8ef87493d84b9c7; normal Supabase integration applied 20261009000000_record_credit_charge_once. Production migration history, function body SHA-256 18f5657dc93408e03c0d8fc9731d73d11e5fc22924f98b5c8f41389155aa4ab9, invoker execution and pinned search path match the reviewed function. service_role may execute; anon/authenticated cannot. No charge function was invoked against a real wallet.

API976 was refreshed against released main for strict branch protection, retested (24 focused cases and full lint), and merged only after all final-head checks passed and no unresolved reviews remained. Checked head aeff080e6c21db7ddb18072219fc59187c1a0108; squash merge 348c481e0efb96293c66c305310222155ef8602f has the same tree. Vercel production dpl_AzNHCH2QQp99yzLxsLfJyFxQkDGm is READY; api.recoupable.dev maps to that commit. Unauthenticated release-case list still returns HTTP401.

No live caller uses the new charge adapter. No balances, prices, paid-provider flags or auto-top-up settings changed. This release supplies retry-safe charge identity, not a completed reservation/budget system or hosted payment test. Next approved batch: inspect wallet creation/refill writers and implement the smallest shared reservation prerequisite under #2105/#2123, preserving stable receipts and leaving paid Context collection off. Account-level wallet uniqueness, legacy writer compatibility, request/pilot limits, retained charge identities and explicit failure policies still need completion.

Mono257 now contains the released API/Database references at c422daa10bf8df9a34920b6a1ae4fac799044bad, still only three platform gitlinks and separately unapproved/unmerged. The heartbeat resumes after this approved release.

Single-wallet prerequisite — October 8, 10:51 PM ET

Database88, head fb4dd28ec3ee43053505651232e033531ac3d7ef, enforces one credits_usage row per non-null billing account. The migration changes no balances, usage receipts, prices or role grants. Existing duplicates fail installation for explicit review; it never merges/deletes balances. Installation has bounded lock/work timeouts. Nullable-owner behavior is preserved, and those rows are not valid charge payers.

A read-only aggregate production preflight found zero duplicate account groups and zero unassigned rows; no account identities or balances were returned. This is a point-in-time observation, not a deployed constraint. All 18 new/existing credit transaction tests pass on disposable PostgreSQL 15/17. Five new regression assertions failed before the migration, including all twelve concurrent initial inserts succeeding. CI on 15/16, Supabase preview and review are pending. Worktree .worktrees/database/credit-wallet-identity, branch codex/credit-wallet-identity, is pushed and clean. No merge or production migration; this PR requires its own approval.

Source audit confirms the API's initial-read fallback already rereads after a failed insert. A concurrent legacy admin grant may now fail and roll back instead of creating a second wallet; no grant retry is introduced. Remaining hazards: refill writes an absolute balance based on an earlier read; top-up increments and unaudited deductions also use read-modify-write. Account uniqueness does not fix those lost updates, coordinate old spenders with holds, or implement request/pilot ceilings. Inventory, rollout checks and limits are in the PR's tests/CREDIT-WALLET-IDENTITY.md.

Next bounded batch: inspect Database88 exact-head CI/preview/review, address valid findings, then prepare explicit approval. Continue scoped refill/legacy writer engineering afterward without enabling paid callers. No budget values, prices, provider collection, top-ups, financial mutations or duplicate Records intake occurred. Mono257 remains separately unapproved.

Database88 ready for approval — October 9 UTC

Sidney requested pausing the ten-minute loop and continuing manually; the existing heartbeat is PAUSED and must remain paused until explicitly resumed. Database88 review corrections are pushed at c5a12d025f52b4c59d971d220002eb0a83af237d: release notes now identify the ACCESS EXCLUSIVE lock and its read/write impact; tests require the migration file rather than silently falling back. All 18 local credit transaction tests pass after corrections. All nine exact-head checks pass, and both review findings are confirmed addressed/resolved. The Supabase preview database shows a validated UNIQUE(account_id) constraint and valid unique backing index. This proves preview installation, not production rollout.

Database88 remains unmerged and requires specific approval under the standing per-PR release rule. No production schema, balances, prices or paid flags changed. On approval, recheck the exact head, required checks and aggregate duplicate preflight; merge through normal workflow; verify production migration and constraint metadata. Keep Mono257 separately unapproved. After this prerequisite, concurrent refill/top-up absolute writes still need a bounded fix before reservations and paid Context collection can be activated.

Activity

  1. added
    enhancementNew feature or request
    priority:P0Required for the first shared Sites and external Widgets release
    on Sep 20, 2026
  2. 53 remaining items

  3. sidneyswift commented on Oct 9, 2026

    @sidneyswift
    Collaborator

    Original-intake bounded checkpoint: API991 c553d187 catches an authentication dependency rejection before admission/body/storage and returns redacted503 with private/no-store/CORS headers. Regression failed before fix;104 originals/route tests, full lint/scoped TypeScript/format/diff pass locally. Default-disabled; no GET delivery or activation.

    Database94 94b250c9 / Database95 b3003c39 add forward-only30300 nonblocking source contention and30400 retained-receipt replay before source creation lock. Fresh CI at intermediate95 head4f5ee71 caught transient exact-retry denial during transaction lock release ordering; deterministic held-lock replay test reproduced it then passed after correction.18 registration/26 combined executions pass on each disposable PostgreSQL15/17. Earlier preview-applied migrations unchanged. Migration timeouts do not cap later RPC calls; owner/row waits still depend on caller session. Source protection covers this RPC, not raw service writers. Split concurrency test module retains CI discovery.

    Four review findings replied/resolved; fresh final-head CI/review pending. Existing approval questions remain pending without repetition, no new merge approval requested. No merge, production migration/deployment, enabled intake, customer upload, provider/financial or rights operation. Existing customer request/source IDs preserved; no new business completion claimed.

    Next: inspect final-head CI/reviews, then controlled authenticated original delivery using existing retained lookup/readback (strict receipt/workspace/current-scope/withdrawal/actual-bytes/payload/private response). Distributed concurrency, retained storage/orphan controls, explicit legacy recovery and complete authenticated synthetic write/read/recovery remain activation gates. Representative deterministic imports, saved assessment and authorized Records action remain incomplete.

  4. sidneyswift commented on Oct 9, 2026

    @sidneyswift
    Collaborator

    Disabled original-delivery checkpoint: API99180da3786 adds GET to the existing default-disabled route; strict receipt/optional organization metadata, current shared auth before admission/lookup,4MiB trusted reader bound before download and Blob/digest/type/current receipt/withdrawal recheck. Private/no-store fixed-filename attachment/nosniff, no path/signed capability. GET/POST/recovery share8global/1actor60s, so immediate readback can wait for Retry-After. No environment activated.

    API988135b884f carries bounded retained reader:78 local cases pass. API991145 originals/route plus13 existing shared-auth tests pass, full lint/scoped TypeScript/format/diff.6 reader regressions failed before fix;12 initially missing GET cases failed before implementation,14 GET cases now pass plusGETpreflight. Mocked route auth/domain and synthetic storage/RPC boundaries are not hosted lifecycle proof. Blob download is not streaming memory bound; authorization point-in-time/disconnect does not cancel storage download.

    Fresh reviews also corrected Database94 CI discovery at0692cee to include race fixtures and Database95 combined26 count atc10c739; applied SQL unchanged, row-variable style rename deferred to substantive forward migration. Bounded auth-unavailable diagnostics added without IDs/path/cause.4 findings replied/resolved. All existing PRs open/unapproved, fresh exact-head CI/reviews pending, approval questions not repeated. No merge/migration/deployment/customer upload/provider/financial/rights operation.

    Existing private case/source IDs preserved; no original imported or business assessment saved. Next inspect exact reviews then authenticated synthetic write/read/recovery with fault/scope/withdrawal cases through supported existing flows. Distributed concurrency, retained storage/orphan lifecycle, explicit legacy recovery and hosted roundtrip remain activation gates. Representative deterministic imports, saved current-state assessment and useful authorized Records action remain business outcomes; no billing/new-ledger detour.

  5. sidneyswift commented on Oct 9, 2026

    @sidneyswift
    Collaborator

    Review-driven actual-download correction: API988 d3110f5f and API991 0ed7d278 now stream bounded retained bytes via the installed Supabase SDK and existing reader before Blob creation. Metadata above 4 MiB is rejected before download; actual oversized replacement cancels during body consumption. Actual bytes/current receipt/scope/withdrawal checks remain. Default verifier calls without a bound retain Blob behavior; upstream chunk allocation, response-header wait and concurrency remain outside this bound.

    Seven installed-SDK/mock-HTTP regressions failed before code; all 8 pass now. Reader suite 95 / intake-route suite 153 pass locally with full lint, scoped TypeScript, format and diff checks. Replacement fixture now uses verifiable CSV, exact overflow error and no verification arrayBuffer call. Default-disabled test removes the setting entirely. Five review findings replied/resolved, including applied SQL style deferral; no historical migration rewritten.

    Fresh exact-head CI/review pending, no new approval request or repeated pending question. No merge, deployment, migration, activation, customer file, provider/financial or rights action. Existing Records case IDs preserved; originals not imported and no assessment saved. Integrated authenticated synthetic write/read/recovery remains next; hosted roundtrip, distributed concurrency, retained storage/orphan lifecycle and explicit legacy recovery remain activation gates. Reuse existing helpers rather than another primitive or ledger.

  6. sidneyswift commented on Oct 9, 2026

    @sidneyswift
    Collaborator

    Retained original download review corrections pushed: API988 2c4728a1 / API991 67dbc7c6. One scoped, abortable 30-second deadline now covers headers and body, including ignored-abort caller timeout; exact redaction assertion and PR descriptions corrected. 98 reader / 156 original-route fixtures pass with installed SDK over synthetic HTTP, plus lint/scoped TypeScript/format/diff. Three observed reviews resolved; fresh exact-head checks/reviews pending. No merge, activation, production or customer operation. Authenticated synthetic write/read/recovery remains next; concurrency, retained-storage/orphan lifecycle, legacy recovery and hosted roundtrip still gate activation. No original imported, saved assessment or useful Records action completed; existing pending approval questions not repeated.

  7. sidneyswift commented on Oct 10, 2026

    @sidneyswift
    Collaborator

    API991 41055402 adds seven integrated authenticated synthetic lifecycle fixtures through real shared API-key/Bearer-key auth, organization access, domain operations and storage/RPC wrappers. Module-reset retained readback, committed lost reply/no-upload recovery, unknown credential, revoked membership and withdrawal during download covered. All163 original/route cases plus full lint/scoped TypeScript/format/diff pass. Backend receipt/access/admission models and SDK synthetic HTTP are not hosted or real database transaction evidence. No production runtime change, activation/customer upload/merge/release. One deadline review disproved/replied/resolved; fresh head CI/review required. Existing approvals not repeated. Explicit legacy-address recovery fixtures remain next; concurrency, retained-storage/orphan lifecycle and hosted roundtrip remain gates. Existing Records originals unimported; saved assessment and useful authorized action remain outcomes.

  8. sidneyswift commented on Oct 10, 2026

    @sidneyswift
    Collaborator

    First-trial release audit:95 c10c739d all11 /988 2c4728a1,990 f76511f4,991 41055402 all7 checks pass/no unresolved reviews, clean/open/unapproved. First specific95/988 merge approval requested for service-only lookup/internal readback; older questions unchanged, no merges.989 preview failed with authenticated Vercel git_info_fail, exact SHA/ref correct and zero build events; no retry/environment mutation. Not a code-build diagnosis. Private Records case now has exact prepared baseline trial request after approved89/981 release/live verification; no new UI or completed assessment promised. Legacy pre-registration recovery cannot derive historical path from source/work identity; existing receipt lookup cannot invent missing receipt, no new API/ledger. No production/customer operation. Resource/lifecycle controls and hosted roundtrip still gate intake.

  9. sidneyswift commented on Oct 10, 2026

    @sidneyswift
    Collaborator

    MVP progress following Sidney's direction to prioritize usable outcomes and defer edge cases: Database96 at1fdd75a and API992 atc9922141 add company_onboarding to existing saved Context briefs. Compile attributed selected saved request evidence, report gaps/per-request review steps, save and reopen via existing HTTP/standard MCP. No collection/model/original-upload dependency; no new store or accepted analysis/rights assertion. Scope is selected requests, not the complete company register.

    Local validation: two API regressions fail before implementation, 131 Context tests pass/6 skip; full lint/scoped TypeScript/format/diff pass. Three DB transaction tests pass each on disposable PostgreSQL15/17; old brief compatibility and assessment save/read/replay/withdrawal covered. CI adds PostgreSQL15/16 assessment discovery. API fixtures mock backend boundaries; no live Records assessment is claimed. Both PRs branch directly from current main without pending original-intake dependency cherry-picks. Fresh CI/review pending; own merge approval not yet requested. No merge/migration/deployment/intake.

    Next: complete this pair's review, prepare the supported Records saved-assessment trial using existing request IDs, and release database first only after explicit approval. Existing approval questions remain separately pending and are not repeated. Private evidence/case stays in Records; canonical plan in Business226. The heartbeat now explicitly prioritizes connected MVP outcomes over additional intake edge-case primitives.

  10. sidneyswift commented on Oct 10, 2026

    @sidneyswift
    Collaborator

    MVP review/trial checkpoint: Database96 exact1fdd75a passes all10 visible checks/preview; review resolved with intentional inherited compatibility coverage documented. API992 now3f8cd740 restores quoted-evidence-as-source guidance and includes eligible submitted release_locator evidence without claiming verified metadata. New locator fixture failed before implementation;132 Context cases pass/6 skip; scoped lint/format/diff pass. Next-step action now review_assessment_coverage explicitly covers unavailable or size-omitted evidence. Broader compiler refactoring deferred per Sidney’s MVP-first instruction. Fresh API head checks/review required. Private Records case contains exact current-state read→preview→save→reopen sequence with existing IDs, not executed. Historical partial/blocked states require current read first; no eligible document/live assessment is assumed. Database96 own approval requested separately, API992 approval not requested yet; no merge/migration/deployment/intake. Canonical plan Business226; private requests remain in Records.

  11. sidneyswift commented on Oct 10, 2026

    @sidneyswift
    Collaborator

    Connected MVP step: App2178 at0911b400 adds Preview assessment → cited evidence/gaps → Save → Open saved ID in existing Release reviews. Reuses shared authenticated organization-scoped Context helper; workspace/account/request remounts clear state, unavailable/non-company snapshots withhold the brief. No collection/upload/rights action. Requires approved Database96/API992 release first, then App2178 own approval. API992 exact3f8cd740 passes7 checks/no unresolved reviews; its own approval is requested. Database96 approval already pending, not repeated. App2178 initial checks/reviews are pending.

    Validation:19 release/component/hook tests pass, including two new synthetic-fetch assessment cases with real request helper; full lint passes with62 existing warnings, scoped TypeScript/lint/format/diff pass. Initial missing-module collection failure preceded implementation. No browser screenshot, deployed UI or authenticated Records trial. Private case contains prepared current-read/preview/save/reopen sequence and existing request IDs. Canonical Business226/private Records updated; no imported original or saved business outcome claimed.

  12. sidneyswift commented on Oct 10, 2026

    @sidneyswift
    Collaborator

    App2178 updated to exactec93ef447ed971898d087d2db1c6019157fd5fcf after core preview/save/reopen review. Eight findings addressed: a fresh preview resets saved identity/work key; unavailable snapshots withhold briefs in type and runtime; release fingerprint refresh remounts panel; expired auth uses established sign-in message; server guidance rendered; save/reopen notice remains accurate when superseded. Four regressions failed before fixes; all23 release/component/hook tests pass, scoped lint/TypeScript/format/diff pass. Initial0911b400 all6checks/preview passed; fresh head checks/reviews pending, CodeRabbit passes at audit. No own UI approval yet. API992/Database96 approvals already pending separately, not repeated. No merge/deployment/live Records assessment. Private case has exact browser trial sequence and unchanged existing IDs; current blocked or missing evidence must remain explicit. No unrelated edge-case primitives or rights/provider/upload operation.

  13. sidneyswift commented on Oct 10, 2026

    @sidneyswift
    Collaborator

    Assessment MVP release handoff: App2178 exactec93ef447ed971898d087d2db1c6019157fd5fcf passes all6 checks/preview; observed review threads resolved, two structural refactoring suggestions explicitly deferred under Sidney’s MVP-first instruction. Its own merge/release approval is now requested. Database96 exact1fdd75a and API992 exact3f8cd740 approvals remain pending separately without repeated questions. No merge/migration/deployment/live Records assessment.

    The connected trial is existing case → preview cited partial evidence/gaps → save immutable assessment → reopen ID. Local23 release/UI workflow tests pass; API132 Context tests pass/6 skip, DB three transaction tests eachPG15/17 pass. Prepared private HTTP/browser steps use existing case IDs. Current blocked/ineligible evidence must be a visible gap; no fabricated acceptance/import/rights assertion. The next useful trial step requires approved release, so the heartbeat is paused under its standing stop condition rather than adding unrelated primitives. On approval/resume: recheck heads/checks/reviews, release DB first and verify migration/permissions, API authenticated save/readback, UI browser trial with its own approval. Canonical handoff Business226/private Records; pending earlier PRs remain independent.

  14. sidneyswift commented on Oct 10, 2026

    @sidneyswift
    Collaborator

    MVP assessment milestone released and live-verified: Database96 → API992 → App2178 merged normally after explicit user approval. Production database purpose validation and anonymous RPC denial verified; API/app production aliases match released commits. Authenticated Records browser trial reused existing evidence, previewed citations/gaps, saved once, reloaded, and reopened the saved assessment successfully. Private receipt/source IDs stay in the Records case.

    Evidence: Business226 checkpoint7f4114c2; private Records PR3 checkpoint3c6b5cf. Coverage remains partial and release metadata uncollected; no original intake/provider spend/rights or distribution action occurred. Other pending approvals remain independent. Original intake stays disabled. Approved milestone complete; heartbeat stays paused. Next MVP slice: connect displayed evidence gaps to supported review/import operations.

    Released PRs: recoupable/database#96 recoupable/api#992 #2178

  15. sidneyswift commented on Nov 6, 2026

    @sidneyswift
    Collaborator

    Child status: none is complete yet. #2135 duplicates #2136 and can close.

    Partly shipped on main: #2117–#2130, #2133, #2136–#2140, #2142, #2144, #2145, #2147. Not started: #2131, #2132, #2134, #2141, #2143, #2146.

    Merged since the last status: brief freshness and coverage (recoupable/api#1003, recoupable/api#1196, recoupable/api#1201), saved-assessment evidence checks (recoupable/api#1208, recoupable/api#1209), catalog CSV proposal parser (recoupable/api#1213), public Site field allowlist (recoupable/api#1214), ownership and guest-routing tests (recoupable/api#1220, recoupable/api#1223), valuation estimate labels (recoupable/api#1222).

    Still open for the epic: the two-song/two-brief checkpoint, spend reservations, linking displayed gaps to review/import, and hosted web/MCP acceptance (#2134).

    Companion PRs with merged or draft successors can be closed: recoupable/api#1001, recoupable/api#1005, recoupable/api#1010, recoupable/api#1013, recoupable/api#1018.

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