Skip to content

ACP changes for DocuMentor's queued messages: messageId, empty-prompt resume, _meta.opencode - #2

Merged
TheFabFab merged 4 commits into
documentor-pgfrom
queued-messages
Oct 9, 2026
Merged

TheFabFab merged 4 commits into
documentor-pgfrom
queued-messages

Conversation

@TheFabFab

Copy link
Copy Markdown
Owner

Three changes DocuMentor's queued messages rely on. Each keeps upstream behaviour for clients that do not use it (documentor/FORK.md has a row for each):

  • F1 acp/service.ts: a session/prompt messageId starting with msg becomes the durable user message id. UUID ids (other ACP clients) are not forwarded; the unchanged test "normal text prompt sends model variant mode and converted parts" guards that.
  • F2 session/prompt.ts: a prompt with no parts on a session that has a user message stores nothing and runs the loop. Nothing to answer means no model call; a fresh session keeps upstream behaviour.
  • F3 acp/event.ts: agent_message_chunk, agent_thought_chunk, tool_call and tool_call_update carry _meta.opencode = { messageId, parentId }, live and replayed.

Verified locally: the documentor: tests per file, binary-smoke.sh on a --single build, and DocuMentor's layer-1 suite (13 tests against real opencode acp) on that build, where 6 of them fail on the currently released v1.18.34-documentor-pg.1.

Layer-1 results

Built with OPENCODE_VERSION=1.18.34 bun run script/build.ts --single at 6b5fbd923; sha256 47e137a73e2ec0168e1e064a614e529ba4bb00e69b108a494324e57fb5f05fab (baseline release 6157dbc0…889a).

Test Released v1.18.34-documentor-pg.1 This branch
1, 2, 3a, 3b, 4, 6b, 8 pass pass
5a fails when the queued prompt is joined and cancelled (~85% of runs), passes when it self-answers passes on both paths
5b, 6a, 6c fail (empty prompt stored; opencode's own id stored; resent id not stored) pass
7a, 7b fail (no _meta.opencode) pass
Total 7 passing, 6 failing 13 passing, on 4 of 4 full runs
  • 5a by path: run alone 30 times on this build, it passed 30/30: 28 JOINED-CANCELLED, 2 SELF-ANSWERED.
  • 3a: all 24 rounds across the 4 runs were JOINED. No round reached NEW LOOP, so the race at loop exit is not covered on either binary.
  • DocuMentor's existing fake-provider suite on the same build: 8 passing.

Notes

  • Branch name: the head is queued-messages, not documentor/queued-messages. This fork already has a documentor branch, so git cannot create a documentor/… branch here (a ref directory/file conflict).
  • Smoke database: binary-smoke.sh passed against the embedded server's postgres database, as in CI. The local test database (agentstate_test) refuses CONNECT to the scope role, and the released binary fails there the same way.

What remains unproven

  • The race at loop exit (3a NEW LOOP) was never hit.
  • Layer 1 has run only locally. This repo's CI runs upstream's typecheck and unit suites and the binary smoke, not DocuMentor's layer 1.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Hey! Your PR title ACP changes for DocuMentor's queued messages: messageId, empty-prompt resume, _meta.opencode doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

TheFabFab and others added 4 commits October 9, 2026 08:37
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and tool update

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y for tracked sessions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TheFabFab
TheFabFab merged commit 4d2dd39 into documentor-pg Oct 9, 2026
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant