crm-cleanup 0.2.1: execute decided updates through a sealed CRM transport - #411
Open
antheducation wants to merge 18 commits into
Open
crm-cleanup 0.2.1: execute decided updates through a sealed CRM transport#411antheducation wants to merge 18 commits into
antheducation wants to merge 18 commits into
Conversation
…nsport (SKILL.md)
…nsport (crm-cleanup.mjs)
… journeys (X.yaml)
…ess (crm-cleanup.mjs)
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.
crm-cleanup 0.2.1: the cleanup executes its writes
The 0.1.0 package reconciles a transcript against pasted records and returns a proposal object with
write_performed: false; nothing downstream consumes it, so the CRM never changes. This PR evolves the skill so the run itself completes the loop: read the current records from a real source, decide deterministically, and execute the decided updates through a transport that seals before/after evidence bound to the decision digests.What changed
fetch-sourcereads the source handle's https URL through nativeweb.fetchunder a caller-supplied host allowlist; pasted record payloads are no longer accepted as a source.normalize-recordsvalidates the fetch (status, truncation, allowlist decision) and seals the working record set with its origin (kind,ref,count).decideenforces the reconciliation draft deterministically: target record must exist in the set that was read, the field must be insidecrm_schema.allowed_fields, the evidence quote must appear verbatim in the transcript, and the value must be non-empty. Any unsupported proposal refuses the whole write set.execute-writesalways runs. On an apply decision it drift-checks everyfromvalue against the records that were read, applies the updates, and seals{executed: true, write_ref, applied, before, after}bound to the transcript and records digests. On no-op or refusal it seals{executed: false}so the absence of a write is itself evidence.finalizeasserts the transport result matches the decision before sealingrunx.crm_cleanup_result.v1.Evidence
run_reconcile_293cc47646262c74, root receiptsha256:f35d7d879696d86552ce85d9ca8de5356a0b27889d4f1b48aa5fa32e71e7cae5, receipt tree of 9 verified valid. The run fetched https://raw.githubusercontent.com/antheducation/runx/crm-cleanup-executed-writes/harness-data/crm-records-globex.json live, applied two allowlisted, quote-traced updates, and sealed the before/after write result.Harness fixtures fetch pinned JSON files from this branch's
harness-data/directory; each case also declarescaller.http_responseswith identical bytes so harness runners without egress replay the same read deterministically.🤖 Generated with Claude Code
https://claude.ai/code/session_01WYXNBgyhBMg6rASyd4nwhN