feat(core): connect installed contract intent pipeline#368
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR extends the warp-core coordinator with typed intent outcome derivation from tick receipts, feature-gated installed-contract op-id parsing and pre-staging validation, deterministic witnessed-submission replay/import, scheduler-ticketed staging/dispatch plumbing, comprehensive integration tests, and corresponding docs updates. ChangesInstalled Contract Intent Pipeline
Documentation & Roadmap Status
Sequence DiagramsequenceDiagram
participant SubmissionClient
participant ingest_installed_contract_invocation
participant RuntimeValidation
participant TicketedIngress
participant SchedulerCoordinator
participant IntentOutcome
SubmissionClient->>ingest_installed_contract_invocation: installed-contract envelope
ingest_installed_contract_invocation->>ingest_installed_contract_invocation: extract op_id
ingest_installed_contract_invocation->>RuntimeValidation: lookup package op_id support
alt unsupported op_id
RuntimeValidation-->>ingest_installed_contract_invocation: UnsupportedInstalledContractMutation
ingest_installed_contract_invocation-->>SubmissionClient: Err
else op_id supported
ingest_installed_contract_invocation->>TicketedIngress: delegate ticketed invocation
TicketedIngress-->>ingest_installed_contract_invocation: TicketedRuntimeIngressDisposition
ingest_installed_contract_invocation-->>SubmissionClient: Ok(disposition)
end
SchedulerCoordinator->>SchedulerCoordinator: super_tick executes staged mutations -> receipts
SubmissionClient->>IntentOutcome: observe_intent_outcome(correlation)
IntentOutcome->>IntentOutcome: intent_outcome_decision(receipt, worldline)
IntentOutcome-->>SubmissionClient: Decided{correlation, IntentOutcomeDecision}
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d024f24e63
ℹ️ 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".
|
Resolved the replay-generation continuity review in 0c50a29.
Verified with: cargo test -p warp-core --features native_rule_bootstrap,host_test --test installed_contract_intent_pipeline_tests witnessed_submission_replay_preserves_generation_continuity
cargo test -p warp-core --features native_rule_bootstrap,host_test --test installed_contract_intent_pipeline_tests |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/warp-core/src/coordinator.rs`:
- Around line 1336-1337: The code currently only updates
self.next_submission_generation to the max seen value and does not reject
records whose submission_generation is <= self.next_submission_generation;
modify the import/replay handling in the coordinator method containing the
snippet so that when record.submission_generation <=
self.next_submission_generation you immediately return an
IntentSubmissionReplayMismatch error (before mutating any state), otherwise
proceed to set self.next_submission_generation = record.submission_generation;
ensure the check uses the same symbols (record.submission_generation and
self.next_submission_generation) and that the IntentSubmissionReplayMismatch
return happens prior to any state updates to prevent duplicate or backward
generations.
🪄 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
Run ID: 10e80fd5-f7dc-47c5-b622-2a2b234d533d
📒 Files selected for processing (3)
CHANGELOG.mdcrates/warp-core/src/coordinator.rscrates/warp-core/tests/installed_contract_intent_pipeline_tests.rs
|
@codex Self-review findings for PR #368:
I recommend addressing these before merge. The first two are merge-blocking for structural integrity: one affects replay atomicity, and the other affects whether the new pipeline witnesses are enforced by automation. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c50a29b08
ℹ️ 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".
| self.submission_by_target | ||
| .insert((record.head_key, record.ingress_id), record.submission_id); | ||
| self.witnessed_submissions | ||
| .insert(record.submission_id, record); |
There was a problem hiding this comment.
Make replay import failure-atomic
replay_witnessed_submissions mutates runtime state while still validating the batch, so if an earlier record is inserted and a later record fails validation (for example UnknownHead or IntentSubmissionReplayMismatch), the function returns Err after leaving partial replay state behind. That breaks deterministic recovery because callers cannot rely on all-or-nothing import semantics for a replay batch.
Useful? React with 👍 / 👎.
| // SPDX-License-Identifier: Apache-2.0 | ||
| // © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> | ||
| //! Installed contract intent pipeline tests. | ||
| #![cfg(all(feature = "native_rule_bootstrap", feature = "host_test"))] |
There was a problem hiding this comment.
Wire feature-gated pipeline test into automation
This new integration test file is crate-gated behind native_rule_bootstrap and host_test, but the automation in this commit does not include a feature-mapped invocation for this target (checked .github/workflows/ci.yml test-warp-core commands and scripts/verify-local.sh test-feature mapping), so standard runs can pass while executing zero tests from this file. That allows the primary regression witness added here to silently drop out of CI/pre-push coverage.
Useful? React with 👍 / 👎.
| if record.submission_generation > self.next_submission_generation { | ||
| self.next_submission_generation = record.submission_generation; |
There was a problem hiding this comment.
Reject impossible replay submission generations
Replay currently accepts any submission_generation and only tracks the max value, so ZERO or duplicate non-zero generations pass validation both within a batch and against existing replay state. The live submit path allocates strictly increasing generations, so importing impossible generation histories can break continuity assumptions and audit ordering derived from submission generations.
Useful? React with 👍 / 👎.
|
Self-review findings addressed in commits:
Additional local checks passed: |
Summary
This PR pushes the installed-contract intent pipeline through the next five slices:
observe_intent_outcome(...)now reports typed receipt decisions for decided submissions.Docs and backlog status now reflect that local installed mutation dispatch is complete and the next work moves outward toward external consumer proof / contract-aware receipts and readings.
Validation
cargo test -p warp-core --features native_rule_bootstrap,host_test --test installed_contract_intent_pipeline_testscargo test -p warp-core --features host_test --test inbox ticketed_submission_outcome_observation_is_decided_after_scheduler_tickcargo fmt --checkgit diff --check origin/main...HEADpnpm exec markdownlint-cli2 CHANGELOG.md docs/BEARING.md docs/method/backlog/asap/PLATFORM_installed-wesley-contract-host-dispatch.md docs/method/backlog/asap/PLATFORM_contract-queryview-observer-bridge.mdcargo xtask lint-dead-refs --file docs/BEARING.md --file docs/method/backlog/asap/PLATFORM_installed-wesley-contract-host-dispatch.md --file docs/method/backlog/asap/PLATFORM_contract-queryview-observer-bridge.mdNote: pre-push also ran the narrow hook suite successfully. Its inferred exact command for
installed_contract_intent_pipeline_testsomittednative_rule_bootstrap,host_test, so Cargo reported 0 tests for that hook slice; the feature-bearing command above is the authoritative local witness for this new integration test file.Summary by CodeRabbit
New Features
Documentation
Tests