Skip to content

Evaluate package-declared typed application results - #701

Merged
flyingrobots merged 32 commits into
mainfrom
task/698-evaluate-typed-application-results
Jul 29, 2026
Merged

Evaluate package-declared typed application results#701
flyingrobots merged 32 commits into
mainfrom
task/698-evaluate-typed-application-results

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Admits compiler-declared result projections, evaluates them during scheduler-owned Tick construction, and retains exact canonical typed results through outcomes, Receipts, WAL recovery, and the schema-neutral runner report. Refreshes the independently reproduced generic provider components and checked package closure.

Validation: lowerer 12/12; verifier 8/8; warp-core 685/685; executable-operation integration 38/38; runner 9/9; provider corpus 82/82; frozen provider host green; affected Clippy lanes and pre-push hooks green. Standalone Hello Echo build and direct durable runner are green; its published matrix remains RED only on intentionally pinned predecessor artifact identities owned by hello-echo#18.

Closes #698.

@flyingrobots

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@flyingrobots

Copy link
Copy Markdown
Owner Author

@codex please review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds compiler-owned result projections to executable operations, including contract admission, lowerer/verifier binding, scheduler evaluation, canonical typed results, receipt/WAL retention, recovery validation, and durable runner reporting. Provider manifests, schemas, digests, fixtures, tests, and documentation are updated accordingly.

Changes

Result projection execution corridor

Layer / File(s) Summary
Projection contracts and provider wiring
crates/echo-wesley-gen/..., schemas/edict-provider/..., tests/edict-provider-host-v1/...
Adds the result-projection contract and domain, registers the auxiliary semantic input and schema binding, and updates provider package inventories, manifests, digests, and contract-pack tests.
Lowerer and verifier projection binding
crates/echo-edict-provider-lowerer/..., crates/echo-edict-provider-verifier/...
Validates bounded projection expressions against Target IR, lowers runtime expressions and paths, embeds application_result_projection in packages, and exposes the projection in verifier reports.
Projected invocation and durable scheduler evidence
crates/warp-core/...
Carries canonical application input, evaluates compiler-owned projections, binds typed results into identities and receipts, and validates result evidence during installation and recovery.
Canonical runner reporting and recovery
xtask/src/run_edict_operation.rs, xtask/tests/...
Canonicalizes operation input, validates projection references, reports typed result evidence, compares host and WAL recovery results, and adds corruption-rejection tests and fixtures.
Specifications and generated witness documentation
README.md, CHANGELOG.md, docs/..., component READMEs
Documents projection semantics, byte limits, provider closure updates, retained receipt/WAL evidence, and fail-closed recovery behavior.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

  • flyingrobots/echo#673 — Introduced the verifier component and related Target-IR validation path extended here.
  • flyingrobots/echo#683 — Established the executable-operation runtime corridor extended with projection evidence.
  • flyingrobots/echo#695 — Established the durable Edict-operation runner and recovery harness extended with projection reporting.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 55.23% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR implements canonical result projection admission, bounded scheduler evaluation, exact result binding, WAL recovery, and fail-closed checks.
Out of Scope Changes check ✅ Passed The docs, tests, and artifact refreshes support the result-projection flow and package verification; no unrelated changes stand out.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the core change: evaluating compiler-declared typed application results and preserving package-level evidence.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/698-evaluate-typed-application-results

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 20642dbf3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/echo-edict-provider-lowerer/src/executable_operation.rs Outdated
Comment thread crates/echo-edict-provider-lowerer/src/executable_operation.rs Outdated
Comment thread crates/warp-core/src/echo_operation.rs
Comment thread crates/warp-core/src/echo_operation.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Around line 21-23: Distinguish declared result limits from produced result
bytes across the three documentation sites: in CHANGELOG.md lines 21-23, replace
“compiler-declared result bytes” with “compiler-declared result ceiling”; in
README.md lines 290-291, state that the declared maximum result size is capped
before evaluation; and in
docs/adr/0025-scheduler-owned-executable-operation-actions.md lines 125-128,
clarify that the bound applies to the declared maximum while produced bytes are
checked during evaluation.

