Skip to content

Keep active ChatGPT workspace leases alive - #16

Merged
alexanderradahl merged 3 commits into
mainfrom
fix/chatgpt-lease-heartbeat-20260830
Aug 30, 2026
Merged

Keep active ChatGPT workspace leases alive#16
alexanderradahl merged 3 commits into
mainfrom
fix/chatgpt-lease-heartbeat-20260830

Conversation

@alexanderradahl

Copy link
Copy Markdown
Owner

Summary

  • renew active ChatGPT workspace leases every 60 seconds during long page execution
  • stop the heartbeat before normal workspace release while preserving stale-lease reclamation
  • bump the background extension contract to 0.2.11 and add fake-time reconciliation coverage

Test plan

  • npm test
  • npm run check
  • node tests/chrome-workspace-capacity.mjs
  • node tests/chrome-background.mjs
  • git diff --check

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 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-08-30T14:29:48.628072Z 106db93 Manual request
ℹ️ 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.

@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: 90c14d3ab6

ℹ️ 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".

Comment thread chrome-extension/service-worker.js Outdated
}

async function startWorkspaceLeaseHeartbeat(tabId) {
if (!await touchWorkspaceLease(tabId)) return () => {};

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 Do not let the initial heartbeat renewal abort the request

If this immediate touchWorkspaceLease rejects—for example, because of a transient chrome.storage.local.set failure—the exception escapes startWorkspaceLeaseHeartbeat, so executeInTab is never called and the ChatGPT request fails. Each tab-selection path has already established or touched the lease before reaching this helper, so this redundant renewal newly turns a recoverable heartbeat failure into a conversation failure; handle the initial renewal failure as best-effort, like the interval renewals.

Useful? React with 👍 / 👎.

@alexanderradahl

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 106db93914

ℹ️ 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".

@alexanderradahl
alexanderradahl merged commit fea70d1 into main Aug 30, 2026
2 checks passed
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