Skip to content

Harden single-session ownership before release - #40

Merged
slate-rehm merged 2 commits into
devfrom
feature/promotion-review-fixes-2
Aug 8, 2026
Merged

Harden single-session ownership before release#40
slate-rehm merged 2 commits into
devfrom
feature/promotion-review-fixes-2

Conversation

@slate-rehm

@slate-rehm slate-rehm commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Harden the stateless single-session release after promotion review.

  • Keep verified live operations exclusive even when a heartbeat timestamp expires.
  • Stop and report failed ownership updates, then repair stale operation counts on the next FIFO call.
  • Use the active target for doctor and isolated-vault checks.
  • Correct lifecycle, toolset, and release documentation.
  • Strengthen static and live regression coverage.

Verification

  • npm run check
  • npm run typecheck
  • npm test — 470 assertions
  • npm run build
  • npm run smoke — 31 checks
  • npm run acceptance — 20 checks
  • Settings fixture E2E — 93 checks
  • npm run workspaces — 7 checks
  • npm run fence — 16 checks
  • npm run bg-input — 6 checks
  • npm pack --dry-run

Note

Harden single-session ownership to prevent reclamation during active operations

  • ActivityGuard.acquire now only reclaims an existing record when the owner process is dead or when activeOperations is 0 and the record is expired, preventing mid-operation ownership theft
  • activeOperations is set to 1 on acquire and reset to 0 on complete; complete stops the heartbeat and invokes a new onError callback on failure
  • obsidian_doctor and obsidian_create_vault now branch on ctx.targetKind === 'isolated' instead of checking config.sessionId, aligning provisioning logic with the active target kind
  • Tool metadata for obsidian_create_vault, obsidian_unregister_vault, and obsidian_link_plugin is updated to mark them as destructive and not read-only
  • An e2e test verifies that a second vault cannot be created inside an isolated session and that obsidian_doctor reports the correct active target
  • Behavioral Change: heartbeat and completion errors now emit a warning log via onError rather than being silently dropped

Macroscope summarized 07ea647.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b9737cc-d8ce-4879-9feb-962130ec0fbc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Comment thread src/usage/activity-guard.ts Outdated
@slate-rehm

Copy link
Copy Markdown
Collaborator Author

#AI-Automation

  • Kept heartbeat retries active after transient lock or write failures.
  • Stopped failed completion heartbeats and repaired stale operation counts on the next FIFO call.
  • Prevented timestamp expiry from overriding a verified live operation.
  • Switched doctor and isolated-vault guards to the active runtime target.
  • Added dynamic-target, settings UI, ownership, and test-contract coverage.
  • Corrected toolset, lifecycle, CDP, and release documentation.
  • All CI jobs passed on Node 20, 22, and 24.
  • The packaged-install check, Macroscope, and CodeRabbit checks passed.

@slate-rehm
slate-rehm merged commit b9fa679 into dev Aug 8, 2026
6 checks passed
@slate-rehm
slate-rehm deleted the feature/promotion-review-fixes-2 branch August 8, 2026 22:28
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