Skip to content

feat(ui): mark plural affiliations on related-node chips (v0.76.0) - #123

Closed
cursor[bot] wants to merge 9 commits into
mainfrom
cursor/bc-c535f7e4-d3ea-471c-86d0-e1066f866353-4499
Closed

feat(ui): mark plural affiliations on related-node chips (v0.76.0)#123
cursor[bot] wants to merge 9 commits into
mainfrom
cursor/bc-c535f7e4-d3ea-471c-86d0-e1066f866353-4499

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Buyer impact

After make seed, walk from Ada West and you see Priya Nair, multiple organizations (Counterparty). That is not an invented Northridge Grid primary, and it is not a side-only chip that looks like Priya has no organization. Open the Keyman list to read both affiliations. Walk from Demo Corp and you see Ada West, Demo Corp (Our side) and Demo Corp (Company). Post chips show the title only. Click a chip to continue the walk.

What this PR also locks

  • Two distinct catalog orgs are marked ambiguous the same way as two unresolved names.
  • Unresolved names that differ only by letter case count as one identity.
  • CHANGELOG 0.75.0 includes the ADR-0013 mode="auto" / mode="verify" payload-literal lock. 0.76.0 is the missing-vs-plural signal. There is no leftover [Unreleased] section on a version-bumped head.
  • A unique org without a side still names the org. Post chips keep Open related post: ${caption}.

Prefer this over

Test plan

  • pytest tests/test_contextual_orchestrator_default_policy.py backend/tests/test_related_node_affiliation_ambiguity.py — 11 passed, 7 subtests
  • cd frontend && pnpm run lint && pnpm run test — 48 passed
  • Required PR checks

Synthetic fixtures only. No raw LLM API. person_affiliation remains N:N with no primary column.

cursoragent and others added 8 commits August 16, 2026 14:43
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]>
Fold the orchestrator-mode changelog into 0.75.0 so a tag from this
head does not ship Unreleased behavior. Omit affiliation when two
catalog orgs are known, keep a unique org if the side is missing, and
put the visible caption in the post chip accessible name.

Co-authored-by: Seongho Bae <[email protected]>
A known-plural set now says "multiple organizations" so walking from
Ada West does not look like Priya has no org. Two catalog identities
and case-only unresolved aliases stay distinct or collapse by the
same rule. The chip still never invents a primary.

Co-authored-by: Seongho Bae <[email protected]>
@seonghobae seonghobae changed the title fix(ui): lock two-catalog omit and ship 0.75.0 notes together feat(ui): mark plural affiliations on related-node chips (v0.76.0) Aug 16, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 16, 2026 15:37
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Review (bfbca81)

No merge-blocking defect on this SHA. Prefer this head over #113 (silent omit plus leftover [Unreleased]), #120 (plural signal only), #112, #92 (identity rule only), and #117 (ADR-0013 payload-literal subset already on this SHA).

What I checked

  • compact_affiliation_summaries sets display_name only when identity_count == 1. Two unresolved names, two catalog ids, and a catalog org plus a distinct unresolved name all set affiliation_ambiguous and omit the org name. The chip never invents a primary.
  • Seeded walk from Ada West: Priya has no affiliation_organization_name and affiliation_ambiguous is true. A unique org still names entity_name (Ada / Test Corp). Casefold unresolved aliases collapse.
  • relatedNodeCaption: unique + side, plural + side, missing + side, and unique org without a side (no ontology-class fallback). Post chips stay title-only. Accessible names contain the visible caption (WCAG 2.2 Success Criterion 2.5.3).
  • CHANGELOG has no [Unreleased]. [0.76.0] is the missing-vs-plural signal; [0.75.0] records captions plus the ADR-0013 "mode": "auto" / "mode": "verify" payload-literal lock. pyproject.toml, frontend/package.json, and lineageweave/__init__.py are 0.76.0.
  • Affiliation SQL is person-scoped for people already on the visible walk, same as fetch_post_keymen. Not a new ABAC hole.

CodeRabbit CLI 0.7.3 is installed here; coderabbit auth login --agent fails on the browser callback. This is the extra-check pass, not a CodeRabbit result.

Next action

  1. Wait for required checks on this exact SHA (Full test suite, Frontend lint, test, build, Semgrep, scorecard, osv-scan, dependency-review, trivy-fs).
  2. A human other than the author approves, then merge.
  3. After this lands, close #92, #112, #113, #120, and #117. Do not merge those heads.
  4. Do not open another related-node caption rewrite.

Residual, not blocking: a catalog id with no entity_name and no raw name is a nameless unique identity and stays side-only. corporate_entity.entity_name is NOT NULL, so that is an orphaned-FK edge case. Past-and-current affiliations are still counted together — temporal validity belongs in a later migration after #105 / #74 settle the 0012+ numbers, not in a second caption PR.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Assessment

This head is the caption landing vehicle. After make seed, walk from Ada West: the Priya chip must read Priya Nair, multiple organizations (Counterparty) so the next action is the Keyman list. That is not a guessed Northridge Grid primary, and it is not a side-only chip that looks like Priya has no organization. Walk from Demo Corp: Ada West, Demo Corp (Our side) and Demo Corp (Company). Click a chip to continue the walk.

