Skip to content

Use native Effect predicates in runtime and test assertions - #502

Closed
BleedingDev wants to merge 1 commit into
mainfrom
codex/native-effect-predicates
Closed

BleedingDev wants to merge 1 commit into
mainfrom
codex/native-effect-predicates

Conversation

@BleedingDev

@BleedingDev BleedingDev commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Runtime and test code still inspected _tag strings and constructor identity directly. Use native predicates, Schema checks, and typed failure combinators while preserving the same outcomes and assertions.

- assert.equal(error._tag, 'Rejected')
+ assert.ok(Predicate.isTagged(error, 'Rejected'))

- value instanceof Date
+ Predicate.isDate(value)

Core outbox logging now uses Effect.tapErrorTag, and an unused test failure field is removed. The remaining changes migrate error assertions in Core, Shell, and Party Registry tests.

This is the first PR in the cleanup stack. Merge it before #501, which adds repository enforcement and native generator/script interfaces. Split into 64 and 83 files so each PR fits the automated review limit.

Validation: Core and Party Registry unit suites, 193 Shell unit tests, and workspace integration suites passed on the combined cleanup tree. CI checks this base independently.

Summary by CodeRabbit

  • Tests

    • Improved error-type assertions across authentication, identity, permissions, search, and party-registry test suites.
    • Updated asynchronous test registration to avoid unhandled promise warnings.
    • Refined layout and SQL type assertions without changing expected outcomes.
  • Refactor

    • Standardised runtime type and date checks for more reliable error and value handling.
  • Bug Fixes

    • Simplified outbox error handling and logging for recognised persistence failures.
  • Chores

    • Removed an unused optional field from live-operation test errors.

@semanticdiff-com

