feat(sec-core): add runtime activation resolver#826
Open
1570005763 wants to merge 2 commits into
Open
Conversation
5e91d74 to
f238f11
Compare
f238f11 to
8cd5015
Compare
edonyzpc
reviewed
Jun 11, 2026
edonyzpc
reviewed
Jun 11, 2026
edonyzpc
reviewed
Jun 11, 2026
8cd5015 to
ea1af0e
Compare
edonyzpc
reviewed
Jun 11, 2026
edonyzpc
requested changes
Jun 11, 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.
Description
Add the Skill Ledger runtime activation resolver as a staged foundation for the next daemon-mode implementation.
This PR introduces the core resolver that evaluates local Skill Ledger version history and writes a minimal runtime activation record to
.skill-meta/activation.json:{ "schemaVersion": 1, "target": ".skill-meta/versions/v000002.snapshot" }If there is no trusted runtime snapshot,
targetis written asnull. The same activation contract is also written best-effort to the skill directory xattruser.agent_sec.skill_ledger.activationwhen the platform/filesystem supports xattrs.Key behavior:
checkis now read-only: it reportsnonefor unscanned skills and does not create baseline manifests or snapshots.scan,certify, andinitbaseline remain responsible for creating signed versions and snapshots.scanStatus=passversions with intact snapshots.target: null.audit --verify-snapshotsuses the same stricter snapshot verification semantics..skill-meta/activation.jsonwrites.resolveCLI is exposed in this PR. The next stage is daemon mode, which will call the internal resolver directly when it decides to refresh activation.Related Issue
no-issue: staged Skill Ledger daemon groundwork does not have a public tracking issue yet.
Type of Change
Scope
cosh(copilot-shell)sec-core(agent-sec-core)skill(os-skills)sight(agentsight)tokenless(tokenless)ckpt(ws-ckpt)memory(agent-memory)anolisa(anolisa-cli)Checklist
cosh: Lint passes, type check passes, and tests passsec-core(Rust):cargo clippy -- -D warningsandcargo fmt --checkpasssec-core(Python):make python-code-pretty,git diff --check, and pytest passskill: Skill directory structure is valid and shell scripts pass syntax checksight:cargo clippy -- -D warningsandcargo fmt --checkpasstokenless:cargo clippy -- -D warningsandcargo fmt --checkpassmemory(Linux only):cargo clippy --all-targets -- -D warnings,cargo fmt --check, andcargo testpasspackage-lock.json/Cargo.lock)Testing
Ran under
src/agent-sec-core:make python-code-pretty git diff --check PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 agent-sec-cli/.venv/bin/pytest -q -p pytest_cov.plugin -p no:cacheprovider tests/unit-test/skill_ledger tests/integration-test/skill-ledger/test_skill_ledger_integration.py PATH="$PWD/agent-sec-cli/.venv/bin:$PATH" PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 agent-sec-cli/.venv/bin/pytest -q -p pytest_cov.plugin -p no:cacheprovider tests/e2e/skill-ledger/e2e_test.pyResults:
make python-code-pretty: pass, no further formatting changesgit diff --check: pass197 passed, 2 subtests passed1 passedAdditional Notes
activation.jsonintentionally remains minimal: onlyschemaVersionandtargetare part of the staged runtime record.