fix(mcp): emit trace evidence columns in header order - #1703
Conversation
json + include_evidence + data_flow labeled args as strategy because bfs_to_tree_json declared strategy,confidence before args but emitted args first. Tree flat_trace (risk_labels or data_flow) also dropped include_evidence by calling bfs_to_toon_table without the flag. Fixes DeusData#1542 Signed-off-by: rudi193-cmd <rudi193@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.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 the focused follow-up to #1542. This is the right review shape: one output-contract defect, two production branches, and tests that bind column identity rather than merely row width. The initial patch scan found no new dependency, execution, network, or configuration surface. It is labeled high priority because silently mislabeling trace evidence is a correctness bug. The review queue is full, but this contribution is now routed as a compact bug fix. |
The gate waited 90 x 30s = 45 min for CodeQL to finish on the PR head. That is shorter than CodeQL actually takes on this repository, so the gate has been failing runs that had not failed. Measured on PR DeusData#1426, head 7b72652: the CodeQL SAST workflow completed with conclusion=success at 17:46:05, having started at 15:41:44 -- 124 minutes. The gate step ran 16:52:58 to 17:38:44 and reported "BLOCKED: CodeQL timeout" 7 minutes and 21 seconds before the scan it was waiting for succeeded. Two open contributor pull requests are red from exactly this: DeusData#1426 and DeusData#1769, both with CodeQL completed=success on their head and every other check green. Three further PRs (DeusData#1703, DeusData#1741, DeusData#1742) are also red on codeql-gate alone, but from a different cause: the CodeQL run on their head is completed=cancelled, so the gate saw a non-success conclusion and correctly exited 1 without waiting. This change does not help those and is not intended to; they need a fresh scan, most likely having been superseded by concurrency cancel-in-progress in codeql.yml. 300 x 30s = 150 min covers the measured 124 min with margin. The job already declares timeout-minutes: 240, so the wait still cannot outlive its own job. No trigger, permission or gating change: codeql-gate blocks exactly what it blocked before, and a genuine CodeQL failure still exits 1 immediately rather than waiting out the budget. Only the absence of a verdict waits longer. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Reviewed, and the change is right. Sorry it sat two weeks after the 18 August note. First, your four red checks: none of them are your code, and the cause has already been fixed.
The gate's wait was raised from 45 to 150 minutes in #1960, merged earlier today. So a re-run should clear all four without you changing anything. One thing to wait for before re-running: The reviewBoth defects are real and the fixes are the right shape. Column order. Emitting cells in header order rather than declaration order is the fix, and the reason this survived is worth naming: The dropped flag. And you caught the consequence of your own fix. The Holding scope out of #1597's budget signalling was the correct call. Status: approved and cleared. It merges once |
|
Merged as Two things about this one are worth recording rather than just closing. The bug survived because the test that should have caught it was counting. And you caught the consequence of your own change. On the CI you were told about: your four red checks were never yours. Sorry it sat two weeks after the 18 August note. Thank you for keeping it to one claim and holding #1597's budget signalling out. |
What does this PR do?
The original #1542 json omission landed in v0.10.3. Two leftovers remained on
main:bfs_to_tree_jsondeclaredstrategy, confidencebeforeargsbut emittedargsfirst, sojson + include_evidence + data_flowmislabeled columns (len(cols)==len(row)still held).flat_trace(risk_labelsordata_flow) calledbfs_to_toon_tablewithoutinclude_evidence, so evidence was a silent no-op on that branch.This PR emits cells in header order and forwards the flag into the flat table. Tests assert column identity, not just count.
Not folding in #1597 budget signalling.
Checklist
git commit -s) — required, CI rejectsunsigned commits (DCO, see CONTRIBUTING.md)
scripts/test.sh --suites mcp)make -f Makefile.cbm lint-ci)Fixes #1542
Made with Cursor