semanticdiff-com Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  app/verticals/party-registry/tests/unit/merge-survivor-selection.test.ts  86% smaller
  app/packages/core-runtime/tests/integration/search-persistence.test.ts  86% smaller
  app/verticals/party-registry/tests/unit/merge-alias-resolution.test.ts  85% smaller
  app/apps/shell-super-app/tests/unit/layout.test.tsx  76% smaller
  app/verticals/party-registry/tests/unit/search-semantics.test.ts  76% smaller
  app/packages/core-runtime/tests/unit/legal-entity-context.test.ts  72% smaller
  app/verticals/party-registry/tests/integration/governed-identity.test.ts  71% smaller
  app/packages/core-runtime/tests/unit/outbox-health.test.ts  70% smaller
  app/packages/core-runtime/tests/unit/principal-resolver.test.ts  67% smaller
  app/verticals/party-registry/tests/unit/counterparty-persistence.service.test.ts  62% smaller
  app/verticals/party-registry/tests/unit/search-core-adapter.test.ts  60% smaller
  app/verticals/party-registry/tests/unit/identifier-persistence.service.test.ts  60% smaller
  app/verticals/party-registry/tests/unit/identity-persistence.service.test.ts  58% smaller
  app/verticals/party-registry/tests/unit/search-projector.test.ts  55% smaller
  app/packages/core-runtime/tests/integration/principal-resolver.test.ts  51% smaller
  app/packages/core-runtime/src/outbox/runtime.ts  50% smaller
  app/verticals/party-registry/tests/unit/contact-point-persistence.service.test.ts  50% smaller
  app/apps/shell-super-app/tests/integration/identity-modes-runtime.test.ts  48% smaller
  app/packages/core-runtime/src/actions/repository.ts  47% smaller
  app/packages/core-runtime/tests/integration/identity-runtime.test.ts  46% smaller
  app/apps/shell-super-app/tests/integration/auth-runtime.test.ts  46% smaller
  app/packages/core-runtime/tests/integration/legal-entity-context.test.ts  43% smaller
  app/packages/core-runtime/tests/unit/action-collector.test.ts  41% smaller
  app/verticals/party-registry/tests/unit/merge-alias-resolution-service.test.ts  41% smaller
  app/packages/core-runtime/tests/integration/principal-management.test.ts  41% smaller
  app/apps/shell-super-app/tests/unit/auth-config.test.ts  40% smaller
  app/packages/core-runtime/tests/unit/principal-management.test.ts  40% smaller
  app/packages/core-runtime/tests/integration/module-state-gate.test.ts  39% smaller
  app/packages/core-runtime/tests/unit/module-state-gate.test.ts  38% smaller
  app/packages/core-runtime/tests/unit/tenant-module-state.test.ts  37% smaller
  app/verticals/party-registry/tests/unit/api-integration-ares-application.test.ts  37% smaller
  app/verticals/party-registry/tests/unit/search-source.test.ts  36% smaller
  app/packages/core-runtime/tests/unit/config.test.ts  35% smaller
  app/apps/shell-super-app/tests/unit/legal-entity-selection.test.ts  34% smaller
  app/packages/core-runtime/tests/unit/system-principal-context.test.ts  34% smaller
  app/packages/core-runtime/tests/unit/action-runtime.test.ts  33% smaller
  app/verticals/party-registry/tests/integration/ares-governed.test.ts  33% smaller
  app/packages/core-runtime/tests/unit/search-projection.test.ts  33% smaller
  app/packages/core-runtime/tests/unit/commit-recovery-metadata.test.ts  33% smaller
  app/verticals/party-registry/tests/unit/relationship-persistence.service.test.ts  32% smaller
  app/packages/core-runtime/tests/unit/read-runtime.test.ts  32% smaller
  app/verticals/party-registry/tests/unit/engagement-profile-persistence-service.test.ts  31% smaller
  app/verticals/party-registry/tests/unit/ares-subject.service.test.ts  31% smaller
  app/verticals/party-registry/tests/unit/matching-persistence.test.ts  31% smaller
  app/packages/core-runtime/tests/unit/action-definition.test.ts  30% smaller
  app/packages/core-runtime/tests/integration/action-runtime.test.ts  30% smaller
  app/packages/core-runtime/tests/unit/action-testing-harness.test.ts  29% smaller
  app/packages/core-runtime/tests/unit/search-ingestion.test.ts  28% smaller
  app/verticals/party-registry/tests/unit/api-integration-command-runtime.test.ts  27% smaller
  app/verticals/party-registry/tests/unit/correction-contract.test.ts  26% smaller
  app/packages/core-runtime/tests/integration/action-permission.test.ts  26% smaller
  app/verticals/party-registry/tests/unit/search-rebuild-request.test.ts  25% smaller
  app/verticals/party-registry/tests/unit/identity-party-detail-alias.test.ts  25% smaller
  app/packages/core-runtime/tests/unit/action-policy.test.ts  25% smaller
  app/verticals/party-registry/tests/unit/identity-action-evidence.test.ts  25% smaller
  app/verticals/party-registry/tests/unit/ares-lookup-read.test.ts  23% smaller
  app/packages/core-runtime/tests/unit/action-errors.test.ts  23% smaller
  app/packages/core-runtime/tests/unit/pool-configuration.test.ts  22% smaller
  app/packages/core-runtime/tests/unit/scoped-transaction.test.ts  22% smaller
  app/verticals/party-registry/tests/unit/database-client.test.ts  21% smaller
  app/apps/shell-super-app/tests/unit/auth-contract.test.ts  10% smaller
  app/apps/shell-super-app/tests/unit/identity-lifecycle.test.ts  5% smaller
  app/packages/core-runtime/src/testing/live-operations.ts  0% smaller
  app/packages/core-runtime/tests/unit/database-driver-failure.test.ts  0% smaller

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: c203adc2-7442-4433-86c5-5f1e4b254ac4

📥 Commits

Reviewing files that changed from the base of the PR and between 0613ebd and bfe3256.

