Repository navigation
test(agent-core): pin capsule load, host-call and audit guards at entry points - #89
Open
SaulBuilds wants to merge 1 commit into
Open
SaulBuilds wants to merge 1 commit into
SaulBuilds wants to merge 1 commit into
Conversation
…ir entry points Integration tests through the public API: - Capsule::from_archive / from_archive_verified / CapsuleDispatch::load_from_dir stop reading at the production decompression bound. - from_archive_verified refuses a validly signed capsule whose WIT imports sockets or filesystem the manifest denies. - a component whose start function never returns traps during instantiate once the epoch advances. - the eth-send host call hands the gate the calling manifest's risk tier and required roles. - AuditChain::verify_integrity rejects a forged role signature written to the sink directly; doctor::run rolls a skipped check up to Warn. - resolved wasmtime / wasmtime-wasi / wasmtime-wasi-io stay at or above the floor in agent/core/Cargo.toml (with a negative control). Each new test goes red when the guard it pins is reverted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGMeatV8UjtCB4CTbWuAv4
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.
Tests only. Pins existing guards at the runtime entry points (capsule load, host-call dispatch, audit read path, doctor roll-up) instead of only in helper modules. No production code changes.
New file
agent/core/tests/capsule_load_pins.rs:from_archive_stops_reading_at_the_decompression_bound,verified_load_stops_reading_at_the_decompression_bound,load_from_dir_refuses_an_over_cap_capsule_at_the_read: an archive that expands pastMAX_DECOMPRESSED_BYTESis refused at the read, through the production readers (the existing unit test used an explicit small cap).verified_load_refuses_a_wit_socket_import_the_manifest_denies,..._filesystem_import_...(+ controlverified_load_accepts_a_consistent_capsule): the WIT/manifest cross-check on the verified load path, using a capsule repacked and signed with a test key.a_runaway_start_function_traps_during_instantiate: a component whose corestartnever returns traps duringinstantiateonce the epoch advances (60 s hang verdict).eth_send_host_call_carries_the_manifest_tier_to_the_gate: the host function passes the manifest's tier and required roles to the approval gate.resolved_wasmtime_is_at_or_above_the_floor+ negative controlfloor_check_flags_an_old_wasmtime.New file
agent/core/tests/audit_doctor_pins.rs:verify_integrity_rejects_a_forged_signature_written_past_appenddoctor_report_with_a_skipped_check_is_not_a_passStandard: met
read_archive→ 3 load tests redfrom_archive_verified→ 2 redApprovalRequest→ tier test redverify_integrity→ forged-signature test redBefore this PR none of these reverts failed any test in the crate.
cargo +1.96.0 test -p citrate-agent-core: lib 334 passed (unchanged), new integration binaries 10 + 2 passed. Count 334 → 346.🤖 Generated with Claude Code
https://claude.ai/code/session_01KGMeatV8UjtCB4CTbWuAv4