Repository navigation
Phase 2 step 4: the read-only Blocks catalog and provenance UI - #107
Merged
Merged
Conversation
…e lifecycle, fail-first Step 4 of the Phase 2 release plan (sections 7 H3 and 8). Tests only: - composer-core: provenanceVerdict earns "made with block X vN" only by exact expansion identity (a trusted record whose call re-expands to the digest it recorded, on a surface that is that expansion); everything else is inert with its specific reason (reference, base, block, version, validation, expansion, edited, not-offered, stored) and no label; imported and repository projects are unavailable; a verdict carries no action or grant, and a labelled surface's altered messages still bind nothing. parseProvenance keeps the reason it reduced a record for. - runtime: blocksCatalog lists every bundled block with reference, version, status, intents, declared actions and streaming policy; provenanceVerdicts per surface; import keeps reasons. - e2e (experimental): the read-only Catalog section; Preview's provenance line and host-owned note, with no request on any action; edited, duplicated, deleted, imported, forged and stale provenance; an Example session's save pruning its provenance (it does not today: the duplicate carries 1 stale record). - e2e (default build): an imported beta file's provenance is never stored and no block UI appears (a guard; passes today). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R6Ax8qvfN3gYUC85oSGnoi
…d the lifecycle Step 4 of the Phase 2 release plan (sections 7 H3 and 8), read-only and experimental-only. - composer-core: provenanceVerdict. A surface is "made with block X vN" only by exact expansion identity: a record trusted against a bundled sidecar that binds to this build's base, whose call re-expands to the digest it recorded, on a surface that is that expansion. Refinable on a reference project whose build offers the block; unavailable on imported and repository projects; otherwise inert with its specific reason and, unless only the offer is missing, no label. parseProvenance keeps the reason it reduced a record for; PROVENANCE_REASON_TEXT words each one. - runtime: blocksCatalog (every bundled block: reference, version, status, intents, declared actions, streaming policy) and provenanceVerdicts per surface. Data only. - Catalog view: a read-only Interface blocks section. Preview: the provenance line with its status and reason, and for a block surface the note that its actions are host-owned and not executed here. Nothing new can be pressed, and Preview still only records what a surface dispatches. - Lifecycle: an Example session's save now prunes its in-memory provenance, so "duplicate to keep" carries nothing stale. - The guarded views wrap today's JSX rather than adding a child, so a default build's application chunks are byte-identical to main's. - HOST-ACTIONS.md: step 3's first three accepted clarifications (the id form and enum loop variables; the recipe's string, surface and refusal; surfaceIds the server issued and a repeat with other parameters). - Release plan status line and a BLOCKS.md note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R6Ax8qvfN3gYUC85oSGnoi
…-first The independent review of ac52215 found no blocker, three minor issues and four nits. These tests pin each one and fail against ac52215: - Preview's refinable line says what the record is, never that a build offers the block (the beta switch, Settings and eligibility decide that). - A record that names no block id or version has no verdict and is dropped on parse, so an imported name is never shown. - Duplicating an Example session copies its provenance after every pending write, pruned against the examples the duplicate keeps; the e2e loses its sleep. - An import prunes against the imported project's examples. - A reference project whose reference this build does not bundle trusts no provenance. - Both default-artifact scans look for step 4's UI and runtime call, and the experimental positive control finds each marker in its artifact. - Every provenance write notifies listeners, so an open Preview re-reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R6Ax8qvfN3gYUC85oSGnoi
- Preview's refinable line now reads "Refinable: its record verifies against this build's approved block." It states what the record is; the beta switch, Settings and eligibility decide whether a build uses the block, as the Build view says. BLOCKS.md says so. - A record must name a block id (kebab-case, at most 64 characters) and a safe positive version. Anything else has no verdict and is dropped on parse, so no imported text is ever shown as a block's name. - Duplicating an Example session copies its provenance on the session store's queue, after every pending write, pruned against the examples the duplicate keeps (copyProvenance). - An import prunes against the imported project's examples, as a save would. - A reference project whose reference this build does not bundle trusts no provenance. - Every provenance write notifies listeners (onProvenanceChange), and Preview's note re-reads on each, keeping only the latest read. The default build's app chunks are byte-identical to main's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R6Ax8qvfN3gYUC85oSGnoi
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
dspack-studio-composer | 6e7141d | Oct 16 2026, 07:44 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 step 4 (docs/blocks/PHASE-2-RELEASE-PLAN.md, §7 H3 and §8), as the owner authorized it on 2026-10-16: the read-only Blocks catalog and provenance UI. It is experimental-build only and read-only, and it executes no actions. Not for automatic merge.
What it adds
Catalog (H3). The Catalog view gets an "Interface blocks" section after the components. It lists every block this build bundles, by reference:
It contains nothing that can be pressed. Its lead says a block's declared actions are host-owned: Composer never executes them, and a host binds and authorizes each one on its own server.
Preview.
Refinable states what the record is. It does not say a build will use the block: the beta switch, Settings and the project's eligibility decide that, and the Build view states it.
The verdict is
provenanceVerdictinpackages/composer-core/src/blocks/provenance.ts. It is pure, and its fields are{block, version, madeWith, status, reason?}; it carries no action, declaration or grant. The reasons are:reference,base,block,version,validation;expansion,edited;not-offered;stored, a record already reduced to inert.A record must name a block id and a positive version. Anything else is dropped, so no imported text is shown as a block's name.
Lifecycle (§8).
HOST-ACTIONS.md. The first three clarifications from #106's accepted nit list:
$eachenum loop variable and numbers only inside$concat.surfaces[i]the recipe hashes, that the string's UTF-8 encoding is the bytes, and refuse-to-render on a mismatch.The illustrative recipe-test assertions (the fourth nit) need no change.
Boundaries kept
blockProvenance.Commits
Evidence
Fail-first.
editedunit test pins it.copyProvenanceunit test pins it.Suites.
testpasses at 6e7141d (run 38957149819).rediscover > restoredConflict(5761 ms against its 5000 ms limit locally; CI passes it);Accessibility.
Default build.
check-default-artifact: 29 files clean of 11 markers, step 4's included. The experimental positive control finds each step-4 marker in its artifact.b63e085f0a44ab96, which is the same on both sides.Independent review.
handleActionunchanged;copyProvenancewould deadlock if a store were copied onto itself. Unreachable: the duplicate copies "session" into a fresh project id.copyProvenanceoverwrites the target instead of merging. That makes no difference for a project created moments earlier.🤖 Generated with Claude Code
https://claude.ai/code/session_01R6Ax8qvfN3gYUC85oSGnoi