📒 Files selected for processing (64)
  • app/apps/shell-super-app/tests/integration/auth-runtime.test.ts
  • app/apps/shell-super-app/tests/integration/identity-modes-runtime.test.ts
  • app/apps/shell-super-app/tests/unit/auth-config.test.ts
  • app/apps/shell-super-app/tests/unit/auth-contract.test.ts
  • app/apps/shell-super-app/tests/unit/identity-lifecycle.test.ts
  • app/apps/shell-super-app/tests/unit/layout.test.tsx
  • app/apps/shell-super-app/tests/unit/legal-entity-selection.test.ts
  • app/packages/core-runtime/src/actions/repository.ts
  • app/packages/core-runtime/src/outbox/runtime.ts
  • app/packages/core-runtime/src/testing/live-operations.ts
  • app/packages/core-runtime/tests/integration/action-permission.test.ts
  • app/packages/core-runtime/tests/integration/action-runtime.test.ts
  • app/packages/core-runtime/tests/integration/identity-runtime.test.ts
  • app/packages/core-runtime/tests/integration/legal-entity-context.test.ts
  • app/packages/core-runtime/tests/integration/module-state-gate.test.ts
  • app/packages/core-runtime/tests/integration/principal-management.test.ts
  • app/packages/core-runtime/tests/integration/principal-resolver.test.ts
  • app/packages/core-runtime/tests/integration/search-persistence.test.ts
  • app/packages/core-runtime/tests/unit/action-collector.test.ts
  • app/packages/core-runtime/tests/unit/action-definition.test.ts
  • app/packages/core-runtime/tests/unit/action-errors.test.ts
  • app/packages/core-runtime/tests/unit/action-policy.test.ts
  • app/packages/core-runtime/tests/unit/action-runtime.test.ts
  • app/packages/core-runtime/tests/unit/action-testing-harness.test.ts
  • app/packages/core-runtime/tests/unit/commit-recovery-metadata.test.ts
  • app/packages/core-runtime/tests/unit/config.test.ts
  • app/packages/core-runtime/tests/unit/database-driver-failure.test.ts
  • app/packages/core-runtime/tests/unit/legal-entity-context.test.ts
  • app/packages/core-runtime/tests/unit/module-state-gate.test.ts
  • app/packages/core-runtime/tests/unit/outbox-health.test.ts
  • app/packages/core-runtime/tests/unit/pool-configuration.test.ts
  • app/packages/core-runtime/tests/unit/principal-management.test.ts
  • app/packages/core-runtime/tests/unit/principal-resolver.test.ts
  • app/packages/core-runtime/tests/unit/read-runtime.test.ts
  • app/packages/core-runtime/tests/unit/scoped-transaction.test.ts
  • app/packages/core-runtime/tests/unit/search-ingestion.test.ts
  • app/packages/core-runtime/tests/unit/search-projection.test.ts
  • app/packages/core-runtime/tests/unit/system-principal-context.test.ts
  • app/packages/core-runtime/tests/unit/tenant-module-state.test.ts
  • app/verticals/party-registry/tests/integration/ares-governed.test.ts
  • app/verticals/party-registry/tests/integration/governed-identity.test.ts
  • app/verticals/party-registry/tests/unit/api-integration-ares-application.test.ts
  • app/verticals/party-registry/tests/unit/api-integration-command-runtime.test.ts
  • app/verticals/party-registry/tests/unit/ares-lookup-read.test.ts
  • app/verticals/party-registry/tests/unit/ares-subject.service.test.ts
  • app/verticals/party-registry/tests/unit/contact-point-persistence.service.test.ts
  • app/verticals/party-registry/tests/unit/correction-contract.test.ts
  • app/verticals/party-registry/tests/unit/counterparty-persistence.service.test.ts
  • app/verticals/party-registry/tests/unit/database-client.test.ts
  • app/verticals/party-registry/tests/unit/engagement-profile-persistence-service.test.ts
  • app/verticals/party-registry/tests/unit/identifier-persistence.service.test.ts
  • app/verticals/party-registry/tests/unit/identity-action-evidence.test.ts
  • app/verticals/party-registry/tests/unit/identity-party-detail-alias.test.ts
  • app/verticals/party-registry/tests/unit/identity-persistence.service.test.ts
  • app/verticals/party-registry/tests/unit/matching-persistence.test.ts
  • app/verticals/party-registry/tests/unit/merge-alias-resolution-service.test.ts
  • app/verticals/party-registry/tests/unit/merge-alias-resolution.test.ts
  • app/verticals/party-registry/tests/unit/merge-survivor-selection.test.ts
  • app/verticals/party-registry/tests/unit/relationship-persistence.service.test.ts
  • app/verticals/party-registry/tests/unit/search-core-adapter.test.ts
  • app/verticals/party-registry/tests/unit/search-projector.test.ts
  • app/verticals/party-registry/tests/unit/search-rebuild-request.test.ts
  • app/verticals/party-registry/tests/unit/search-semantics.test.ts
  • app/verticals/party-registry/tests/unit/search-source.test.ts
💤 Files with no reviewable changes (1)
  • app/packages/core-runtime/src/testing/live-operations.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
Before touching files under `app/`, read [the application coding guide](./README.md).

📄 CodeRabbit inference engine (app/AGENTS.md)

Files:

  • app/packages/core-runtime/tests/integration/identity-runtime.test.ts
  • app/packages/core-runtime/tests/unit/pool-configuration.test.ts
  • app/packages/core-runtime/tests/unit/search-projection.test.ts
  • app/packages/core-runtime/tests/unit/principal-management.test.ts
  • app/packages/core-runtime/tests/unit/database-driver-failure.test.ts
  • app/packages/core-runtime/tests/unit/action-errors.test.ts
  • app/verticals/party-registry/tests/unit/merge-alias-resolution.test.ts
  • app/packages/core-runtime/tests/integration/legal-entity-context.test.ts
  • app/packages/core-runtime/tests/unit/action-collector.test.ts
  • app/packages/core-runtime/tests/unit/config.test.ts
  • app/packages/core-runtime/tests/unit/principal-resolver.test.ts
  • app/verticals/party-registry/tests/unit/ares-lookup-read.test.ts
  • app/verticals/party-registry/tests/integration/ares-governed.test.ts
  • app/apps/shell-super-app/tests/unit/identity-lifecycle.test.ts
  • app/apps/shell-super-app/tests/integration/auth-runtime.test.ts
  • app/packages/core-runtime/tests/integration/module-state-gate.test.ts
  • app/verticals/party-registry/tests/unit/relationship-persistence.service.test.ts
  • app/packages/core-runtime/tests/integration/principal-resolver.test.ts
  • app/packages/core-runtime/tests/unit/tenant-module-state.test.ts
  • app/packages/core-runtime/tests/unit/module-state-gate.test.ts
  • app/packages/core-runtime/tests/unit/scoped-transaction.test.ts
  • app/apps/shell-super-app/tests/unit/legal-entity-selection.test.ts
  • app/apps/shell-super-app/tests/unit/auth-contract.test.ts
  • app/apps/shell-super-app/tests/integration/identity-modes-runtime.test.ts
  • app/verticals/party-registry/tests/unit/search-semantics.test.ts
  • app/packages/core-runtime/tests/unit/commit-recovery-metadata.test.ts
  • app/packages/core-runtime/tests/integration/search-persistence.test.ts
  • app/apps/shell-super-app/tests/unit/layout.test.tsx
  • app/packages/core-runtime/tests/unit/action-testing-harness.test.ts
  • app/packages/core-runtime/tests/unit/legal-entity-context.test.ts
  • app/verticals/party-registry/tests/unit/engagement-profile-persistence-service.test.ts
  • app/verticals/party-registry/tests/unit/identity-action-evidence.test.ts
  • app/verticals/party-registry/tests/unit/identifier-persistence.service.test.ts
  • app/verticals/party-registry/tests/unit/search-rebuild-request.test.ts
  • app/packages/core-runtime/src/outbox/runtime.ts
  • app/verticals/party-registry/tests/unit/merge-alias-resolution-service.test.ts
  • app/packages/core-runtime/tests/unit/action-policy.test.ts
  • app/packages/core-runtime/tests/integration/principal-management.test.ts
  • app/verticals/party-registry/tests/unit/api-integration-ares-application.test.ts
  • app/packages/core-runtime/tests/unit/outbox-health.test.ts
  • app/verticals/party-registry/tests/unit/database-client.test.ts
  • app/packages/core-runtime/tests/unit/system-principal-context.test.ts
  • app/verticals/party-registry/tests/unit/search-core-adapter.test.ts
  • app/verticals/party-registry/tests/unit/matching-persistence.test.ts
  • app/verticals/party-registry/tests/unit/contact-point-persistence.service.test.ts
  • app/packages/core-runtime/tests/integration/action-permission.test.ts
  • app/verticals/party-registry/tests/unit/search-source.test.ts
  • app/apps/shell-super-app/tests/unit/auth-config.test.ts
  • app/verticals/party-registry/tests/integration/governed-identity.test.ts
  • app/packages/core-runtime/src/actions/repository.ts
  • app/verticals/party-registry/tests/unit/api-integration-command-runtime.test.ts
  • app/verticals/party-registry/tests/unit/ares-subject.service.test.ts
  • app/packages/core-runtime/tests/unit/action-definition.test.ts
  • app/packages/core-runtime/tests/unit/search-ingestion.test.ts
  • app/verticals/party-registry/tests/unit/search-projector.test.ts
  • app/verticals/party-registry/tests/unit/identity-party-detail-alias.test.ts
  • app/verticals/party-registry/tests/unit/counterparty-persistence.service.test.ts
  • app/packages/core-runtime/tests/integration/action-runtime.test.ts
  • app/packages/core-runtime/tests/unit/read-runtime.test.ts
  • app/verticals/party-registry/tests/unit/merge-survivor-selection.test.ts
  • app/verticals/party-registry/tests/unit/correction-contract.test.ts
  • app/verticals/party-registry/tests/unit/identity-persistence.service.test.ts
  • app/packages/core-runtime/tests/unit/action-runtime.test.ts
🪛 Betterleaks (1.8.1)
app/packages/core-runtime/tests/unit/pool-configuration.test.ts

[high] 10-10: Detected a password embedded in a service connection URI, which may expose direct access to the referenced service.

(generic-credential-uri)

🔇 Additional comments (63)
app/apps/shell-super-app/tests/integration/auth-runtime.test.ts (1)

216-216: LGTM!

Also applies to: 373-373, 1016-1016, 1069-1069, 1741-1741, 1772-1772

app/apps/shell-super-app/tests/unit/auth-config.test.ts (1)

3-3: LGTM!

Also applies to: 42-43, 51-51

app/apps/shell-super-app/tests/unit/auth-contract.test.ts (1)

3-3: LGTM!

Also applies to: 236-236, 248-248, 273-274

app/apps/shell-super-app/tests/unit/identity-lifecycle.test.ts (1)

9-9: LGTM!

Also applies to: 92-92, 120-120, 154-154, 459-459

app/apps/shell-super-app/tests/integration/identity-modes-runtime.test.ts (1)

466-466: LGTM!

Also applies to: 583-583, 599-599, 629-629

app/apps/shell-super-app/tests/unit/layout.test.tsx (1)

308-309: LGTM!

app/apps/shell-super-app/tests/unit/legal-entity-selection.test.ts (1)

6-6: LGTM!

Also applies to: 113-113

app/packages/core-runtime/src/actions/repository.ts (1)

109-109: LGTM!

app/packages/core-runtime/src/outbox/runtime.ts (1)

22-22: LGTM!

Also applies to: 103-103, 304-304, 342-342, 354-354

app/verticals/party-registry/tests/integration/ares-governed.test.ts (1)

23-23: LGTM!

Also applies to: 112-112, 377-379, 390-390, 414-414, 427-429

app/verticals/party-registry/tests/integration/governed-identity.test.ts (1)

17-25: LGTM!

Also applies to: 107-107, 254-259, 263-271, 296-301, 307-311, 318-322, 329-329, 345-349, 351-358, 361-365, 384-386, 387-399, 402-402, 451-457, 548-554, 556-560, 658-658

app/verticals/party-registry/tests/unit/api-integration-ares-application.test.ts (1)

5-5: LGTM!

Also applies to: 213-213, 223-223, 230-230, 275-275, 298-299, 301-301, 311-311, 321-321, 351-352, 356-356, 399-399, 405-405, 495-495, 545-545, 591-591, 635-635, 654-654, 697-697, 715-715, 719-719, 749-749, 798-798, 806-806, 822-822, 833-833, 858-858

app/verticals/party-registry/tests/unit/relationship-persistence.service.test.ts (1)

4-4: LGTM!

Also applies to: 135-135, 174-174, 204-204, 260-260, 286-286, 303-303, 344-344, 376-376, 383-383, 404-404, 411-411, 451-451, 492-492

app/verticals/party-registry/tests/unit/search-core-adapter.test.ts (1)

4-4: LGTM!

Also applies to: 62-62, 96-96, 149-149, 163-163

app/verticals/party-registry/tests/unit/search-projector.test.ts (1)

4-4: LGTM!

Also applies to: 71-71, 103-103, 161-161, 220-220, 264-264, 349-349, 387-387, 429-429, 465-465, 469-469, 521-521, 555-555, 608-608

app/verticals/party-registry/tests/unit/search-rebuild-request.test.ts (1)

4-4: LGTM!

Also applies to: 31-31, 44-44, 82-82, 90-90, 99-99, 108-108, 131-131

app/verticals/party-registry/tests/unit/search-semantics.test.ts (1)

3-3: LGTM!

Also applies to: 43-43, 54-54, 61-61, 74-74, 83-83, 88-103, 120-120, 146-146, 155-155, 166-166, 170-170, 186-186, 201-201, 220-220

app/verticals/party-registry/tests/unit/search-source.test.ts (1)

10-10: LGTM!

Also applies to: 83-83, 147-147, 223-223, 242-242, 273-273, 304-304, 322-322

app/verticals/party-registry/tests/unit/api-integration-command-runtime.test.ts (1)

5-5: LGTM!

Also applies to: 276-276, 313-319, 338-338, 345-345, 363-363, 374-374, 388-396, 407-410, 420-430, 446-454, 475-475, 484-484, 514-514, 524-524, 551-551, 563-563, 611-611, 624-624, 660-660, 711-711, 722-722, 731-731, 768-768, 871-871, 904-904

app/verticals/party-registry/tests/unit/ares-lookup-read.test.ts (1)

6-6: LGTM!

Also applies to: 62-62, 71-71, 94-94, 144-146, 149-149, 193-193

app/verticals/party-registry/tests/unit/ares-subject.service.test.ts (1)

5-5: LGTM!

Also applies to: 73-73, 114-114, 124-130, 155-155, 186-194, 219-226, 240-248, 271-275, 293-299, 337-337

app/verticals/party-registry/tests/unit/contact-point-persistence.service.test.ts (1)

3-5: LGTM!

Also applies to: 228-228, 267-267, 335-335, 369-374, 446-446, 494-494, 519-519, 563-569, 598-605, 644-644, 679-687, 807-807, 824-830, 909-909, 953-958

app/verticals/party-registry/tests/unit/correction-contract.test.ts (1)

4-4: LGTM!

Also applies to: 58-58, 83-83, 127-127, 230-230, 258-258, 280-280, 301-308, 347-352, 420-420, 436-443, 469-475, 526-532, 561-561

app/verticals/party-registry/tests/unit/counterparty-persistence.service.test.ts (1)

2-2: LGTM!

Also applies to: 149-149, 169-169, 185-185, 208-208, 226-226, 244-244, 250-250, 264-264, 274-274, 283-283, 292-292, 316-316, 322-322, 346-346, 355-355, 379-379, 385-385, 412-412

app/verticals/party-registry/tests/unit/merge-alias-resolution.test.ts (1)

3-3: LGTM!

Also applies to: 29-29, 43-51, 53-57, 59-68, 72-72

app/verticals/party-registry/tests/unit/merge-survivor-selection.test.ts (1)

3-3: LGTM!

Also applies to: 54-54, 69-69, 87-87, 99-99, 116-116, 136-136, 143-155, 159-159, 166-166

app/verticals/party-registry/tests/unit/database-client.test.ts (1)

5-5: LGTM!

Also applies to: 8-8, 23-23, 42-42

app/verticals/party-registry/tests/unit/engagement-profile-persistence-service.test.ts (1)

4-4: LGTM!

Also applies to: 48-48, 61-61, 70-70, 74-74, 91-91, 99-99, 115-115, 119-119, 132-132

app/verticals/party-registry/tests/unit/identifier-persistence.service.test.ts (1)

2-2: LGTM!

Also applies to: 151-151, 168-168, 217-217, 230-230, 237-237, 247-247, 259-259, 269-269, 274-274, 284-284, 300-300, 310-310, 314-314, 327-327, 338-338, 350-350

app/verticals/party-registry/tests/unit/identity-action-evidence.test.ts (1)

4-4: LGTM!

Also applies to: 47-47, 75-75, 96-96, 117-117, 158-158

app/verticals/party-registry/tests/unit/identity-party-detail-alias.test.ts (1)

4-4: LGTM!

Also applies to: 66-66, 93-93, 113-113, 122-122, 127-127, 136-136

app/verticals/party-registry/tests/unit/identity-persistence.service.test.ts (1)

4-4: LGTM!

Also applies to: 153-153, 157-157, 221-221, 243-243, 258-258, 279-279, 293-293, 299-299, 324-324, 365-365, 417-417, 430-430, 452-452, 467-467, 478-478, 483-483, 494-494, 520-520, 533-533, 539-539, 571-571, 581-581, 587-587, 608-608, 629-629, 646-646, 652-652, 685-685, 692-692, 720-720, 735-735, 765-765, 784-784, 791-791, 808-808

