Skip to content

Settle retained worker feedback without replaying execution - #61

Merged
ancongui merged 1 commit into
mainfrom
fix/known-worker-completion-settlement
Oct 25, 2026
Merged

ancongui merged 1 commit into
mainfrom
fix/known-worker-completion-settlement

Conversation

@ancongui

Copy link
Copy Markdown
Contributor

A worker can finish its model calls, retain valid feedback, and pause for factory-owned verification while an earlier completion hold still blocks resumption. Repeating the model call would duplicate execution and lose the relationship to the original result.

Add an explicit native settlement API. A candidate verifies the complete intent, checkpoint, response and consume chain against the current run, model, task, source and operator. A confirmed request appends an immutable completion receipt and updates only the corresponding hold projection in one transaction. The receipt preserves the original hold. It grants no new execution, tool call, budget, resume or Git action.

The API rejects unknown outcomes, incomplete custody, changed authority and unsupported restored custody. Every returned receipt is screened against current credentials. The contract covers stored typed WorkerFeedback; ordinary reports without feedback require a separate producer integration and are documented as unsupported here.

Validation: 87 focused host tests; four controlled PostgreSQL cases pass, including atomic rollback, competing requests, revoked access and unknown outcomes. These use controlled provider responses and do not establish live CRM acceptance. The first PostgreSQL run exposed an incorrect split-worker fixture; that failure is retained, and the successor uses the existing combined-owner fixture pattern. The complete publication source matches the tested successor. Ruff, mypy, strict documentation, package contents and isolated import smoke pass. Full hosted CI is pending.

@ancongui
ancongui merged commit b2e6f95 into main Oct 25, 2026
7 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