Skip to content

feat(cursor): add typed stopping consumer - #338

Merged
777genius merged 3 commits into
mainfrom
feat/cursor-stopping-consumer
Oct 5, 2026
Merged

777genius merged 3 commits into
mainfrom
feat/cursor-stopping-consumer

Conversation

@777genius

@777genius 777genius commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Scope

Thin Cursor Stop decoder and consumer using public typed SDK, existing AN bounded claim/deadline cache and an injected trusted authority gate. Fixed informational stopping text for completed, aborted or error. Real schema2 Cursor profile isolation without borrowing another agent or global opt-in.

Current head 638e1c430e91898c6b1359ae28565e9549030720, based on accepted main 2813f2ebcedd5f8625364dfa341810344a348f4d. Nine owned files, 1,086 changed LOC: seven N1 source owners and two existing installer shell owners. All nine exact approved blobs remain unchanged while preserving accepted upstream history and public dependency graph.

Independent source review and focused verification

  • R148 gpt-6.1-sol xhigh/default APPROVE seven N1 source blobs: public typed SDK decode, real profile-isolation behavioral RED/GREEN, shared cache/concurrent claims, retained uncertain effects and fixed delivery boundary.
  • R161 gpt-6.1-sol xhigh/default/account-v APPROVE exact two-line installer correction. Fresh existing 30 assertions passed without skips, including live/foreign/replacement-owner protection, and controlled old-source RED / actual candidate GREEN proved late heartbeat touch cannot recreate removed metadata. Original stale-lock disappearance assertion preserved. Earlier producer ephemeral raw logs were unavailable and received no independent credit; R161 retained actual commands and raw outputs.
  • Root also retained controlled Linux and Mac Darwin24.6arm64/Bash3.2.57/BSDtouch RED/GREEN. The specific holder from the original CI incident is not identified; causal source race is proven.
  • R164 exact638 public dependency graph: 113 modules, no Replace/developer overlay. Current SDK01f7, agentplugins0109 and integrationctlf80d. Existing Cursor source/consumer tests passed once with -race; six existing focused config tests passed. Nine approved blobs unchanged.
  • Exact AN golangci-lint2.12.2 with unchanged configuration passed. Previously inherited privileged config fixtures separately passed in a fresh TEST checkout with real child UID65534; unavailable unrelated UID fixtures were not rerun or skipped to claim green.

Final CI and limitations

Merged as b940b7a514ef934a95032f68878b89b40491a564 after all 20 actual final-head contexts passed on 638e1c430e91898c6b1359ae28565e9549030720. One Windows1.25 job was cancelled before steps and had no available log; only that undemonstrated job was rerun successfully. Successful current-code gates were preserved, including macOS installer E2E. Independent source approvals, all nine owned blobs, owner author/issue link and original head ancestry were verified after merge.

No affirmative installed physical proof, setup enablement, native E2E, release or new target is claimed. This checkpoint prepares the fixed injected effect boundary for the separately scoped installed Cursor vendor adapter and existing lifecycle composition. No new SDK, OS writer, event bus, lease or storage subsystem.

Refs #105

Decode the pinned public Cursor Stop contract into private AN facts. Apply the Cursor config profile, existing bounded claims, fixed informational delivery and injected trusted authority. Installed lifecycle wiring remains a separate checkpoint.

Refs #105
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d3824f1b-e98a-4693-a626-8630554677a0
📥 Commits

Reviewing files that changed from the base of the PR and between 7e40d7a and 951fcbd.

📒 Files selected for processing (2)
  • bin/install.sh
  • bin/install_e2e_test.sh

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The changes add Cursor to agent profile selection, introduce decoding and validation for Cursor stop events, and add a consumer for eligible events. The consumer applies channel policy, deduplicates delivery claims, and reports desktop and webhook outcomes. The installer heartbeat update and stale-lock test also change.

Changes

Cursor stopping events

