Repository navigation
feat(skills): pin a third-party skill with a source and a ledger that outranks the approvals file (#600) - #880
Merged
Merged
Conversation
…nd-only ledger tole skills approve takes --source-url, --registry-id and --pinned-sha, recorded as data only. Skill approve, revoke and draft promotion are appended to skill-ledger.jsonl before the approvals file; an approval the ledger contradicts is ignored at load, unrecorded approvals are reported once, an unreadable ledger fails startup, and a torn tail is repaired. tole skills revoke and tole skills drafts revoke are owner-only. Refs #600
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Nov 16, 2026
feat(plugins): tole plugin audit, a read-only report of locked plugins and pinned skills (#600)
#882
Merged
Closed
ajianaz
added a commit
that referenced
this pull request
Nov 17, 2026
…n the shared delegate dir at exit (#702) `delegation::delegate::tests::a_child_with_a_complete_report_settles_done_and_the_parent_sees_it_fenced` failed once on CI (PR #880, `no-mcp profile`): the stand-in child wrote `env > file` in place, a CI runner's environment is over 4 KiB so `env` wrote it in several chunks, and the test read a prefix. fake_reporter and the discussion reviewer_bin now write argv and env to a temporary name and rename them into place, as fake_tole already did (#828). The tole-cli lib tests also leave a shared-delegate-data-<pid>-<hex> directory per run; an atexit hook now removes the process's own directory (the start-up sweep stays for killed runs). The failure could not be reproduced locally; the fix rests on the CI log and code reading. Tests only; no production code changed. #712 and #738 were not reproduced in 100 to 300 stress runs and are left alone. Refs #702, #712, #738.
This was referenced Nov 17, 2026
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.
What
Slice 3a of #600: third-party skills are pinned by approved hash with a stated source, and every skill approve, revoke and draft promotion is recorded in a new append-only ledger that outranks the approvals file.
tole plugin auditfollows as slice 3b.Why
A skill is followed, so the trust anchor is the owner's approval of exact bytes (skills design 4.2). The approvals file was a plain replaceable JSON with no history: a hand-edited file could bring back a skill the owner revoked, and nothing recorded where a third-party skill came from. The plugin side already has an append-only ledger that wins over the lock; this gives skills the same discipline. The MCP Registry namespace check is skipped by the owner, and the uteke registry fetch is not built (see #878): the source is recorded as data only.
Changes
tole skills approvetakes--source-url,--registry-idand--pinned-sha(40 or 64 lowercase hex). Validated for shape, stored in the approval and the ledger, never fetched or verified.skill-ledger.jsonlnext toskill-approvals.json.approve,revokeand draft promotion/revoke append before the approvals file is written, so a crash leaves a skill unapproved, never approved without a record.tole skills revokeandtole skills drafts revokeare now owner-only (both added to the owner-only e2e).tole_core::skill_approval::Approvalgains asourcefield (external struct literals must add it).Approvals::approveis unchanged; new pub items areSource,ledger_line,read_ledger,check_against_ledger,ledger_history,LedgerCheck,LEDGER_FILE,MAX_LEDGER_BYTESandApprovals::approve_from.Approvalis only constructed inApprovals::approve_from;SkillsAction::Approvehas no other match site; draft promotion and draft revoke (skill/drafts.rs) also write approvals and would have been blocked by the ledger, so they now append ledger lines.docs/epics.mdand a new section indocs/third-party-plugins-design.md.Testing
load_checkedfailsa_hand_edited_approvals_file_cannot_undo_a_ledger_revoke; disabling the torn-tail repair and the unrecorded note each failunrecorded_approvals_are_reported_a_torn_tail_is_repaired_and_notes_stay_one_line; removing the two revoke guards failsowner_only_subcommands_refuse_under_a_session_and_write_nothing; skipping the ledger write on draft promotion failsrevoke_rejects_pending_drafts_and_withdraws_what_was_promoted.a_pinned_skill_keeps_its_source_and_the_ledger_outranks_the_approvals_fileapproves with a source, checks the ledger has no skill text, runs with the skill, swaps SKILL.md and sees it refused, revokes, restores the approvals file by hand and sees it still refused, and checks the ledger is exactly two lines.-D warnings(workspace all features; core, cli and tui--no-default-features; cli shell-tools-only),cargo check -p tole-core --no-default-features --tests, andcargo testwithTOLE_REQUIRE_BWRAP=1 --no-fail-fastin default,--no-default-featuresand shell-tools-only profiles: green. Theskill::tests were re-run in all three profiles after one last test-only fix.skill_approval_e2e,owner_only_e2eandcargo check -p tole-core --no-default-features --testsitself: all green. CI: all checks green and Cora Review "No issues found" on the final head; the one failure seen (no-mcp profile,delegation::delegate::tests::a_child_with_a_complete_report_settles_done_and_the_parent_sees_it_fenced, delegation code this PR does not touch) passed on re-run.tole plugin auditfollows as slice 3b.