Skip to content

Declare typed external action requests - #175

Merged
flyingrobots merged 11 commits into
mainfrom
task/172-typed-external-action-requests
Jul 29, 2026
Merged

Declare typed external action requests#175
flyingrobots merged 11 commits into
mainfrom
task/172-typed-external-action-requests

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Closes #172.

Plain-English Walkthrough

TL;DR

Edict can now compile a digest-locked, domain-specific external-action request into canonical Core and Target IR data without performing the action or granting a provider import. Echo admission and settlement execution remain downstream work.

Walkthrough

flowchart LR
  S[Edict request source] --> C[Typed Core request]
  C --> T[Capability-closed Target IR]
  T --> R[Echo admission and settlement]
  C -. no callable import .-> P[Provider seam]
Loading
  1. [VERIFIED, HIGH] Source authority is explicit. use capability supplies an exact digest-locked operation resource. Request construction type-checks settlement, schemas, input, authority scope, basis, and budgets; admission uses a case-insensitive domain allowlist rather than ambient authority. (crates/edict-syntax/src/compiler.rs#L863-L958@6bb6552929f75768fa5815c53a8c56524ec469a0, crates/edict-syntax/src/compiler.rs#L2185-L2191@6bb6552929f75768fa5815c53a8c56524ec469a0)
  2. [VERIFIED, HIGH] Lowering preserves request data without creating an intrinsic. External requests enter a dedicated Target IR collection with deterministic identity; ordinary target steps remain separate. (crates/edict-syntax/src/target_ir.rs#L610-L641@6bb6552929f75768fa5815c53a8c56524ec469a0)
  3. [VERIFIED, HIGH] Capability closure and request identity fail closed. Canonical Target IR requires exact capability closure, nonempty resources, and unique per-intent request ids before bytes exist. (crates/edict-syntax/src/canonical.rs#L496-L531@6bb6552929f75768fa5815c53a8c56524ec469a0, crates/edict-syntax/src/canonical.rs#L616-L653@6bb6552929f75768fa5815c53a8c56524ec469a0)
  4. [VERIFIED, HIGH] Public review projection exposes the complete boundary. CLI review JSON includes capability closure and every Core/Target request field as structured data, not execution authority. (crates/edict-cli/src/main.rs#L1257-L1300@6bb6552929f75768fa5815c53a8c56524ec469a0, crates/edict-cli/src/main.rs#L1345-L1364@6bb6552929f75768fa5815c53a8c56524ec469a0)
  5. [VERIFIED, HIGH] The negative envelope is executable. Tests prove non-callability, exact closure, empty-resource and duplicate-id refusal, ambient-family rejection, Core and Target mutation sensitivity, a fixed-seed corpus, and a bounded 64-request stress module. (crates/edict-syntax/tests/external_action_requests.rs#L187-L277@6bb6552929f75768fa5815c53a8c56524ec469a0, crates/edict-syntax/tests/external_action_requests.rs#L279-L447@6bb6552929f75768fa5815c53a8c56524ec469a0, crates/edict-syntax/tests/external_action_requests.rs#L470-L523@6bb6552929f75768fa5815c53a8c56524ec469a0)
  6. [SCOPED, HIGH] Runtime settlement is not claimed. This Edict slice owns deterministic request construction and explicit awaiting posture. Echo and Hello Effect own admission, adapter execution, settlement, recovery, and replay. (docs/topics/external-action-requests/README.md#L86-L101@6bb6552929f75768fa5815c53a8c56524ec469a0)
Validation and citations
  • cargo xtask verify
    • cargo fmt --all --check
    • workspace Clippy with -D warnings
    • all workspace tests and four doctests
    • 13 CLI golden cases
    • five provider-component fixtures
    • provider contract-pack check
    • provider runtime dependency boundary
    • 25 topic shelves
    • git diff --check origin/main...HEAD
  • Core, Target IR, and provider contract artifacts were regenerated only through their owning xtask commands and then passed check mode.
  • The public contract and non-goals are recorded in docs/topics/external-action-requests/README.md#L1-L104@6bb6552929f75768fa5815c53a8c56524ec469a0.

@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
✅ 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

Review Change Stack

Summary by CodeRabbit

  • New Features

    • Added typed external-action requests that preserve operation, schema, authority, budget, and reconciliation details through Core and Target IR.
    • Added digest-locked capability imports and request syntax with validation for supported operation families.
    • CLI review output now displays external requests as structured, non-callable data awaiting settlement.
    • Added capability closure tracking and canonical encoding support.
  • Documentation

    • Added comprehensive language, architecture, provider, Target IR, and external-request documentation and test plans.
  • Bug Fixes

    • Added fail-closed validation for missing capabilities, invalid digests, unsupported ambient operations, and altered request identity data.

Walkthrough

Adds typed external-action request syntax and capability imports, lowers requests into non-callable Core and Target IR data, enforces digest-locked capability closure during canonical encoding, exposes review JSON, updates schemas and documentation, and adds determinism, authority, closure, and bounded-stress tests.

Changes

Typed external-action request pipeline

Layer / File(s) Summary
Source syntax and IR lowering
crates/edict-syntax/src/{ast,parser,semantic,compiler,core_ir,target_ir,result_projection}.rs
Capability imports and request statements now produce typed external-action request nodes, with recursive typing, digest validation, ambient-family rejection, capability closure tracking, and non-callable Target IR lowering.
Canonical encoding and contracts
crates/edict-syntax/src/{canonical,contract_bundle}.rs, docs/abi/*, fixtures/provider-contracts/v1/*
Core and Target IR canonical encoders serialize request data and reject missing capability bindings; schemas and contract corroboration cover capabilities, request arrays, budgets, and settlement posture.
Projection and validation
crates/edict-cli/*, crates/edict-syntax/tests/*, crates/edict-provider-schema/tests/*
CLI review output exposes request data and capabilities, while tests cover closure enforcement, rejected authority families, reproducibility, identity sensitivity, projection, and bounded request collections.
Specification and documentation
ARCHITECTURE.md, README.md, ROADMAP.md, docs/*, CHANGELOG.md
Language, architecture, roadmap, requirements, topic documentation, provider boundaries, and deferred admission/resumption responsibilities describe the new request behavior.

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

Possibly related issues

  • flyingrobots/echo issue 694 — Defines the durable request/settlement protocol that consumes Edict’s typed request representation.

Possibly related PRs

  • flyingrobots/edict#9 — Introduced the parser scaffolding extended here with capability imports and request statements.
  • flyingrobots/edict#67 — Established the Target IR lowering surface extended here with request collections and capability closure.
  • flyingrobots/edict#108 — Added Target IR canonical encoding framing used by the new external-request encoding.

Poem

A request takes shape, digest-bound and bright,
Through Core it travels, non-callable in flight.
Target steps stay empty; closures guard the door,
Canonical bytes remember every field in store.
Settlement waits, while Echo holds the key—
Typed little promises, deterministic as can be.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.59% 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 changes satisfy #172: syntax, Core/Target IR, deterministic lowering, closure checks, and rejection tests are all present.
Out of Scope Changes check ✅ Passed I see no clearly unrelated changes; the docs, tests, and fixture updates all support the same feature.
Title check ✅ Passed The title clearly summarizes the main change: adding typed external action requests.
Description check ✅ Passed The description is directly about the changeset and accurately describes the new request flow and downstream scope.

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: 76e9f37527

ℹ️ 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/edict-syntax/src/canonical.rs
Comment thread crates/edict-syntax/src/canonical.rs
Comment thread crates/edict-syntax/src/parser.rs
Comment thread crates/edict-syntax/src/compiler.rs

@coderabbitai coderabbitai 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.

Actionable comments posted: 15

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/edict-syntax/src/canonical.rs (1)

588-620: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract a shared helper for lawpack/capability resource-set handling. Both sites hand-roll the same "lawpacks vs capabilities" logic side-by-side — one root cause: no reusable abstraction for digest-locked resource-set dedupe/compare, so the pattern get copy-pasted every time a second resource kind (capabilities) is bolted onto the first (lawpacks).

  • crates/edict-syntax/src/canonical.rs#L588-L620: extract the dedupe+conflict-detect loop (BTreeMap<&str, &ResourceRef> build + conflict error) into a helper taking (&[ResourceRef], field_name) and call it once for lawpacks and once for capabilities.
  • crates/edict-syntax/src/contract_bundle.rs#L606-L640: extract the "compare canonical_resource_set(actual.X) vs expected.X, error with field name" pattern into a helper parameterized by field name, and call it once for lawpacks and once for capabilities in both match arms.
🤖 Prompt for 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.

In `@crates/edict-syntax/src/canonical.rs` around lines 588 - 620, Extract
reusable resource-set helpers: in crates/edict-syntax/src/canonical.rs lines
588-620, move the BTreeMap deduplication and conflicting-resource validation
into a helper accepting a ResourceRef slice and field name, then use it for both
lawpacks and capabilities; in crates/edict-syntax/src/contract_bundle.rs lines
606-640, extract the canonical_resource_set comparison and field-specific error
handling into a field-name-parameterized helper and invoke it for lawpacks and
capabilities in both match arms.
🤖 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 `@ARCHITECTURE.md`:
- Line 176: Update the architecture flow around “typed external-action request
data” so it is shown as part of Core IR rather than as a separate post-Core-IR
artifact. Align the diagram with the existing module map by documenting the
sequence as Core IR including typed external-action request data, followed by
canonical Core bytes.

In `@crates/edict-syntax/src/compiler.rs`:
- Around line 2140-2147: The ambient operation gate in ambient_operation_family
must enforce the registry’s guarantee: normalize the root segment
case-insensitively, replace the denylist with an explicit allowlist of
requestable operation families, and add a dedicated CompilerErrorKind for
refusals so tests can assert the stable kind. In docs/REQUIREMENTS.md at line
70, retain status: impl only after the allowlist, error kind, and executable
negative evidence exist; otherwise downgrade the status and record the residual
ambient-coverage gap in the owning topic shelf’s test-plan.md.
- Around line 1661-1674: Update the Stmt::ExternalActionRequest arm to
accumulate results with a mutable accepted flag and &= for every
check_known_effect_profiles call, matching the sibling Stmt::If and Stmt::For
arms. Ensure operation, authority_scope, basis, max_settlement_bytes, and
max_attempts are all checked so diagnostics are not short-circuited.
- Line 286: Remove the unused _errors: &mut Vec<CompilerError> parameter from
resolve_imports, then update its sole call site to pass only the imports
argument. Do not add replacement validation or error handling.
- Around line 994-1013: Update the capability lookup in
check_external_action_operation() to require the import’s digest-lock predicate
in addition to CoreImportKind::Capability and the matching alias. Reuse the
existing digest predicate used by canonical Core lowering so capability imports
without a digest fall through to the MissingContextFact error instead of
producing an operation_resource.

In `@crates/edict-syntax/src/parser.rs`:
- Around line 964-969: In the external-action request validation around
is_call_expr, replace ParseErrorKind::NonCallEffect with a new dedicated
ParseErrorKind for non-call request operations. Define the new kind alongside
the existing parse error kinds and assign it its own stable diagnostic code,
preserving the current error message and validation behavior.

In `@crates/edict-syntax/src/target_ir.rs`:
- Around line 635-666: Update the ExternalActionRequest branch in lower_node to
record the produced request binding in state.step_outputs as well as
state.external_action_requests, so require arms can resolve it. Remove the
redundant step_outputs insertion from the Effect arm, since lower_effect_node
does not reliably create these steps. Preserve the existing request construction
and binding validation behavior.
- Around line 403-438: Extract the duplicated digest-lock and
coordinate-conflict validation from the lawpack and capability-import loops into
a shared helper near the target-lowering logic. Have both loops invoke the
helper while preserving their respective maps and failure-kind/label behavior,
including existing error details and insertion semantics.

In `@crates/edict-syntax/tests/external_action_requests.rs`:
- Around line 85-95: Add an alternate value for maxAttempts to the ObserveInput
fixture type and use it in the mutation cases exercised by
every_request_authority_field_moves_core_identity. Ensure the maxAttempts
mutation changes only that field while preserving the test’s existing coverage
pattern for the other authority fields.

In `@docs/REQUIREMENTS.md`:
- Line 70: Update the EDICT-LANG-EXTERNAL-REQUEST-001 row in
docs/REQUIREMENTS.md so its positive and negative fixture cells identify
distinct evidence, naming the specific negative test functions or a separate
negative artifact for missing-closure and ambient-family rejection. Because the
requirement has hash-significant Core and Target encoding behavior, add the
appropriate generated CBOR golden artifact and checksum reference consistent
with neighboring hash-impacting rows.

In `@docs/topics/cli/test-plan.md`:
- Line 102: Correct the CLI-TP-029 test-plan entry to match the assertions in
project_exposes_external_requests_as_non_callable_review_data: describe only the
verified Core/Target IR fields, including node kind, operation and closure
coordinates, awaitingSettlement state, and zero steps. Do not claim a complete
request payload unless the cited test is expanded to assert the additional
projected fields.

In `@docs/topics/external-action-requests/README.md`:
- Around line 71-74: Update the authority allowlist terminology in the external
action requests documentation to use the canonical `Git` and `GitHub`
operation-family names instead of lowercase `git` and `github`, while preserving
the surrounding rejection rules unchanged.

In `@docs/topics/external-action-requests/test-plan.md`:
- Line 57: Update the EXTREQ-TP-006 mutation-sensitivity test plan entry and its
referenced every_request_authority_field_moves_core_identity coverage to assert
Target IR canonical bytes or digests for every listed mutation, in addition to
Core identity, so target encoding changes are detected.

In `@docs/topics/providers/README.md`:
- Around line 131-134: Clarify the provider-boundary paragraph around “use
capability” declarations and Core external-action request nodes: describe
capability declarations as digest-locked module-import closure resources, and
reserve “canonical request data” and request fields for the Core request nodes.
Preserve the statement that neither becomes component imports, host functions,
or provider-owned execution authority.

In `@docs/topics/target-ir/test-plan.md`:
- Line 109: Update the TP-035 entry in the test plan to remove TIR-REQ-006 from
its requirements mapping while retaining TIR-REQ-001, TIR-REQ-008, and
TIR-REQ-017. Keep the existing behavioral evidence and the Notes boundary
statement unchanged, since the policy non-goal is not established by these test
functions.

---

Outside diff comments:
In `@crates/edict-syntax/src/canonical.rs`:
- Around line 588-620: Extract reusable resource-set helpers: in
crates/edict-syntax/src/canonical.rs lines 588-620, move the BTreeMap
deduplication and conflicting-resource validation into a helper accepting a
ResourceRef slice and field name, then use it for both lawpacks and
capabilities; in crates/edict-syntax/src/contract_bundle.rs lines 606-640,
extract the canonical_resource_set comparison and field-specific error handling
into a field-name-parameterized helper and invoke it for lawpacks and
capabilities in both match arms.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3d13a243-baf3-460a-88ee-59150b61d20c

📥 Commits

Reviewing files that changed from the base of the PR and between 21c4400 and 76e9f37.

📒 Files selected for processing (39)
  • ARCHITECTURE.md
  • CHANGELOG.md
  • README.md
  • ROADMAP.md
  • crates/edict-cli/src/main.rs
  • crates/edict-cli/tests/jsonl_cli.rs
  • crates/edict-provider-schema/tests/provider_contract_pack.rs
  • crates/edict-syntax/src/ast.rs
  • crates/edict-syntax/src/canonical.rs
  • crates/edict-syntax/src/compiler.rs
  • crates/edict-syntax/src/contract_bundle.rs
  • crates/edict-syntax/src/core_ir.rs
  • crates/edict-syntax/src/lib.rs
  • crates/edict-syntax/src/parser.rs
  • crates/edict-syntax/src/result_projection.rs
  • crates/edict-syntax/src/semantic.rs
  • crates/edict-syntax/src/target_ir.rs
  • crates/edict-syntax/tests/contract_bundle.rs
  • crates/edict-syntax/tests/external_action_requests.rs
  • crates/edict-syntax/tests/parse_review_regressions.rs
  • docs/REQUIREMENTS.md
  • docs/SPEC_edict-language-v1.md
  • docs/abi/edict-core.cddl
  • docs/abi/edict-target-ir.cddl
  • docs/topics/README.md
  • docs/topics/cli/test-plan.md
  • docs/topics/contract-bundles/test-plan.md
  • docs/topics/core-ir/README.md
  • docs/topics/core-ir/test-plan.md
  • docs/topics/external-action-requests/README.md
  • docs/topics/external-action-requests/test-plan.md
  • docs/topics/providers/README.md
  • docs/topics/providers/test-plan.md
  • docs/topics/syntax/README.md
  • docs/topics/syntax/test-plan.md
  • docs/topics/target-ir/README.md
  • docs/topics/target-ir/test-plan.md
  • fixtures/provider-contracts/v1/edict-provider-contracts.cddl
  • fixtures/provider-contracts/v1/manifest.json
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: rust msrv 1.94.0 (fmt · clippy · test)
  • GitHub Check: supply-chain (cargo-deny)
  • GitHub Check: rust stable (fmt · clippy · test)
🧰 Additional context used
📓 Path-based instructions (6)
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Never amend Git commits, use git rebase without explicit user approval, or force any Git operation; use new commits and regular merge commits instead.
Do not create draft pull requests, and never use a codex prefix in branch names, pull request titles, or commit messages.
Pull requests for issue work must include GitHub auto-close text such as Closes #123`` for every issue they intend to close.
Use codex-think --remember --json when starting a session, entering the repository, or regaining context, and record significant durable events with `codex-think "..." --json`. Treat Think as memory rather than repository truth.
Every pull request body must contain `## Plain-English Walkthrough` with `### TL;DR` and `### Walkthrough`, explaining the prior behavior, new model and dataflow, invariants, failures, compatibility, and verification as applicable.
Use Mermaid diagrams for nontrivial flow, lifecycle, ownership, or component interaction when clearer than prose; every diagram requires an introductory paragraph, the diagram, the exact collapsed caption structure, and a concluding interpretation.
Tag each material technical claim at first occurrence as `[claim:, confidence:]`, cite evidence using repository-relative paths, line numbers, and Git SHAs, and end the explanatory body with a collapsed citations appendix.
If CodeRabbit is actively reviewing, obtain its approval before merge; if unavailable due to limits or credits, request `@codex review please` and wait for the alternate response. Do not treat unavailability as approval unless a maintainer explicitly overrides the gate.
For release preparation, write the release thesis first, reconcile changes from the previous tag, update release policy and tests, verify the milestone has no open issues and no unauthorized crates.io publication occurred, and record a durable release report.
Run `cargo xtask verify` before claiming a branch is ready.

Files:

  • docs/topics/core-ir/test-plan.md
  • docs/topics/README.md
  • docs/REQUIREMENTS.md
  • docs/topics/providers/README.md
  • README.md
  • ROADMAP.md
  • fixtures/provider-contracts/v1/manifest.json
  • docs/topics/providers/test-plan.md
  • crates/edict-syntax/tests/contract_bundle.rs
  • crates/edict-syntax/src/semantic.rs
  • crates/edict-syntax/tests/parse_review_regressions.rs
  • docs/topics/external-action-requests/test-plan.md
  • crates/edict-syntax/src/lib.rs
  • docs/topics/cli/test-plan.md
  • docs/topics/syntax/README.md
  • docs/topics/target-ir/test-plan.md
  • ARCHITECTURE.md
  • crates/edict-syntax/src/contract_bundle.rs
  • docs/abi/edict-target-ir.cddl
  • docs/topics/external-action-requests/README.md
  • docs/topics/contract-bundles/test-plan.md
  • docs/topics/syntax/test-plan.md
  • docs/topics/target-ir/README.md
  • docs/topics/core-ir/README.md
  • docs/abi/edict-core.cddl
  • crates/edict-cli/tests/jsonl_cli.rs
  • crates/edict-cli/src/main.rs
  • docs/SPEC_edict-language-v1.md
  • CHANGELOG.md
  • fixtures/provider-contracts/v1/edict-provider-contracts.cddl
  • crates/edict-syntax/src/ast.rs
  • crates/edict-syntax/src/target_ir.rs
  • crates/edict-syntax/src/core_ir.rs
  • crates/edict-syntax/src/canonical.rs
  • crates/edict-syntax/src/parser.rs
  • crates/edict-provider-schema/tests/provider_contract_pack.rs
  • crates/edict-syntax/src/compiler.rs
  • crates/edict-syntax/src/result_projection.rs
  • crates/edict-syntax/tests/external_action_requests.rs
docs/topics/**

📄 CodeRabbit inference engine (AGENTS.md)

docs/topics/**: Topic shelves document landed behavior: README.md describes current HEAD truth, test-plan.md records verification and known gaps, and optional architecture or rationale pages contain durable supporting information.
For every nontrivial behavior, contract, workflow, release, schema, validation, or public-surface change, identify or create the owning topic shelf, update test-plan.md, add executable evidence, update README.md only after behavior exists, and run cargo xtask verify.
Do not update topic shelves for purely mechanical edits that do not change a contract; explain the omission in the pull request or final report.

Files:

  • docs/topics/core-ir/test-plan.md
  • docs/topics/README.md
  • docs/topics/providers/README.md
  • docs/topics/providers/test-plan.md
  • docs/topics/external-action-requests/test-plan.md
  • docs/topics/cli/test-plan.md
  • docs/topics/syntax/README.md
  • docs/topics/target-ir/test-plan.md
  • docs/topics/external-action-requests/README.md
  • docs/topics/contract-bundles/test-plan.md
  • docs/topics/syntax/test-plan.md
  • docs/topics/target-ir/README.md
  • docs/topics/core-ir/README.md
**/*.{rs,md}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,md}: Tests must assert software behavior and stable error kinds or structured artifacts, not implementation details, prose, paths, or merely is_err(); documentation-tool tests may test validator behavior.
For nontrivial behavior, contract, workflow, release, schema, validation, or public-surface changes, follow RED/GREEN TDD: update the owning test-plan.md, write the deterministic test first, observe the RED failure, implement the smallest coherent fix, then mark the case implemented only after executable evidence exists.

Files:

  • docs/topics/core-ir/test-plan.md
  • docs/topics/README.md
  • docs/REQUIREMENTS.md
  • docs/topics/providers/README.md
  • README.md
  • ROADMAP.md
  • docs/topics/providers/test-plan.md
  • crates/edict-syntax/tests/contract_bundle.rs
  • crates/edict-syntax/src/semantic.rs
  • crates/edict-syntax/tests/parse_review_regressions.rs
  • docs/topics/external-action-requests/test-plan.md
  • crates/edict-syntax/src/lib.rs
  • docs/topics/cli/test-plan.md
  • docs/topics/syntax/README.md
  • docs/topics/target-ir/test-plan.md
  • ARCHITECTURE.md
  • crates/edict-syntax/src/contract_bundle.rs
  • docs/topics/external-action-requests/README.md
  • docs/topics/contract-bundles/test-plan.md
  • docs/topics/syntax/test-plan.md
  • docs/topics/target-ir/README.md
  • docs/topics/core-ir/README.md
  • crates/edict-cli/tests/jsonl_cli.rs
  • crates/edict-cli/src/main.rs
  • docs/SPEC_edict-language-v1.md
  • CHANGELOG.md
  • crates/edict-syntax/src/ast.rs
  • crates/edict-syntax/src/target_ir.rs
  • crates/edict-syntax/src/core_ir.rs
  • crates/edict-syntax/src/canonical.rs
  • crates/edict-syntax/src/parser.rs
  • crates/edict-provider-schema/tests/provider_contract_pack.rs
  • crates/edict-syntax/src/compiler.rs
  • crates/edict-syntax/src/result_projection.rs
  • crates/edict-syntax/tests/external_action_requests.rs
**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{md,mdx}: Documentation pages must have one primary reader job, separate user task help from contributor architecture and evidence maps, use concrete valid examples with expected results when relevant, and keep exact public facts in validated or generated reference material.
Update affected documentation in the same change as behavior, schema, release, workflow, or public-surface changes, or state docs-impact: none with a concise rationale.

Files:

  • docs/topics/core-ir/test-plan.md
  • docs/topics/README.md
  • docs/REQUIREMENTS.md
  • docs/topics/providers/README.md
  • README.md
  • ROADMAP.md
  • docs/topics/providers/test-plan.md
  • docs/topics/external-action-requests/test-plan.md
  • docs/topics/cli/test-plan.md
  • docs/topics/syntax/README.md
  • docs/topics/target-ir/test-plan.md
  • ARCHITECTURE.md
  • docs/topics/external-action-requests/README.md
  • docs/topics/contract-bundles/test-plan.md
  • docs/topics/syntax/test-plan.md
  • docs/topics/target-ir/README.md
  • docs/topics/core-ir/README.md
  • docs/SPEC_edict-language-v1.md
  • CHANGELOG.md
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

Use tables for consistent-shape comparisons and evidence, bullets for unordered sets, numbered lists for ordered procedures or states, and focused branch-accurate snippets for exact syntax.

Files:

  • docs/topics/core-ir/test-plan.md
  • docs/topics/README.md
  • docs/REQUIREMENTS.md
  • docs/topics/providers/README.md
  • README.md
  • ROADMAP.md
  • docs/topics/providers/test-plan.md
  • docs/topics/external-action-requests/test-plan.md
  • docs/topics/cli/test-plan.md
  • docs/topics/syntax/README.md
  • docs/topics/target-ir/test-plan.md
  • ARCHITECTURE.md
  • docs/topics/external-action-requests/README.md
  • docs/topics/contract-bundles/test-plan.md
  • docs/topics/syntax/test-plan.md
  • docs/topics/target-ir/README.md
  • docs/topics/core-ir/README.md
  • docs/SPEC_edict-language-v1.md
  • CHANGELOG.md
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: For Rust changes, preserve claim integrity by providing executable evidence, keep compiler and validation paths deterministic and free of hidden I/O, and prefer structured public failures with stable error kinds over prose-only diagnostics.
Do not add Rust dependencies without pull-request rationale and contract-impact notes; treat planned lint, dependency, and fuzzing ratchets as planned until executable checks land.

Files:

  • crates/edict-syntax/tests/contract_bundle.rs
  • crates/edict-syntax/src/semantic.rs
  • crates/edict-syntax/tests/parse_review_regressions.rs
  • crates/edict-syntax/src/lib.rs
  • crates/edict-syntax/src/contract_bundle.rs
  • crates/edict-cli/tests/jsonl_cli.rs
  • crates/edict-cli/src/main.rs
  • crates/edict-syntax/src/ast.rs
  • crates/edict-syntax/src/target_ir.rs
  • crates/edict-syntax/src/core_ir.rs
  • crates/edict-syntax/src/canonical.rs
  • crates/edict-syntax/src/parser.rs
  • crates/edict-provider-schema/tests/provider_contract_pack.rs
  • crates/edict-syntax/src/compiler.rs
  • crates/edict-syntax/src/result_projection.rs
  • crates/edict-syntax/tests/external_action_requests.rs
🧠 Learnings (3)
📚 Learning: 2026-07-29T12:58:15.297Z
Learnt from: flyingrobots
Repo: flyingrobots/edict PR: 174
File: fixtures/provider-contracts/v1/edict-provider-contracts.cddl:798-829
Timestamp: 2026-07-29T12:58:15.297Z
Learning: When reviewing CDDL schema files and generated provider-contract fixtures for Rust result projections, ensure the schema-expressible bounds match what the authoritative decoder enforces: `maxOutputBytes` must be positive; root-record fields must be ≤ 255; source-path segments must be ≤ 32. Also verify the decoder’s non-CDDL-global runtime limits are respected/consistent—specifically the 256 recursive expression-node limit and the 64 KiB canonical artifact-byte limit—so the CDDL constraints don’t drift from `crates/edict-syntax/src/result_projection.rs`.

Applied to files:

  • docs/abi/edict-target-ir.cddl
  • docs/abi/edict-core.cddl
  • fixtures/provider-contracts/v1/edict-provider-contracts.cddl
📚 Learning: 2026-07-29T12:58:25.905Z
Learnt from: flyingrobots
Repo: flyingrobots/edict PR: 174
File: fixtures/provider-contracts/v1/edict-provider-contracts.cddl:798-829
Timestamp: 2026-07-29T12:58:25.905Z
Learning: When reviewing Edict result projection CDDL fixtures (e.g., provider-contracts/*/edict-provider-contracts.cddl generated from docs/abi/edict-result-projection.cddl), ensure the CDDL enforces only the CDDL-expressible *local* bounds: `maxOutputBytes` must be positive, records must have at most 255 fields, source-paths must have at most 32 segments, and text length limits must be present. Do not rely on (or duplicate) global limits for recursive expression nodes and total canonical-artifact bytes in CDDL; those *global* limits are intentionally enforced during authoritative decode/verification by `crates/edict-syntax/src/result_projection.rs`, which is invoked by `crates/edict-cli/src/application_build.rs` before provider binding.

Applied to files:

  • fixtures/provider-contracts/v1/edict-provider-contracts.cddl
📚 Learning: 2026-07-29T12:58:32.500Z
Learnt from: flyingrobots
Repo: flyingrobots/edict PR: 174
File: fixtures/provider-contracts/v1/edict-provider-contracts.cddl:798-829
Timestamp: 2026-07-29T12:58:32.500Z
Learning: When reviewing CDDL artifacts for `edict.result-projection/v1` (both `docs/abi/edict-result-projection.cddl` and the generated `fixtures/provider-contracts/v1/edict-provider-contracts.cddl`), ensure the CDDL-expressible bounds remain correct: `maxOutputBytes` must be positive, each record must have at most 255 fields, and each record must have at most 32 source-path segments. Also confirm reviewers understand and preserve that the whole-value constraints—(1) the 256 aggregate-expression-node limit and (2) the 64 KiB encoded-artifact limit—are enforced authoritatively in `decode_result_projection`/`verify_result_projection` (`crates/edict-syntax/src/result_projection.rs`), and that `crates/edict-cli/src/application_build.rs` independently verifies the compiler-owned projection before using it as provider semantic input. Do not assume the CDDL constraints cover those whole-value limits; keep CDDL and Rust validation logic consistent when changes are proposed.

Applied to files:

  • fixtures/provider-contracts/v1/edict-provider-contracts.cddl
🪛 LanguageTool
docs/topics/external-action-requests/README.md

[grammar] ~59-~59: Ensure spelling is correct
Context: ...source alongside the source Core and any lawpacks; canonical Target IR encoding refuses a ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[uncategorized] ~72-~72: The official name of this software platform is spelled with a capital “H”.
Context: ...lesystem, process, network, git, github, model, and shell` operation fami...

(GITHUB)

docs/topics/target-ir/README.md

[grammar] ~116-~116: Ensure spelling is correct
Context: ...plicit basis, the Core module imports a lawpack, or the Core module imports a requestab...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (32)
ARCHITECTURE.md (1)

39-40: 📐 Maintainability & Code Quality

No claim/citation work needed on these lines.

The cited Markdown sections use existing requirement-style citations such as [SYNTAX-REQ-003], [SYNTAX-REQ-007], and [COREIR-REQ-*]; they are not missing repository-specific evidence or requiring new [claim:<id>, confidence:<value>] tags.

			> Likely an incorrect or invalid review comment.
crates/edict-syntax/src/lib.rs (1)

134-137: LGTM!

Also applies to: 210-213, 335-337

docs/SPEC_edict-language-v1.md (1)

1342-1354: LGTM!

Also applies to: 1389-1389, 1427-1427, 1441-1453, 1949-1983

docs/topics/README.md (1)

55-57: LGTM!

docs/topics/target-ir/README.md (1)

17-18: LGTM!

Also applies to: 27-27, 83-88, 116-124, 138-142, 184-192, 208-208

docs/topics/external-action-requests/README.md (1)

1-70: LGTM!

Also applies to: 75-101

docs/topics/external-action-requests/test-plan.md (2)

13-13: 🗄️ Data Integrity & Integration

Reconcile the claimed closure scope with executable evidence.

Line 13 claims package-closure binding for operation, schema, and reconciliation resources, but the supplied TargetIrSemanticClosure contains only the source Core, lawpacks, and capabilities (crates/edict-syntax/src/target_ir.rs, Lines 203-207). The listed implemented closure cases explicitly verify operation capability membership, not schema or reconciliation-law closure. Either add evidence for those bindings or narrow this scope statement.


1-12: LGTM!

Also applies to: 14-34, 36-56, 58-79

crates/edict-syntax/src/ast.rs (1)

32-32: LGTM!

Also applies to: 50-56, 216-229

crates/edict-syntax/src/parser.rs (2)

139-139: LGTM!

Also applies to: 195-195, 492-495, 896-897, 1003-1013


970-986: 📐 Maintainability & Code Quality

No parser/spec mismatch found for these soft keywords.

The frozen spec spells input, schema, settlement, authority, basis, budget, maxSettlementBytes, maxAttempts, and reconcile exactly as the parser expects.

crates/edict-syntax/src/semantic.rs (1)

369-387: LGTM!

crates/edict-syntax/src/core_ir.rs (1)

42-42: LGTM!

Also applies to: 52-52, 152-154, 284-304

crates/edict-syntax/src/compiler.rs (1)

9-19: LGTM!

Also applies to: 312-313, 386-392, 395-427, 576-586, 824-851, 1328-1338, 1380-1392, 2130-2138

docs/topics/core-ir/test-plan.md (1)

55-55: LGTM!

Also applies to: 104-104

docs/topics/target-ir/test-plan.md (1)

56-56: LGTM!

Also applies to: 103-103

crates/edict-syntax/src/target_ir.rs (1)

10-12: LGTM!

Also applies to: 206-206, 217-217, 245-261, 368-368, 454-454, 563-567, 583-583, 598-598

crates/edict-syntax/src/result_projection.rs (1)

519-525: LGTM!

Also applies to: 820-827

docs/abi/edict-target-ir.cddl (1)

44-50: LGTM!

Also applies to: 81-97

fixtures/provider-contracts/v1/edict-provider-contracts.cddl (1)

105-105: LGTM!

Also applies to: 114-114, 163-166, 331-332, 366-385, 900-906, 937-953

docs/topics/contract-bundles/test-plan.md (1)

46-46: LGTM!

Also applies to: 71-71

docs/topics/providers/test-plan.md (1)

66-66: LGTM!

Also applies to: 138-138

docs/topics/syntax/test-plan.md (1)

32-36: LGTM!

Also applies to: 59-59, 80-80

fixtures/provider-contracts/v1/manifest.json (1)

6-7: 🗄️ Data Integrity & Integration

No action needed. The bytesHex/rawSha256 pair is consistent with the CDDL bundle bytes.

crates/edict-syntax/src/canonical.rs (1)

16-22: LGTM!

Also applies to: 496-532, 672-718, 770-794, 929-932, 1026-1068

crates/edict-provider-schema/tests/provider_contract_pack.rs (1)

17-20: LGTM!

Also applies to: 201-211, 723-782, 797-814, 845-849, 852-853

crates/edict-cli/src/main.rs (1)

20-22: LGTM!

Also applies to: 1264-1268, 1287-1291, 1344-1365, 1397-1399, 1461-1491

crates/edict-cli/tests/jsonl_cli.rs (1)

52-81: LGTM!

Also applies to: 278-338, 1142-1145, 1453-1456

crates/edict-syntax/tests/parse_review_regressions.rs (1)

8-10: LGTM!

Also applies to: 66-71

crates/edict-syntax/tests/contract_bundle.rs (1)

501-501: LGTM!

Also applies to: 854-877

crates/edict-syntax/tests/external_action_requests.rs (1)

1-84: LGTM!

Also applies to: 116-378, 402-493

docs/abi/edict-core.cddl (1)

279-298: 🗄️ Data Integrity & Integration

No action needed: the 256-node budget is recursive.

Comment thread ARCHITECTURE.md Outdated
Comment thread crates/edict-syntax/src/compiler.rs Outdated
Comment thread crates/edict-syntax/src/compiler.rs
Comment thread crates/edict-syntax/src/compiler.rs
Comment thread crates/edict-syntax/src/compiler.rs Outdated
Comment thread docs/topics/cli/test-plan.md
Comment thread docs/topics/external-action-requests/README.md
Comment thread docs/topics/external-action-requests/test-plan.md Outdated
Comment thread docs/topics/providers/README.md Outdated
Comment thread docs/topics/target-ir/test-plan.md Outdated
@flyingrobots

Copy link
Copy Markdown
Owner Author

Merge gate: current-head CI is green; CodeRabbit approved; all bot-authored threads are resolved; cargo xtask verify and git diff --check are clean. This solo-maintained repository has no required independent approval, so those technical criteria substitute for human approval.

@flyingrobots
flyingrobots merged commit eb873d3 into main Jul 29, 2026
4 checks passed
@flyingrobots
flyingrobots deleted the task/172-typed-external-action-requests branch July 29, 2026 23:49
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.

Declare typed external-action request values

1 participant