feat: validate required run artifacts against a schema (--require-artifact-schema) - #1071
Conversation
…for required run artifacts
…t schema validation and parsing
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 7:12 AM ET / 11:12 UTC. Summary Reproducibility: not applicable. This PR introduces a new opt-in validation mode rather than fixing behavior that violates an existing contract. Its proposed behavior nevertheless has credible SSH-backed runtime proof. Review metrics: 3 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Retain the opt-in evidence gate only after maintainers approve a standards-compatible validator with explicit bounded-execution guarantees and a sustainable upstream or first-party dependency ownership plan. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR introduces a new opt-in validation mode rather than fixing behavior that violates an existing contract. Its proposed behavior nevertheless has credible SSH-backed runtime proof. Is this the best way to solve the issue? Unclear: the implementation appears correct and carefully bounded, but maintainers must decide whether the broad fork-backed schema contract is the narrowest sustainable product solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8c40b42f42d6. Label changesLabel justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (9 earlier review cycles; latest 8 shown)
|
…ema validator for latest PR reviews
…tests according to review response
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
Co-authored-by: Dwin Gharibi <dwin.gharibi@email.kntu.ac.ir>
Co-authored-by: Dwin Gharibi <dwin.gharibi@email.kntu.ac.ir>
|
Maintainer improvement pass pushed to the contributor branch at Improvements:
Proof: Final Codex autoreview command: Remaining gate — do not merge: a maintainer product decision is still required on whether Crabbox should own this bespoke JSON-Schema-subset contract at all, versus narrowing the feature or using a maintained standards-compatible approach. If the feature is retained, it still needs redacted real SSH-backed CLI proof for valid, invalid, missing, oversized, and malformed-schema cases. This fork also needs maintainer approval before hosted workflows can run. |
|
Maintainer correctness pass pushed to the contributor branch at Two reproducible P2 fail-closed bugs found by live testing are fixed:
Regression provenance: Real CLI proof through a localhost SSH target, using the branch-built binary: Verification clean: Technically merge-ready. Still do not merge until the maintainer decides whether Crabbox should own this bespoke JSON-Schema-subset contract, use a maintained standards-compatible validator, or keep validation repo-owned. This pass intentionally does not make that product decision. |
Co-authored-by: Dwin Gharibi <dwin.gharibi@email.kntu.ac.ir>
Co-authored-by: Dwin Gharibi <dwin.gharibi@email.kntu.ac.ir>
…-schema # Conflicts: # CHANGELOG.md
Closes #1070
Summary
Adds
--require-artifact-schema remote=schema.json, a post-command evidence gate that validates a required JSON artifact instead of checking existence alone.Safety and dependency notes
Schema definitions are capped at 1 MiB and artifacts at 5 MiB. JSON depth, value count, numeric work, reference expansion, validation work, regular-expression source/program work, and diagnostic output all have explicit limits. The regular-expression engine uses Go's linear-time RE2 implementation through a fail-closed ECMA-262 compatibility layer.
The implementation uses
github.com/santhosh-tekuri/jsonschema/v6plusgithub.com/dlclark/regexp2/syntax. A compatibility correction for mixed legacydependenciesresources is proposed upstream at santhosh-tekuri/jsonschema#262; this PR temporarily replaces the module with the public commit steipete/jsonschema@7235d3e. The replacement is source-compatible and can be removed once upstream ships the fix. Both dependencies are active, non-archived projects; no credentials or new runtime configuration are introduced.Verification
go test -race ./...go vet ./...go build -trimpath -o bin/crabbox ./cmd/crabboxgo mod verifyb6a830872ecb262ec4259dd1d2c32957e1c8ae5c: all jobs green, including Go race/coverage/build, Worker, release snapshot, Apple VM, Windows cancellation, scripts, connector lifecycles, docs, Docs UI Proof, and Connector E2E Smokes — https://github.com/openclaw/crabbox/actions/runs/29575888071Contributor credit
Preserves Dwin Gharibi's authorship with co-authored maintainer commits and the changelog credit to @dwin-gharibi.