Skip to content

fix(compliance): chain proposal_id between storyboard steps in proposal_finalize + sales-proposal-mode#4088

Draft
bokelley wants to merge 1 commit intomainfrom
claude/issue-4086-proposal-finalize-context-chain
Draft

fix(compliance): chain proposal_id between storyboard steps in proposal_finalize + sales-proposal-mode#4088
bokelley wants to merge 1 commit intomainfrom
claude/issue-4086-proposal-finalize-context-chain

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 4, 2026

Closes #4086

Both media_buy_seller/proposal_finalize and sales-proposal-mode storyboards were sending the literal string "balanced_reach_q2" as proposal_id in their refine/finalize/accept steps. Proposal-mode sellers with runtime-generated IDs (UUIDs, DB rowids) received 404s from their upstreams on those steps. The fix adds context_outputs on the brief_with_proposals step to capture the seller-minted proposal_id, then substitutes $context.proposal_id in every subsequent step that references it. Catalog-mode sellers with stable IDs are unaffected — the chained value equals the old literal for any seller whose brief step returns the same ID.

Non-breaking justification: Adds optional context_outputs chaining to existing storyboard steps (additive) and an optional proposal_id property to CreateMediaBuySuccess schema (additive, additionalProperties: true already permitted the field). No existing fields renamed or removed.

Scope note: The protocol expert flagged that sales-proposal-mode/index.yaml carries the identical "balanced_reach_q2" placeholder bug. Both files are fixed in this PR rather than a separate follow-up to avoid the "small follow-up gets lost while the parent ships and re-opens the same file" failure mode.

Open follow-on (not in scope): finalize_proposal/get_products_finalize has prose-only assertions for proposals[0].proposal_status: committed and proposals[0].expires_at. Adding machine-checkable field_value / field_present validations for those would improve coverage — filed separately.

Pre-PR review:

  • code-reviewer: approved — YAML shape (name + path on context_outputs, $context.<name> in sample_request) is correct; context_outputs on stateful: false step is valid per schema; one nit (missing blank line before - id: review_refine) fixed before commit
  • ad-tech-protocol-expert: approved — chaining approach is protocol-correct; proposals[0] index convention matches corpus; added proposal_id as optional property to CreateMediaBuySuccess to resolve the field_present validation's blocker risk (schema didn't previously declare the field)

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_01CvVpewM8Xh3bG49S8QGZoM


Generated by Claude Code

…nalize + sales-proposal-mode storyboards

Both storyboards were sending the static placeholder "balanced_reach_q2"
as proposal_id in refine/finalize/accept steps. Proposal-mode sellers
(runtime UUIDs, DB rowids) received 404s on their upstreams. Catalog-mode
sellers with stable IDs are unaffected — the chained value is identical to
the prior literal for any seller whose brief step returns the same ID.

- Add context_outputs on brief_with_proposals/get_products_brief in both
  storyboards to capture proposals[0].proposal_id into the context accumulator
- Replace "balanced_reach_q2" with "$context.proposal_id" in refine, finalize,
  and accept steps of both storyboards
- Add field_present validation for proposal_id echo on create_media_buy response
- Add optional proposal_id field to CreateMediaBuySuccess schema to document
  the echo contract (non-breaking additive change; additionalProperties: true
  already permitted it)

Fixes #4086

https://claude.ai/code/session_01CvVpewM8Xh3bG49S8QGZoM
@bokelley
Copy link
Copy Markdown
Contributor Author

bokelley commented May 4, 2026

This PR was opened by the triage routine. See issue #4086 for context.


Generated by Claude Code

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

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proposal_finalize.yaml: add context_outputs / context_inputs to chain proposal_id between steps

2 participants