Skip to content

Share automations in solenta.json with per-machine opt-in (#1590) - #1605

Merged
currentbits merged 14 commits into
mainfrom
coder/automations-permission-scopes-private-vs-bdf997
Oct 12, 2026
Merged

currentbits merged 14 commits into
mainfrom
coder/automations-permission-scopes-private-vs-bdf997

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Project-scoped automations now live in solenta.json so teammates can share definitions. Each machine still opts in before those automations auto-fire. Closes #1590.

Changes

  • Shared definitions live in solenta.json; enabled, cursor, and memory stay in the local overlay (shared:<projectId>:<slug>).
  • Auto-fire requires enabled on this machine and, for project scope, automationsTrust matching the current automations hash (separate from command trust).
  • Approve-and-run trusts the file and fires once without flipping enabled.
  • The ticker, GitHub poller, and Run now all execute the merged file definition, not a stale overlay prompt.
  • Automations UI: scope select, project badge, approve card, and a write-to-file note after a real solenta.json write.

Verification

  • electron/test/automations.test.js + automations-file.test.js + automation-triggers.test.js + webScopes.test.js: 80 pass
  • test/automationsView.test.tsx: 33 pass
  • npm run typecheck: pass
  • Not tested: full npm test / test:electron sweep on this HEAD; earlier Task 8 sweep was before the two review-fix commits

Notes for reviewers

  • main has moved (#1588/#1604 Linear/Sentry poller, #1599 chat-created enable). Expect merge conflicts in electron/automation-triggers.js and automations UI/settings.
  • Leftover polish (slug overflow past 48 chars, 256 KB oversize test, trigger-cursor re-baseline on event-type change) is a follow-up, not in this PR.
  • There is no projects:changed push; trust and approve-and-run re-list via api.projects.list().

cursor-grok-4.6 via Cursor

Made with Cursor

Solenta and others added 13 commits October 11, 2026 21:09
Solenta-Message-Id: b1bb2813-6247-4eb2-8dff-6aaac1887a70
Solenta-Message-Id: 5810051b-42c9-433f-a737-2f5b1b226e91
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Memory-only project-scope saves never rewrite the file, so the commit prompt was a lie.

Co-authored-by: Cursor <cursoragent@cursor.com>
…1590)

Approve-and-run was firing a stale overlay prompt, file-only listed rows threw, and the approve card did not refresh after trust.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T09:50:18.318528Z 88e934d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Keep the poller on the merged file row and use main's Linear/Sentry trigger-note title.

Co-authored-by: Cursor <cursoragent@cursor.com>
@currentbits
currentbits merged commit b2af5e1 into main Oct 12, 2026
4 of 6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88e934da3a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

lastError: overlay.lastError,
consecutiveFailures: overlay.consecutiveFailures,
pendingRunThreadId: overlay.pendingRunThreadId,
nextRunAt: overlay.nextRunAt,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Recompute due time when a shared schedule changes

When a checked-in automation changes its preset or hour while this machine already has an overlay, the merge unconditionally retains the overlay's old nextRunAt. Approving the new file hash therefore leaves a weekly-to-hourly change dormant until the old weekly deadline, or can fire a newly daily automation at the old hourly deadline. Compare the stored definition fields with the file definition and recompute nextRunAt when the schedule changed.

Useful? React with 👍 / 👎.

Comment on lines +597 to +598
const written = writeAutomations(project.path, rows);
persistAutomationsTrust(store, project.id, written.hash);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refresh project metadata after shared automation writes

When an untrusted project automation is edited, this path writes a new hash and auto-trusts it, but the renderer's add/update/remove callbacks only refresh the automation list, not projects. The view consequently retains the old untrusted automationsFile hash, keeps the enable toggle disabled, and offers an Approve action that fails as stale until some unrelated project refresh occurs. Shared CRUD should re-list projects, or the main process should push the updated project metadata.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automations: permission scopes (private vs project-shared)

1 participant