Skip to content

Add harness controller workflow gates#36

Merged
laimis91 merged 9 commits into
mainfrom
feature/harness-controller-refactor
Jul 9, 2026
Merged

Add harness controller workflow gates#36
laimis91 merged 9 commits into
mainfrom
feature/harness-controller-refactor

Conversation

@laimis91

@laimis91 laimis91 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add harness-controller workflow gates with Done Contract, trace/replay/run-state, worker-status, pivot/restart, Code Reviewer, and QA Evaluator contract coverage.
  • Keep review and QA loops bounded at the restored max 10 rounds, with round 10 terminal and round 11 rejected by runtime/contract guards.
  • Add safe Codex QA Evaluator lifecycle compatibility: reviewer lifecycle events satisfy QA only when QA-labeled journal evidence mentions the exact same agent id, with prefix-overlap and stale-id regressions.
  • Move detailed QA-loop behavior into references/qa-evaluation-loop.md, keeping assistant-review/SKILL.md to routing and load-boundary guidance.
  • Treat Status: COMPLETE and Status: COMPLETED journals as inactive so completed task state is not injected into new prompts; preserve Status: NOT DONE as active.
  • Replace full active task-journal injection with compact path reminders for SessionStart and PostCompact, while root-scoping status/phase parsing so slice statuses do not complete or phase the whole task.
  • Sync plugin skill mirrors for assistant-dev.

Validation

  • bash tests/test-hooks.sh --filter workflow-phase-gates -> 68 passed, 0 failed
  • bash tests/test-hooks.sh --filter stop-review -> 66 passed, 0 failed
  • bash tests/test-hooks.sh --filter task-journal-resolver -> 4 passed, 0 failed
  • bash tests/test-hooks.sh --filter session-start -> 17 passed, 0 failed
  • bash tests/test-hooks.sh --filter post-compact -> 5 passed, 0 failed
  • bash tests/test-hooks.sh --filter workflow-enforcer -> 45 passed, 0 failed
  • bash tests/test-hooks.sh --filter workflow-guard -> 18 passed, 0 failed
  • bash tests/test-hooks.sh --filter "codex default install" -> 1 passed, 0 failed
  • bash tests/p0-p4/review-loop-cap-contracts.sh -> 4 passed, 0 failed
  • bash tests/p0-p4/qa-evaluator-contracts.sh -> 8 passed, 0 failed
  • bash tests/p0-p4/installed-hook-smoke.sh -> 1 passed, 0 failed
  • bash tests/p0-p4/codex-hook-reinstall-contracts.sh -> 1 passed, 0 failed
  • bash tests/test-p0-p4-contracts.sh -> 226 passed, 0 failed
  • bash tools/plugins/sync-plugin-skills.sh --check
  • ./install.sh --agent codex --dry-run
  • bash tools/skills/validate-skills.sh --skill skills/assistant-review
  • bash tools/skills/validate-skills.sh --skill skills/assistant-workflow
  • bash tools/skills/validate-skills.sh --skill skills/assistant-skill-creator
  • git diff --check

Review

  • Code-writer, builder-tester, and reviewer subagents were used for the audit fixes and completed/active-journal follow-ups.
  • Final independent reviewer pass for the harness audit fixes: CLEAN.
  • Completed-journal follow-up reviewer pass: CLEAN.
  • Compact active-journal follow-up review loop reached CLEAN on round 5.

@laimis91 laimis91 changed the title [codex] Add harness controller workflow gates Add harness controller workflow gates Jul 2, 2026
@laimis91 laimis91 marked this pull request as ready for review July 2, 2026 11:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0663815f3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hooks/scripts/workflow-phase-gates.sh Outdated
NR <= minimum_line {
next
}
/^### QA Evaluation #[0-9]+/ {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce the QA 10-round cap

When qa_evaluation_mode=required, this parser accepts any ### QA Evaluation #N heading and only looks for an accepted verdict after it, so a journal with ### QA Evaluation #11 and - QA result: accepted passes assistant_phase_review_missing_reason_key and lets stop-review complete. That bypasses the documented terminal round-10 cap for QA loops; parse the QA evaluation number/Round: N of 10 here and reject rounds outside 1..10.

Useful? React with 👍 / 👎.

Comment thread hooks/scripts/workflow-phase-gates.sh Outdated
Comment on lines +1162 to +1164
if (low ~ /(^|[^[:alnum:]_])accepted([^[:alnum:]_]|$)/) return "accepted"
if (low ~ /(^|[^[:alnum:]_])rejected([^[:alnum:]_]|$)/) return "rejected"
if (low ~ /(^|[^[:alnum:]_])blocked([^[:alnum:]_]|$)/) return "blocked"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prioritize rejected QA verdicts over accepted text

For compact QA result lines, this returns accepted before checking for rejected or blocked, so a rejected summary that also mentions accepted criteria, e.g. QA Evaluator result: rejected; accepted 3/4 criteria, is normalized as accepted and the review gate completes. Negative terminal verdicts should take precedence when the value contains mixed prose.

Useful? React with 👍 / 👎.

@laimis91 laimis91 merged commit 335ee57 into main Jul 9, 2026
@laimis91 laimis91 deleted the feature/harness-controller-refactor branch July 9, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant