Skip to content

Dashboard v1 phase 1 (#280): contracts, codecs, canonical encoding, resource limits #283

Description

@BorisTyshkevich

Part of #280 (Dashboard as a first-class module). Phase 1 of 6. The normative spec lives in #280 — this issue tracks scope, order, and the decisions this phase must settle.

Goal

All new contracts exist as canonical JSON Schemas with generated types/validators, a canonical deterministic encoder, sorted diagnostics, and enforced resource limits — before any persistence or UI work begins.

Scope (from #280 "Phase 1: contracts and codecs")

Decisions to settle in this phase

  • query-spec-v1 extension for QueryDashboardPresentationV1 (variants, defaultVariant, sizeHints; existing dashboard.role from Dashboard: multi-filter option bundles, shared preview, and role-aware result selector #160 maps into it). Decide: in-place additive revision of query-spec-v1.schema.json vs a new version — fields are optional/additive, so a revision is the likely answer, but make it explicit and cover Spec-editor completion/validation.
  • Limit consistency with the storage mechanism chosen in Phase 2: maxDecodedJsonBytes = 10 MiB exceeds typical localStorage origin quota (~5 MB). Either the Phase 2 repository is IndexedDB-backed or these limits come down; the schema constants must match that decision.

Dependencies

None on #276 — this is pure src/core/ + schemas/ + build/ work and can start while #276 finishes.

Tests

Per #280 "Required tests → Schemas, codecs, and limits": valid/invalid documents for every schema, every limit at boundary and boundary+1, deterministic encoding from differently-ordered equivalent inputs, deterministic numeric-aware diagnostic ordering, legacy-format conversion failures without partial import. 100% per-file coverage (core layer).

Acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions