Repository navigation
feat(coven): page one automation's run history - #333
Merged
Merged
Conversation
Add automations.runHistory(automationId, { limit, cursor, occurrenceId })
over coven.automations.run.history.v1 as an sdk-core Page, and
iterateRunHistory() on iteratePages. Cursors are validated to the spec's
256-character bound before transport I/O; pages that cross automations or
occurrences, break newest-first instant order, or misreport the cursor are
refused. The cursor, instant-order and byte-cap helpers move to a shared
automations-history module used by both history reads.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8 tasks
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address the trimmed-ID byte validation and malformed iterator-filter validation issues.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds capability-gated, paginated automation run-history APIs with occurrence filtering, shared validation, transport limits, tests, and documentation.
Changes:
- Adds
runHistory()anditerateRunHistory(). - Shares cursor, ordering, and response-size validation.
- Updates transports, types, tests, README, API baseline, and changeset.
| File | Summary |
|---|---|
tests/coven-automations.spec.ts |
Run-history behavior and validation tests |
tests/coven-automations-platforms.spec.ts |
Unix/Windows size-cap tests |
packages/coven/src/index.ts |
Public type exports |
packages/coven/src/automations.ts |
Client history APIs |
packages/coven/src/automations-socket.ts |
History response limits |
packages/coven/src/automations-runs.ts |
Run-history types and decoding |
packages/coven/src/automations-occurrences.ts |
Shared validation integration |
packages/coven/src/automations-history.ts |
Shared history validation |
packages/coven/src/automations-definitions.ts |
Request and response handling |
packages/coven/README.md |
Consumer documentation |
api-baselines/coven.d.ts |
Public API baseline |
.changeset/coven-run-history.md |
Release notes |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+182
to
+183
| const identifier = (value: unknown): value is string => typeof value === 'string' && | ||
| value.trim().length > 0 && Buffer.byteLength(value) <= 4_096 && value.isWellFormed(); |
BunsDev
added a commit
that referenced
this pull request
Oct 3, 2026
The README still called the lock the unchanged historical pin that does not certify coven#991/#999; it now names the v0.4.7 release producer, whose contract includes them. The roadmap records the rebinding and corrects two statements this program has since overtaken: individual run lookup and per-automation history landed in SDK #330, #331 and #333, and Coven persists rich definitions (coven#1185) that SDK #336 sends. Refs #80 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
BunsDev
added a commit
that referenced
this pull request
Oct 3, 2026
…ucer (#337) * test(coven): pin the Automations v1 canary to the v0.4.7 release producer The exact-artifact canary was still bound to Coven 8a796807, a pre-release CI artifact with the 17-file contract (content 3c145eb9), while every release since v0.4.4 ships content ef266d16 (19 files). Coven's release runbook requires the SDK canary to consume the released archive and its recorded SHA-256. The lock, the exact-runtime CI reproduction and the pinned test values now name the producer of the released v0.4.7 bundle: source c93a8a93, CI run 37077748408 job 111071346442, artifact 11257472104, bundle fcb084bd (byte-identical to the GitHub release asset and to a local reproduction from the tag), manifest 976c9b70, content ef266d16. The canary already supports the 19-file contract, so no SDK source changes. Refs #80 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs: describe the rebound Automations pin instead of the historical one The README still called the lock the unchanged historical pin that does not certify coven#991/#999; it now names the v0.4.7 release producer, whose contract includes them. The roadmap records the rebinding and corrects two statements this program has since overtaken: individual run lookup and per-automation history landed in SDK #330, #331 and #333, and Coven persists rich definitions (coven#1185) that SDK #336 sends. Refs #80 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part of #80. This is the SDK consumer of the producer's new
run.history.v1(OpenCoven/coven#1160, part of coven#1054).What
automations.runHistory(automationId, { limit?, cursor?, occurrenceId? })over the capability-gatedcoven.automations.run.history.v1.Page:{ automationId, occurrenceId?, data, cursor }.id, each with attempts and any cancellation, validated exactly likeruns().automations.iterateRunHistory(automationId, BoundedPageOptions, { occurrenceId? }), built oniteratePages.{ action, automationId, limit, occurrenceId?, cursor? }, with trimmed ids of at most 4096 bytes, well-formed Unicode, and a canonical cursor of at most 256 characters (the spec bound).occurrenceIdecho, or a run of another occurrence;hasMoreornextinconsistencies, or nocurrentecho.automations-history.ts, used by both history reads. Occurrence history's behavior is unchanged, and its page cursor type is now the named, structurally identicalCovenAutomationHistoryCursor.Verification
pnpm verifypassed: 3054 tests, contracts, package, coverage, stress and lint.Content-Length: 262145yieldsbody_limit.🤖 Generated with Claude Code