In `@crates/echo-edict-provider-lowerer/src/executable_operation.rs`:
- Around line 610-678: Carry the validated maxOutputBytes value through lowering
instead of discarding it. Store it as max_output_bytes on ResultProjectionPlan
in validate_result_projection, then emit that value as a dedicated field in
encode_package’s application_result_projection map so scheduler consumers can
enforce the bound without decoding artifact_bytes.

In `@crates/echo-edict-provider-verifier/src/executable_operation.rs`:
- Around line 684-689: Update the projection validation in the verifier and
lowerer around the required_u64 checks to reject maxOutputBytes values above
MAX_APPLICATION_RESULT_BYTES, matching validate_edict_result_projection. Also
reject configurations where nodeKeyField and replacementField resolve to the
same path, consistent with
EchoOperationApplicationResultProjectionV1::from_value, before accepting or
lowering the projection.

In `@crates/warp-core/src/echo_operation.rs`:
- Around line 6468-6480: Update hash_optional_application_result to emit the
same explicit absence/presence tag as the other optional hash helpers: write the
absence byte for None and retain the existing tagged identity and
canonical_bytes hashing for Some. Regenerate affected receipt and
terminal-outcome digest fixtures and retained WAL test evidence.
- Around line 1450-1472: Update same_projection_shape and the authored
EchoOperationResultExpressionShapeV1 representation to preserve source kind and
path instead of collapsing all sources to Source. Match ApplicationInputPath
only when its runtime path equals the authored applicationInput path, and
require CapabilityResult to match the lowered application_input_node_key_path
produced by the lowerer. Keep mismatched source kinds or paths invalid so the
runtime plan cannot bind to an unrelated projection identity.

In `@docs/topics/WAL.md`:
- Around line 340-341: Update the recovery wording in the WAL documentation to
say it “revalidates the retained evidence against the exact installed package
projection” rather than requiring evidence to reproduce under it. Preserve the
callback-free, evidence-based recovery contract and make clear that recovery
does not reevaluate the projection.

In `@tests/edict-provider-host-v1/tests/package_contract.rs`:
- Line 71: Add a direct identity assertion in the package contract test
alongside EXPECTED_SCHEMA_BINDING_COUNT, verifying the
edict.result-projection.artifact/v1 domain/root pair through the existing
schema-binding representation. Keep the count assertion unchanged so the test
validates both the total number of bindings and the presence of this specific
new binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7622eb9a-1734-4796-8f13-2a91ac7875c7

📥 Commits

Reviewing files that changed from the base of the PR and between 63482dc and 20642db.

