feat(coven): read one automation run by id and filter occurrences by automation - #330
Merged
Merged
Conversation
…automation
Add automations.getRun(runId) over the capability-gated
coven.automations.run.get.v1 producer action, returning one run with its
attempts or { run: null }, validated with the same rules as an occurrence
detail's runs. Add an optional automationId to automations.occurrences();
the producer applies it inside each view's query, and the SDK refuses a
filtered page naming any other automation and rejects a malformed filter
before transport I/O. Both need a producer that advertises them
(OpenCoven/coven#1155); older producers yield capability_unsupported.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Transport parity coverage and the README action allowlist still need updating.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds capability-gated run lookup and per-automation occurrence filtering to the Coven SDK.
Changes:
- Adds
getRun()with validation and absence handling. - Adds trimmed
automationIdfiltering and response checks. - Updates exports, documentation, API baseline, tests, and Changeset.
| File | Summary |
|---|---|
tests/coven-automations.spec.ts |
Tests filtering, run reads, validation, and capability gating. |
packages/coven/src/index.ts |
Exports the new run result type. |
packages/coven/src/automations.ts |
Implements client operations; moderate review note (1 vote) requests transport parity coverage. |
packages/coven/src/automations-occurrences.ts |
Adds filtering and shared run validation. |
packages/coven/src/automations-definitions.ts |
Updates request encoding and response decoding. |
packages/coven/README.md |
Documents the new APIs; nit review note (2 votes) requests updating the action allowlist and count. |
api-baselines/coven.d.ts |
Updates the public API baseline. |
.changeset/coven-get-run-occurrence-filter.md |
Records the package release change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8 tasks
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 (Phase 1:
getRun(runId)andoccurrences(automationId, …)).The producer landed in OpenCoven/coven#1156 at
552d827e0decebfc96181d31c5504113ac5e5c6f(closes coven#1155):coven.automations.run.get.v1 { id }returns{ run }with its attempts, read from one snapshot. It uses the same projection asoccurrence.get.v1's runs, and returns{ run: null }when the run is absent.coven.automations.occurrence.list.v1accepts an optionalautomationId. It is applied inside each view's query, solimitbounds that automation's rows. Foreligible, it is applied inside the scheduler's own eligibility query.SDK
automations.getRun(runId, operationOptions?)calls the exact advertised action. It validates the run with the same rules as an occurrence detail's nested runs:runsPayloadchecks;occurrenceId, revision, nullable digest, authority profile and timeout;The occurrence-run field checks are now one shared function, so
getOccurrenceandgetRuncannot drift.automations.occurrences({ view, limit?, automationId? })sends the trimmed filter.definitionReadBytesadmits the new action and the optional field and nothing else.Older producers. Both reads are capability-gated. A producer that does not advertise
run.get.v1yieldscapability_unsupported, never a fallback to another action.Also: the README section is updated,
CovenAutomationRunResultis exported, the packed API baseline is updated (exactly these additions), and a minor Changeset for@opencoven/coven-clientis included.Tests
tests/coven-automations.spec.tscovers:getRunsuccess and explicit absence;Mutation check: disabling the filtered-page check fails its test.
Validation: full
pnpm verifypasses, 3003 passed and 2 skipped.This does not change the frozen
cd10a3fcandidate, and it does not authorize publication.🤖 Generated with Claude Code