Skip to content

Expose structured ECS and Rector result contracts #10

Open

Description

@coisa

Outcome and source boundary

Move only ECS/Rector structured-result work from php-fast-forward/dev-tools#248 into the Code Standards domain. The source issue remains open for the top-level orchestration schema and other tools; this is a partial scope handoff, not completion.

Acceptance

  • Dedicated parsing/result/rendering collaborators; commands orchestrate only.
  • Strict compact JSON has no ANSI; default pretty JSON remains parseable. Human color mode, if any, is explicit and disabled for redirected/agent output.
  • Include command label, exit code, tool-specific diagnostics and stable paths sufficient for automation without scraping human output. Preserve raw fallback for unsupported tool cases without breaking the top-level result contract.
  • Preserve ECS/Rector tool exits, CWD/cache/color options and deterministic sorting. Check does not write; semantic operations remain explicit opt-in.
  • Real malformed/success/failure parsing fixtures, stable schema tests and docs/skill examples. Do not turn this into application testing, coverage or report orchestration.

Depends on #1 for the initial ECS adapter; coordinates with #4 for Rector. Successful current-head checks plus real Codex AND CodeRabbit reviews before merge, 0.x via Changelog automation only.

Activity

  1. coisa commented on Oct 27, 2026

    @coisa
    ContributorAuthor

    The lossless process-result foundation is now integrated by #67: merge 26152a0, reviewed HEAD 8b04fa9. The merge tree exactly matches the tested and independently reviewed candidate. PHP 8.3–8.5/reusable/Changelog/CodeQL checks and current-head Codex code/security plus CodeRabbit full review completed without actionable findings before the normal merge.

    This delivers the optional ResultProcessRunner capability and raw exit/stdout/stderr capture. It does not deliver structured ECS/Rector payload parsing or CLI JSON, so this issue remains open. Main CI and isolated consumer qualification are being checked separately; no release is claimed.

  2. coisa commented on Oct 28, 2026

    @coisa
    ContributorAuthor

    Focused presentation increment prepared in draft #94, HEAD 660d72171047eab163b2a67bf10caf1b0e1859ad: dedicated check renderer plus explicit check --format=json-pretty; existing compact JSON and read-only execution remain unchanged. PHP 8.3–8.5 CI, reusable checks, Changelog and CodeQL pass. Codex code/security and CodeRabbit full review completed on that HEAD without findings. No merge or release is performed, and this issue remains open.

    Remaining Rector gap: src/Refactoring/RectorRunner::run() streams native JSON through the existing process transport, while preflight/invocation failures can return human diagnostics before a JSON report exists. The CLI has no stable Rector result envelope or common compact/pretty presentation. Native parsing/classification already exists in .github/OptionalAnalysis/NativeReportParser::rector(), with malformed/status-consistency fixtures in OptionalAnalysisReportTest and real clean/findings/error qualification in RectorJsonIntegrationTest; it should be reused rather than duplicated.

    Smallest independent next increment proposed, not implemented: extract only native Rector report validation into a dedicated src/Refactoring collaborator, keep workflow policy and AnalysisResult mapping in the helper, and preserve existing CLI bytes/options/exits and fixture expectations. A public result envelope needs a separate decision on a new explicit opt-in representation; changing current refactor --format=json in place would break native-report consumers. Keep that decision and implementation separate from #94.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions