Repository navigation
Description
Summary
The "egg: Contract Verification" CI workflow (.github/workflows/on-pull-request-contract-verify.yml) does not verify sliced PRs (egg/issue-N/slice-M → egg/issue-N/work) against the SDLC contract. As a result a significant scope change shipped unchecked: slice-2 of #3023 was descoped from 12 tasks to 1 ("slice-2a", PR #3037) during implement, and no CI gate verified the shipped PR against the contract.
Evidence
On slice PR #3037 (egg/issue-3023/slice-2 → egg/issue-3023/work) the contract-verification job skipped:
Check if verification should run pass 4s
egg-review / Contract Verification skipping 0
Why it skips: the should-run gate runs verification only when (a) the PR has the sdlc:pr label, or (b) the PR adds a new file under .egg-state/contracts/. Slice PRs carry egg, agent:orchestrator labels (no sdlc:pr), and a slice→work PR does not add a contract file (it already exists on work from the base / an earlier slice). So run=false and the reviewer_contract verification never runs. Both slice PRs here (#3034, #3037) are in this state.
Why it matters
The descope of slice-2 → slice-2a (drop TASK-2-0, defer TASK-2-2…2-11 — the entire OnDemandSpawner) left the shipped PR materially out of sync with the contract's slice-2 task set, and nothing flagged it. build-contract-verification-prompt.sh calls this "the last check before human review" — for sliced pipelines it isn't running at all.
Two gaps to address
- Trigger gap (primary, proven): contract verification should run on sliced PRs. Options — detect slice branches (
^egg/issue-[0-9]+/slice-) and/or a base ofegg/issue-N/workin theshould-rungate; or have the orchestrator apply thesdlc:prlabel when it opens slice PRs (today it appliesagent:<role>). - Contract-location / base-ref gap (surfaces once it runs): even when triggered, verification must (a) locate the contract on a slice→work checkout (
egg-contract showreads.egg-state/contracts/{issue}.json— confirm it's present on the slice ref), and (b) use the correct base.build-contract-verification-prompt.shdefaultsBASE_REFtomain; for a slice→work PR the base isegg/issue-N/work, so the re-review delta (git log … --not origin/${base_ref}) is computed against the wrong base unless the PR's actual base is threaded through.
Repro
- Open any sliced PR (
egg/issue-N/slice-M → egg/issue-N/work) — the normal case: nosdlc:prlabel, no added.egg-state/contracts/file. - The "egg: Contract Verification" workflow's verify job reports
skipping.
Found while reviewing #3023's slice-2a (PR #3037). Related: #3032 (operator observability).
Activity
fix(ci): run contract verification on sliced PRs (#3040) (#3048)
Skip code-review + autofix bots on SDLC pipeline PRs (#3269)