Skip to content

fix(analyze): ACP-only path, tape, dedupe ChatModel callbacks#31

Merged
STRRL merged 3 commits into
masterfrom
tape-composer-2.0
May 9, 2026
Merged

fix(analyze): ACP-only path, tape, dedupe ChatModel callbacks#31
STRRL merged 3 commits into
masterfrom
tape-composer-2.0

Conversation

@STRRL
Copy link
Copy Markdown
Owner

@STRRL STRRL commented Mar 20, 2026

  • Drop eino filesystem middleware so ToolsNode never runs; ACP executes tools
  • acpToolCallingModel reports IsCallbacksEnabled to skip callbackInjectedModel
  • Wire tape JSONL + SlogEinoHandler on analyze; remove local backend adapter
  • go mod tidy (drop unused eino-ext/local backend)

Made-with: Cursor

@STRRL STRRL marked this pull request as ready for review March 20, 2026 05:08
Copy link
Copy Markdown

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

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: 55bb3dd419

ℹ️ 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 pkg/tape/jsonl.go
Comment on lines +46 to +47
sc := bufio.NewScanner(f)
for sc.Scan() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Support JSONL entries larger than scanner token limit

scanMaxID uses bufio.Scanner with the default 64 KiB token size, so reopening .tape.jsonl will fail with bufio.Scanner: token too long once any single tape line exceeds that size. This is likely with large tool outputs, and after that OpenJSONL fails and workspace analyze cannot start for that workspace until the tape is manually edited.

Useful? React with 👍 / 👎.

Comment thread pkg/tape/eino_handler.go Outdated
if msg != nil {
h.write(Message(messageToMap(msg), h.baseMeta()))
}
runData := map[string]any{"status": "ok"}
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 Mark stream runs failed when callback stream read errors

In OnEndWithStreamOutput, stream read errors only log and break the receive loop, but the handler still emits a run event with "status": "ok". When ACP streaming fails mid-response (transport/process errors), tape records the run as successful, which makes debugging and run auditing inaccurate.

Useful? React with 👍 / 👎.

STRRL added 3 commits May 8, 2026 16:59
- Drop eino filesystem middleware so ToolsNode never runs; ACP executes tools
- acpToolCallingModel reports IsCallbacksEnabled to skip callbackInjectedModel
- Wire tape JSONL + SlogEinoHandler on analyze; remove local backend adapter
- go mod tidy (drop unused eino-ext/local backend)

Made-with: Cursor
…abysit)

- scanMaxID: increase bufio.Scanner buffer to 10MB to handle large
  tool outputs that exceed the default 64KB token limit
- OnEndWithStreamOutput: track stream read errors and emit run event
  with "error" status instead of always reporting "ok"
@STRRL STRRL force-pushed the tape-composer-2.0 branch from 4e02986 to ae3d198 Compare May 9, 2026 00:01
@STRRL STRRL changed the base branch from master to tape-opus-4.6 May 9, 2026 00:01
Copy link
Copy Markdown

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

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: ae3d198e64

ℹ️ 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 pkg/analyzer/analyzer.go
return "", errors.Errorf("create filesystem middleware: %w", err)
return "", errors.Errorf("open tape store: %w", err)
}
defer func() { _ = tapeStore.Close() }()
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 Wait for streamed tape callbacks before closing

When ACP emits streamed callbacks, pkg/tape/eino_handler.go drains and writes the stream from a goroutine, but this deferred close runs as soon as the runner iterator finishes. There is no synchronization with those goroutines, so the final assistant message/run event can race with Close() and be dropped with an append error, leaving .tape.jsonl incomplete for normal streamed model responses.

Useful? React with 👍 / 👎.

Base automatically changed from tape-opus-4.6 to master May 9, 2026 00:16
@STRRL STRRL merged commit 3eef3a0 into master May 9, 2026
2 checks passed
@STRRL STRRL deleted the tape-composer-2.0 branch May 9, 2026 00:17
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