app/verticals/party-registry/tests/unit/matching-persistence.test.ts (1)

4-4: LGTM!

Also applies to: 199-199, 242-242, 259-259, 312-312, 340-340, 365-365, 427-427, 480-480, 540-540, 606-606, 644-644, 669-669, 679-679, 689-689, 699-699, 729-729, 740-740, 745-745, 755-755, 798-798, 833-833, 874-874, 890-890, 897-897, 914-914, 928-928, 934-934, 958-958

app/verticals/party-registry/tests/unit/merge-alias-resolution-service.test.ts (1)

4-4: LGTM!

Also applies to: 23-23, 35-35, 49-49, 66-66, 75-75, 78-78, 84-84

app/packages/core-runtime/tests/integration/action-permission.test.ts (1)

4-4: LGTM!

Also applies to: 581-581, 640-640, 681-684, 776-776, 826-826

app/packages/core-runtime/tests/integration/action-runtime.test.ts (1)

6-6: LGTM!

Also applies to: 457-458, 551-551, 846-846, 960-961, 1068-1068, 1165-1165, 1228-1229, 1281-1284, 1363-1363, 1427-1431, 1443-1443, 1452-1452, 1468-1468, 1615-1615, 1692-1695, 1736-1736, 1767-1767, 1865-1865, 1897-1897

app/packages/core-runtime/tests/integration/identity-runtime.test.ts (1)

470-470: LGTM!

app/packages/core-runtime/tests/integration/legal-entity-context.test.ts (1)

7-7: LGTM!

Also applies to: 113-113, 115-115

app/packages/core-runtime/tests/unit/module-state-gate.test.ts (1)

229-229: LGTM!

Also applies to: 240-240, 337-337, 479-479, 525-525, 543-543

app/packages/core-runtime/tests/unit/outbox-health.test.ts (1)

6-6: LGTM!

Also applies to: 12-12, 23-23, 57-57, 69-69, 79-79, 84-84, 106-106

app/packages/core-runtime/tests/unit/pool-configuration.test.ts (1)

4-4: LGTM!

Also applies to: 12-12, 33-33, 47-47, 63-63, 74-74, 83-83

app/packages/core-runtime/tests/unit/principal-management.test.ts (1)

4-4: LGTM!

Also applies to: 95-96, 160-162, 186-186, 237-237, 263-263

app/packages/core-runtime/tests/unit/principal-resolver.test.ts (1)

2-2: LGTM!

Also applies to: 156-160, 171-175, 177-181, 183-187, 206-211, 220-224, 226-232, 234-244, 247-253, 255-261, 263-271, 291-291

app/packages/core-runtime/tests/unit/read-runtime.test.ts (1)

259-259: LGTM!

Also applies to: 325-325, 358-358, 374-374, 406-406, 450-450, 456-456, 493-493, 498-498, 548-548, 656-656, 674-674, 679-679, 726-726, 730-730, 760-760, 764-764, 795-795, 799-799, 817-817, 845-845, 888-888, 892-892, 936-936, 969-969, 972-972, 1008-1010, 1080-1080, 1082-1082

app/packages/core-runtime/tests/integration/module-state-gate.test.ts (1)

4-4: LGTM!

Also applies to: 166-166, 181-181, 204-204, 214-214, 225-225

app/packages/core-runtime/tests/integration/principal-management.test.ts (1)

8-8: LGTM!

Also applies to: 121-121, 142-142

app/packages/core-runtime/tests/integration/principal-resolver.test.ts (1)

7-7: LGTM!

Also applies to: 121-121, 136-136, 149-149, 162-162

app/packages/core-runtime/tests/integration/search-persistence.test.ts (1)

6-13: LGTM!

Also applies to: 255-255

app/packages/core-runtime/tests/unit/action-collector.test.ts (1)

5-5: LGTM!

Also applies to: 88-89, 151-154, 174-174, 210-210, 248-251

app/packages/core-runtime/tests/unit/scoped-transaction.test.ts (1)

5-5: LGTM!

Also applies to: 75-75

app/packages/core-runtime/tests/unit/search-ingestion.test.ts (1)

4-4: LGTM!

Also applies to: 107-107, 141-141

app/packages/core-runtime/tests/unit/search-projection.test.ts (1)

4-4: LGTM!

