Skip to content

test: cover pipeline_v1 wait, read-only execute gate, policy eval remap, zip-csv#402

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-5d92
Draft

test: cover pipeline_v1 wait, read-only execute gate, policy eval remap, zip-csv#402
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-5d92

Conversation

@cursor

@cursor cursor Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Risky behavior now covered

  • pipeline_v1 + wait: true: extractExecutionId must read v1 trigger shapes (execution_details.execution_id, top-level execution_id) and poll via the shared execution endpoint. Without this, agents using v1 pipelines with server-side wait would silently skip polling (_wait.skipped).
  • HARNESS_READ_ONLY + pipeline.run: Write-risk execute actions must be blocked before elicitation (mirrors registry.dispatchExecute()). Prevents prompting users to approve runs that can never execute.
  • policy_evaluation list extractor: Remaps API idevaluation_id so compact list mode preserves the stable identifier (compactor matches _id$, not bare id).
  • parseZipCsv / dashboardDataExtract: Hand-rolled ZIP+CSV parser for dashboard data downloads — covers both store (method 0) and deflate (method 8) entries.

Builds on PR #393 coverage (diagnose download URLs, FME primitives, execute remap, incident close).

Test files added/updated

File Change
tests/tools/tool-handlers.test.ts +4 tests: pipeline_v1 wait shapes, read-only pipeline.run gate
tests/registry/governance.test.ts +1 test: policy_evaluation evaluation_id remap
tests/utils/zip-csv.test.ts new — 4 tests for ZIP parsing and dashboard extractor

Why these tests materially reduce regression risk

  1. v1 wait path is a separate code branch from v0 (extractExecutionId lines 82–86) with no prior handler-level coverage — a shape mismatch breaks the single-call wait contract agents rely on.
  2. Read-only execute gate was only tested for harness_delete and pipeline_dynamic_execution; standard pipeline.run is the most common write action and shares the same pre-dispatch gate.
  3. Policy evaluation ID remap is a documented compact-mode workaround — losing it makes paginated policy lookups return items without joinable IDs.
  4. ZIP parser is a custom binary parser with zero prior tests; dashboard tools depend on it for all tabular data extraction.

Validation

pnpm test  # 2145 passed
Open in Web View Automation 

cursoragent and others added 2 commits June 23, 2026 10:12
…cident close

Add focused regression tests for recently merged production paths with thin
coverage:

- harness_diagnose pipeline: return_download_url on requested_step_log for
  explicit step_id and auto-fetch paths; dedup when failed_step_logs already
  holds the URL
- FME execute actions: fmeActionExtract wraps primitive kill/restore/archive
  responses so MCP output validation does not fail
- harness_execute: successful security_exemption.approve remaps resource_id to
  exemption_id in the API path; FME kill remaps resource_id to feature_flag_name
- incident close: response projection drops backend envelope/meta fields

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…ap, zip-csv

Add regression tests for high-risk paths not covered by PR #393:

- pipeline_v1 wait: extractExecutionId from execution_details and top-level
  execution_id shapes; skip wait when ID is missing
- HARNESS_READ_ONLY: pipeline.run blocked before elicitation (high_write risk)
- policy_evaluation list: id → evaluation_id remap for compact-mode preservation
- parseZipCsv/dashboardDataExtract: store and deflate ZIP parsing for dashboards

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants