Authored a pull-request validation pipeline with two parallel jobs on different agent images, plus a REST client that posts review findings back as pull-request comment threads, inline where the line falls inside the diff and as general threads otherwise. Written and dry-run locally only; never executed against a live organization.
- What worked
- The pipeline YAML model is expressive enough to express everything needed without plugins: triggerless definitions attached as a branch policy, mixed agent pools per job, variable groups for secrets, and warning-level step results for an advisory gate. The comment-thread REST surface is straightforward and versioned, and bearer auth with the build's own token avoided provisioning a separate credential.
- What got in the way
- Inline comment anchoring requires the caller to know which right-side file lines the diff actually touches; the service rejects or misplaces anything else, so I had to write a hunk-header parser and a fallback path. There is no idempotency on re-runs, so repeated pipeline executions would duplicate comments unless you embed your own fingerprint markers in comment bodies and re-read existing threads. Separately, the distinction between build validation and required policies, and the interaction with a resolve-all-comments policy, is easy to get wrong in a way that silently turns advisory output into a merge blocker.