Add cross-org ecosystem inventory and shared automation OpenAPI contract#3
Conversation
PR Summary by QodoAdd cross-org ecosystem inventory and shared automation OpenAPI contract
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. Payload type mismatch
|
| event_type: | ||
| type: string | ||
| payload: | ||
| description: Event payload forwarded to automation steps. | ||
| type: object | ||
| additionalProperties: true | ||
| nullable: true | ||
| metadata: |
There was a problem hiding this comment.
1. Payload type mismatch 🐞 Bug ≡ Correctness
TriggerEventRequest.payload is constrained to an object in the OpenAPI contract, but the automation engine accepts arbitrary payload types (and the repo’s own example passes a string). This makes the contract reject valid events or forces clients to wrap non-object payloads, diverging from current runtime behavior.
Agent Prompt
## Issue description
The OpenAPI schema for `TriggerEventRequest.payload` is `type: object`, but the implementation treats payload as `Any` and examples pass strings. This makes the contract incompatible with the current engine usage.
## Issue Context
- `TriggerEvent.payload` is typed as `Any`.
- Quick-start uses `payload="world"` (a string).
## Fix approach
Update `TriggerEventRequest.payload` to accept any JSON value (object/array/string/number/boolean/null). In OpenAPI 3.1 (JSON Schema 2020-12), express this using `anyOf` (or omit `type` entirely) rather than forcing `type: object`.
## Fix Focus Areas
- docs/openapi/automation.yaml[150-164]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| started_at: | ||
| type: string | ||
| format: date-time | ||
| nullable: true | ||
| finished_at: | ||
| type: string | ||
| format: date-time | ||
| nullable: true | ||
| duration_ms: | ||
| type: number | ||
| nullable: true | ||
| error: | ||
| type: string | ||
| nullable: true | ||
| required: [run_id, trigger, status, outputs] |
There was a problem hiding this comment.
2. Oas3.1 nullable keyword 🐞 Bug ⚙ Maintainability
The OpenAPI document declares openapi: 3.1.0 but uses nullable: true in multiple schemas, which reduces interoperability with JSON-Schema-based OpenAPI 3.1 tooling. This can lead to clients/validators treating fields as non-nullable or failing validation depending on the toolchain.
Agent Prompt
## Issue description
`docs/openapi/automation.yaml` declares OpenAPI 3.1.0 while using `nullable: true` across schemas. In 3.1, schemas are JSON Schema; nullability is typically expressed via unions (e.g., `anyOf` including `{ "type": "null" }`), improving portability across validators/generators.
## Issue Context
Affected examples include `started_at`, `finished_at`, `duration_ms`, `error`, and others.
## Fix approach
Replace `nullable: true` usages with JSON Schema unions:
- For a nullable string: `anyOf: [{type: string}, {type: "null"}]`
- For `date-time`: include `format: date-time` on the string branch
- For nullable numbers: `anyOf: [{type: number}, {type: "null"}]`
- For payload/result where type is flexible: model explicitly with `anyOf` branches or use an unconstrained schema plus explicit null allowance.
## Fix Focus Areas
- docs/openapi/automation.yaml[150-164]
- docs/openapi/automation.yaml[195-211]
- docs/openapi/automation.yaml[234-248]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Pull request overview
This PR introduces cross-org documentation and a reusable automation OpenAPI contract to serve as a shared “source of truth” for orchestration between pinkycollie and Pmaster-dev.
Changes:
- Added an ecosystem inventory document describing the cross-org operating model, lifecycle layers, and rollout sequence.
- Added an OpenAPI 3.1 contract (
docs/openapi/automation.yaml) defining automation trigger, definition management, run history, and stats endpoints/schemas. - Updated the Pyre GitHub Actions workflow command/options for SARIF generation and upload.
Reviewed changes
Copilot reviewed 3 out of 8 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| docs/pinkycollie-ecosystem-inventory.md | Adds cross-org ecosystem inventory + rollout plan documentation. |
| docs/openapi/automation.yaml | Introduces OpenAPI 3.1 contract for shared automation workflows and data schemas. |
| .github/workflows/pyre.yml | Adjusts Pyre invocation and makes the Pyre step non-blocking while still uploading SARIF. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| payload: | ||
| description: Event payload forwarded to automation steps. | ||
| type: object | ||
| additionalProperties: true | ||
| nullable: true |
| result: | ||
| nullable: true |
| error: | ||
| type: string | ||
| nullable: true |
| started_at: | ||
| type: string | ||
| format: date-time | ||
| nullable: true |
| finished_at: | ||
| type: string | ||
| format: date-time | ||
| nullable: true |
| duration_ms: | ||
| type: number | ||
| nullable: true |
| error: | ||
| type: string | ||
| nullable: true |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This PR implements the first phase of the ecosystem alignment plan by documenting the
pinkycollie+Pmaster-devoperating model and introducing a reusable API contract for automation workflows. It establishes a concrete source of truth inserverfor cross-org orchestration and contract-driven integration.Ecosystem inventory (cross-org map)
docs/pinkycollie-ecosystem-inventory.mdwith the six-layer strategy:Shared automation API contract
docs/openapi/automation.yaml(OpenAPI 3.1) defining core automation endpoints:Contract clarity improvements
/) for deployment-specific resolution.