Repository navigation
feat: export bounded environment artifacts - #171
Conversation
Punchcard-Session: coral-orchard-orchard-d4
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 6:11 AM ET / 10:11 UTC (Revision 8). ClawSweeper reviewWhat this changesAdds a Unix command that exports one size-limited environment file as raw stdout, with path safeguards, change detection, documentation, and tests. Merge readiness✅ Ready for maintainer review The capability remains distinct from current main, and no blocking defect was found. The refreshed head resolves the previous integration concern. This member-authored PR remains eligible for normal review and required CI. Priority: P2 Review scores
Verification
How this fits togetherOCM manages registered OpenClaw environment homes separately from their execution-source checkouts. The new exporter resolves an environment name, reads a bounded file from its home using the invoking user's permissions, and sends bytes to the caller. flowchart LR
A[Environment name and file path] --> B[Registered environment home]
B --> C[Descriptor-relative file access]
C --> D[Path and size checks]
D --> E[Bounded raw stdout]
E --> F[File stability check]
F --> G[Success or error requiring output discard]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the exporter as a narrow, caller-permission file reader with explicit partial-output disposal and producer-quiescence requirements. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds a command rather than repairing a reported existing-behavior failure; its filesystem scenarios are covered by the inspected tests. Is this the best way to solve the issue? Yes: a separate bounded raw-file operation fits the need better than the existing whole-environment archive writer and preserves existing commands and settings. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9ed6256922b3. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
Preserve the reviewed artifact export while incorporating the fixed main baseline and its existing lifecycle, private-config, and CI changes. Punchcard-Session: coral-orchard-orchard-d4
Preserve the reviewed artifact export while incorporating the fixed main baseline and its native dev UI, readiness, and journal-test changes. Punchcard-Session: coral-orchard-orchard-d4
Integrate current main while retaining the bounded artifact export contract. Cover owned and borrowed source registrations through the real CLI, including source-only rejection and export after a borrowed checkout moves. Punchcard-Session: coral-orchard-orchard-d4
What Problem This Solves
Consumers need bounded diagnostic files from an OCM environment without running
candidate commands or directly reading another user's private state.
Why This Change Was Made
Adds
ocm env artifact export ENV --path RELATIVE --max-bytes N. On Unix,descriptor-relative reads reject traversal, symlinks, nonregular files and
multiple hard links, enforce the byte bound, and reject observed file changes.
stdout contains raw bytes only; callers own the destination and must discard
partial output on failure and independently bound transport time and bytes.
The original 10-path export scope is unchanged after integrating fixed main.
There is no candidate execution, UID redesign, service-policy change or new
dependency in the PR delta. Non-Unix export fails closed. Incoming main's
version metadata is retained; this PR does not perform a release.
User Impact
Callers can run the whole OCM command as the environment owner while retaining
destination ownership. Export does not attest candidate data or provide an
atomic snapshot; final diagnostics still require producer quiescence.
Export reads the registered environment home, not an owned or borrowed
execution-source checkout, including when a borrowed checkout has moved.
Downstream activation will pin the actual landed OCM commit for its integrated
qualification; that campaign is separate from this generic export PR.
Downstream stack: Kova invocation,
Kova collection,
benchmark transport,
isolation harness, and
workflow activation.
Evidence
a1ff45af8b54aa4fa65a8b1fdf1de1dacf7d3dc0, integratingfixed main
9ed6256922b3e5cc6e933f2f119074ce91e4be3bwithout conflicts.Exporter and handler bytes are unchanged; the only new authored change is
one owned/borrowed home-routing table in the existing artifact test file.
selected registry, dev-source, handoff and cleanup cases. The routing table
uses real main/linked Git checkouts and public registration, with distinct
home/source bytes, source-only rejection and displaced-source preservation.
whitespace checks passed. Fresh scoped review found no P0-P2 issues.
passed on
a1ff45af8b54aa4fa65a8b1fdf1de1dacf7d3dc0: Format, Rust 1.88minimum, Windows compile, Test (ubuntu-latest), and Test (macos-latest).
CodeQL also passed.
All 15 checks are terminal: 14 success and one optional
[code]smithskip;that skip is not counted as a pass.
landing. The fixed integration base is not a claim that main has stopped
advancing; no enforced check or review is waived.
remains with downstream activation and is not claimed here. Local
compilation is not Linux, Windows or MSRV proof.
Punchcard-Session: coral-orchard-orchard-d4