Skip to content

fix(index): bind shared consumer discriminators - #634

Merged
mohanagy merged 2 commits into
nextfrom
agent/issue-632-discriminator-correction
Aug 1, 2026
Merged

fix(index): bind shared consumer discriminators#634
mohanagy merged 2 commits into
nextfrom
agent/issue-632-discriminator-correction

Conversation

@mohanagy

@mohanagy mohanagy commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Corrects the generic shared-consumer false-proof gap found after the earlier [P0][Index]: Add authenticated execution facts, ordering, persistence, and shared async channels #632 merge.
  • Authentically binds producer payload discriminators to the exact consumer selector and case arm before branch-owned persistence can be selected.
  • Fails closed for dynamic or ambiguous selectors, mutated or removed arms, unproven aliases, and sibling progress or failure branches.
  • Adds generic namespace-mutation invalidation, including renamed and shorthand destructuring while preserving unrelated same-module member precision.
  • Changes no dependency, version, script, lockfile, retrieval budget, CLI or MCP public surface, publication workflow, Registry metadata, tag, or main branch.

Root cause

The merged index could separately prove a producer literal such as trigger: assembly_complete, the shared db-sync queue, a consumer switch, and persistence facts, but it did not bind the producer key and value to the local switch selector and exact case arm. That allowed durable writes owned by a sibling arm to appear eligible.

This correction stores a compact authenticated discriminator mapping tied to source excerpts and mutation state. Branch-owned facts are usable only when selector origin, discriminator property, literal value, and case ownership all resolve exactly.

Exact candidate

  • Target: protected next, never main
  • Base and sole parent: e7bd30c
  • Head: d703564
  • Tree: 5a5caa6ecccf453b843963317643f43a2e9d20a9
  • Scope: 14 files, of which 4 are production files

Frozen receipts

  • Production source: 44 TypeScript files, 15,719 LOC, +3,462/-197, net +3,265 against protected anchor 9043320
  • Nine-source full-index diff SHA-256: 910d0e1835e54af5e7a36af0a7ffa612977fb9240e9985d0f1368532d4ca3a43
  • execution.ts SHA-256: 192f0eb505615dd5f62b340496b4515b2df8e8509240e960517f2a86fa09e034
  • Package: 102 files, 149,453 packed bytes, 639,867 unpacked bytes; 133 bytes below the unchanged ceiling
  • Package shasum: 0d7e3f067d09d6db953ffc34356d2c1221cc7d08
  • Tarball SHA-256: fb1aa735fc8d3eb57c5771e9bf59b20c542afa9b96d43975a737e964d40743e6
  • Frozen GoValidate graph: 12,313 nodes, 32,717 edges, 60,271,172 bytes, SHA-256 569af2dcd681c4db48124a47bceac7036a94b344f2a2f88e8cb35f6120711610
  • Shared topology: 6 queue channels, 35 publishes_to edges, 7 consumed_by edges; no speculative job or event channels
  • Indexing: five identical graph hashes; 13.49 second median versus beta.4 22.16 seconds, ratio 0.608754512635379
  • Canonical retrieval: evidence, 10 files, 10 snippets, 3,669 tokens, 5 relationships, 4 honest disconnected boundaries, 13,376 bytes, SHA-256 ca003cd8eb0be3273589b556ad0acaf2c49588a1d9e00dccf4e5f36da795b996
  • Warm retrieval: 100 samples, 213.32806250000067 ms median, 238.83405145000143 ms p95, 256.85883300000205 ms maximum

Verification

  • Exact [P0][Index]: Add authenticated execution facts, ordering, persistence, and shared async channels #632 cohort: 247/247 tests passed
  • Full serial coverage: 80 files, 785 tests passed
  • Coverage: statements 85.85% (7,715/8,986), branches 79.46% (6,959/8,757), functions 92.37% (1,369/1,482), lines 89.22% (6,481/7,264)
  • Governance: 18/18; baseline plus governance: 23/23
  • Typecheck, production build, evaluation build, Registry validation, release hygiene, packed-runtime parity, high-severity audit, and git diff check passed
  • Two independent exact-commit reviews found no blocker and reproduced the committed identity and receipts

