feat(gateway/sdk): artifact RPCs with cursor pagination, type filter, and provenance fix#75208
feat(gateway/sdk): artifact RPCs with cursor pagination, type filter, and provenance fix#75208Angfr95 wants to merge 3 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 24, 2026, 4:51 AM ET / 08:51 UTC. Summary PR surface: Source +781, Tests +1093, Docs +41, Generated +3, Other +404. Total +2322 across 26 files. Reproducibility: yes. at source level for the PR defects: the head code resumes artifact pages with messageSeq-only cursors, and the route checks a resolved Hyprland flag that the config resolver never returns. I did not run a live Gateway or Hyprland repro in this read-only review. Review metrics: 3 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Narrow this to maintainer-approved artifact pagination/type filtering on the current packages/gateway-protocol surface, preserve current SDK call shape, use a stable per-artifact cursor, and leave Hyprland capture to its dedicated PR. Do we have a high-confidence way to reproduce the issue? Yes at source level for the PR defects: the head code resumes artifact pages with messageSeq-only cursors, and the route checks a resolved Hyprland flag that the config resolver never returns. I did not run a live Gateway or Hyprland repro in this read-only review. Is this the best way to solve the issue? No, not as submitted. Artifact pagination/type filtering may be useful, but the current branch is too broad and stale; the safer path is a narrowed rebase on packages/gateway-protocol with a stable per-artifact cursor and Hyprland split out. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a2725b6a24c8. Label changesLabel justifications:
Evidence reviewedPR surface: Source +781, Tests +1093, Docs +41, Generated +3, Other +404. Total +2322 across 26 files. View PR surface stats
Security 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
|
… and provenance fix
Adds artifacts.list / .get / .download gateway RPCs and an oc.artifacts SDK
namespace. Cursor pagination encodes messageSeq as base64url; types[] filter
uses Set membership; limit defaults to 50 with a hard cap of 200.
Fixes the P2 provenance bug where artifacts.list({ runId }) silently returned
nothing: transcript writers only persist { id, seq } in __openclaw, never
runId/taskId, so the per-message filter was always dropping everything. Fix:
apply the filter only when the field is explicitly present on the message.
Also adds hyprland-capture.ts stub to resolve a pre-existing TS2307 error in
the browser extension, and regenerates Swift GatewayModels for both targets.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
bc718ea to
07b489a
Compare
|
@vincentkoc this supersedes #74926 — resolves the P2 provenance blocker and adds cursor pagination with a reusable utility. Ready for review. |
|
#75208 supersedes this PR — resolves the P2 provenance blocker identified in the Codex review (artifacts.list({ runId }) silently returning empty on real transcript data), adds cursor pagination, type filter, and introduces src/gateway/util/cursor.ts as the canonical reusable pagination utility for Gateway list RPCs. All checks pass. |
|
@shakkernerd would you be able to review this? It resolves the P2 provenance blocker on the artifact RPC surface and #74926 currently has conflicts. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Thanks for the substantial work here. I’m closing this as stale and no longer safely landable, not as a duplicate. The branch has had no source update since April 30, conflicts with current main, targets the removed |
Summary
artifacts.list,artifacts.get,artifacts.download) exposed via the gateway and the SDKoc.artifactsnamespace, with AJV validation and TypeBox schemasartifacts.list: base64url-encodedmessageSeqcursors viasrc/gateway/util/cursor.ts,typesarray filter, configurablelimit(default 50, hard-cap 200)collectArtifactsFromMessagespreviously dropped all artifacts underrunId/taskIdqueries because transcript writers only write{ id, seq }to__openclaw— neverrunId/taskId. Fix: apply per-message filter only when the field is explicitly present; session-level routing already scopes correctlyextensions/browser/src/browser/hyprland-capture.tsimplementingisHyprlandAvailableandcaptureWithHyprland(resolves pre-existingCannot find moduleTS error inagent.snapshot.ts)ProtocolSchemassoprotocol:gen:swiftproduces the corresponding Swift structs in bothGatewayModels.swifttargetsTest plan
pnpm test— 67/67 tests pass (artifacts + cursor + SDK suites)pnpm protocol:check— exits 0 (generated Swift matches working tree)pnpm exec oxfmt --check— all modified files correctly formattedOPENCLAW_TESTBOX=1 pnpm check:changed— exits 0artifacts.list({ runId })returns artifacts when transcript messages lack__openclaw.runId(P2 regression guard test)nextCursor, second page with that cursor returns remaining artifacts and no further cursor🤖 Generated with Claude Code