Repository navigation
Preserve checklist state when saving a starting step - #999
Merged
Merged
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes across the checklist tool, operation gateway, approval previews, starting-step instructions, regression tests, and shared consumer preview handling.
- Append-only saves:
item_to_adduses the existing append command, preserving stored text, order, and checked state while adding the new item unchecked. - Replacement safeguards: Growing full-list replacements must preserve the stored prefix, with argument validation running before a preview is held.
- Approval previews: Append previews show the merged checklist as read-only while retaining append intent for execution; existing revision and stale-preview checks remain in place.
- Regression coverage: Captured pt-BR failure replay and bilingual save tests cover preservation and approval. Both local test selections passed: 88 starting-step/tool tests and 617 preview, revision, and chat approval tests. Live model pass^3 evaluation was not run in this review.
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.




Tracks thomasluizon/orbit-tickets#1857.
Saving a starting step could replace the full checklist and uncheck an existing item.
update_checklistnow acceptsitem_to_add, previews the stored list plus the unchecked step, and dispatches the existing append command after approval. Full-list additions must keep every stored item's text, order and checked state. The operation gateway checks these arguments before holding a preview.The change lives in
UpdateChecklistTool.cs,PendingOperationChangePreviewer.Checklist.csand the checklist argument-check entry inAgentOperationExecutor.cs. This keeps the model responsible for tool selection while the server owns preservation. Existing validators, domain guards, ownership checks and approval binding remain on the path.The English checklist-save setup says "I can't get myself to drink water." Its captured attempt records no tool calls and a missing successful
suggest_breakdown. The tool description now explicitly covers inability to do an activity and requests for a first step, even without the word start. The shared prompt changes only the checklist-save instruction. No message pattern selects or rewrites a tool or substitutes an answer.AnswerComposition.mdand the tool README describe the append contract. The capability snapshot records its optional input; the gap report is unchanged. Release generation left all four committed OpenAPI artifacts unchanged. Paired work remains in thomasluizon/orbit-tickets#1866 and thomasluizon/orbit-tickets#1867.Assumptions
item_to_addto the existing tool rather than introducing another tool or endpoint; a growing full replacement cannot also edit stored items.Test evidence
Before changing tests or implementation,
dotnet test tests/Orbit.Application.Tests --filter FullyQualifiedName~OneSmallStep_ChecklistSavePreservesExistingItemsAndWaitsForApproval --verbosity quietexited 0: both existing cases passed with the defect present because their model arguments already preserved the list.Before the fix,
dotnet test tests/Orbit.Application.Tests --no-build --filter FullyQualifiedName~OneSmallStep_CapturedChecklistAdditionCannotChangeStoredItems --logger 'console;verbosity=normal'exited 1: both composition modes failed because a held preview contained the captured unchecked replacement. The replay uses the real pt-BR r3 arguments, replacing only the redacted habit ID with the seeded ID.After the fix, the regression verifies a typed denial of the captured checked-state change, zero pending operations, an append-only retry, approval, and independent habit-detail readback. The captured duplicate text is appended once unchecked while the existing checked occurrence remains checked. Separate tool tests reject changed text, reordered entries, malformed inputs, foreign targets and full checklists. English and pt-BR save tests cover both the new append input and valid full-list additions.
Checks completed by exit code:
dotnet build Orbit.slnx -c Release --verbosity quietdotnet test tests/Orbit.Domain.Tests -c Release --no-build --verbosity quietdotnet test tests/Orbit.Application.Tests -c Release --no-build --verbosity quietdotnet test tests/Orbit.Infrastructure.Tests -c Release --no-build --verbosity quietdotnet test tests/Orbit.Analyzers.Tests -c Release --no-build --verbosity quietpython3 .github/scripts/openapi_artifacts.py freshnesspython3 .github/scripts/openapi_artifacts.py plan --base origin/mainnode tools/capability-inventory.mjs --checkgit diff --checkCopy review
Every added or changed model-facing string has its English runtime text and pt-BR review translation in
src/Orbit.Api/OpenApi/AnswerComposition.md, under "One small starting step": the starting-activity prompt,suggest_breakdowndescription,update_checklistdescription, both checklist input descriptions, conflicting-input and type errors, and the addition-preservation guard. Existing visible step labels and action messages are unchanged.Evidence boundary
The committed fixture
tests/Orbit.Application.Tests/Fixtures/ChecklistSaves/composition-one-small-step-save-checklist-pt-BR-r3.jsonis extracted from the coordinator's captured g9a attempt, retaining its case, repeat, failure reason, fixture facts and tool calls. The English setup request was read fromorbit-ui-mobileatorigin/main:evals/astra/composition-scenarios.yaml; its r1 attempt contains an emptytoolCallsarray, so no successful call was invented for replay. This change adds no reads of external service or package response fields. Live pass^3 evals remain the coordinator's verification.