Named Layers (reserved acronyms)
The governed schema — 18 custom record types storing everything that defines, computes, governs, and audits a metric. The source of truth every other component reads from.
18 custom recordsimmutable after approvaleffective datingversion chains
- Structural Core (R1–6): Metric Definition · Query Component · Filter/Scope · Dimension Scope · Minor Change Log · Metric Result
- Governance (R7, R10): Approval Domain · Portlet Config · Metric Comparison (R8, v2) · Resolution Policy (R9, v2)
- Shared Library (R11–12): Query Template (4 v1 templates — record + code deployment) · Formula Pattern (8 v1 patterns — data change to add)
- Benchmark (R13–14): Benchmark Series · Benchmark Data Point
- Segment (R15): adjacency list + materialized path strings for recursive-free rollup queries
- Query Template Slot (R16): named slot definitions per Query Template record
- Verification Source Library (R17): pre-built verification source types for Wizard pre-flight (Step 5)
- Event Log (R18): append-only domain event store — cache invalidation events and metric lifecycle status transitions
- Metric Definition immutable after Controller sign-off — material changes create a new version requiring re-approval. Minor changes (display name, thresholds, chart type) logged without re-approval
- Version chain: Effective From / Effective To / Scheduled Effective Date — all system-managed
Reads MDL records and renders a plain-English lineage trace for every metric — what it computes, what it includes, what it excludes, and why. Powers Controller sign-off review and dashboard detail views.
reads MDL recordsSIL-assisted summariesprovisional patent candidate
- Reads: Metric Definition, Query Component (Component Label — never the Role letter), Filter/Scope, Formula Pattern, Query Template MLL description templates
- Renders: metric-level plain English summary, per-component lineage blocks, filter conditions in plain language, formula explanation with component value breakdown
- Used in: Metric Wizard pre-flight step, Controller sign-off review, portlet "View definition" detail, Metric Comparison AI diff input (v2)
- Constant components rendered inline ("trailing 90 days") — no separate lineage block
- Role letter (A/B/C) is machine-facing only — Component Label always shown to users
Engines
Reads Query Component + Filter/Scope records, resolves Query Template slots, assembles and executes SuiteQL, combines component scalars via mathjs formula evaluation.
N/query SuiteQLmathjs evaltwo-source routing
- Three component paths: Structured (template slot resolution → SuiteQL), Raw SuiteQL (execute directly), Constant (read value, no query)
- Three-tier query strategy: Tier 1 (
AccountPeriodActivity) for period-end balances — no dimension filter; Tier 1.5 (PostingAccountActivity) for class/department/location-filtered aggregations ~88ms; Tier 2 (TransactionAccountingLine → Transaction → AccountingPeriod) for transaction-type filters. Confirmed in sandbox validation 2026-06-02. See tessera_platform_validation.md.
- Period resolver reads AccountingPeriod records to derive comparison windows (sply, sqly_td, lqtd, lytd_fy…) — no raw date arithmetic
- Negate field: prefixes
-SUM() for credit-normal accounts — sign convention explicit and auditable
- mathjs evaluates Formula Pattern formula string against component scalar map → final metric result
Manages metric result freshness. Closed-period results stored permanently — never recomputed. Open-period results marked as stale by transaction events and recomputed on the next scheduled run.
Map/ReduceUser Event scriptsevent-driven
- Scheduled refresh: Map/Reduce script processes all active metrics on configured cadence — architecture design pending
- Event-driven: User Event scripts on key transaction record types mark open-period Metric Results as stale on post/approve. Closed-period results never touched
- Closed-period immutability: once a period closes, Metric Result records for that period are permanent. Substantially reduces GU consumption and aligns with accounting-grade positioning
- On-demand refresh: escape hatch for open-period results — v2 (requires client-side Restlet call)
- Per-metric transaction type trigger configuration — which record types mark which metrics stale — open design item (Query Layer design session)
[v2] Enforces Metric Resolution Policy at portlet placement. Determines which definition is surfaced to which user, handles override acknowledgment, writes the permanent override record. In v1, portlet configuration assigns a definition directly — no policy resolution.
reads R9 Resolution Policy (v2)writes R10 Portlet Config
- [v2] At portlet placement: reads applicable Resolution Policy for user's Approval Domain scope, recommends preferred definition
- Override flow: non-preferred definition requires written rationale. Records override, acknowledged-by, override date on Portlet Config — permanent record
- Override indicator surfaced in portlet header — users always know which definition is in use and whether it is system-recommended
Role-gated export of metric results and drill-down data. Three-tier handling: direct render, server-side pagination, or async Map/Reduce job based on row count.
AG Grid CommunityMap/Reduce asyncrole-based gating
- Under 5k rows: direct AG Grid render with client-side export
- 5k–50k rows: server-side pagination within AG Grid
- Over 50k rows: async Map/Reduce export job — user notified on completion
- Export access gated by NetSuite role