Skip to content

fix(studio): keep prompt_builder.dart out of the Studio assembly files - #387

Merged
hydall merged 1 commit into
nightlyfrom
fix/studio-message-builder-prompt-builder-mention
Sep 4, 2026
Merged

fix(studio): keep prompt_builder.dart out of the Studio assembly files#387
hydall merged 1 commit into
nightlyfrom
fix/studio-message-builder-prompt-builder-mention

Conversation

@hydall

@hydall hydall commented Sep 4, 2026

Copy link
Copy Markdown
Owner

prompt_build_architecture_test.dart › "Studio request assembly excludes ordinary prompt artifacts" fails on nightly (824e4ef), so CI is red on every PR opened against it — including #386, whose diff does not touch lib/core/llm/ at all.

The test forbids the literal string prompt_builder.dart in the six Studio request-assembly files, so the ordinary prompt path cannot creep back into them. lib/core/llm/studio_message_builder.dart names it in two comments added by #385 (lines 115 and 559). There is no import and no PromptPayload / PromptResult use — it is the wording alone that trips the contract.

Changes

  • reword the two appendToLastMessage comments in StudioMessageBuilder to point at "the ordinary prompt builder" instead of naming prompt_builder.dart, and rewrap the affected lines

The test itself is left exactly as strict as it was, and no behaviour changes: the diff is two comments.

Verification

  • Reproduced the failure first on the base commit 824e4ef (flutter test test/prompt_build_architecture_test.dart+3 -1), then confirmed the same file passes with the change (+4).
  • flutter test test/studio_typed_message_builder_test.dart — 16/16, so the appendToLastMessage path the comments describe is still covered.
  • flutter analyze --no-fatal-infos --no-fatal-warnings lib/core/llm/studio_message_builder.dart — no issues.
  • dart format was deliberately not run on the file: it rewrites it wholesale on the base commit too, so running it here would bury a two-comment fix under an unrelated reformat. CI has no formatting step.

🤖 Generated with Claude Code

https://claude.ai/code/session_0137NTHNxY3UPZ4iwrnyW1jU


Generated by Claude Code

`prompt_build_architecture_test.dart` forbids the literal string
`prompt_builder.dart` in the six Studio request-assembly files, so the
ordinary prompt path cannot creep back into them. Two comments in
`StudioMessageBuilder` name the file — there is no import and no
`PromptPayload` / `PromptResult` use, only the wording — and they have
been failing that test on `nightly` since #385, which reddens CI for
every PR opened against it.

- reword the `appendToLastMessage` comments in
  `lib/core/llm/studio_message_builder.dart` to point at "the ordinary
  prompt builder" instead of naming the file

The test's contract is untouched: it stays as strict as it was, and no
behaviour changes — the diff is two comments.

Verified: reproduced the failure on 824e4ef, then `flutter test
test/prompt_build_architecture_test.dart` and
`test/studio_typed_message_builder_test.dart` pass with the change;
`flutter analyze` clean on the file. `dart format` is deliberately not
run — it rewrites this file wholesale on the base commit too, and CI has
no formatting step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137NTHNxY3UPZ4iwrnyW1jU
@hydall
hydall merged commit 8672953 into nightly Sep 4, 2026
3 checks passed
@hydall
hydall deleted the fix/studio-message-builder-prompt-builder-mention branch September 6, 2026 16:19
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