Also applies to: 90-90, 195-195, 438-438

app/packages/core-runtime/tests/unit/system-principal-context.test.ts (1)

3-3: LGTM!

Also applies to: 83-85, 109-109

app/packages/core-runtime/tests/unit/tenant-module-state.test.ts (1)

5-5: LGTM!

Also applies to: 104-104, 121-121, 132-132, 190-190, 194-194

app/packages/core-runtime/tests/unit/action-definition.test.ts (1)

59-59: LGTM!

Also applies to: 77-77, 105-105, 140-140, 178-178

app/packages/core-runtime/tests/unit/action-errors.test.ts (1)

3-3: LGTM!

Also applies to: 112-115

app/packages/core-runtime/tests/unit/action-policy.test.ts (1)

5-5: LGTM!

Also applies to: 87-87

app/packages/core-runtime/tests/unit/action-runtime.test.ts (1)

453-453: LGTM!

Also applies to: 470-470, 477-477, 505-505, 577-577, 615-615, 682-682, 746-746, 769-769, 781-781, 784-784, 843-843, 865-865, 902-902, 916-916, 930-930, 949-949, 996-996, 1016-1016, 1076-1076, 1139-1139, 1197-1197, 1226-1226, 1254-1254, 1328-1328, 1366-1366, 1371-1371, 1427-1427, 1461-1461, 1474-1474, 1494-1494, 1507-1507, 1516-1516, 1587-1587, 1653-1653, 1685-1685, 1735-1735, 1749-1749, 1795-1795, 1801-1801, 1828-1828, 1883-1883, 1931-1934, 1938-1938, 2004-2004, 2010-2010, 2087-2087, 2089-2089, 2094-2094, 2144-2144, 2149-2149, 2241-2241, 2244-2244, 2247-2249, 2251-2254, 2257-2257, 2290-2290, 2333-2334, 2338-2338, 2358-2358, 2363-2363, 2415-2415

app/packages/core-runtime/tests/unit/action-testing-harness.test.ts (1)

5-5: LGTM!

Also applies to: 68-68, 78-78, 88-88, 93-93, 101-101, 159-159, 175-175

app/packages/core-runtime/tests/unit/commit-recovery-metadata.test.ts (1)

6-6: LGTM!

Also applies to: 20-20, 67-67, 77-77, 103-103, 147-147, 159-159

app/packages/core-runtime/tests/unit/config.test.ts (1)

5-5: LGTM!

Also applies to: 63-64, 116-119

app/packages/core-runtime/tests/unit/database-driver-failure.test.ts (1)

2-2: LGTM!

Also applies to: 148-150, 152-154, 156-158

app/packages/core-runtime/tests/unit/legal-entity-context.test.ts (1)

2-2: LGTM!

Also applies to: 6-6, 27-27, 86-93, 95-95, 98-105, 107-107, 116-122, 124-124, 127-130, 132-132, 135-141, 159-159


Walkthrough

The changes replace direct tagged-value and class checks with Predicate.isTagged or schema predicates. Test registrations now explicitly discard returned promises. Production hashing and outbox checks use Effect-compatible predicates. Fixture and DOM test assertions receive small type-safe updates.

Changes

Tagged assertions and test-harness updates

Layer / File(s) Summary
Shell application tests
app/apps/shell-super-app/tests/**
Shell tests use Predicate.isTagged, explicit void test(...) calls, and a scoped selector for the account-menu header.
Core runtime checks and tests
app/packages/core-runtime/src/**, app/packages/core-runtime/tests/**
Runtime checks use Predicate.isDate, Schema.is, and Effect.tapErrorTag. Core tests replace direct _tag checks and floating test calls.
Party registry tests
app/verticals/party-registry/tests/**
Party registry tests use tagged predicates, schema-compatible checks, drizzle-orm type guards, and explicit promise discards.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to bfe32

This change modernizes error and type assertions while retaining the same tested outcomes, with no unresolved current-head risk identified for merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing direct assertions with native Effect predicates across runtime and test code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 5…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/native-effect-predicates
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/native-effect-predicates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-07T21:26:06.267501Z bfe3256 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@BleedingDev

Copy link
Copy Markdown
Contributor Author

Closing: commit bfe3256 (native Effect predicates) is already included in #501, which carries all of this work together.

@BleedingDev BleedingDev closed this Sep 7, 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.

1 participant