Skip to content

fix(pipeline): robust contract violation parsing for verbose agent output#384

Merged
RyderFreeman4Logos merged 1 commit intomainfrom
fix/contract-violation-parsing
Mar 8, 2026
Merged

fix(pipeline): robust contract violation parsing for verbose agent output#384
RyderFreeman4Logos merged 1 commit intomainfrom
fix/contract-violation-parsing

Conversation

@RyderFreeman4Logos
Copy link
Owner

Summary

  • Add disk-based result.toml fallback when stdout path extraction fails (validates file exists, not symlink, nlink==1, valid non-empty TOML)
  • Add embedded path extraction (extract_embedded_result_toml_path) to find result.toml paths within longer output lines
  • 5 new contract tests covering verbose output, embedded paths, and disk fallback scenarios

Fixes the "contract violation" false positive when CSA employee tools produce verbose multi-line output that buries the result.toml path.

Test plan

  • just pre-commit passes (2443 unit + 16 e2e tests)
  • Pre-commit review: PASS
  • Cumulative review (main...HEAD): PASS
  • New tests: result_toml_path_contract_extracts_embedded_path, result_toml_path_contract_accepts_verified_session_result_fallback, result_toml_path_contract_handles_verbose_multiline_output

🤖 Generated with Claude Code

…tput

Add disk-based result.toml fallback and embedded path extraction to
handle cases where employee tools produce verbose multi-line output
that prevents clean path extraction from stdout.

Two-pronged fix:
- session_result_fallback_is_valid() validates session-dir result.toml
  on disk when output parsing fails (symlink + nlink + TOML checks)
- extract_embedded_result_toml_path() scans output lines for absolute
  paths ending in result.toml even when surrounded by other text

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@RyderFreeman4Logos RyderFreeman4Logos merged commit c0782c5 into main Mar 8, 2026
3 of 6 checks passed
@RyderFreeman4Logos RyderFreeman4Logos deleted the fix/contract-violation-parsing branch March 8, 2026 22:59
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