compact_affiliation_summaries counts distinct catalog ids plus leftover unresolved names and sets a display name only when the count is exactly one. Two catalog orgs, a catalog org plus a distinct unresolved name, and two unresolved names are all affiliation_ambiguous. Case-only unresolved names collapse. Unique org without a side still names the org. Post chips stay title-only with Open related post: ${caption}.

CHANGELOG is honest on bfbca81: [0.76.0] is the missing-vs-plural signal; [0.75.0] holds the ADR-0013 "mode": "auto" / "mode": "verify" payload-literal lock. No leftover [Unreleased].

Local review of c93d449..bfbca81 found no merge-blocking source defect. Affiliation + policy unit tests and the caption contract were read against ADR-0014 and Browne et al. (2001). Required checks were still queued at review time — do not treat that queue as a source defect, and do not merge until they are terminal-success on this SHA.

Prefer this over

  • #113 at 5eeaa7f — silent omit makes a plural set look missing; CHANGELOG still called the orchestrator lock Unreleased.
  • #120 — same plural signal, without the ADR-0013 lock or the two-catalog / casefold tests on this head.
  • #112 — caption-only omit, no plural signal.
  • #92 — identity rule only; merge the signal with this head, not alone.
  • #117 / #106 — payload-literal / adaptive-default work is already on this SHA.

Do not open another caption rewrite. Independent non-author approval is still required. This automation will not approve or merge.

Residual (not blocking)

  • Blank-affiliation unit test should also assert affiliation_ambiguous is absent, so whitespace cannot later be marked plural.
  • Unique-Ada API path should assert affiliation_ambiguous is absent next to Test Corp.
  • If a stale payload ever sent both a name and affiliation_ambiguous, the caption currently prefers the name. Backend never emits both.

Next buyer gap

Frontend still has no Storybook inventory and no named token module for the repeating chip. That is the next product surface after this caption contract, not another affiliation rewrite.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Comment thread backend/tests/test_related_node_affiliation_ambiguity.py
Comment thread backend/tests/test_api.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Updated landing head

#123 at bfbca81 still has no merge-blocking defect. Prefer #132 (71704ae, v0.77.0) as the landing vehicle. That branch is this SHA plus the on-panel next action, the ambiguous-over-name defense, doctoring citations, and proposed ADR-0015.

Next action

  1. Review and land #132 instead of merging #123 and #132 as two landings.
  2. After #132 lands, close #123, #120, #113, #112, #92, and #117. Do not merge those older heads.
  3. Do not add affiliation interval columns until Milestone 2.1 / #74 settle the 0012+ numbers.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Blank extraction is missing evidence, not ambiguous. A unique catalog
org must not carry affiliation_ambiguous.
@seonghobae
seonghobae enabled auto-merge (squash) August 16, 2026 16:39
@seonghobae

Copy link
Copy Markdown
Contributor

Locked the missing-vs-plural distinction: blank affiliation omits affiliation_ambiguous; Ada/Test Corp unique catalog org also omits the flag. Frontend 48 tests passed twice.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (acd9dff)

Verdict: SOUND. No merge-blocking defect on this SHA. The two prior residuals are fully addressed.

acd9dff (test: lock missing-vs-plural affiliation flags) adds the exact omit locks asked for:

  1. Blank affiliation is missing evidence, not plural — test_related_person_omits_blank_affiliation now asserts affiliation_ambiguous is absent.
  2. Unique Ada / Test Corp catalog org is the named-org path — the Demo Corp walk now asserts affiliation_ambiguous is absent next to Test Corp.

Implementation still matches those locks. compact_affiliation_summaries sets display_name only when identity_count == 1 and sets ambiguous only when the count is greater than one. Whitespace-only rows never enter the summary map, so hydrate omits both fields. Ada’s seeded row is one catalog affiliation (Test Corp); Priya’s two unresolved names stay plural with no invented primary. person_affiliation remains N:N with no primary column.

relatedNodeCaption on this SHA still prefers a name if both fields were present. Backend never emits both. CHANGELOG [0.76.0] is the missing-vs-plural signal; [0.75.0] still holds the ADR-0013 payload-literal lock; no leftover [Unreleased]. Versions are 0.76.0.

Previous threads:

  • blank omit — fully_addressed
  • Ada / Test Corp omit — fully_addressed

Landing vehicle

Do not merge #123 alone. Prefer the successor that is this SHA plus the on-panel next action, RelatedNodeChip tokens, and the ambiguous-over-name defense. #132 at 71704ae is still based on bfbca81 and does not include these two test locks — do not merge #132 instead of this SHA.

Close #113, #112, and #92 after the successor lands. Do not merge those older heads.

Residual (not blocking on this SHA)

  • Past-and-current affiliations are still counted together. Temporal validity stays later (ADR-0015) after Milestone 2.1 / #74 settle the 0012+ numbers.

This automation will not approve or merge. Independent non-author approval is still required.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Copy link
Copy Markdown
Contributor

Superseded by #192. #192 carries the same catalog-identity/alias collapse and plural-affiliation signal, adds the missing-vs-multiple distinction requested during review, preserves all affiliations rather than inventing a primary organization, and names the next Buyer action. Keeping both branches would duplicate the same related-node caption surface and stale ADR/version history. Closing without merge.

@seonghobae seonghobae closed this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants