feat(github): render multi-deployment apply comment from presentation model#319
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub-markdown renderer for multi-deployment apply comments by consuming the surface-agnostic presentation.Apply model (introduced in #315). This enables an aggregate “rollup” header plus per-deployment summaries and expandable per-deployment details, while reusing the existing single-deployment renderer for each deployment’s detailed body.
Changes:
- Added
RenderMultiDeploymentApplyCommentand supporting helpers to render aggregate + per-deployment sections frompresentation.Apply. - Added unit tests covering in-progress barrier rollouts, halted failures, reuse of the single-deployment renderer, unknown states, and “no next action” behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| pkg/webhook/templates/multi_apply.go | New renderer for multi-deployment apply PR comments (aggregate header + per-deployment summaries/details). |
| pkg/webhook/templates/multi_apply_test.go | New test coverage validating multi-deployment comment output and structure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The rendering matches the intended model well — aggregate header, per-status counts, single next-action, ordered summary, per-deployment
There are also several existing inline review comments on these same lines that don't appear addressed on the current head — worth resolving those together with the above. 🤖 This review was generated by Claude Code (claude-fable-5) with maintainer approval. |
thank you - all 4 concerns are addressed in 51d578c |
… model MD-10b: aggregate header (state, per-status counts, single next-action), an at-a-glance per-deployment summary, and a <details> per deployment that reuses the single-deployment renderer for full per-table fidelity. Dormant until callers dispatch on operation-row count; single-deployment UX unchanged.
…deployment summaries Address review on the multi-deployment apply comment: suggest only the apply-id command forms today's CLI accepts (cutover/start) and the retry form for a failed apply, since revert applies only to a deployment in its post-cutover window and no --deployment flag exists yet. HTML-escape config-derived deployment names/labels, and render a placeholder for a deployment with no detail. Document that ApplyID/Environment are always set so the renderer need not guard them.
51d578c to
9db9b9f
Compare
…S.md Seed in-progress (barrier), halt-on-failure, and completed rollout scenarios through the preview pipeline so the aggregate + per-deployment UX renders in TEMPLATES.md. Also fix PR-only section headings escaping the snapshot redirect.
What and Why ?
Adds the GitHub markdown renderer for multi-deployment apply comments, consuming the surface-agnostic
presentation.Applymodel (from #315). This is the rendering half of MD-10 — it turns the derived presentation into the comment an operator sees on the PR, and seeds the multi-deployment scenarios into the preview pipeline so the UX is reviewable inTEMPLATES.md.Changes
presentation.Applyinto a multi-deployment apply comment:<details>block per deployment whose body reuses the existing single-deployment renderer, so per-deployment table fidelity is identical to today's single-deployment commentTEMPLATES.md.Design-note compliance
Verified the seeded scenarios against the agreed UX contract in
schemabot/design/schemabot-multi-deployment-ux.md:Deployments: …counts, then per-deployment<details>deployment_order(eu→us→au→ca)<details open>, au/ca collapsed; Failure: us<details open>, eu/au/ca collapsed; Completed: all collapsed❌ us — failed,⏸ au — halted — us failedin the aggregate rowsapply_operationus);euis parked at the cutover barrier — valid barrier semantics, not concurrent copiesKnown divergence (follow-up): the failure scenario's next-action renders
schemabot apply -e production, whereas the design note's Failure-UX example prescribes a per-deploymentschemabot retry … --deployment <dep>(withrevertreserved for the revert-window only). That's existing renderer behavior, not seed data — tracked as a follow-up.Stacking
Part of the MD-10 per-deployment presentation series: