fix(api): wiki-maintenance BYOK and conflict-resolution HITL stuck sessions - #971
Conversation
- Add routeAfterBrief and routeAfterResearch conditional edges to wikiComposeGraph - Add skip_research and conflict_resolution nodes with Vitest coverage - Register wiki-maintenance graph (broken links + stub page scan) - Bump wiki-compose graph version to 1.1.0 Co-authored-by: Akimasa Sugai <otomatty@users.noreply.github.com>
- Return no compose model ids for wiki-maintenance so BYOK session create does not require orchestrator credentials for a lint-only graph. - Project conflict_resolution interrupts on GET compose-sessions reload. - Handle conflict_resolution in the compose hook and UI so research approval can pause for acknowledgement instead of leaving the session stuck.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e22509cfea
ℹ️ 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".
| return { | ||
| researchConflictSummary: payload.conflicts, | ||
| approvedSources: prev.approvedSources, | ||
| pendingSources: [], |
There was a problem hiding this comment.
Preserve approved sources when projecting conflict interrupt
When PATCH /resume returns a conflict_resolution interrupt, reduceResumeOutput calls reduceInterrupt(INITIAL_STATE, ...), so this branch reads prev.approvedSources from the initial empty state and overwrites the hook state with approvedSources: []. In the common path (submitResearchApproval), this erases the just-approved sources immediately after resume, so the client loses approved-source context until a later interrupt/projection repopulates it.
Useful? React with 👍 / 👎.
- Align conflict_resolution UI with develop (conflict phase, ConflictResolutionSection) - Keep briefDegraded routing from develop - Update hook test to expect conflict phase after research approval
Summary
Fixes two correctness issues introduced with Wiki Compose P5 (PR #970).
1. BYOK users cannot create
wiki-maintenancesessionsImpact: Session create returns HTTP 400 for BYOK backends because
getComposeModelIdsForGraphfell through to the orchestrator model list even though the maintenance graph never calls an LLM.Fix: Return an empty model id list for
wiki-maintenance.2. Compose sessions stuck after research conflict interrupt
Impact: When research approval triggers
conflict_resolution(≥2 rejected, ≥1 approved), the graph halts correctly but the client did not handle the new interrupt kind. Reload projected the wrong phase; live flow left users without an acknowledgement path.Fix:
conflict_resolutionincomposeSessionProjectionuseWikiComposeSession(no erroneous follow-upPOST /run)ResearchConflictSectionUI andsubmitConflictAckValidation
bun test—composeModelConfig.test.ts,composeSessionProjection.test.tsbunx vitest run src/hooks/useWikiComposeSession.test.ts