Skip to content

[HC-008] Hard cutover frontend pipeline and artifacts into separate orchestration and reporting modules #8139

@doublemover

Description

@doublemover

Hard cutover policy: pipeline orchestration runs compiler phases only, and artifact modules emit reports only. No artifact writer owns semantic behavior. No compiler phase owns generated docs or proof packets.

Source facts already established:

  • native/objc3c/src/pipeline/objc3_frontend_artifacts.cpp has 29,040 lines.
  • native/objc3c/src/pipeline/objc3_frontend_pipeline.cpp has 7,896 lines.
  • Pipeline code mixes semantic surface packets, IR emission, report fields, JSON text, readiness gates, and source-truth claims.
  • io/objc3_json.h exists, while other modules still perform ad hoc JSON string construction.

Required pipeline tree:

  • native/objc3c/src/pipeline/core/
    • frontend_pipeline.h/.cpp
    • phase.h/.cpp
    • phase_graph.h/.cpp
    • phase_result.h
  • native/objc3c/src/pipeline/phases/
    • lex_phase.h/.cpp
    • parse_phase.h/.cpp
    • sema_phase.h/.cpp
    • lower_phase.h/.cpp
    • ir_phase.h/.cpp
    • object_phase.h/.cpp
    • link_phase.h/.cpp
  • native/objc3c/src/pipeline/diagnostics/
    • diagnostics_bus.h/.cpp
    • diagnostic_reporter.h/.cpp
  • native/objc3c/src/pipeline/results/
    • compile_result.h/.cpp
    • artifact_paths.h/.cpp
    • phase_timings.h/.cpp

Required artifact tree:

  • native/objc3c/src/artifacts/core/
    • artifact_context.h/.cpp
    • artifact_manifest.h/.cpp
    • artifact_writer.h/.cpp
  • native/objc3c/src/artifacts/json/
    • json_model.h/.cpp
    • json_writer.h/.cpp
    • schema_emitter.h/.cpp
  • native/objc3c/src/artifacts/reports/
    • compile_report.h/.cpp
    • semantic_report.h/.cpp
    • runtime_report.h/.cpp
    • conformance_report.h/.cpp
  • native/objc3c/src/artifacts/docs/
    • native_docs_model.h/.cpp
    • command_surface_model.h/.cpp
  • native/objc3c/src/artifacts/evidence/
    • evidence_bundle.h/.cpp
    • capability_matrix.h/.cpp

Required work:

  • Move artifact emission out of pipeline/ into artifacts/.
  • Move JSON serialization into artifacts/json/ and io/objc3_json.*.
  • Move docs and evidence packet construction into artifact modules.
  • Keep pipeline phase code focused on inputs, outputs, diagnostics, timings, and artifact paths.
  • Delete readiness-gate source strings from phase code.
  • Replace report booleans with structured artifact model fields.

Maximum effort shared hoist pass:

  • Hoist JSON escaping and field emission into one JSON writer.
  • Hoist report path construction into artifacts/core/artifact_context.*.
  • Hoist diagnostic packet construction into pipeline/diagnostics/.
  • Hoist capability/evidence model assembly into artifacts/evidence/.

Acceptance criteria:

  • objc3_frontend_artifacts.cpp is deleted.
  • No pipeline or artifact source file exceeds 1,500 lines.
  • Pipeline sources contain no generated-doc wording, proof packet strings, or large JSON assembly blocks.
  • Report generation tests compare structured JSON output from artifact modules.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions