Skip to content

Replace committedSlots/resolvedContract with PendingWriteOperation#71

Merged
MaxLinCode merged 7 commits into
mainfrom
claude/phase1-pending-write-operation
Mar 28, 2026
Merged

Replace committedSlots/resolvedContract with PendingWriteOperation#71
MaxLinCode merged 7 commits into
mainfrom
claude/phase1-pending-write-operation

Conversation

@MaxLinCode

@MaxLinCode MaxLinCode commented Mar 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces the fragmented committedSlots + resolved_slots + pending_write_contract model with a single PendingWriteOperation type that carries operationKind, resolvedFields, missingFields, originatingText, and startedAt through the turn pipeline
  • packages/core commit-policy, ambiguity, write-contract, and proposal-rules updated to output resolvedFields/missingFields instead of committedSlots/missingSlots
  • apps/web turn-router, decide-turn-policy, conversation-state, and telegram-webhook all thread resolvedOperation instead of the old parallel fields
  • All tests updated to match the new shape

Test plan

  • pnpm --filter @atlas/core typecheck && pnpm --filter @atlas/core test
  • pnpm --filter @atlas/web typecheck && pnpm --filter @atlas/web test
  • Verify no references to committedSlots, pending_write_contract, or resolved_slots remain in source files

🤖 Generated with Claude Code

MaxLinCode and others added 2 commits March 26, 2026 22:34
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>
@vercel

vercel Bot commented Mar 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
atlas-web Error Error Mar 28, 2026 9:02pm

MaxLinCode and others added 2 commits March 27, 2026 15:12
…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>
@MaxLinCode
MaxLinCode merged commit c6cb566 into main Mar 28, 2026
1 of 2 checks passed
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