feat: add V-PROGRAM message type support (phase 1) - #1220
Conversation
Bump the aleph-message pin to 08898ecd6 (verifiability-first schema tightening). Verified volumes replace classic machine volumes on V-PROGRAM content and are not costed, since they are STORE-paid artifacts like the workload rather than execution volumes. The environment no longer carries aleph_api. The canonical test fixture and its item hash were regenerated for the new content shape.
The removed-messages machinery (#1219) is type-generic; prove a V-PROGRAM rides it: REMOVING -> REMOVED in one GC pass (no file-pin gate), billing metadata (owner, credit payment type) copied onto the removal record, messages row deleted.
eb41eb0 to
34eeb4d
Compare
foxpatch-aleph
left a comment
There was a problem hiding this comment.
Well-structured phase-1 implementation for V-PROGRAM support. The handler, cost service, schemas, and controllers all follow existing patterns correctly. V-Programs are priced on the INSTANCE_CONFIDENTIAL tier with VerifiedVolume entries correctly excluded from execution-volume costs. The credit-only payment enforcement is explicit. 13 new tests provide thorough coverage of parsing, pricing, pipeline processing, API display, and GC removal. The only merge gate is swapping the aleph-message git pin for a released version, which is already documented in the PR description.
pyproject.toml (line 33): Merge gate: this git pin to aleph-message#158 must be swapped for a released PyPI version before merging, as noted in the PR description.
What
Phase-1 CCN support for the new
V-PROGRAMmessage type (SEV-SNP verifiable programs,VerifiableProgramContentfrom aleph-im/aleph-message#158): parse, price, store, and display.PendingVProgramMessage,CONTENT_TYPE_MAPentry, tag extraction fromcontent.metadata.tags.VProgramMessageresponse model wired intoMESSAGE_CLS_DICT, theAlephMessagediscriminated union, and the headers content format, so V-PROGRAM rows render in every /messages endpoint (list filters, single message, pending, rejected, websocket).instance_confidentialtier (compute units + declared extravolumes; the runtime bundle and workload are STORE-paid artifacts and deliberately carry no execution-volume cost). Cost-estimation schemas and both price endpoints (GET /api/v0/price/{item_hash},POST /api/v0/price/estimate) support the type.VProgramMessageHandlervalidates the credit balance (V-Programs are credit-only by schema) and persists cost rows; recurring credit billing picks the rows up generically.process/forgetkeep no side tables in phase 1: the message row is the source of truth.No DB migration is needed (the message
typecolumn is a plain varchar).Phase-1 scope (deliberate)
vmstable rows, noVmTypemember: v-programs do not appear in vms accessors yet, and forgetting a STORE file referenced by a v-program workload is not blocked.replaceschain validation.Merge gate
pyproject.tomlpinsaleph-messageto the head commit of aleph-im/aleph-message#158. Swap it for the released version once that PR ships in a release, and re-run the type checks, before merging.Tests
13 new tests (schema round-trips with the canonical cross-SDK fixture, cost tier selection, end-to-end pipeline processing/rejection against Postgres, price and display endpoints). Full suite: 871 passed, 10 skipped, 0 failed; black/ruff/isort clean; mypy clean.
🤖 Generated with Claude Code