Layer / File(s) Summary
Cursor profile selection
internal/config/agents.go, internal/config/effective.go, internal/cursorevent/consumer_test.go
Configuration recognizes AgentCursor and preserves it for effective profile lookup. Tests cover Cursor-specific profile selection and channel settings.
Cursor event decoding
internal/cursorsource/source.go, internal/cursorsource/source_test.go
The Cursor source boundary validates stop-event payloads and returns typed facts. Tests cover accepted status and loop-count values, plus rejected frames and selectors.
Cursor event consumption and delivery
internal/cursorevent/cache.go, internal/cursorevent/consumer.go, internal/cursorevent/consumer_test.go
The consumer validates bindings and event status, claims enabled channels, rechecks gate policy, and delivers fixed desktop or webhook content. Tests cover profile policy, deduplication, admission and cache failures, and delivery outcomes.

Installer lock handling

Layer / File(s) Summary
Heartbeat and stale-lock test
bin/install.sh, bin/install_e2e_test.sh
The heartbeat command no longer creates a missing file. The stale-lock test attempts release only if acquisition succeeds.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Consumer
  participant Gate
  participant RecentCache
  participant Desktop
  participant WebhookSender
  Consumer->>Gate: Get enabled channels
  opt Desktop enabled
    Consumer->>RecentCache: Claim desktop event marker
    RecentCache-->>Consumer: Claim result
    Consumer->>Gate: Recheck desktop policy
    Gate-->>Consumer: Policy result
    Consumer->>Desktop: Deliver fixed notification
  end
  opt Webhook enabled
    Consumer->>RecentCache: Claim webhook event marker
    RecentCache-->>Consumer: Claim result
    Consumer->>Gate: Recheck webhook policy
    Gate-->>Consumer: Policy result
    Consumer->>WebhookSender: Send fixed webhook message
  end
Loading

Merge Risk: ⚪ Minimal · up to 951fc

The Cursor consumer uses the supplied effective profile, with installation wiring separately scoped. The reported macOS lock-release assertion remains unverified and is not established as a blocker to normal installation.

Architecture Summary

Architecture risk: 🔵 Low · up to 951fc

The change affects 2 systems.

Changed systems: bin, internal

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — bin (service) was modified; 2 changed files map to changed impact.
  • observed — internal (service) was modified; 7 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in internal/config/agents.go: Added the AgentCursor identifier with value "cursor".
  • observed — Modified behavior in internal/config/effective.go: AgentCursor is now included among the agents that retain their identity for profile lookup; previously it fell through to the empty-agent profile.
  • observed — Modified behavior in internal/cursorevent/cache.go: Adds marker, which hashes the listed binding and event-fact values in order, prefixing each UTF-8 value with its 8-byte big-endian length, then returns the SHA-256 digest as hexadecimal.
  • observed — Modified behavior in internal/cursorevent/consumer.go: Adds the cursorevent package and imports for fact validation, configuration, notification delivery, observation claims, webhook sending, and UUID generation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 46.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the change: a typed consumer for Cursor stopping events.
Description check ✅ Passed The description explains the change and provides substantial verification details. It does not use the template’s Summary and Test plan headings, and it omits the CLA section and acceptance statement.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

I’m a rabbit with a cursor to chase,
Stop-event facts hop into place.
Claims keep each channel in view,
Desktop and webhook get messages true.
A lock-file heartbeat skips a missing trail,
And a guarded release completes the tale.

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.43662% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.97%. Comparing base (2813f2e) to head (638e1c4).

Files with missing lines Patch % Lines
internal/cursorsource/source.go 75.75% 5 Missing and 3 partials ⚠️
internal/cursorevent/consumer.go 93.00% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
+ Coverage   65.85%   65.97%   +0.11%     
==========================================
  Files         290      293       +3     
  Lines       31779    31920     +141     
==========================================
+ Hits        20929    21060     +131     
- Misses       7781     7786       +5     
- Partials     3069     3074       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Maintain the existing heartbeat without recreating a released pathname. Preserve the stale-lock cleanup assertion and require acquisition success before fixture release.

Refs #105
Preserve accepted upstream OpenCode history and validate Cursor against its updated public SDK graph. All nine Cursor and installer source blobs remain unchanged.

Refs #105
@777genius
777genius merged commit b940b7a into main Oct 5, 2026
21 of 22 checks passed
@777genius
777genius deleted the feat/cursor-stopping-consumer branch October 5, 2026 08:47
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve the dependency stack and its verified checkpoints.

Refs #248, #247, #246, #245, #244, #316, #319, #145, #307, #322, #323
Refs 777genius/agent-notifications#338
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve the registered research dependency stack. This is a source foundation checkpoint; native lifecycle qualification remains required before activation.

