Skip to content

fix(api): wiki-maintenance BYOK and conflict-resolution HITL stuck sessions - #971

Merged
cursor[bot] merged 4 commits into
developfrom
cursor/critical-correctness-bugs-a450
May 25, 2026
Merged

fix(api): wiki-maintenance BYOK and conflict-resolution HITL stuck sessions#971
cursor[bot] merged 4 commits into
developfrom
cursor/critical-correctness-bugs-a450

Conversation

@cursor

@cursor cursor Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes two correctness issues introduced with Wiki Compose P5 (PR #970).

1. BYOK users cannot create wiki-maintenance sessions

Impact: Session create returns HTTP 400 for BYOK backends because getComposeModelIdsForGraph fell 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:

  • Project conflict_resolution in composeSessionProjection
  • Handle the interrupt in useWikiComposeSession (no erroneous follow-up POST /run)
  • Add ResearchConflictSection UI and submitConflictAck

Validation

  • bun testcomposeModelConfig.test.ts, composeSessionProjection.test.ts
  • bunx vitest run src/hooks/useWikiComposeSession.test.ts
Open in Web View Automation 

cursoragent and others added 3 commits May 25, 2026 07:56
- 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.
@otomatty
otomatty marked this pull request as ready for review May 25, 2026 09:38
@otomatty
otomatty self-requested a review as a code owner May 25, 2026 09:38
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@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: 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".

Comment thread src/hooks/useWikiComposeSession.ts Outdated
Comment on lines +497 to +500
return {
researchConflictSummary: payload.conflicts,
approvedSources: prev.approvedSources,
pendingSources: [],

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 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
@cursor
cursor Bot merged commit 71e2b62 into develop May 25, 2026
17 checks passed
@cursor
cursor Bot deleted the cursor/critical-correctness-bugs-a450 branch May 25, 2026 09:52
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.

2 participants