Replace committedSlots/resolvedContract with PendingWriteOperation#71
Merged
Conversation
Adds "vitest": "vitest" script alongside "test": "vitest run" in apps/web, packages/core, packages/db, and packages/integrations so vitest can be invoked directly in watch/interactive mode per package. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the old parallel slot-tracking model (committedSlots + resolved_slots + pending_write_contract) with a single structured PendingWriteOperation that carries operationKind, resolvedFields, missingFields, originatingText, and startedAt through the turn pipeline. Changes: - packages/core: commit-policy now outputs resolvedFields/missingFields instead of committedSlots/missingSlots; ambiguity.ts switches to missingFields; write-contract and proposal-rules updated accordingly - apps/web/turn-router: builds a PendingWriteOperation from commit results and passes resolvedOperation through policy instead of committedSlots + resolvedContract - apps/web/decide-turn-policy: drops committedSlots from all policy branches; uses missingFields/resolvedFields throughout - apps/web/conversation-state: persists pending_write_operation; drops resolved_slots and pending_write_contract - apps/web/telegram-webhook: threads resolvedOperation instead of committedSlots/resolvedContract - All tests updated to reflect the new shape Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ngSlots to missingFields - turn-router: only build resolvedOperation when policy.action !== "reply_only"; informational and follow_up_reply turns were creating a synthetic PendingWriteOperation that overwrote any real in-progress write workflow in discourse state - core/index: rename turnInterpretationSchema field missingSlots → missingFields to match the PendingWriteOperation naming introduced in phase 1 - update tests to assert reply_only turns produce no resolvedOperation, and fix missingSlots references in conversation-state.test.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add workflowChanged: boolean to CommitPolicyOutput; set from operationChanged so commit-policy is the sole authority on workflow identity decisions - Thin down buildResolvedOperation: use commitResult.resolvedTargetRef for targetRef; reset originatingText/startedAt when workflowChanged or no prior op - Fix PERSISTABLE_SLOT_KEYS to dot-path format (scheduleFields.*) matching the clarificationSlots format from commit-policy; drop "target" (now in targetRef) - Remove "target" from slotKeySchema in index.ts — target is resolved via classification.resolvedEntityIds, not slot extraction - Add target-change tests: switch clears prior schedule fields, workflowChanged is true, resolvedTargetRef carries the new entity ID - Rename "Committed slots" reason string in proposal-rules to "Resolved fields" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace WriteContract/committedSlots/resolved_slots/intentKind references with operationKind, resolvedFields, resolvedTargetRef, workflowChanged, and pending_write_operation throughout steps B, C, D, Phase 5, seams, state machine, and code map. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
committedSlots+resolved_slots+pending_write_contractmodel with a singlePendingWriteOperationtype that carriesoperationKind,resolvedFields,missingFields,originatingText, andstartedAtthrough the turn pipelinepackages/corecommit-policy, ambiguity, write-contract, and proposal-rules updated to outputresolvedFields/missingFieldsinstead ofcommittedSlots/missingSlotsapps/webturn-router, decide-turn-policy, conversation-state, and telegram-webhook all threadresolvedOperationinstead of the old parallel fieldsTest plan
pnpm --filter @atlas/core typecheck && pnpm --filter @atlas/core testpnpm --filter @atlas/web typecheck && pnpm --filter @atlas/web testcommittedSlots,pending_write_contract, orresolved_slotsremain in source files🤖 Generated with Claude Code