Skip to content

fix(runtime): join report backends through finding aliases - #437

Merged
aviggiano merged 2 commits into
mainfrom
fix/404-report-source-finding-backend
Aug 9, 2026
Merged

aviggiano merged 2 commits into
mainfrom
fix/404-report-source-finding-backend

Conversation

@aviggiano

@aviggiano aviggiano commented Aug 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • join final-report fuzzer backend provenance through finding_id, upstream_id, and source_finding_id
  • preserve fail-closed behavior by unioning campaign backends across every alias
  • cover the exact R59 presentation-ID/source-ID shape plus an adversarial partial-backend claim

Live evidence

Aave v4 invariant-only R59 reached 31/32 successful nodes. final-report emitted presentation ID NP-01, retained campaign ID failure-1 as source_finding_id, and correctly recorded backend recon. The artifact gate looked up only NP-01, inferred no campaign backend, and rejected it with PROPERTY_REPORT_FUZZER_BACKEND_MISMATCH / Report fuzzer backends do not match the campaign records.

This PR fixes that newly exposed final-node blocker. A fresh externally owned live run is still required before #404 can close; this host does not have the uncommitted .ultrafuzz/modal/benchmark.json launch configuration.

Refs #404

Validation

  • artifact-gates suite: 68/68 passed
  • focused regression tests: 2/2 passed
  • runtime typecheck passed
  • touched-file ESLint passed
  • touched-file Prettier check passed
  • git diff --check passed

Greptile Summary

The PR extends final-report backend joins across presentation and source finding IDs while attempting to constrain aliases through lifecycle provenance.

  • Passes the final report into property-provenance diagnostics.
  • Collects campaign backends across aliases admitted by matching report outcomes.
  • Adds coverage for renumbered findings and cross-outcome alias claims.

Confidence Score: 4/5

The PR is not safe to merge until report aliases are verified against independent campaign provenance rather than lifecycle claims from the report itself.

The previously reported backend-borrowing path remains reachable despite the reply claiming it was fixed: a report can coordinate its alias with a fabricated primary lifecycle source, causing the new helper to admit an unrelated real campaign finding and use its backend.

Files Needing Attention: packages/runtime/src/artifact-gates.ts, packages/runtime/test/artifact-gates.test.ts

Important Files Changed

Filename Overview
packages/runtime/src/artifact-gates.ts Adds alias-aware backend joining, but treats lifecycle assertions from the report under validation as proof that an alias belongs to the outcome.
packages/runtime/test/artifact-gates.test.ts Covers the intended renumbering and a cross-outcome claim, but not a report that coordinates a false alias with a matching fabricated lifecycle binding.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  P[Property provenance alias] --> O[Matching report outcome]
  O --> L[Report-authored primary lifecycle source]
  L --> A[Alias admitted]
  A --> C[Campaign backend map lookup]
  C --> G[Backend provenance gate]
Loading

Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
packages/runtime/src/artifact-gates.ts:3191-3204
**Report assertions verify their own aliases**

When a property-provenance entry claims an existing campaign finding as an alias and its matching report outcome supplies a fabricated primary lifecycle source for that finding, `verifiedReportFindingAliases` treats the report-authored lifecycle assertion as verification and imports the real campaign backend. The unrelated finding then avoids `PROPERTY_REPORT_FUZZER_BACKEND_MISMATCH` despite having no genuine campaign provenance.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (3): Last reviewed commit: "fix(runtime): bind report aliases to lif..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used:

Comment thread packages/runtime/src/artifact-gates.ts Outdated
@aviggiano
aviggiano force-pushed the fix/404-report-source-finding-backend branch from 916ee2b to 4352d2e Compare August 9, 2026 02:47
Comment on lines +3191 to +3204
const lifecycleFindingIds = new Set(
outcome.lifecycle.source_artifacts.flatMap((source) =>
isRecord(source) &&
campaignLogicalNodeIds.some((nodeId) => nodeId === source.node_id) &&
source.relationship === "primary" &&
typeof source.finding_id === "string"
? [source.finding_id]
: []
)
);
for (const alias of stringArray([outcome.finding_id, outcome.upstream_id, outcome.source_finding_id])) {
if (lifecycleFindingIds.has(alias)) {
verifiedAliases.add(alias);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Report assertions verify their own aliases

When a property-provenance entry claims an existing campaign finding as an alias and its matching report outcome supplies a fabricated primary lifecycle source for that finding, verifiedReportFindingAliases treats the report-authored lifecycle assertion as verification and imports the real campaign backend. The unrelated finding then avoids PROPERTY_REPORT_FUZZER_BACKEND_MISMATCH despite having no genuine campaign provenance.

Knowledge Base Used: Runtime: Run Orchestration Lifecycle

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/runtime/src/artifact-gates.ts
Line: 3191-3204

Comment:
**Report assertions verify their own aliases**

When a property-provenance entry claims an existing campaign finding as an alias and its matching report outcome supplies a fabricated primary lifecycle source for that finding, `verifiedReportFindingAliases` treats the report-authored lifecycle assertion as verification and imports the real campaign backend. The unrelated finding then avoids `PROPERTY_REPORT_FUZZER_BACKEND_MISMATCH` despite having no genuine campaign provenance.

**Knowledge Base Used:** [Runtime: Run Orchestration Lifecycle](https://app.greptile.com/monad-foudnation/-/custom-context/knowledge-base/monad-developers/ultrafuzz/-/docs/runtime.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

@aviggiano
aviggiano merged commit e9bc594 into main Aug 9, 2026
9 checks passed
@aviggiano
aviggiano deleted the fix/404-report-source-finding-backend branch August 9, 2026 03:06
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