Summary
- add a first-class
endpoint-dedupe-debug workflow to integrator
- add checked-in case-file input format for duplicate action investigations
- generate structured markdown/json evidence bundles for duplicate-action RCA
- correlate case metadata with local finder artifacts, final consolidated outputs, and S3 artifact-prefix hints
Why
We need a repeatable internal workflow for endpoint dedupe / duplicate-action debugging instead of reconstructing each case manually.
This PR creates the workflow skeleton + first useful implementation so we can feed in:
- the insertion PR/comment/workflow/run context
- the removal/deprecation PR/comment/workflow/run context
- the app + duplicate actions involved
and get back a structured report that helps answer:
- what raw Finder candidates existed
- what final consolidated Finder output contained
- whether downstream canonical naming introduced collisions
- what artifact prefixes exist for insertion/removal workflows
- what evidence is still missing
What the workflow does right now
Input:
- checked-in JSON case file under
cortex/workflows/endpoint_dedupe_debug_cases/
Output:
- markdown report bundle
- json report bundle
- uploaded workflow artifacts
Analysis performed:
- inspects local Finder artifacts for the target app
- loads raw endpoints + final consolidated endpoints + finder_report when present
- matches provided duplicate-action metadata against raw/final candidate sets
- reconstructs likely final-name collisions
- builds insertion/removal timeline from case metadata
- scans S3 artifact prefixes using workflow/run hints
- records explicit gaps instead of silently assuming missing evidence
Follow-ups expected after this PR
This intentionally does not yet fully reconstruct builder/call-test trajectories automatically from every historical workflow. That deeper correlation can now be added on top of a stable workflow/input/report contract.
Next likely steps:
- pull richer workflow metadata from DB / cortex_execution records
- ingest action-builder / call-test artifacts directly
- produce a tighter “where exactly dedupe failed” conclusion block
- add HTML rendering for easier review
Validation
python3 -m py_compile common/enums.py common/configs.py common/registry.py common/__init__.py cortex/workflows/registry.py cortex/workflows/endpoint_dedupe_debug.py api/routes/workflows/endpoint_dedupe_debug.py api/routes/workflows/__init__.py api/routes/__init__.py api/main.py