Skip to content

Prove bounded workspace observation - #22

Merged
flyingrobots merged 15 commits into
mainfrom
task/10-bounded-workspace-observation
Jul 30, 2026
Merged

Prove bounded workspace observation#22
flyingrobots merged 15 commits into
mainfrom
task/10-bounded-workspace-observation

Conversation

@flyingrobots

Copy link
Copy Markdown
Owner

Admit compiler-authored observation requests, durably settle bounded workspace reads, and prove recovery, reconciliation, and effect-free replay. Closes #10.

@flyingrobots

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@flyingrobots

Copy link
Copy Markdown
Owner Author

@codex please review

@coderabbitai

coderabbitai Bot commented Jul 30, 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 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@flyingrobots, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4eb52a2e-0d6d-47ba-9402-fc85d2ea3a0d

📥 Commits

Reviewing files that changed from the base of the PR and between 916dafd and 97be4f1.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • README.md
  • docs/roadmap.md
  • effect-host/src/main.rs
  • tests/effect-build.sh
  • tests/effect-run.sh
  • tests/effect-runtime.sh

Summary by CodeRabbit

  • New Features
    • Added a workspace observation end-to-end workflow covering request/claim/settlement durability, recovery after restart, replay behavior, and idempotent conflict handling.
    • Added an effect-host command flow and a new workspace observer configuration for running the observation proof.
  • Documentation
    • Expanded README and roadmap with proof/guarantee details, boundary conditions, and refusal/timeout behaviors.
    • Updated the changelog with a new Unreleased entry describing the bounded workspace observation witness.
  • Tests
    • Added integration scripts and comprehensive runtime/build coverage, including fixtures matching and fixed-seed and bounded stress scenarios.

Walkthrough

Adds a compiler-authored bounded workspace observation application, a Rust host for durable request/claim/settlement handling, build and execution scripts, and an end-to-end witness covering recovery, retries, replay, refusals, ambiguity, budgets, artifact validation, and bounded stress.

Changes

Workspace observation

