Repository navigation
test(automations): drive Cave against the released Coven daemon (#5217) - #5782
Merged
Merged
Conversation
Adds an exact-release canary for Cave's Automations surface, the gap #5509's isolated-daemon evidence explicitly did not claim and the last canary slice of OpenCoven/coven#1054. `pnpm canary:automations-release` installs the @opencoven/cli release pinned in fixtures/coven-automations-release at its locked integrity, requires `npm audit signatures` to verify its signatures and attestations, and starts `coven daemon serve` in an owned temporary COVEN_HOME. It then drives Cave's own code through Cave's daemon transport: - coven-automations-client creates, reads, lists, revises and deletes a paused utc routine, and a daemon refusal stays a typed refusal rather than an outage; - the history route returns the created and revised events, and a checkpoint taken before a daemon restart resumes with only the removal, then an empty page; - with the daemon stopped, the client reports it degraded and the route answers 503 unavailable instead of falling back. The daemon is stopped and its home removed on success, failure, SIGINT or SIGTERM. CI runs the canary as a frontend validation lane, and .gitignore makes an explicit exception for the fixture's npm lockfile.
Open
9 tasks
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Fixture-only release bumps currently bypass frontend validation, allowing the exact-release canary to be skipped.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds an exact-release integration canary that exercises Cave Automations against the published Coven daemon.
Changes:
- Installs and verifies pinned
@opencoven/cli@0.4.8. - Tests lifecycle, restart, history checkpoint, refusal, and offline behavior.
- Adds unit coverage and a dedicated CI validation lane.
| File | Description |
|---|---|
scripts/coven-automations-release-canary.ts |
Implements the daemon canary. |
scripts/coven-automations-release-canary.test.ts |
Tests scenario invariants and pin consistency. |
scripts/run-tests.mjs |
Wires the new tests. |
scripts/ci-recovery-workflow.test.mjs |
Updates the CI matrix contract. |
package.json |
Adds the canary command. |
fixtures/coven-automations-release/package.json |
Pins the CLI release. |
fixtures/coven-automations-release/package-lock.json |
Locks package integrity. |
.gitignore |
Allows the fixture lockfile. |
.github/workflows/ci.yml |
Adds the release-canary lane. |
Files not reviewed (1)
- fixtures/coven-automations-release/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A pull request that only bumps fixtures/coven-automations-release classified as no frontend change, so it skipped both the pin test and the exact-release canary that should validate the bump. Route that fixture directory to frontend validation, and pin the routing in ci-paths.test.mjs. Other fixtures are unaffected.
6 tasks
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.

Summary
Adds
pnpm canary:automations-release. It installs the published@opencoven/cli(pinned to0.4.8) at its locked integrity and drives Cave's own Automations code against that real daemon: the routine client and the history route, across a daemon restart and after the daemon is gone. CI runs it as a new frontend validation lane.Why
Part of #5217, on the maintainer's instruction (continuation note on #5217). #5509's evidence came from an isolated daemon built from source, and its PR explicitly did not claim an exact-release canary. OpenCoven/coven#1054 lists that same Cave canary as its last open slice. The SDK's counterpart is OpenCoven/sdk#338 and #339.
Changes
scripts/coven-automations-release-canary.ts. Setup:fixtures/coven-automations-releasewithnpm ci --ignore-scripts;npm audit signaturesto verify registry signatures and attestations;coven --version;coven daemon servein an owned0700temporaryCOVEN_HOME, with a minimal environment and no harness.It then points Cave at that home and drives Cave's real modules:
createAutomationReadClient): the routine actions andevents.subscribe.v1must be advertised.coven-automations-client): create a pausedutcroutine, read it, list it, find it has no runs, and revise it. A create the daemon refuses (an invalid id) must stay a typed refusal (degraded: false), not an outage.GET /api/coven-automations/[id]/events: entries0 Definition created / Revision 1and1 Definition revised / Revision 2, with a checkpoint.daemon.jsonand the socket, then a fresh start): the revision survives. Delete returnstrue, a second delete returnsfalse, and the routine is thennull.2 Definition removed / Revision 3, and the checkpoint after that returns an empty page.degraded: true, and the route must answer503 {"kind":"unavailable"}.The daemon and the home are removed on success, failure, SIGINT or SIGTERM, which exit 130 or 143. Because the npm wrapper cannot forward SIGKILL, the native pid recorded in
daemon.jsonis killed as a last resort. Unix only.fixtures/coven-automations-release/:package.jsonand an npmpackage-lock.json(v3) pinning@opencoven/cli@0.4.8and its four platform packages at registrysha512integrity..gitignoregets an explicit, commented exception for this one lockfile; the root rule against stray npm lockfiles stays.scripts/coven-automations-release-canary.test.ts, 11 tests, wired intotest:app:package.json, the registry URLs and integrity, the CI lane, and the package script;package.json: thecanary:automations-releasescript..github/workflows/ci.yml: a newfrontend-validationlane, "Automations release canary".scripts/ci-recovery-workflow.test.mjspins the matrix and is updated to match.scripts/ci-paths.mjs: routesfixtures/coven-automations-release/to frontend validation, so a pin bump runs the canary lane. This addresses the Copilot finding, andci-paths.test.mjspins the routing.Verification
pnpm canary:automations-releaseagainst the published 0.4.8, about 4 s including the npm install:cvc-*temp root and no canary daemon remained afterwards.coven-automations-client11/11;coven-automations-sdk11/11;ci-recovery-workflow;ci-paths14/14, including the new routing case;check-merge-tree-freshness9/9;release-promotion-workflow12/12.pnpm typecheck,pnpm lintandpnpm check:tests-wiredall pass; all 2,103 test files are wired.Risk + rollout notes
pnpm installalready does.npm install --package-lock-only --ignore-scriptsinfixtures/coven-automations-release. The pin test keeps it consistent.Signed-off-byline. That certification belongs to the human contributor, so it is left for the maintainer to add if wanted.