Task: Give each analytic parameter one contract row per version window
Table of Contents
This page documents a task in the Fix the tenor basis swap convention model and the document TU — the remaining work story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
A parameter has one contract row per version window, and the publish function reads the row that applies to the analytic type's version, so provisioning completes.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Fix the tenor basis swap convention model and the document TU — the remaining work |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-10-27 |
3. Acceptance
- The seed carries no two identical rows for one scope, subtype, name, schema and XPath.
- The publish function picks the applicable row rather than requiring exactly one.
- ACME provisioning completes and the convention smoke can run.
4. Plan
(Implementation strategy. Written when work starts; key decisions
are distilled into the parent story's * Decisions at close, but the
plan itself stays — it is the historical record of what we did.)
5. Measurements
Every number this task claims about a tree, with the command that produced it
and the commit it was measured at. A number without both is not a measurement,
because a clean-up record describes a tree and trunk moves under a branch: a
consumer count, a gate's component count and a suite's size all change with no
code changing, and the reader of a bare number cannot tell which tree it came
from. Where the raw output matters, put it in an evidence/ file beside the
task and name that file in the Command column.
| What | Value | Command | Commit |
|---|---|---|---|
6. Notes
7. Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario)
that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
8. PRs
| PR | Title |
|---|---|
| #3937 | [reporting] Supersede an orphaned parameter and pick the row |
9. Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
10. Result
Two defects, both found by ACME provisioning and both fixed.
- The publish closed no orphan. The parameter id derives from schema and XPath, and that derivation has changed between generations, so the id-keyed check could not see the row it no longer reproduces. In upsert mode it now closes any live row of the target tenant whose scope, subtype, name, schema and XPath are staged under a different id.
- The risk report configuration resolved each analytic parameter with a scalar subquery, which a versioned contract defeats. The candidates are ordered and the first is taken.
Evidence: the run passes step 20 of the tenant setup, which previously aborted it with "more than one row returned by a subquery used as an expression", and the live duplicate check across every tenant returns none. The tenant has not reached active: provisioning now stops on the party-selected token expiring after 300 seconds, which is captured separately.