Layer / File(s) Summary
Observation contract and artifacts
edict.effect.application.json, effect/src/observe-workspace.edict, effect/vendor/workspace-snapshot/*
Defines the bounded observe intent, application configuration, workspace snapshot lawpack artifacts, authority and basis fields, and reconciliation limits.
Host lifecycle and durable settlement
effect-host/Cargo.toml.template, effect-host/src/main.rs
Adds the hello-effect-host CLI with request, claim, inspect, settle, retry, replay, and unknown phases backed by WAL recovery, adapter authorization, canonical observation decoding, and settlement reconciliation.
Build and execution boundary
tests/effect-build-request.jsonl, tests/effect-build.sh, tests/effect-run.sh
Builds and validates Core/Target IR fixtures, copies the provider without symlinks, compiles the host, and invokes it with configurable artifacts and WAL paths.
Runtime witness and documentation
tests/effect-runtime.sh, README.md, docs/roadmap.md, CHANGELOG.md
Covers successful observation, recovery, idempotent and conflicting retries, replay, ambiguity, refusal cases, budget boundaries, artifact substitution, fixed-seed and stress runs, and documents the resulting proof.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant build as effect-build.sh
  participant compiler as edict-cli
  participant host as hello-effect-host
  participant wal as WAL coordinator
  participant workspace as workspace observation adapter

  build->>compiler: build application from compiler settings
  compiler-->>build: emit core.cbor and target-ir.cbor
  build->>host: execute request, claim, and settle phases
  host->>wal: record request and claim
  host->>workspace: observe bounded workspace root
  workspace-->>host: return files, basis evidence, or refusal
  host->>wal: admit settlement
  wal-->>host: return durable posture and commit ordering
Loading

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

  • flyingrobots/echo#709 — Covers rootless outcomeUnknown settlement after claim, exercised by this runtime witness.
  • flyingrobots/graft#228 — Matches the durable bounded workspace observation, authorization, retry/replay, and refusal scenarios.

Poem

A bounded glance through workspace walls,
WAL remembers every call.
Retries align or conflicts cease,
Unknowns remain, refusals speak.
Core and target guard the gate—
Tiny proofs now execute straight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
Title check ✅ Passed The title clearly matches the main change: proving bounded workspace observation.
Description check ✅ Passed The description is directly about admitting observation requests and proving recovery, replay, and settlement behavior.
Linked Issues check ✅ Passed The changes appear to cover the linked acceptance criteria for bounded observation, settlement ordering, replay, retries, and capability denial.
Out of Scope Changes check ✅ Passed No obvious unrelated changes stand out; the added docs, tests, artifacts, and host code all support the observation workflow.

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: eec0fb96f5

ℹ️ 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 effect-host/src/main.rs
Comment thread tests/effect-build.sh
Comment thread effect-host/src/main.rs
Comment thread effect-host/src/main.rs Outdated

@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: 5

🤖 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 `@effect-host/src/main.rs`:
- Around line 80-97: Update the admission-error match around
admit_edict_external_action_request_v1 so every invocation phase, not only
"request", emits the structured compilerArtifactRejected obstruction with
wal.commitCount set to 0 and exits with the existing rejection status. Remove
the phase-specific guard while preserving successful admission handling and the
existing formatted error path only for errors that are not compiler-artifact
admission rejections.

In `@README.md`:
- Around line 130-134: Update the refusal bullet in README.md to include the
stale-basis refusal alongside unauthorized, parent-escaped, and symlink paths,
aligning it with the documented four-refusal count and runtime witness.

In `@tests/effect-build.sh`:
- Around line 57-65: Update the path preparation in the effect build script
before the sed substitutions for ECHO_REPO and project_root: serialize each path
as a valid TOML string so quotes and backslashes are preserved, then escape the
serialized values for safe sed replacement. Keep the existing `@ECHO_REPO`@ and
`@PROJECT_ROOT`@ substitutions intact.

In `@tests/effect-run.sh`:
- Around line 24-25: Normalize EFFECT_CORE_FILE and EFFECT_TARGET_IR_FILE
against project_root when their environment-provided values are relative,
matching the existing request_file and wal_dir handling; preserve absolute paths
and the current defaults.

In `@tests/effect-runtime.sh`:
- Around line 441-446: Update the checkout-path leak check’s artifact glob in
the grep block to include both report JSON and recovery JSON files, covering the
request-recovery.json and claim-recovery.json artifacts asserted earlier while
preserving the existing path-content validation.
🪄 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: ca289ab3-50ce-4e0c-b44c-2db4f81098ec

📥 Commits

Reviewing files that changed from the base of the PR and between 81d23dc and eec0fb9.

📒 Files selected for processing (15)
  • CHANGELOG.md
  • README.md
  • docs/roadmap.md
  • edict.effect.application.json
  • effect-host/Cargo.toml.template
  • effect-host/src/main.rs
  • effect/src/observe-workspace.edict
  • effect/vendor/workspace-snapshot/adapter.cbor
  • effect/vendor/workspace-snapshot/exports.cbor
  • effect/vendor/workspace-snapshot/manifest.cbor
  • effect/vendor/workspace-snapshot/request-profile-configuration.cbor
  • tests/effect-build-request.jsonl
  • tests/effect-build.sh
  • tests/effect-run.sh
  • tests/effect-runtime.sh
📜 Review details
🔇 Additional comments (12)
edict.effect.application.json (1)

1-21: LGTM!

effect/src/observe-workspace.edict (1)

6-12: 🔒 Security & Privacy

Prove the symlink rule is part of the admitted contract.

The request binds paths, scope, basis, and budgets, but no link-following policy. Confirm that workspace.snapshot.input@1’s verified schema fixes no-follow and that settlement evidence retains that commitment; otherwise provider behavior can drift from the compiler-authorized policy.

Also applies to: 20-32

effect/vendor/workspace-snapshot/adapter.cbor (1)

1-1: LGTM!

effect/vendor/workspace-snapshot/exports.cbor (1)

1-1: LGTM!

effect/vendor/workspace-snapshot/manifest.cbor (1)

1-2: LGTM!

effect/vendor/workspace-snapshot/request-profile-configuration.cbor (1)

1-1: LGTM!

tests/effect-build-request.jsonl (1)

1-1: LGTM!

effect-host/Cargo.toml.template (1)

1-17: LGTM!

effect-host/src/main.rs (2)

326-336: 🎯 Functional Correctness | ⚡ Quick win

Positional constructor with adjacent same-typed Hash fields is a silent-swap risk.

ExternalActionSettlementCandidateV1::new takes 9 positional args, several of which are back-to-back Hash values (settlement_schema_digest/basis_digest, then later schema_admission_evidence_digest/external_evidence_digest). A transposition here compiles cleanly and would corrupt retry reconciliation silently. Worth confirming the order against the declared signature in warp-core, and, if the crate exposes a builder or named-field constructor, preferring that here.


556-571: 🗄️ Data Integrity & Integration

Confirm the warp-core epoch fencing contract before relying on this host setup.

The local code always hashes the same epoch literals and passes previous_epoch_id: None / previous_epoch_final_commit_digest: None; the checkpoint requires the warp-core contract to determine whether this counts as idempotent recovery or bypasses real epoch-lineage fencing for stale writers.

CHANGELOG.md (1)

23-26: LGTM!

docs/roadmap.md (1)

111-119: LGTM!

Also applies to: 133-136

Comment thread effect-host/src/main.rs
Comment thread README.md Outdated
Comment thread tests/effect-build.sh
Comment thread tests/effect-run.sh
Comment thread tests/effect-runtime.sh
@flyingrobots

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 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.

@flyingrobots

Copy link
Copy Markdown
Owner Author

@codex please review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@flyingrobots

Copy link
Copy Markdown
Owner Author

Merge gate: OPEN at 97be4f1. Full local pure-runtime and Hello Effect witness suites, Rust formatting/clippy, ShellCheck, Markdown lint, JSON validation, and diff checks pass. CodeRabbit completed rate-limited with its check passing; Codex completed usage-limited. GraphQL reports zero unresolved review threads, APPROVED, MERGEABLE, and CLEAN. Solo-maintainer technical-gate substitution applies; no independent human approval is required by branch protection.

@flyingrobots
flyingrobots merged commit 66060e1 into main Jul 30, 2026
1 check passed
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.

Prove bounded workspace observation through durable settlement

1 participant