Skip to content

fix: avoid repeated Astra preview confirmation requests - #676

Merged
thomasluizon merged 1 commit into
redesign/mainfrom
fix/ticket-1041-astra-preview-prose
Oct 1, 2026
Merged

thomasluizon merged 1 commit into
redesign/mainfrom
fix/ticket-1041-astra-preview-prose

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Held Astra writes can repeat confirmation requests beside the preview. The prompt now introduces the proposed work once in the user's language, says nothing has been saved, and leaves the approval request to the preview. Useful explanations and genuine clarification questions remain allowed; explicit preview approval, irreversible confirmation, and identity verification remain required.

The change lands in src/Orbit.Infrastructure/Services/Prompts/Sections/Static/CoreIdentitySection.cs, which already owns approval-card guidance. English and Portuguese examples cover held create, update, and delete proposals. tests/Orbit.Infrastructure.Tests/Services/PromptSectionTests.cs strengthens the existing guidance test, and tests/Orbit.Infrastructure.Tests/Services/SystemPromptBuilderTests.cs verifies all six examples through the production static prompt builder.

Closes thomasluizon/orbit-tickets#1041

Assumptions

  • Extended the existing CoreIdentitySection instead of adding a separate prompt section because it already defines how Astra responds beside approval cards.

Test evidence

  • Before any edits, dotnet test tests/Orbit.Infrastructure.Tests --filter 'FullyQualifiedName~CoreIdentitySectionTests|FullyQualifiedName~SystemPromptBuilderTests' passed all 22 tests with the defect present, including Build_SoftenedGuidance_RoutesEveryWriteAndAmbiguityThroughCards.
  • After strengthening that test and adding BuildStatic_HeldWriteExamples_DescribeUnsavedProposalsWithoutAskingForApproval, but before changing the prompt, dotnet test tests/Orbit.Infrastructure.Tests --filter 'FullyQualifiedName~CoreIdentitySectionTests|FullyQualifiedName~SystemPromptBuilderTests' --no-restore failed 7 tests and passed 21. The strengthened test failed on missing held-write guidance; all six theory cases failed on missing bilingual proposal examples.
  • After the prompt fix, dotnet test tests/Orbit.Infrastructure.Tests --no-build --filter 'FullyQualifiedName~CoreIdentitySectionTests|FullyQualifiedName~SystemPromptBuilderTests|FullyQualifiedName~AgentChatWriteHoldTests|FullyQualifiedName~AgentPolicyEvaluatorTests|FullyQualifiedName~AgentCatalogServiceTests' passed all 119 tests, including the 28 prompt tests. This also covers approval holds, destructive confirmation tokens, and step-up authorization.
  • dotnet test tests/Orbit.Application.Tests --no-build --filter 'FullyQualifiedName~ChatWriteHoldHandlerTests' passed all 7 handler tests, including no write before approval, execution after approval, and clarification before the approval card.
  • dotnet build Orbit.slnx succeeded with 0 errors.
  • Full dotnet test passed all 8,487 tests: 4,861 Application, 2,943 Infrastructure, 651 Domain, and 32 Analyzers. No failures or skips. Existing dependency and obsolete-API warnings remain.

These unit tests cover the generated prompt contract and server approval enforcement. Live model output was not exercised.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes The complete three-file change was reviewed, including production prompt assembly and the unchanged server-side approval path.

  • Held-write wording: Proposals are introduced once as unsaved, with confirmation requests left to the preview while useful explanations and genuine clarification remain allowed.
  • Approval safeguards: The guidance preserves explicit approval, irreversible confirmation, and identity verification, and prohibits retrying pending writes.
  • Prompt coverage: Strengthened section assertions and six English/Portuguese example cases exercise the production static prompt builder. All 119 focused prompt and approval-enforcement unit tests passed; live model output was not exercised.

Pullfrog  | View workflow run | Using openai/gpt-6.1-sol | 𝕏

@thomasluizon
thomasluizon merged commit 6144fe8 into redesign/main Oct 1, 2026
22 checks passed
@thomasluizon
thomasluizon deleted the fix/ticket-1041-astra-preview-prose branch October 1, 2026 02:25
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