⛔ Files ignored due to path filters (17)
  • Cargo.lock is excluded by !**/*.lock
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/components/lowerer.echo-dpo.component.wasm is excluded by !**/*.wasm
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/components/verifier.echo-dpo.component.wasm is excluded by !**/*.wasm
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/generated/evidence/provenance.provider-generation.json is excluded by !**/generated/**
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/generated/evidence/review.provider-generation.json is excluded by !**/generated/**
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/generated/primary/schema.echo-provider-artifacts.cddl is excluded by !**/generated/**
  • schemas/edict-provider/components/v1/lowerer.echo-dpo.component.wasm is excluded by !**/*.wasm
  • schemas/edict-provider/components/v1/verifier.echo-dpo.component.wasm is excluded by !**/*.wasm
  • schemas/edict-provider/generated/v1/evidence/provenance.provider-generation.json is excluded by !**/generated/**
  • schemas/edict-provider/generated/v1/evidence/review.provider-generation.json is excluded by !**/generated/**
  • schemas/edict-provider/generated/v1/primary/schema.echo-provider-artifacts.cddl is excluded by !**/generated/**
  • schemas/edict-provider/package/v1/components/lowerer.echo-dpo.component.wasm is excluded by !**/*.wasm
  • schemas/edict-provider/package/v1/components/verifier.echo-dpo.component.wasm is excluded by !**/*.wasm
  • schemas/edict-provider/package/v1/generated/evidence/provenance.provider-generation.json is excluded by !**/generated/**
  • schemas/edict-provider/package/v1/generated/evidence/review.provider-generation.json is excluded by !**/generated/**
  • schemas/edict-provider/package/v1/generated/primary/schema.echo-provider-artifacts.cddl is excluded by !**/generated/**
  • tests/edict-provider-host-v1/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (48)
  • CHANGELOG.md
  • README.md
  • crates/echo-edict-provider-lowerer/README.md
  • crates/echo-edict-provider-lowerer/src/executable_operation.rs
  • crates/echo-edict-provider-lowerer/src/lib.rs
  • crates/echo-edict-provider-lowerer/tests/executable_operation_package.rs
  • crates/echo-edict-provider-lowerer/tests/fixtures/generated_echo_dpo.rs
  • crates/echo-edict-provider-lowerer/tests/lowerer_contract.rs
  • crates/echo-edict-provider-verifier/README.md
  • crates/echo-edict-provider-verifier/src/executable_operation.rs
  • crates/echo-edict-provider-verifier/tests/executable_operation_package.rs
  • crates/echo-wesley-gen/README.md
  • crates/echo-wesley-gen/assets/v1/edict-provider/contracts/v1/edict-provider-contracts.cddl
  • crates/echo-wesley-gen/assets/v1/edict-provider/contracts/v1/manifest.json
  • crates/echo-wesley-gen/assets/v1/edict-provider/echo-provider-semantics-v1.json
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/provider-manifest.echo.json
  • crates/echo-wesley-gen/assets/v1/repository/Cargo.lock.source
  • crates/echo-wesley-gen/src/provider_artifacts.rs
  • crates/echo-wesley-gen/src/provider_contract_pack.rs
  • crates/echo-wesley-gen/src/provider_package.rs
  • crates/echo-wesley-gen/src/provider_semantics.rs
  • crates/echo-wesley-gen/tests/provider_contract_pack.rs
  • crates/echo-wesley-gen/tests/provider_package.rs
  • crates/echo-wesley-gen/tests/provider_package_corpus.rs
  • crates/echo-wesley-gen/tests/provider_semantic_source.rs
  • crates/warp-core/Cargo.toml
  • crates/warp-core/src/echo_operation.rs
  • crates/warp-core/src/lib.rs
  • docs/adr/0025-scheduler-owned-executable-operation-actions.md
  • docs/architecture/application-contract-hosting.md
  • docs/spec/scheduler-warp-core.md
  • docs/topics/GeneratedRules.md
  • docs/topics/WAL.md
  • schemas/edict-provider/README.md
  • schemas/edict-provider/components/v1/README.md
  • schemas/edict-provider/contracts/v1/README.md
  • schemas/edict-provider/contracts/v1/edict-provider-contracts.cddl
  • schemas/edict-provider/contracts/v1/manifest.json
  • schemas/edict-provider/echo-provider-semantics-v1.json
  • schemas/edict-provider/package/README.md
  • schemas/edict-provider/package/v1/provider-manifest.echo.json
  • tests/edict-provider-host-v1/tests/package_contract.rs
  • xtask/src/provider_lowerer_component.rs
  • xtask/src/run_edict_operation.rs
  • xtask/tests/fixtures/edict-operation/ORIGIN.toml
  • xtask/tests/fixtures/edict-operation/executable-operation-package.cbor
  • xtask/tests/fixtures/edict-operation/verification-report.cbor
  • xtask/tests/run_edict_operation.rs

Comment thread CHANGELOG.md Outdated
Comment thread crates/echo-edict-provider-lowerer/src/executable_operation.rs
Comment thread crates/echo-edict-provider-verifier/src/executable_operation.rs Outdated
Comment thread crates/warp-core/src/echo_operation.rs
Comment thread crates/warp-core/src/echo_operation.rs
Comment thread docs/topics/WAL.md Outdated
Comment thread tests/edict-provider-host-v1/tests/package_contract.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/echo-edict-provider-lowerer/src/executable_operation.rs`:
- Around line 540-550: Apply the existing projection-path text-byte bound to
both configuration-derived fields before constructing ProgramConfiguration:
reject oversized nodeKeyField and replacementField values in lowerer
executable_operation.rs#L540-L550, and apply the identical validation before
reconstructing the expected package in verifier
executable_operation.rs#L577-L587. Add boundary coverage for accepted and
rejected field-name lengths, preserving the existing empty-field and equality
checks.

In `@crates/warp-core/src/echo_operation.rs`:
- Around line 7266-7307: Update
runtime_projection_cannot_rebind_authored_source_kind_or_path to capture the
projection_test_package error and assert its refusal detail explicitly
identifies the authored/runtime source shape mismatch, matching the established
detail assertion used by the adjacent preflight test. Keep both cases and their
existing error expectation intact while preventing unrelated validation failures
from satisfying the test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9b57b396-190d-4a67-959b-0aaae1e4cc87

📥 Commits

Reviewing files that changed from the base of the PR and between 20642db and 2162024.

⛔ Files ignored due to path filters (6)
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/components/lowerer.echo-dpo.component.wasm is excluded by !**/*.wasm
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/components/verifier.echo-dpo.component.wasm is excluded by !**/*.wasm
  • schemas/edict-provider/components/v1/lowerer.echo-dpo.component.wasm is excluded by !**/*.wasm
  • schemas/edict-provider/components/v1/verifier.echo-dpo.component.wasm is excluded by !**/*.wasm
  • schemas/edict-provider/package/v1/components/lowerer.echo-dpo.component.wasm is excluded by !**/*.wasm
  • schemas/edict-provider/package/v1/components/verifier.echo-dpo.component.wasm is excluded by !**/*.wasm
📒 Files selected for processing (20)
  • CHANGELOG.md
  • README.md
  • crates/echo-edict-provider-lowerer/README.md
  • crates/echo-edict-provider-lowerer/src/executable_operation.rs
  • crates/echo-edict-provider-lowerer/tests/executable_operation_package.rs
  • crates/echo-edict-provider-verifier/README.md
  • crates/echo-edict-provider-verifier/src/executable_operation.rs
  • crates/echo-edict-provider-verifier/tests/executable_operation_package.rs
  • crates/echo-wesley-gen/assets/v1/edict-provider/package/v1/provider-manifest.echo.json
  • crates/echo-wesley-gen/tests/provider_package.rs
  • crates/echo-wesley-gen/tests/provider_package_corpus.rs
  • crates/warp-core/src/echo_operation.rs
  • crates/warp-core/src/trusted_runtime_host.rs
  • docs/adr/0025-scheduler-owned-executable-operation-actions.md
  • docs/topics/WAL.md
  • schemas/edict-provider/README.md
  • schemas/edict-provider/components/v1/README.md
  • schemas/edict-provider/package/v1/provider-manifest.echo.json
  • tests/edict-provider-host-v1/tests/package_contract.rs
  • xtask/src/provider_lowerer_component.rs

Comment thread crates/echo-edict-provider-lowerer/src/executable_operation.rs
Comment thread crates/warp-core/src/echo_operation.rs
@flyingrobots

Copy link
Copy Markdown
Owner Author

Merge gate open at 671124e: all current-head checks pass, zero bot-authored review threads remain unresolved, and the local affected suites, generators, frozen-host contract, linters, and pre-push gate are clean. The repository is solo-maintained by flyingrobots and main is not branch-protected, so criteria 1–4 substitute for a separate human approval. The standalone Hello Echo build and direct generic runner are green; hello-echo#18 owns the intentionally deferred consumer artifact-pin update.

@flyingrobots
flyingrobots merged commit 28d7a0f into main Jul 29, 2026
40 checks passed
@flyingrobots
flyingrobots deleted the task/698-evaluate-typed-application-results branch July 29, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate package-declared typed application results

1 participant