fix: avoid repeated Astra preview confirmation requests - #676
Merged
Merged
Conversation
There was a problem hiding this comment.
✅ 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.
openai/gpt-6.1-sol | 𝕏
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

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.csstrengthens the existing guidance test, andtests/Orbit.Infrastructure.Tests/Services/SystemPromptBuilderTests.csverifies all six examples through the production static prompt builder.Closes thomasluizon/orbit-tickets#1041
Assumptions
CoreIdentitySectioninstead of adding a separate prompt section because it already defines how Astra responds beside approval cards.Test evidence
dotnet test tests/Orbit.Infrastructure.Tests --filter 'FullyQualifiedName~CoreIdentitySectionTests|FullyQualifiedName~SystemPromptBuilderTests'passed all 22 tests with the defect present, includingBuild_SoftenedGuidance_RoutesEveryWriteAndAmbiguityThroughCards.BuildStatic_HeldWriteExamples_DescribeUnsavedProposalsWithoutAskingForApproval, but before changing the prompt,dotnet test tests/Orbit.Infrastructure.Tests --filter 'FullyQualifiedName~CoreIdentitySectionTests|FullyQualifiedName~SystemPromptBuilderTests' --no-restorefailed 7 tests and passed 21. The strengthened test failed on missing held-write guidance; all six theory cases failed on missing bilingual proposal examples.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.slnxsucceeded with 0 errors.dotnet testpassed 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.