Repository navigation
feat(workflow): serve the pinned copy to public viewers - #8575
Draft
yangzhang75 wants to merge 2 commits into
Draft
yangzhang75 wants to merge 2 commits into
yangzhang75 wants to merge 2 commits into
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
This was referenced Sep 17, 2026
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 389 | 0.238 | 24,978/33,145/33,145 us | 🟢 -8.5% / 🔴 +144.8% |
| 🔴 | bs=100 sw=10 sl=64 | 774 | 0.473 | 126,314/184,655/184,655 us | 🔴 +26.8% / 🔴 +97.9% |
| ⚪ | bs=1000 sw=10 sl=64 | 917 | 0.559 | 1,088,461/1,192,807/1,192,807 us | ⚪ within ±5% / 🔴 +32.3% |
Baseline details
Latest main be65bf8 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 389 tuples/sec | 416 tuples/sec | 983 tuples/sec | -6.5% | -60.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.238 MB/s | 0.254 MB/s | 0.6 MB/s | -6.3% | -60.3% |
| bs=10 sw=10 sl=64 | p50 | 24,978 us | 24,560 us | 10,903 us | +1.7% | +129.1% |
| bs=10 sw=10 sl=64 | p95 | 33,145 us | 36,228 us | 13,539 us | -8.5% | +144.8% |
| bs=10 sw=10 sl=64 | p99 | 33,145 us | 36,228 us | 16,174 us | -8.5% | +104.9% |
| bs=100 sw=10 sl=64 | throughput | 774 tuples/sec | 828 tuples/sec | 1,259 tuples/sec | -6.5% | -38.5% |
| bs=100 sw=10 sl=64 | MB/s | 0.473 MB/s | 0.505 MB/s | 0.769 MB/s | -6.3% | -38.5% |
| bs=100 sw=10 sl=64 | p50 | 126,314 us | 120,044 us | 86,981 us | +5.2% | +45.2% |
| bs=100 sw=10 sl=64 | p95 | 184,655 us | 145,683 us | 93,289 us | +26.8% | +97.9% |
| bs=100 sw=10 sl=64 | p99 | 184,655 us | 145,683 us | 105,695 us | +26.8% | +74.7% |
| bs=1000 sw=10 sl=64 | throughput | 917 tuples/sec | 919 tuples/sec | 1,300 tuples/sec | -0.2% | -29.4% |
| bs=1000 sw=10 sl=64 | MB/s | 0.559 MB/s | 0.561 MB/s | 0.793 MB/s | -0.4% | -29.5% |
| bs=1000 sw=10 sl=64 | p50 | 1,088,461 us | 1,081,411 us | 854,105 us | +0.7% | +27.4% |
| bs=1000 sw=10 sl=64 | p95 | 1,192,807 us | 1,141,749 us | 901,686 us | +4.5% | +32.3% |
| bs=1000 sw=10 sl=64 | p99 | 1,192,807 us | 1,141,749 us | 924,532 us | +4.5% | +29.0% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,513.70,200,128000,389,0.238,24978.46,33145.44,33145.44
1,100,10,64,20,2582.83,2000,1280000,774,0.473,126314.45,184655.31,184655.31
2,1000,10,64,20,21819.62,20000,12800000,917,0.559,1088460.97,1192806.74,1192806.74
This was referenced Sep 17, 2026
❌ 2 Tests Failed:
View the top 1 failed test(s) by shortest run time
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
1 of 7 tasks
yangzhang75
force-pushed
the
pin/3-read-paths
branch
3 times, most recently
from
September 28, 2026 21:13
6ff993b to
e1f144b
Compare
yangzhang75
force-pushed
the
pin/3-read-paths
branch
from
October 6, 2026 18:01
e1f144b to
aad6703
Compare
yangzhang75
marked this pull request as ready for review
October 6, 2026 18:42
yangzhang75
marked this pull request as draft
October 7, 2026 01:35
A public workflow follows the author's latest content, as publishing has
always done. This adds the other state: the author pins the version they
have now, and the public copy stops moving until they pin again.
`is_public` stays the on/off switch; `published_content` is the pin, NULL
while following. `WorkflowPublishService` owns the two states, and three
endpoints expose them: POST and DELETE `/workflow/pin/{wid}` to pin and
unpin, GET `/workflow/publish-status/{wid}` for what the author is shown.
Publishing and unpublishing move through the same service, so unpublishing
drops the pin rather than leaving a private workflow carrying one.
Two paths are narrowed so a pin can hold. A save wrote the whole row back,
so a publish landing while a save was in flight was silently rolled back,
and a request body could set the publish columns itself; saves now write
only name, description and content. Creating a workflow clears the publish
columns for the same reason.
Nothing reads the pinned copy yet: every workflow is in the following
state it is in today, and nothing on screen changes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
With a version pinned, a workflow has two copies: the author's working copy and the frozen one on public show. This routes every read that serves a viewer without granted access through the frozen copy, and freezes the name and description with the graph. `WorkflowPublishService.publicCopyOf` returns the three fields as a group, so a surface cannot pick up the published graph under a title the author has not published; `WorkflowAccessResource.hasGrantedAccess` is the seam that decides which copy a caller gets. Granted access -- owner, shared, project member -- keeps tracking the author's latest, because sharing is not publishing. Name and description freeze because they are as public as the graph: if only the graph froze, a report about a title could be answered by editing the title while the pinned copy still advertised it. Routed through it: opening a workflow, the hub's read, Clone, Duplicate, `/workflow_name`, `/workflow_description` and the size a listing shows. A workflow that follows the author's latest -- every workflow today -- is served exactly what it is served now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
yangzhang75
force-pushed
the
pin/3-read-paths
branch
from
October 8, 2026 18:07
aad6703 to
7824786
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
With a version pinned, a workflow has two copies. This routes every read that serves a viewer
without granted access through the frozen one.
WorkflowAccessResource.hasGrantedAccess(wid, uid): granted access, as opposedto being able to read a workflow only because it is public. An owner or a shared user keeps
tracking the author's latest, because sharing is not publishing. Everyone else is here only
because the workflow is public, and gets the public copy.
WorkflowPublishService.PublicCopycarries the name, thedescription, the content and the default view together, and
publicCopyOfhands them out as agroup, so no surface can serve the published graph under a title the author never published, or
open a form view over a copy whose content carries no form.
Duplicate,
/workflow_name,/workflow_description, and the size a listing shows.from the author's current content, so listing or checking out versions would hand a public
viewer the drafts the pin is holding back.
canReadHistorykeeps the history open to anyonewith granted access, and to everyone while nothing is pinned — the public copy is then the
author's latest and its history is the history of what everyone can already see.
A workflow that follows the author's latest — every workflow today — is served exactly what it
is served now.
publicCopyOfreturns the working copy when nothing is frozen, so with no UI topin from yet (that arrives later in the series), nothing anyone can see changes.
Any related issues, documentation, discussions?
Closes #7939
Part of #7828. Design discussion: #7128. Stacked on #7853, which this needs and which is under
review; until that merges, this PR shows its commit too and the review here is the second one.
How was this PR tested?
22 new cases in
WorkflowPublishSpec(54 in the suite, 540 in the dashboard package):the author still opening everything they have;
still clones its working copy and a copy starts with no publish state of its own;
not, and a public workflow with nothing pinned keeps the history it has today;
The history guard was checked by mutation: restoring
hasReadAccessturns the leak case red,and the case was written from a reproduction — a stranger retrieving a version of a pinned
workflow and getting back an unpublished draft.
scalafmtCheckAllclean.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)
🤖 Generated with Claude Code