Skip to content

[BC-INTEGRATION-02] Add JSON-safe plan, result, and artifact DTO serialization #113

Description

@Gonza10V

Notion task: https://app.notion.com/p/39f1a3339dcb81b789e3dcf1bb247d5e
Parent epic: #111
Notion program: https://app.notion.com/p/39f1a3339dcb818ea29eec44007d8e6e
Temporary ID: BC-02
Release: R2 Planning Preview
Dependencies: BC-01
Codex-ready: yes after dependencies are satisfied

Goal

Define deterministic JSON-safe DTOs for plan previews, FullBuildResult, stage results, graphs, blockers, approvals, warnings, and artifact descriptors.

Expected files/modules

  • src/buildcompiler/reporting/serialization.py (new or existing boundary)
  • src/buildcompiler/domain/
  • src/buildcompiler/reporting/
  • tests/unit/reporting/

Scope

  • Serialize enums/dataclasses/SBOL identities without raw Python objects.
  • Describe artifacts by type, stage, filename, media type, size, and logical role.
  • Exclude credentials and absolute filesystem paths.
  • Add contract fixtures for SynBioSuite.

Non-goals

  • Do not define HTTP routes.
  • Do not inline unbounded binary data.
  • Do not change biological semantics.

Acceptance criteria

  • Representative plan/result fixtures round-trip through JSON.
  • Serialization is deterministic.
  • No tokens, raw SBOL objects, Path objects, or server-local paths appear.
  • Schema/fixture version is explicit and documented.

Verification

  • Add snapshot/contract tests for success, partial success, blocked, and failure.
  • Run core pytest and Ruff.

Risks and review

  • Risk tags: cross-repo-contract, SBOL-validation
  • Human checkpoint required: yes
  • Treat AI-generated changes as unreviewed until tests and human review pass.

Codex handoff

Implement as one focused PR. Begin by verifying dependencies and current repository state. Preserve unrelated work. Report implemented behavior, tests, commands, assumptions, and blockers.

Activity

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