Merge gate

Merge remains blocked until this unchanged head has all six hosted CI jobs green, independent review remains blocker-free, and zero review threads remain. CodeRabbit is evaluated honestly: a skip, pending state, rate limit, or non-default-base limitation is not represented as an independent completed review.

No npm publication, GitHub Release, Registry metadata publication, tag, or main action is authorized.

Closes #632

Summary by CodeRabbit

  • New Features

    • Improved execution analysis for queue and event workflows, including payload positions, switch-based routing, wrappers, aliases, and control-flow paths.
    • Enhanced support for persistence operations, asynchronous behavior, mutations, iteration, and parallel execution.
    • Added richer graph diagnostics and edge metadata.
  • Bug Fixes

    • Corrected producer-to-consumer payload and typed switch-case bindings.
    • Added fail-closed handling for uncertain, unsafe, or inconsistent analysis results.
    • Strengthened graph validation.
  • Documentation

    • Updated execution-index status, measurements, audit findings, and completion criteria.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 48f5d2cf-f6c5-4adb-a4c8-513de0e2681b

📥 Commits

Reviewing files that changed from the base of the PR and between d703564 and da3e1ad.

📒 Files selected for processing (1)
  • tests/unit/canonical-index-execution-review-regressions.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/unit/canonical-index-execution-review-regressions.test.ts

📝 Walkthrough

Walkthrough

The PR hardens semantic execution indexing with authenticated payload and switch-discriminant bindings, stricter fail-closed analysis, canonical graph validation, extensive regression tests, and updated corrective-candidate governance evidence.

Changes

Semantic execution index correction

Layer / File(s) Summary
Execution analysis and channel evidence
src/adapters/typescript/execution.ts
The analyzer records stricter facts, resolves bounded effects, tracks payload arguments, validates queue and event origins, and emits channel and edge metadata.
Canonical encoding and graph validation
src/domain/index/..., src/domain/query/index-status.ts, tests/unit/query-index-execution-validation.test.ts, tests/unit/update-index.test.ts
Canonical execution data retains its validation behavior while dispatch payload metadata must match exactly one call fact. The engine identifier advances and stale graphs are fully regenerated.
Execution regression and integration coverage
tests/unit/canonical-index-execution*.test.ts
Tests cover typed switch cases, exact payload positions, control-flow reachability, unsafe aliases and mutations, queue patching, unresolved imports, and producer-to-consumer mapping.
Corrective candidate governance evidence
docs/core-reset/..., docs/designs/..., docs/roadmap.md, tests/unit/core-reset-governance.test.ts
Governance records the reopened status, corrected measurements, audit results, fail-closed cases, and pending completion gates.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TypeScriptAnalyzer
  participant EffectResolver
  participant QueryIndexValidator
  participant RegressionTests
  TypeScriptAnalyzer->>EffectResolver: collect facts and resolve payload-aware effects
  EffectResolver->>QueryIndexValidator: emit channels, edges, and dispatch metadata
  QueryIndexValidator->>RegressionTests: validate authenticated evidence and fail-closed cases
Loading

Possibly related PRs

  • mohanagy/madar#633: Corrected and hardened the same execution-analysis and validation paths.
  • mohanagy/madar#617: Introduced the canonical TypeScript execution-index implementation refined here.
  • mohanagy/madar#583: Introduced the canonical graph-artifact foundation used by the execution index.