Refs #308, #304, #310, #312, #313, #314, #315, #317, #320, #321, #145, #307, #247, #248, #246, #245, #244, #316, #319, #322, #323
Refs 777genius/agent-notifications#338
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Refs #249, #248, #247, #308, #324, #145, #307
Refs 777genius/agent-notifications#338
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Refs #250, #249, #248, #247, #308, #324, #145, #307
Refs 777genius/agent-notifications#338
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
…#310)

Preserve the registered research stack and independently reviewed checkpoints. Retain original reservation receipts across post-await refusal and protect newer ownership during compensation. Native lifecycle qualification remains required before activation.

Refs #310, #308, #304, #312, #313, #314, #315, #317, #320, #321, #145, #307, #324
Refs 777genius/agent-notifications#338
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
…253)

Preserve local dependency source lifetime and both required native CI gates. Independent gpt-6.1-sol high review accepted the current source. All 16 jobs passed on the exact merge tree; organization checks passed. Native activation remains disabled.

Refs #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve PR258 and PR257 histories. Genuine V1 logical-only captures close their cold handoff and use existing fresh canonical qualification; V2 physical retention remains unchanged. Independent gpt-6.1-sol high source review accepted the bounded correction. Native actual-caller qualification remains pending.

Refs #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve original PR259 and current PR258 histories. All eight readonly custody foundation blobs remain byte-identical. Independent gpt-6.1-sol high source review accepted exact tree6543eed2fc9fad8c11e05d790af9932fd547972c. Readonly activation and native qualification remain disabled/pending.

Refs #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve PR260 and current PR259 histories. The receipt-root conflict retains equivalent inode/private-mode/late root guards and both concurrent-publication regression sets. Independent gpt-6.1-sol high source review accepted tree6826b2eb13083b9b8d56b17b9ada36fc1bc1970b. Diagnostic Unknown and NotEstablished do not authorize native readiness or cleanup.

Refs #260, #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve PR261 and actual PR259 parent histories. Receipt-root custody guards and the generation retirement verifier both remain intact. Independent gpt-6.1-sol high source review accepted tree2ed126c531df4e1a51caf82e9746144dd117592f. Readonly activation and native qualification remain pending.

Refs #261, #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve original PR262 and current PR261 histories. All eight own blobs remain byte-identical. Independent gpt-6.1-sol high source review accepted tree4d65e7a3d7c1d100c10e37e102430dff73988e28. FD/system-bus authority guards, root custody, retirement verifier and cold V1 fallback remain intact; native qualification is pending.

Refs #262, #261, #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve original PR263 and current PR262 histories. All four own blobs remain byte-identical. Independent gpt-6.1-sol high source review accepted tree8ef9508c1603c0eae7cd6554f4b8059a761baf0b. Root Git profile, FD/mount/custody guards and V1 fallback remain intact. Actual native pin/helper/provider qualification remains pending.

Refs #263, #262, #261, #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Restore nine unchanged parent storage-accounting paths while preserving all eight reviewed custody postimages.

Refs #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Compose current main while preserving the inactive readonly custody checkpoint.
Reuse the existing custody workspace validator for version 3 owners, rejecting
secret-like and control-bearing paths before CAS mutex or durable publication.
Preserve version 1 and 2 parsing and add eight parser/store regression cases.

Refs #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248,
#247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve the reviewed inventory DATA checkpoint while composing the exact
current PR261 parent and its v3 workspace validation. No activation or native
qualification is added.

Refs #262, #261, #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve the four Root Git profile files while adopting the current
read-only inventory parent without expanding installer authority.

Refs #263, #262, #261, #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Adopt reviewed native-web receipt and bounded-storage Source changes
while retaining both core exports and the version-three custody parser fix.

Refs #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #348, #325, #310, #319, #307, #145 and 777genius/agent-notifications#338.
777genius added a commit to 777genius/ar that referenced this pull request Oct 16, 2026
Preserve accepted readonly origin and continuity guards while retaining the actual merged custody, settlement and Native NEWTEST parent histories.

Refs #261, #259, #258, #257, #256, #255, #254, #253, #252, #251, #250, #249, #248, #247, #244, #310, #319, #307, #145 and 777genius/agent-notifications#338.
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.

1 participant