Repository navigation
RFC draft: build attempt identity and result lifecycle - #21
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0de9e55daf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | Prepared | Execute once | Invoke exactly one Provider Execution request using the recorded `execution_id`; do not replace a caller-supplied `correlation_id` with the `attempt_id`. Wait for its single normalized result; the host state is `executing` until that result is durably recorded. | A second execution call under this attempt; hidden adapter retry; correlation value rewritten to imply attempt identity. | | ||
| | Executing | Record the returned outcome | Append and confirm a protected immutable `provider-outcome` record containing the exact normalized result and canonical byte size/digest, keyed by `execution_id`, before discarding the returned outcome or interpreting it for a Comic Manifest result. | Proceeding without a confirmed outcome record; losing the outcome before its protected record is confirmed. | | ||
| | Outcome-recorded | Successful outcome and build-result verification | Construct one candidate `comic-build-result` with a distinct `result_id`, the same `attempt_id` and exact production reference. Preserve actual inputs, ordered transformations, verified outputs, status `complete`, and no diagnostics. This is `result-prepared`, not terminal. | Missing/mismatched required input, transformation, or output identity; an unverified output treated as successful. | | ||
| | Outcome-recorded | Normalized failure or cancellation | Prepare a candidate result using existing status/diagnostic fields; transition to `result-prepared`. Proposed mapping: use `partial` only when verified outputs are retained; otherwise use `failed`. Use an applicable existing diagnostic, including `CANCELLED` for cancellation. Neither result is release-eligible. This remains nonterminal until persisted and confirmed. | Claiming `complete` with diagnostics or incomplete/unverified outputs; inventing a diagnostic or emitting unsafe diagnostic content. | |
There was a problem hiding this comment.
Define mappings for all normalized provider failures
When the mock returns a schema-valid failure such as rate-limit, provider-unavailable, transport, or internal, none of the Comic Manifest diagnostics accurately represents that outcome, while every failed or partial result requires at least one diagnostic. Only timeout is deferred and output-validation/cancellation receive explicit mappings, so this transition otherwise forces implementations either to misclassify the failure or leave the attempt stranded; define or defer mappings for the remaining Provider Execution failure categories.
Useful? React with 👍 / 👎.
| | No attempt | Prepare | Allocate fresh `attempt_id` and `execution_id`; bind both to the exact production reference and record `retry_of_attempt_id: null` for a first attempt. Append and confirm this `prepared` entry before any execution side effect. | Missing/mismatched production identity; reused ID; protected index unavailable; execution begins before preparation is confirmed. | | ||
| | Prepared | Execute once | Invoke exactly one Provider Execution request using the recorded `execution_id`; do not replace a caller-supplied `correlation_id` with the `attempt_id`. Wait for its single normalized result; the host state is `executing` until that result is durably recorded. | A second execution call under this attempt; hidden adapter retry; correlation value rewritten to imply attempt identity. | | ||
| | Executing | Record the returned outcome | Append and confirm a protected immutable `provider-outcome` record containing the exact normalized result and canonical byte size/digest, keyed by `execution_id`, before discarding the returned outcome or interpreting it for a Comic Manifest result. | Proceeding without a confirmed outcome record; losing the outcome before its protected record is confirmed. | | ||
| | Outcome-recorded | Successful outcome and build-result verification | Construct one candidate `comic-build-result` with a distinct `result_id`, the same `attempt_id` and exact production reference. Preserve actual inputs, ordered transformations, verified outputs, status `complete`, and no diagnostics. This is `result-prepared`, not terminal. | Missing/mismatched required input, transformation, or output identity; an unverified output treated as successful. | |
There was a problem hiding this comment.
Add a transition for successful calls with invalid build output
When Provider Execution returns succeeded but the resulting artifact is missing a required rendition or fails integrity/validation, the rejection column correctly prevents a complete result, but no row transitions the attempt to a failed/partial result or another defined state. Provider success explicitly does not establish output quality, so this reachable case leaves the attempt permanently at Outcome-recorded; map it to the existing OUTPUT_MISSING, OUTPUT_INTEGRITY, or VALIDATION_FAILED diagnostics as appropriate.
Useful? React with 👍 / 👎.
Summary
Draft Codex RFC for Studio O02 #103. It defines a bounded transition table and finite synthetic fixture expectations for one exact Comic Manifest revision and exactly one offline mock Provider Execution call per attempt.
correlation_id. Multi-call attempts are deferred.prepared,result-prepared,persisting,terminal, and reconciliation-required host states. An attempt is terminal only after immutable result bytes are read back and verified and its terminal index entry is confirmed.partial/failedplusCANCELLEDhandling. Retry eligibility remains with O03/caller policy.timed-outmapping: the current Comic Manifest diagnostic enum has no timeout value, so a timed-out attempt stays nonterminal pending a versioned contract decision.Decision boundary
This remains a draft, not an accepted contract. Owner review is needed for the proposed index/identity linkage, cancellation mapping, and immutable-write/integrity boundary. Timeout mapping is explicitly deferred to a versioned contract decision. No existing schema is changed or accepted; no runtime, storage, release, or production work is included.
Validation
git diff --checkpassed; all 7 relative Markdown links and local heading anchors resolve.npm ci --ignore-scriptsandnpm teston Node 22 and 24.