Skip to content

Module: prism.errors, contract and code ownership #448

Closed

Description

@humuhumu33

Part of the nine-module architecture in #440. This issue holds the contract and code ownership of errors. M2 defines the contract; the issues listed below own the implementation.

Purpose: Typed errors with stable codes, plus the types and schemas that the other modules share. It depends on nothing.

Docker equivalent: Errors and types

API surface: prism.errors classes and stable codes, shared types

Prism difference: Types come from @prism-code/spec. Reading the .holo format is in verify; only the layout constants and value encoding sit here.

Code that moves here

  • Rust (crates/prismpm/src): error, contracts (schema table and closed-shape checks; its semantic checks move to their owners), holo/canonical (value encoding)
  • JavaScript (sdk/npm/prism-code/src): errors, errors-namespace, version, vendor/spec/, canonicalJson from archive, plus @prism-code/spec

This map follows the agreed design in docs/proposals/440-nine-modules.md, under Code ownership. A file that will split keeps its current owner until it does. Confirm each row when the code moves.

May depend on: None

Implemented by: #263 (@prism-code/spec), #276 (typed errors), #312 (contracts in LexLean)

Done when: Every module raises only registered, typed errors with stable codes, ERRORS.md lists them all, and this module imports no other module. Each public capability and diagnostic is registered in model/*.toml and covered by conformance fixtures.

Depends on: #440.

Part of the Prism SDK v1.0 roadmap: Prism SDK v1.0

Activity

  1. added
    kind/api-changeChanges a public API, CLI verb, file format or predicate; needs a design proposal
    area/runtime-jsprism-code, verify, testing packages
    area/specSpec package, WIT worlds, conformance
    stability/experimentalBehind experimental_ prefix or --unstable flag; pin exact versions
    module/errorsOwned by the errors module of PrismPM
    on Nov 1, 2026
  2. afflom commented on Nov 12, 2026

    @afflom
    Member

    The done-when holds on main:

    Closing.


    Generated by Claude Code

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

    area/runtime-jsprism-code, verify, testing packagesarea/specSpec package, WIT worlds, conformancekind/api-changeChanges a public API, CLI verb, file format or predicate; needs a design proposalmodule/errorsOwned by the errors module of PrismPMpriority/critical-urgentBlocks the current milestonestability/experimentalBehind experimental_ prefix or --unstable flag; pin exact versions

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions