Skip to content

feat(share): prepare review content before opening a link - #7542

Merged
terencecho merged 2 commits into
mainfrom
codex/share-kernel-before-open
Nov 11, 2026
Merged

terencecho merged 2 commits into
mainfrom
codex/share-kernel-before-open

Conversation

@terencecho

@terencecho terencecho commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

Add an optional beforeOpen(projectId) hook to the shared review kernel. Expose authenticated storyboard read and composition binding methods on the review client.

Why

A host with a synced storyboard needs to bind and validate its content after review registration and before making the link accessible. The shared kernel owns the project lock, durable registration and audience changes, so the host needs an explicit point in that sequence.

Related work

The CLI share work in #7135 also uses the shared kernel.

How

After persisting the review ID and checking the current share for a takedown, call the optional hook under the existing project lock only for first opening or reopening a revoked link. Already-open links return their status without preparing again. The hook must stay short and must not call same-project review-lock operations because the lock is not reentrant. A rejection stops link and audience changes. Retrying uses the recorded project ID. Hosts that omit the hook keep their existing flow.

Test plan

  • 65 share kernel tests passed, including first-open retry, already-open bypass, revoked-link preparation and retry, takedown and authenticated route tests.
  • Workspace build, share package build and typecheck passed.
  • Changed source passed oxlint and oxfmt.
  • Package README documents the hook and retry behavior.

@terencecho
terencecho marked this pull request as ready for review November 11, 2026 05:49

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: APPROVE · 0 blocker · 2 important · 0 nits

The hook placement is correct: after the record is saved, after the takedown short-circuit, and before linkOn or the first audience change. Retry reuses the registration. The server routes match EF master (GET /v1/hyperframes/projects/<id>/storyboard, and PUT …/review-projects/<id>/composition, which needs manage and the storyboards flag). Two contract gaps are noted inline. CI is green on bb0865f, and the 25 kernel tests pass locally.

Scope

Audited all 5 files, openLink, applyFirstAudience, heldInstead, oneAtATime and withProjectShareLock, plus the EF route and logic files for the two new client methods. Reentrancy was confirmed with a local probe: a nested oneAtATime call on the same path hung.

— Genesis

Comment thread packages/share/src/reviewShare.mjs Resolved
Comment thread packages/share/README.md Resolved

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: APPROVE · 0 resolved-open · 2 resolved · 0 new · bb0865f → f250120

@terencecho
terencecho added this pull request to the merge queue Nov 11, 2026
@terencecho
terencecho removed this pull request from the merge queue due to a manual request Nov 11, 2026
@terencecho
terencecho added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 6442aa1 Nov 11, 2026
113 of 119 checks passed
@terencecho
terencecho deleted the codex/share-kernel-before-open branch November 11, 2026 06:37
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