fix(mcp): attribute post-publish failures to artifact export (#1665) - #1789
fix(mcp): attribute post-publish failures to artifact export (#1665)#1789umi008 wants to merge 1 commit into
Conversation
A failed persistence artifact export after a successful publish reported status error with a hint blaming repo_path: 'Pipeline failed. Check repo_path exists and contains source files.' On a read-only checkout with --persistence true, the graph database was published fine — only the team-sharing artifact could not be written — and the hint pointed the reader at the wrong cause. The pipeline now snapshots the artifact export error of the run it just executed (not the process-global one, which may describe a previous run). index_repository uses that snapshot to name the real failure — the artifact directory, the export detail and the remedies (writable checkout or --persistence false) — while every other failure keeps the existing hint byte-for-byte. The fail-hard semantics are unchanged. Fixes DeusData#1665 Signed-off-by: Ulises Millan Guerrero <ulises.millanguerrero@gmail.com>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
|
Thank you for tracing the misleading error to the post-publish artifact phase and for preserving the existing fail-hard contract. I checked current Before code review, please remove the 135 lines under the five new |
What does this PR do?
With
--persistence trueon a read-only repository,index_repositoryreportedstatus: "error"with the hint "Pipeline failed. Check repo_path exists and contains source files" — blaming the repository for a failure that is actually the post-publish team-sharing artifact export (.codebase-memory/cannot be written inside a read-only checkout). The graph database itself published fine.The pipeline now snapshots the artifact export error of the run it just executed (a per-pipeline buffer, not the process-global export error which can describe a previous run).
index_repositoryconsults that snapshot on failure and names the real cause: the artifact export, the error detail, and the remedies (writable checkout or--persistence false). Every other failure path keeps the existing hint byte-for-byte.The fail-hard semantics are unchanged: a failed persistence export still makes the run fail, which is the in-tree documented decision (
export_after_publish, "intentionally fails the run"). This change only makes an already-failing run report the truth — the issue-1466-era misleadingrepo_pathhint is what hid the cause.Verified with a reproduce-first pipeline test: an artifact directory blocked (
.codebase-memoryas a file), fixture indexed, assertsrc != 0,cbm_pipeline_export_error()non-empty and naming the artifact phase, the DB still published, and a clean re-run leaving the snapshot empty.Checklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)