ADF PR Gate Result Contract Handover
Generated: 2026-06-09 14:48 BST
Progress Summary
Tasks Completed This Session
- Implemented canonical
PrGateResulthandling for ADF PR fan-out gates. - Added fail-closed handling for missing, malformed, stale, or invalid
adf:gate-resultblocks. - Added drain-log backed parsing so reconciliation can read full producer output instead of only in-memory event samples.
- Added orchestrator-owned bounded canonical failure envelopes for invalid producer output.
- Added PR gate timeout fail-closed handling with a 300 second wall-clock cap for PR gate agents.
- Pushed implementation branch
task/2301-pr-gate-result-contractto Gitea. - Created PR
#2318:Fix #2301: add PrGateResult contract for PR fan-out gates. - Deployed ADF from latest branch head
ca4a6f2ad07a55441f07d5e390b9ce9f8c7beabdon bigbox. - Created binary backups before deployment:
/usr/local/bin/adf.bak-20260609-1425/opt/ai-dark-factory/adf.bak-20260609-1425
- Restarted
adf-orchestrator.serviceand verified it is active using/usr/local/bin/adf orchestrator.toml. - Ran synthetic PR webhooks for PR
#2318and verified live terminal commit statuses. - Updated Gitea PR and issues with evidence:
- PR
#2318comment38973 - Issue
#2301comments38974and38978 - Follow-up issue
#2334created for producer-agent output quality.
- PR
Current Implementation State
- Branch:
task/2301-pr-gate-result-contractin isolated worktree/var/folders/rb/l4_6j2nx0lnfhysk974ldpg40000gn/T/opencode/adf-2301. - Latest implementation commit before this handover:
ca4a6f2ad fix(orchestrator): fail closed on PR gate timeouts Refs #2301. - PR
#2318is open and points to the latest pushed branch head. - ADF on bigbox is deployed from
ca4a6f2adand active. - Current head
ca4a6f2ad07a55441f07d5e390b9ce9f8c7beabdhas terminal fail-closed gate statuses:adf/validation: failure,agent exceeded 300s PR gate wall-clock limitadf/verification: failure,agent exceeded 300s PR gate wall-clock limitadf/pr-reviewer: failure,agent exceeded 300s PR gate wall-clock limit
- Canonical timeout failure comments were posted and parsed successfully:
38970:pr-verifier,adf/verification,status=fail38971:pr-reviewer,adf/pr-reviewer,status=fail38972:pr-validator,adf/validation,status=fail
What Is Working
- Branch protection no longer remains stuck on pending when PR gate producers emit malformed output.
- Malformed or missing producer output is converted into bounded canonical failure comments.
- Valid canonical
adf:gate-resultblocks are parsed and used to determine terminal commit statuses. - PR gate agents that run too long are killed and failed closed after 300 seconds.
- Status descriptions and PR comments are tied to the expected PR number, context, agent name, and head SHA.
- Local verification and pre-commit hooks passed before the latest implementation commit.
What Is Blocked Or Remaining
- Producer agents still emit excessive or malformed output and can run until the 300 second safety cap.
- Useful review/validation/verification reports are not yet produced reliably by
pr-reviewer,pr-validator, orpr-verifier. - Follow-up issue
#2334tracks producer quality: make the PR gate producers emit useful bounded reports with valid canonicaladf:gate-resultblocks. - Native CI status checks unrelated to ADF gates may remain pending or blocked according to branch protection and runner state.
Technical Context
Implementation Worktree
Path: /var/folders/rb/l4_6j2nx0lnfhysk974ldpg40000gn/T/opencode/adf-2301
# Current branch
# Recent commits before this handover
# Modified files before this handover
The untracked .docs/orchestrator-legacy-2301/patch-terraphim-toml.py file was pre-existing and intentionally left untouched.
Main Workspace
Path: /Users/alex/projects/terraphim/terraphim-ai
# Current branch
# Recent commits
# Modified files
These main-workspace files were not part of the PR gate implementation changes in the isolated worktree.
Verification Evidence
cargo test -p terraphim_orchestrator --lib reconcile_impl::tests: pass.cargo test -p terraphim_orchestrator --lib pr_gate_result: pass.cargo clippy -p terraphim_orchestrator --all-targets: pass.cargo llvm-cov -p terraphim_orchestrator --lib --summary-only -- pr_gate_result reconcile_impl::tests: 28 focused tests passed.ubs --only=rust --diff .: 0 critical issues.- Commit hook passed format, cargo check, clippy, cargo build, full Rust tests, and UBS critical gate.
Next Recommended Steps
- Review and merge PR
#2318once maintainers are satisfied with fail-closed behaviour. - Work issue
#2334next to fix producer agents so they emit useful reports before the timeout cap. - Keep the 300 second PR gate timeout as a safety backstop, not as the normal completion path.
- Avoid re-enabling retired ADF bash
build-runner; native Gitea CI remains the build path.