Story: Finish the refdata read path

Table of Contents

This page documents a story in Sprint 27. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

1. Goal

Every refdata list the record-screen standard names searches and sorts on the server, a tenant has a history, a party event refreshes the cache that names parties, the party test inserts a category, and a parent cycle in the party hierarchy is reported rather than silently dropped.

2. Status

Field Value
State DONE
Parent sprint Sprint 27
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-10-06

3. Acceptance

  • The tenant roster orders on every column it shows, and a tenant page has a History tab.
  • The party read takes a search and an order, and the parties list searches and sorts on the server.
  • A party event reloads IAM's party cache partition for that party's tenant.
  • refdata_party_test.sql inserts a party with its category and passes.
  • A parent cycle in the party hierarchy is reported, and a test covers it.

4. Tasks

Task State Start End Description
Scaffold story: Finish the refdata read path DONE 2026-10-06 2026-10-06 Story scaffolding rides this task: documents, sprint wiring, and the scaffold PR. Close it before merging that PR.
Serve tenant and party search, order and history DONE 2026-10-06 2026-10-06 Initial task for: Finish the refdata read path
Reload the party cache on party events DONE 2026-10-06 2026-10-06 IAM's party cache does not follow party events during provisioning, so a partition holds stale names until a sign-in misses it. Make the party events reload the affected tenant's partition.
Fix the party test that inserts no category DONE 2026-10-06 2026-10-06 refdata_party_test.sql inserts a party with no party_category, so the test aborts before its first assertion. Give the fixture its category and make the file pass.
Guard the party hierarchy against cycles DONE 2026-10-06 2026-10-06 A parent_id cycle in the party or counterparty hierarchy either spins the recursive CTE or silently drops both nodes from build_tree(). Report the cycle and cover it with a test.

5. Decisions

6. Out of scope

7. Result

All four tasks are DONE. The tenant and party lists search and sort on the server and the tenant page has a History tab; party events reload IAM's party cache; the party pgTAP test passes; and the party hierarchy survives a parent cycle in both build_tree and the generated recursive CTE.

Verified: refdata regeneration is drift-free; 670 web tests pass; the six refdata C++ suites and the utility hierarchy tests pass; and the party pgTAP tests pass 14 of 14 against a recreated database.

Emacs 29.3 (Org mode 9.6.15)