Suggested labels: core-reset

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed but omits the required Core Reset contract section and reset-scope checklist. Add the Core Reset contract fields and complete the reset-scope and standard checklist items from the repository template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main correction: binding shared consumer discriminators in the index.
Linked Issues check ✅ Passed The changes address #632 by authenticating producer-to-consumer discriminator bindings, failing closed on ambiguity, and adding regression coverage.
Out of Scope Changes check ✅ Passed The code, tests, governance updates, and documentation support the shared-consumer discriminator correction and remain within #632 scope.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/issue-632-discriminator-correction

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (9)
tests/unit/canonical-index-execution-review-regressions.test.ts (4)

3154-3215: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Declare selector before the helpers that close over it.

mapping on Line 3154 reads selector on Line 3162, and selectedPersistence on Line 3186 calls mapping on Line 3204. selector is declared with const on Line 3208. The current code works only because the first call site, Line 3222, runs after Line 3208.

Any assertion added between Line 3216 and Line 3221 that calls mapping or selectedPersistence throws ReferenceError: Cannot access 'selector' before initialization. That failure names the temporal dead zone, not the assertion. Move the selector declaration above mapping to remove the ordering dependency.

♻️ Proposed reordering
+    const selector = {
+      kind: 'template',
+      parts: [
+        { kind: 'parameter', position: 0 },
+        { kind: 'literal', value: 'data' },
+        { kind: 'literal', value: 'trigger' },
+      ],
+    }
     const mapping = (built: ReturnType<typeof build>) => {
-    const selector = {
-      kind: 'template',
-      parts: [
-        { kind: 'parameter', position: 0 },
-        { kind: 'literal', value: 'data' },
-        { kind: 'literal', value: 'trigger' },
-      ],
-    }
-
     const baseDispatch = dispatch(baseline)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/canonical-index-execution-review-regressions.test.ts` around lines
3154 - 3215, Move the const selector declaration above the mapping helper,
before any helper that closes over it; keep mapping, dispatch, and
selectedPersistence behavior unchanged while ensuring they can be called safely
immediately after definition.

2647-2727: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Convert the payload assertions to a table and split the duplicate-witness scenario.

Lines 2647-2706 contain 60 sequential expect(marked(name)).toEqual([...]) calls. Vitest stops the it block at the first failure, so one regression hides the remaining 59 results, and triage requires reading the 660-line fixture above. A table gives every case a name in the failure message and evaluates all rows.

Lines 2707-2727 build a second fixture and assert duplicate case-arm behaviour plus inspectQueryIndex readiness. That scenario is independent of positional payload inference. Move it into its own it block so a failure names the scenario directly.

♻️ Proposed table-driven assertions
-    expect(marked('exact')).toEqual([1])
-    expect(marked('observedExact')).toEqual([1])
-    expect(marked('awaitedObservedExact')).toEqual([1])
-    expect(marked('pendingObservedExact')).toEqual([])
+    const expected: ReadonlyArray<readonly [string, number[]]> = [
+      ['exact', [1]],
+      ['observedExact', [1]],
+      ['awaitedObservedExact', [1]],
+      ['pendingObservedExact', []],
+      // ...remaining cases
+    ]
+    for (const [name, positions] of expected)
+      expect(marked(name), name).toEqual(positions)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/canonical-index-execution-review-regressions.test.ts` around lines
2647 - 2727, Refactor the sequential marked(...) assertions in the existing test
into a table-driven test that names each case and evaluates every payload
expectation independently, preserving all current expected values. Move the
duplicate-witness fixture, duplicateEdge assertions, and inspectQueryIndex
readiness check into a separate it block with a scenario-specific name, leaving
the payload regression test focused only on its table.

1743-1751: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Document the selector proof span.

statement_range intentionally spans the destructuring statement on fixture line 6 through the closing brace of the switch on fixture line 12. Add a short comment beside the literal that records these fixture lines.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/canonical-index-execution-review-regressions.test.ts` around lines
1743 - 1751, In the expectation for condition('exact'), add a short comment
beside the statement_range literal documenting that the selector proof span
covers fixture lines 6 through 12, from the destructuring statement to the
switch’s closing brace.

2908-2916: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a positive Nest control and handle the decorator diagnostic. symbol(nodes, 'Publisher.dispatch') and symbol(nodes, 'outerNest') throw when either symbol is absent, so the test cannot pass with those symbols completely unanalyzed. However, the fixture has no tsconfig.json, and default options omit experimentalDecorators; TypeScript emits a parameter-decorator diagnostic. Add an unpatched Nest-shaped control, or assert method-body facts, to prove the monkey-patch path is exercised.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/canonical-index-execution-review-regressions.test.ts` around lines
2908 - 2916, Add a positive Nest-shaped control in the test fixture and
explicitly handle the expected parameter-decorator diagnostic caused by missing
experimentalDecorators configuration. Ensure the test validates analyzed
method-body facts or guards symbol lookups for Publisher.dispatch and outerNest,
proving the monkey-patch path is exercised without requiring unavailable
symbols.
tests/unit/canonical-index-execution-hardening.test.ts (1)

109-143: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Share the typed case-arm decoders between test files.

decodeTypedCaseArm and typedCaseValues are duplicated verbatim in tests/unit/canonical-index-execution.test.ts (lines 139-169). The two copies already differ in parameter naming and in the frame cast on Line 136, which shows the drift starting. Move both helpers into a shared test helper module and import them in both files.

The rawFrame as Record<string, unknown> cast on Line 136 is not present in the sibling copy, so the frame type is already narrow enough to drop the cast.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/canonical-index-execution-hardening.test.ts` around lines 109 -
143, Move decodeTypedCaseArm and typedCaseValues into a shared test-helper
module, then import and use those shared helpers from both
canonical-index-execution-hardening.test.ts and
canonical-index-execution.test.ts. Remove both duplicated local implementations,
preserving their existing behavior and signatures. In typedCaseValues, use the
existing rawFrame type directly and remove the unnecessary `as Record<string,
unknown>` cast.
tests/unit/query-index-execution-validation.test.ts (2)

114-116: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace the non-null assertion with an explicit guard.

If every operation of run is a call fact, find returns undefined and line 115 throws a TypeError when it reads .evidence. The other fixture lookups raise descriptive errors instead. Use the same pattern here.

♻️ Proposed change
-  const proof = marker?.matchCall === false
-    ? operations.find((operation) => operation.kind !== 'call')!.evidence
-    : marker ? call.evidence : operations[0]!.evidence
+  const other = operations.find((operation) => operation.kind !== 'call')
+  if (marker?.matchCall === false && !other) {
+    throw new Error('Execution validation fixture has no non-call operation')
+  }
+  const proof = marker?.matchCall === false
+    ? other!.evidence
+    : marker ? call.evidence : operations[0]!.evidence
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/query-index-execution-validation.test.ts` around lines 114 - 116,
Update the proof lookup in the test around the marker?.matchCall branch to
explicitly validate the result of finding a non-call operation before accessing
evidence; when none exists, throw the same descriptive error pattern used by the
other fixture lookups, while preserving the existing call and first-operation
branches.

349-353: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert that the accepted marker survives in the sealed graph.

The test proves that a valid marker does not corrupt the index. It does not prove that dispatch_payload_argument is preserved on the publish edge. A consumer of the query index reads that metadata, so assert its value directly.

🧪 Proposed additional assertion
   it('accepts a dispatch marker authenticated by one exact call fact', () => {
     const current = fixture(false, { edge: 'publish', value: 0 })
-    expect(ready(inspectQueryIndex(current.graph))).toBeDefined()
+    const index = ready(inspectQueryIndex(current.graph))
     expect(current.callArgumentCount).toBeGreaterThan(0)
+    const edge = index.graph.edgesBetween(current.runId, current.jobId)
+      .find((candidate) => candidate.attributes.relation === 'publishes_to')
+    expect(edge?.attributes.dispatch_payload_argument).toBe(0)
   })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/query-index-execution-validation.test.ts` around lines 349 - 353,
Extend the test around fixture and inspectQueryIndex in “accepts a dispatch
marker authenticated by one exact call fact” to inspect the sealed graph’s
publish edge and assert that its dispatch_payload_argument metadata equals
current.callArgumentCount. Keep the existing readiness and positive-count
assertions unchanged.
src/domain/query/index-status.ts (1)

93-112: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reorder the owner narrowing before the payload lookup.

Line 102 uses String(i) while i is still unknown. The final typeof i === 'string' check at line 107 makes the result fail closed, so there is no exploitable gap. Reading the code is easier if the string narrowing happens first and the lookup uses i directly.

♻️ Optional change
-  const s = a[SF], i = a[EO], w = typeof i === 'string' ? n.get(i) : undefined
+  const s = a[SF], i = typeof a[EO] === 'string' ? a[EO] : null
+  const w = i === null ? undefined : n.get(i)
@@
-    && si(d) && (o.get(String(i)) ?? []).filter((x) =>
+    && si(d) && i !== null && (o.get(i) ?? []).filter((x) =>
@@
-  return typeof s === 'string' && f.has(s) && typeof i === 'string'
+  return typeof s === 'string' && f.has(s) && i !== null
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/domain/query/index-status.ts` around lines 93 - 112, In function ep,
narrow i to a string before computing the dispatch-payload lookup q, then use
the narrowed i directly for o.get rather than String(i). Preserve the existing
final validation and payload-matching behavior while making the owner lookup
occur only after the type guard.
src/adapters/typescript/execution.ts (1)

2013-2033: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Confirm the publish-edge dedup key is stable, then simplify the branch.

The dedup key omits metadata.execution_owner_id, so two publish edges from different owners with identical from, to, kind, source, and evidence collapse into one. The execution_owner_id equals the publish source node for publishes_to edges, so from already carries it. Verify that assumption holds for framework-decorator publish edges.

The conflict branch is also easier to read if the payload key is removed once and reused.

♻️ Optional readability change
-          if (!d) p.set(k, b)
-          else if (d.metadata?.dispatch_payload_argument !== b.metadata?.dispatch_payload_argument) {
-            const m = { ...(d.metadata ?? {}) }; delete m.dispatch_payload_argument
-            p.set(k, { ...d, metadata: m })
-          } else if (ct(js(b), js(d)) < 0) p.set(k, b)
+          const pa = (x: IndexEdge): unknown => x.metadata?.dispatch_payload_argument
+          if (!d) p.set(k, b)
+          else if (pa(d) !== pa(b)) {
+            const m = { ...(d.metadata ?? {}) }; delete m.dispatch_payload_argument
+            p.set(k, { ...d, metadata: m })
+          } else if (ct(js(b), js(d)) < 0) p.set(k, b)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/adapters/typescript/execution.ts` around lines 2013 - 2033, In sort,
verify that framework-decorator publishes_to edges always set execution_owner_id
to the publish source node, so the existing publish dedup key’s from component
uniquely identifies the owner; update the key if that invariant does not hold.
Simplify the PU conflict branch by removing metadata.dispatch_payload_argument
once and reusing the resulting metadata when comparing or storing the edge.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/unit/canonical-index-execution-review-regressions.test.ts`:
- Around line 535-539: Rename the event listener registration near the existing
events.on('conditional', ...) call to use the unique key 'conditional-event',
keeping the Worker key 'conditional' unchanged so consumes and hasConsumer
assertions target distinct channels. Update the Line 561 assertion loop to pass
its key as the assertion message, matching the existing loops around lines 546
and 578.

---

Nitpick comments:
In `@src/adapters/typescript/execution.ts`:
- Around line 2013-2033: In sort, verify that framework-decorator publishes_to
edges always set execution_owner_id to the publish source node, so the existing
publish dedup key’s from component uniquely identifies the owner; update the key
if that invariant does not hold. Simplify the PU conflict branch by removing
metadata.dispatch_payload_argument once and reusing the resulting metadata when
comparing or storing the edge.

In `@src/domain/query/index-status.ts`:
- Around line 93-112: In function ep, narrow i to a string before computing the
dispatch-payload lookup q, then use the narrowed i directly for o.get rather
than String(i). Preserve the existing final validation and payload-matching
behavior while making the owner lookup occur only after the type guard.

In `@tests/unit/canonical-index-execution-hardening.test.ts`:
- Around line 109-143: Move decodeTypedCaseArm and typedCaseValues into a shared
test-helper module, then import and use those shared helpers from both
canonical-index-execution-hardening.test.ts and
canonical-index-execution.test.ts. Remove both duplicated local implementations,
preserving their existing behavior and signatures. In typedCaseValues, use the
existing rawFrame type directly and remove the unnecessary `as Record<string,
unknown>` cast.

In `@tests/unit/canonical-index-execution-review-regressions.test.ts`:
- Around line 3154-3215: Move the const selector declaration above the mapping
helper, before any helper that closes over it; keep mapping, dispatch, and
selectedPersistence behavior unchanged while ensuring they can be called safely
immediately after definition.
- Around line 2647-2727: Refactor the sequential marked(...) assertions in the
existing test into a table-driven test that names each case and evaluates every
payload expectation independently, preserving all current expected values. Move
the duplicate-witness fixture, duplicateEdge assertions, and inspectQueryIndex
readiness check into a separate it block with a scenario-specific name, leaving
the payload regression test focused only on its table.
- Around line 1743-1751: In the expectation for condition('exact'), add a short
comment beside the statement_range literal documenting that the selector proof
span covers fixture lines 6 through 12, from the destructuring statement to the
switch’s closing brace.
- Around line 2908-2916: Add a positive Nest-shaped control in the test fixture
and explicitly handle the expected parameter-decorator diagnostic caused by
missing experimentalDecorators configuration. Ensure the test validates analyzed
method-body facts or guards symbol lookups for Publisher.dispatch and outerNest,
proving the monkey-patch path is exercised without requiring unavailable
symbols.

In `@tests/unit/query-index-execution-validation.test.ts`:
- Around line 114-116: Update the proof lookup in the test around the
marker?.matchCall branch to explicitly validate the result of finding a non-call
operation before accessing evidence; when none exists, throw the same
descriptive error pattern used by the other fixture lookups, while preserving
the existing call and first-operation branches.
- Around line 349-353: Extend the test around fixture and inspectQueryIndex in
“accepts a dispatch marker authenticated by one exact call fact” to inspect the
sealed graph’s publish edge and assert that its dispatch_payload_argument
metadata equals current.callArgumentCount. Keep the existing readiness and
positive-count assertions unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b50491c8-19d4-4a68-932f-db50056d00a8

📥 Commits

Reviewing files that changed from the base of the PR and between e7bd30c and d703564.

📒 Files selected for processing (14)
  • docs/core-reset/removal-manifest.yml
  • docs/core-reset/scorecard.md
  • docs/designs/2026-07-19-core-reset.md
  • docs/roadmap.md
  • src/adapters/typescript/execution.ts
  • src/domain/index/build-state.ts
  • src/domain/index/model.ts
  • src/domain/query/index-status.ts
  • tests/unit/canonical-index-execution-hardening.test.ts
  • tests/unit/canonical-index-execution-review-regressions.test.ts
  • tests/unit/canonical-index-execution.test.ts
  • tests/unit/core-reset-governance.test.ts
  • tests/unit/query-index-execution-validation.test.ts
  • tests/unit/update-index.test.ts

Comment thread tests/unit/canonical-index-execution-review-regressions.test.ts
@mohanagy
mohanagy merged commit c88823e into next Aug 1, 2026
7 checks passed
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