Skip to content

feat: structured dead-code detection pipeline with multi-mode output#149

Draft
nextlevelshit wants to merge 1 commit intomainfrom
135-dead-code-pipeline
Draft

feat: structured dead-code detection pipeline with multi-mode output#149
nextlevelshit wants to merge 1 commit intomainfrom
135-dead-code-pipeline

Conversation

@nextlevelshit
Copy link
Collaborator

Summary

  • Rewrote the dead-code detection pipeline into a family of 4 pipelines: scan-only (dead-code.yaml), PR comment (dead-code-pr.yaml), GitHub issue (dead-code-issue.yaml), and heal (dead-code-heal.yaml)
  • Expanded the dead-code-scan.schema.json contract with new detection categories (duplicate, stale_glue, hardcoded_value), line range support, and suggested actions
  • Added three new output contract schemas: dead-code-report, dead-code-pr-result, and dead-code-issue-result
  • Extended the github-commenter persona permissions in wave.yaml to support PR commenting
  • Added comprehensive unit tests for schema validation and pipeline YAML parsing

Closes #135

Changes

  • .wave/contracts/dead-code-scan.schema.json — Expanded with new categories, line_range, suggested_action fields
  • .wave/contracts/dead-code-report.schema.json — New schema for formatted markdown report output
  • .wave/contracts/dead-code-pr-result.schema.json — New schema for PR comment posting result
  • .wave/contracts/dead-code-issue-result.schema.json — New schema for GitHub issue creation result
  • .wave/pipelines/dead-code.yaml — Rewritten as scan-only + local format pipeline (removed clean/verify/create-pr steps)
  • .wave/pipelines/dead-code-pr.yaml — New pipeline: scan + format + publish PR comment
  • .wave/pipelines/dead-code-issue.yaml — New pipeline: scan + format + create GitHub issue
  • .wave/pipelines/dead-code-heal.yaml — New pipeline: extracted heal flow from original dead-code pipeline
  • wave.yaml — Extended github-commenter persona with gh pr comment* permission
  • internal/contract/dead_code_schemas_test.go — Schema validation tests for all contract schemas
  • internal/pipeline/dead_code_pipelines_test.go — Pipeline YAML parse and dependency resolution tests
  • specs/135-dead-code-pipeline/ — Spec, plan, and task artifacts

Test Plan

  • Schema validation tests cover all new categories (duplicate, stale_glue, hardcoded_value), new fields (line_range, suggested_action), and backward compatibility with existing payloads
  • Pipeline YAML parse tests verify all 4 pipelines load correctly, resolve step dependencies, and reference valid personas
  • All tests located in internal/contract/ and internal/pipeline/ packages

…ulti-mode output

Rewrite the dead-code detection pipeline into a family of 4 pipelines
supporting structured JSON output, PR comments, and GitHub issue creation.

Schema changes:
- Expand dead-code-scan schema with new categories (duplicate, stale_glue,
  hardcoded_value), line_range object, and suggested_action field
- Create dead-code-report schema for formatted markdown reports
- Create dead-code-pr-result schema for PR comment results
- Create dead-code-issue-result schema for GitHub issue results

Pipeline changes:
- Rewrite dead-code.yaml as scan + format (local JSON report)
- Create dead-code-pr.yaml: scan + format + publish PR comment
- Create dead-code-issue.yaml: scan + format + create GitHub issue
- Create dead-code-heal.yaml: preserves existing clean/verify/create-pr flow

Persona changes:
- Extend github-commenter with gh pr comment and gh issue create permissions
- Replace overly broad gh pr* deny with specific denials

Tests:
- Schema validation tests covering all new categories, fields, and backward
  compatibility
- Pipeline YAML parse tests verifying loading, DAG validation, persona
  references, and tool requirements
@nextlevelshit nextlevelshit marked this pull request as draft February 24, 2026 14:02
@nextlevelshit
Copy link
Collaborator Author

Code Review (Wave Pipeline)

Verdict: REQUEST_CHANGES

Blocking Issues

  1. Missing BasicProgressDisplay guard test — both reviewers flagged this independently, confirming it's a real coverage gap
  2. Silent observability regression from unstaged executor.go change — artifact injection messages are dropped in CI/non-TTY output

Non-Blocking Improvements

Four non-blocking improvements were also surfaced:

  • Test safety with t.Chdir
  • Fragile timeouts
  • PipelineID inconsistency
  • State tracking type inconsistency

Positive Observations

Overall quality of the committed fix was noted positively by both reviewers.

Assessment

The implementation is too shallow and too destructive; may need full re-implementation.


Generated by Wave code-review pipeline

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.

Improve dead-code detection pipeline: multi-mode output, PR review comments, and issue creation

1 participant