feat(ui): show business context on related-node chips (v0.75.0) - #113
feat(ui): show business context on related-node chips (v0.75.0)#113cursor[bot] wants to merge 6 commits into
Conversation
Keep ADR-0013 and drop the colliding ADR-0005 copies. Record one Unreleased changelog entry, restore the runtime-adapter and post-evaluation transport regressions, and correct the leftover post-chat docstring so it no longer describes a forced route. Co-authored-by: Seongho Bae <[email protected]>
Keep post-chat and adjudication off the auto source-scan list so a docstring mention cannot satisfy the product default. Assert both checked-judgment clients send mode=verify on the wire. Co-authored-by: Seongho Bae <[email protected]>
The live client already sends mode=auto. Keep the research note aligned with ADR-0013 so operators do not reintroduce route. Co-authored-by: Seongho Bae <[email protected]>
Source scans now demand the executable "mode": "auto" / "mode": "verify" literals so a docstring mention cannot satisfy ADR-0013. Rephrase the post-chat contrast sentence so it no longer contains mode="auto". Co-authored-by: Seongho Bae <[email protected]>
Related-node chips use side and entity-level labels instead of ontology class names. A person chip adds an organization only when exactly one affiliation is known, so Priya Nair stays Counterparty-only rather than inventing a Northridge Grid primary. Post chips show the title only. Co-authored-by: Seongho Bae <[email protected]>
Treat a resolved corporate_entity as one identity and show entity_name. Unresolved names that casefold-match that catalog label collapse into it. Distinct multiples stay omitted so the chip never invents a primary. Co-authored-by: Seongho Bae <[email protected]>
There was a problem hiding this comment.
Verdict
Do not merge #113 at 5eeaa7f. The unique-identity rule is correct — seeded Priya is no longer given an invented Northridge Grid primary — but the chip still treats a known-plural set as a missing affiliation. After make seed, walking from Ada West shows Priya Nair (Counterparty), which looks like Priya has no organization. The next action (open the Keyman list) is not on the chip.
Prefer #123 (bfbca81, v0.76.0): Priya Nair, multiple organizations (Counterparty), two-catalog-id omit locked, case-only unresolved aliases collapsed, and the ADR-0013 mode="auto" / mode="verify" lock is in [0.75.0] instead of leftover [Unreleased] on a version-bumped head.
#120 has the same plural signal without this head's payload-literal lock. #92 / #112 remain superseded. This review is COMMENT because GitHub rejects REQUEST_CHANGES on a pull request authored by the same actor.
Blocking if this head is kept
- Silent omit hides the next action.
compact_affiliation_display_namesdrops every person withidentity_count != 1. A buyer cannot tell Priya (two orgs) from a person with zero orgs. Emitaffiliation_ambiguousand captionmultiple organizations(Browne et al., 2001; ADR-0014). - CHANGELOG release defect. This SHA bumps the package to 0.75.0 and also introduces
[Unreleased]for the orchestrator-mode lock that ships in the same commits. Fold that bullet under[0.75.0]before anyone tags this head. - Two-catalog-id hole. The unit file locks two unresolved names and catalog-plus-unresolved. A
return first catalog orgrewrite would still pass. Add a person with two distinctaffiliated_corporate_entity_idvalues and assert the name is omitted.
Verified locally on the successor
pytest affiliation + policy: 11 passed, 7 subtests. pnpm run lint && pnpm run test: 48 passed. Required checks on this draft were still queued at review time — not merge evidence.
Synthetic fixtures only. person_affiliation stays N:N with no primary column.
Sent by Cursor Automation: Fix Issues
| [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versioning follows | ||
| [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] |
There was a problem hiding this comment.
This head also bumps pyproject.toml / lineageweave/__init__.py / frontend/package.json to 0.75.0. Tagging 0.75.0 from 5eeaa7f would ship the orchestrator-mode lock while the notes still call it Unreleased. Move this bullet under [0.75.0], or drop the version bump. #123 folds it.
| if name.casefold() not in catalog_name_fold | ||
| } | ||
| identity_count = len(catalog_ids.get(person_id, set())) + len(leftover_names) | ||
| if identity_count != 1: |
There was a problem hiding this comment.
identity_count != 1 drops the person from the display map. After make seed, Priya has two unresolved orgs, so the chip becomes Priya Nair (Counterparty) — the same caption as a person with no affiliation. Keep display_name unset, but return a summary with ambiguous=True so the frontend can say multiple organizations and the buyer opens the Keyman list. #123 does this; also lock two distinct catalog ids so a first-catalog rewrite cannot pass.
| if (side && org) { | ||
| return `${name}, ${org} (${side})`; | ||
| } | ||
| if (side) { |
There was a problem hiding this comment.
When affiliation_organization_name is absent this falls through to side-only, so a known-plural set and a missing affiliation share one caption. If the payload sets affiliation_ambiguous, use multiple organizations as the context (Priya Nair, multiple organizations (Counterparty)). A unique org without a side should still name the org so a missing side cannot revive Ada West (Person).
| {"affiliated_organization_name": "Northridge Holdings"}, | ||
| ] | ||
| ) | ||
| assert "affiliation_organization_name" not in node |
There was a problem hiding this comment.
This locks two unresolved names. Add a person with two distinct affiliated_corporate_entity_id values and assert affiliation_organization_name is omitted (and, once the plural signal exists, affiliation_ambiguous is True). Without that, return next(iter(catalog_labels)) still passes the suite.


Buyer impact
Related-node chips now name the decision, not the ontology class. After
make seed, walk from Ada West and you seePriya Nair (Counterparty)instead ofPriya Nair (Person). Priya has two affiliations, so the chip does not invent a Northridge Grid primary — open the Keyman list to read both. Walk from Demo Corp and you seeAda West, Demo Corp (Our side)andDemo Corp (Company). Post chips show the title only. Click a chip to continue the walk.What this PR also locks
mode="auto"; post-chat and adjudication sendmode="verify"on the wire.Prefer this over
affiliation_organization_name == "Northridge Grid"for Priya (two affiliations) and its frontend tests still expect that invented primary.Test plan
pytest tests/test_contextual_orchestrator_default_policy.py backend/tests/test_related_node_affiliation_ambiguity.py— 4 passed, 7 subtestscd frontend && pnpm run lint && pnpm run test— 42 passedSynthetic fixtures only. No raw LLM API.
person_affiliationremains N:N with no primary column.