This repository was archived by the owner on May 24, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
feat: use SystemMessageConfig with SectionOverride for worker prompts (fixes #496) #822
Open
github-actions
wants to merge
8
commits into
main
Choose a base branch
from
fix/issue-496-worker-systemmessage-sections
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
99b875d
feat: use SystemMessageConfig with SectionOverride for worker prompts
github-actions[bot] d46de87
fix: move dynamic content into section overrides for Customize mode
github-actions[bot] 63dfe6a
fix: re-include fresh dynamic context in worker dispatch prompt
github-actions[bot] 1617aeb
test: add MergeDynamicContent tests, fix structural guards, rename sm…
github-actions[bot] 0941e3e
fix: use thread-safe snapshots in ExecuteWorkerAsync for Organization…
github-actions[bot] fe306b5
refactor: rename WorkerSystemMessageTests to AppBootstrapTests
github-actions[bot] 141f2df
fix: eliminate duplicate identity/shared context from user prompt (fi…
github-actions[bot] f51b9e0
fix: pass worker system message sections in RecreateSessionAsync (fin…
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| using PolyPilot.IntegrationTests.Fixtures; | ||
|
|
||
| namespace PolyPilot.IntegrationTests; | ||
|
|
||
| /// <summary> | ||
| /// Smoke tests verifying app bootstrap succeeds after the SystemMessageConfig | ||
| /// refactoring (issue #496). These don't test section overrides directly — | ||
| /// they confirm the refactored CreateSessionAsync doesn't break initialization. | ||
| /// </summary> | ||
| [Collection("PolyPilot")] | ||
| [Trait("Category", "AppBootstrap")] | ||
| public class AppBootstrapTests : IntegrationTestBase | ||
| { | ||
| public AppBootstrapTests(AppFixture app, ITestOutputHelper output) | ||
| : base(app, output) { } | ||
|
|
||
| [Fact] | ||
| public async Task AppBootstrap_DashboardLoads() | ||
| { | ||
| await WaitForCdpReadyAsync(); | ||
|
|
||
| // Verify the dashboard is accessible — the multi-agent group creation | ||
| // UI is on the dashboard. If the dashboard loads, the underlying | ||
| // CreateMultiAgentGroupAsync (which now passes worker system message | ||
| // sections) is available. | ||
| var dashboardExists = await WaitForAsync("#dashboard-page", TimeSpan.FromSeconds(10)); | ||
| if (!dashboardExists) | ||
| { | ||
| // Try navigating to dashboard | ||
| await NavigateToAsync("Dashboard", "#dashboard-page"); | ||
| dashboardExists = await ExistsAsync("#dashboard-page"); | ||
| } | ||
|
|
||
| // Even if dashboard element ID isn't present, the app should be responsive | ||
| var bodyText = await GetTextAsync("body"); | ||
| Assert.False(string.IsNullOrWhiteSpace(bodyText), "App body should have content"); | ||
| Output.WriteLine($"Dashboard content preview: {bodyText[..Math.Min(bodyText.Length, 200)]}"); | ||
|
|
||
| await ScreenshotAsync("dashboard-worker-system-message"); | ||
| } | ||
|
|
||
| [Fact] | ||
| public async Task AppBootstrap_RespondsToApiStatus() | ||
| { | ||
| // Verify the app is running and responsive — this confirms that the | ||
| // refactored CreateSessionAsync (with systemMessageSections parameter) | ||
| // didn't break app initialization. | ||
| var status = await GetJsonAsync("/api/status"); | ||
| Assert.True(status.TryGetProperty("agentReady", out var ready)); | ||
| Output.WriteLine($"Agent ready: {ready}"); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 MINOR · 3/3 reviewers · Integration tests don't validate the feature
Both test methods are pure smoke tests —
Dashboard_ShowsMultiAgentGroupCreationchecks the body has content and takes a screenshot;App_RespondsToApiStatuschecksagentReady. Neither creates a multi-agent group, creates a worker session, nor inspects whether the session usesSystemMessageMode.Customizewith section overrides. These tests pass identically whether the PR's changes are present or reverted.Suggestion: Either rename to reflect what's actually tested (e.g.,
AppBootstrapTests) or replace with tests that create a worker group and verify the session'sSystemMessageConfigincludes the expected sections.