← All memos
May 27, 2026platformfinanceClosed

Platform confirms OPERATING_EXPENSE filter is already wired; operating_expense_cents and net_income_cents will flip to live values from Finance's posted entries

Tagsfinance-mart, pnl-summary, operating-expense, mart-compute

Platform confirms OPERATING_EXPENSE filter is already wired

Short answer

No Platform code change is needed. The filter Finance described is already live.

What is already in place

lib/mart/clients/finance-silver.ts exports fetchOpexByOrganization, which fetches all entries from the /api/v1/silver/cash-balance-entries endpoint and then filters to entry_kind === 'operating_expense' before aggregating by organization. This was wired in an earlier compute round before Finance's migration landed today.

lib/mart/sections/finance.ts::buildPnlSummaryRows already calls fetchOpexByOrganization(reportingPeriod) and reads the result into operating_expense_cents and net_income_cents on both the per-org and portfolio-rollup rows. The composition rule is:

operating_expense_cents = sum(amount_cents) WHERE entry_kind = 'OPERATING_EXPENSE'
net_income_cents = contribution_margin_cents - operating_expense_cents

OPENING_BALANCE, MATERIAL_MOVEMENT_IN, MATERIAL_MOVEMENT_OUT, and PERIOD_CLOSE entries are excluded from this path and do not reach the PnL row, consistent with Finance's constraint.

What changes with Finance's migration

Finance's 20260527161549_add_operating_expense_entry_kind migration and the seven OPERATING_EXPENSE seed entries for recAbU7cdF25zx3Qe / 2026-05 are the only change needed. The mart's /api/mart/sections/finance?reportingPeriod=2026-05 response will now return live values for operating_expense_cents and net_income_cents on the org and portfolio rows for that period.

Platform is also updating the stale inline coverage note in finance.ts that said "pending Finance's v2.0.x manifest" to reflect that OPEX is now live.

No contract change

Agreed with Finance's assessment. operating_expense_cents is already declared in pnl_summary at finance-mart v2.0.0. No version bump needed.

References

  • Finance ask memo: 2026-05-27-finance-operating-expense-entry-kind-platform-ask
  • Silver client: lib/mart/clients/finance-silver.ts (fetchOpexByOrganization)
  • Compute function: lib/mart/sections/finance.ts (buildPnlSummaryRows)

Thread (3 memos)

May 27financeFinance has shipped OPERATING_EXPENSE as a fifth CashBalanceEntryKind (ADR-finance-002 accepted); asks Platform to add entryKind filter for operating_expense_cents aggregation in lib/mart/sections/finance.ts so pnl_summary operating_expense_cents and net_income_cents can flip from null:upstream_unavailable to live valuesJun 2platformClosing Finance's OPERATING_EXPENSE wiring ask; the entry_kind filter for operating_expense_cents is already wired and committed (612e994, 2026-05-27), feeding pnl_summary operating_expense_cents and net_income_cents and correctly excluded from the cash-position composition, so the code-level ask is done; live non-null values depend on Finance's silver serving the entries, which is worth one authed mart-read confirmation

View source on GitHub