Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ban-nondeterminism-allowlist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ std-process crates/warp-core/tests/external_action_protocol_tests.rs external-ac
std-env crates/warp-core/tests/bounded_workspace_observation_tests.rs bounded-observation filesystem fixture temp directory selection only.
std-fs crates/warp-core/tests/bounded_workspace_observation_tests.rs bounded-observation filesystem fixture I/O only.
std-process crates/warp-core/tests/bounded_workspace_observation_tests.rs bounded-observation filesystem fixture temp directory disambiguation only.
std-env crates/warp-core/tests/bounded_workspace_patch_tests.rs bounded-patch filesystem fixture temp directory selection only.
std-fs crates/warp-core/tests/bounded_workspace_patch_tests.rs bounded-patch filesystem fixture I/O only.
std-process crates/warp-core/tests/bounded_workspace_patch_tests.rs bounded-patch filesystem fixture temp directory disambiguation only.
std-fs crates/warp-core/tests/external_consumer_contract_fixture_tests.rs installed-contract restart WAL fixture I/O only.
std-fs crates/warp-core/tests/executable_operation_pipeline_tests.rs executable-operation restart WAL fixture I/O only.
std-fs crates/warp-core/tests/provider_contract_admission_tests.rs provider invocation restart WAL fixture I/O only.
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@

### Added

- Echo now consumes the exact independently verified Edict
`workspace.patch.applyValidated@1` request through a capability-rooted
single-file patch adapter. The request binds the prior bounded-observation
basis, replacement identity, exact writable aperture, immutable no-follow
and CI-workflow-exclusion policy, and byte budgets before mutation. The
adapter rejects stale bases, escaped or substituted paths, symlinks, special
files, and oversized writes without mutation; synchronizes a same-directory
atomic replacement; and settles the resulting basis and observed before/after
content identities before resumption. Claimed attempts reconcile by observing
only the exact postcondition or settling `OutcomeUnknown`, never by claiming
an unobserved pre-state or reapplying the patch. Identical settlement retry
and replay remain effect-free.
- Bounded workspace claims can now settle as `OutcomeUnknown` after directory
authority disappears. A rootless reconciliation handle retains only the
exact runtime-owned profile, revalidates the durable grant's exact claim
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ Echo owns:
- causal history, frontiers, and runtime coordinates;
- admission, scheduling, ticks, and settlement;
- receipts, witnesses, reading envelopes, and retained artifacts;
- bounded observation machinery;
- bounded observation and basis-bound external-action coordination;
- generic contract hosting and suffix import/export surfaces.

You own:
Expand Down
26 changes: 19 additions & 7 deletions crates/warp-core/src/external_action_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const CORE_DIGEST_DOMAIN: &str = "edict.core.module/v1";
const TARGET_IR_DIGEST_DOMAIN: &str = "edict.target-ir.artifact/v1";
const ECHO_TARGET_IR_DOMAIN: &str = "echo.span-ir/v1";
const ECHO_TARGET_PROFILE_COORDINATE: &str = "echo.dpo@1";
const EXTERNAL_REQUEST_OPERATION_PROFILE: &str = "continuum.profile.read-only/v1";
const COMPATIBILITY_READ_ONLY_REQUEST_PROFILE: &str = "continuum.profile.read-only/v1";
const EXTERNAL_REQUEST_OPERATION_PROFILE: &str = "continuum.profile.request-only/v1";
const RESOURCE_ID_DOMAIN: &[u8] = b"echo.external-action.resource-id/v1";
const TARGET_OPERATION_ID_DOMAIN: &[u8] = b"echo.external-action.target-operation-id/v1";
const INPUT_DIGEST_DOMAIN: &[u8] = b"echo.external-action.input/v1";
Expand All @@ -48,6 +49,9 @@ const OBSERVATION_REFUSAL_EVIDENCE_DOMAIN: &[u8] = b"echo.bounded-observation.re
const MAX_CORE_EVALUATION_STEPS_V1: u64 = 4_096;
const MAX_CORE_EVALUATION_ALLOCATED_BYTES_V1: u64 = 4 * 1_024 * 1_024;
const MAX_CORE_EVALUATION_OUTPUT_BYTES_V1: u64 = 1_024 * 1_024;
// Must continue to fit the pathless terminal obstruction asserted by the
// workspace-patch settlement-budget boundary test.
const MIN_REQUEST_ONLY_SETTLEMENT_BYTES_V1: u64 = 1_024;
Comment thread
coderabbitai[bot] marked this conversation as resolved.

/// One canonical Edict request admitted from exact Core and Target IR bytes.
#[derive(Clone, Debug, PartialEq, Eq)]
Expand Down Expand Up @@ -202,11 +206,12 @@ pub fn admit_edict_external_action_request_v1(
let intent = map_field(intents, intent_name)
.ok_or(EdictExternalActionAdmissionErrorV1::MissingIntent)?;
let intent_map = expect_map(intent)?;
require_text_field(
intent_map,
"operationProfile",
EXTERNAL_REQUEST_OPERATION_PROFILE,
)?;
let operation_profile = require_nonempty_text(intent_map, "operationProfile")?;
if operation_profile != EXTERNAL_REQUEST_OPERATION_PROFILE
&& operation_profile != COMPATIBILITY_READ_ONLY_REQUEST_PROFILE
{
return Err(EdictExternalActionAdmissionErrorV1::ArtifactShape);
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
if !expect_array(require_field(intent_map, "inputConstraints")?)?.is_empty()
|| !expect_array(require_field(intent_map, "requirements")?)?.is_empty()
{
Expand Down Expand Up @@ -274,7 +279,12 @@ pub fn admit_edict_external_action_request_v1(
if max_settlement_bytes > u64::try_from(bytes_type_max(settlement_type)?).unwrap_or(u64::MAX) {
return Err(EdictExternalActionAdmissionErrorV1::InvalidRuntimeValue);
}
if max_settlement_bytes < minimum_terminal_settlement_bytes_v1(basis_digest)? {
let minimum_settlement_bytes = if operation_profile == EXTERNAL_REQUEST_OPERATION_PROFILE {
MIN_REQUEST_ONLY_SETTLEMENT_BYTES_V1
} else {
minimum_terminal_settlement_bytes_v1(basis_digest)?
};
if max_settlement_bytes < minimum_settlement_bytes {
return Err(EdictExternalActionAdmissionErrorV1::InvalidRuntimeValue);
}

Expand Down Expand Up @@ -1075,6 +1085,8 @@ fn verify_target_derivation(
|| require_field(core_intent, "coreEvaluationBudget")?
!= require_field(target_intent, "coreEvaluationBudget")?
|| require_field(core_intent, "basis")? != require_field(target_intent, "basis")?
|| require_field(core_intent, "requiredOperationProfile")?
!= require_field(target_intent, "operationProfile")?
{
return Err(EdictExternalActionAdmissionErrorV1::TargetDerivationMismatch);
}
Expand Down
2 changes: 2 additions & 0 deletions crates/warp-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ mod tick_patch;
#[cfg(all(feature = "native_rule_bootstrap", feature = "trusted_runtime"))]
mod trusted_runtime_host;
mod tx;
#[cfg(not(target_arch = "wasm32"))]
pub mod validated_workspace_patch;
mod warp_state;
mod witness;
mod witnessed_suffix;
Expand Down
Loading
Loading