Repository navigation
Read a workflow stage out of the page HEY serves for it, and write down the Go parity - #169
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the documented Go behavior and includes focused wire and parser coverage.
Pull request overview
Adds Rust parity with Go for parsed workflow stages and topic moves.
Changes:
- Adds
WorkflowStageViewHTML parsing and tests. - Adds
Topics::move_to_box. - Documents Go/Rust parity and adds parser dependencies.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
File summaries
| File | Description |
|---|---|
rust/hey-sdk/src/services/workflows.rs |
Adds workflow-stage models and parser. |
rust/hey-sdk/src/services/topics.rs |
Adds topic-move convenience. |
rust/hey-sdk/src/services/mod.rs |
Re-exports stage models. |
rust/hey-sdk/tests/services_workflows.rs |
Tests stage fetching and parsing. |
rust/hey-sdk/tests/services_topics.rs |
Tests topic move requests. |
rust/hey-sdk/PARITY.md |
Documents Go-to-Rust parity. |
rust/hey-sdk/Cargo.toml |
Adds HTML parser dependencies. |
rust/Cargo.lock |
Locks parser dependency graph. |
conformance/runner/rust/Cargo.lock |
Updates runner dependencies. |
Review details
- Files reviewed: 7/9 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7493cc8734
ℹ️ 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".
7493cc8 to
afc881a
Compare
|
Codex CLI (
The Codex GitHub reviewer's P1 ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afc881a0aa
ℹ️ 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".
…wn the Go parity Workflows::stage answers a WorkflowStageView — the stage's name and its thread cards — parsed from the HTML get_stage returns, by the same rules Go's GetStage reads it: the element whose id names the stage, its first h2 for the name, every topic_<id> element for a card with its staging id, subject and email count, screen-reader text left out, a card whose ids will not parse left out. scraper (html5ever underneath, as Go uses x/net/html) does the parsing. Topics::move_to_box takes a bare box id, the one thing the generated move_topic's body carries, as Go's Topics.Move does. PARITY.md maps every Go service method to its Rust counterpart, says which behaviour the model declares and how each SDK honours it, and lists the Rust-only surface and the two waivers.
…say so in PARITY.md
afc881a to
2120114
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2120114e38
ℹ️ 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".
Since v0.30.0 the Rust crate's response types and enums are #[non_exhaustive] (#166, breaking), the Rust client honors each route's retry policy and the Go client holds its retry settings as a ceiling over it (#154, #164), operations carry tracing spans behind a feature (#165), a workflow stage is read out of the page HEY serves (#169), and the crate publishes to crates.io on the tag (#162). cargo semver-checks against v0.30.0 asks for the minor. The bump script still looked for the README dependency line #160 replaced. The READMEs now show the crates.io requirement, which names the minor, and the git dependency pinned to the release tag, which names the whole version; the script moves both and checks each.
Card: hey-sdk Rust: parity audit vs Go and WorkflowStageView
Based on
origin/main; independent of #165 and #168.WorkflowStageView
Workflows::stage(workflow_id, stage_id)answers aWorkflowStageView—id,name, andtopics: Vec<WorkflowStageTopic { staging_id, topic_id, subject, entry_count }>— parsed from the HTML the generatedget_stagereturns (that method still answers the page, unchanged). The parser mirrorsparseWorkflowStageHTMLingo/pkg/hey/workflows.gorule for rule: the element whose id iscontainer_workflow_stage_{id}(elseNotFound), its firsth2for the name, every element under it whose id istopic_<n>for a card,data-identifierfor the staging id, firsth3for the subject, the first whitespace field ofp.card__detailfor the count; a card is left out when either id will not parse as a positive integer or the detail line does not start with a count, and text undersr-only/screen-reader-only/u-for-screen-reader/visually-hiddenis left out of names and subjects. One addition Go gets by construction: a card inside a card is that card's content, not a card of its own.Parser:
scraperwith default features off (html5ever, selectors, cssparser, ego-tree, tendril — a spec-compliant HTML5 parser, which is what Go'sx/net/htmlis too; ~20 crates on the lock).WorkflowStageView::parse(html, stage_id)is public so a page fetched some other way can be read the same way.Tests: the wire test uses Go's own fixture from
TestWorkflowsService_GetStage(name without its screen-reader suffix, a full card, a sparse card, two cards with unparsable ids left out), a not-found page, and a parser test for the rules the fixture does not reach (count line without a count, empty detail, nested card, non-positive ids, surrounding markup, whitespace collapse).Parity audit
rust/hey-sdk/PARITY.mdis the checked-in Go → Rust mapping: every one of the 202 exported Go service methods against its Rust counterpart (131 generated methods, one per modelled operation and route, plus 121 conveniences), the behaviour the model declares and how each SDK honours it, the Rust-only surface, and the waivers.Findings:
GetStageparsing (closed here) andTopics.Move(topicID, boxID)— Rust only had the generatedmove_topic(id, &body)— closed here asTopics::move_to_box(topic_id, box_id)with a wire test.Contacts.Clearances(deprecated in Go;clearances().summary()is the same read) andClient.BoxIDByKind(a client method in Go;Boxes::id_by_kindis the counterpart).generated.IsIdempotent("UpdateMessage")andbehavior-model.jsonsay idempotent whilex-hey-idempotent.naturalis false and both runtimes send it once; theWindowpagination style is carried onGetCalendarRecordingsbut read as a Link page in both.Journal::list_page/Contacts::get_contactergonomics over generated methods that already answer the same thing.Gate
On the branch as pushed (on
mainat1d3d047):make rs-checkgreen,make rs-check-driftgreen,make conformance-rs195/195.Adversarial review
Codex CLI (
gpt-6-astra, reasoningxhigh) review runs against this diff; findings and dispositions follow in a comment.Summary by cubic
Adds
Workflows::stage, which parses the HTML HEY serves for a workflow stage into aWorkflowStageView(stage id, name, and topic cards), mirroring Go'sGetStagerule for rule, and closes the last two Go/Rust parity gaps withTopics::move_to_boxand a checked-in parity audit. The shared conformance case now asserts the parsed stage in both runners, which is why Go's stage structs gained JSON tags.New Features
h2for the name, and everytopic_<id>element under it for a card; a card inside a card is that card's content, not a card of its own.scraper(html5ever underneath), a spec-compliant HTML5 parser like Go'sx/net/html.sr-only,screen-reader-only,u-for-screen-reader, orvisually-hiddenis left out of names and subjects.WorkflowStageView::parseis public so a page fetched some other way can be read the same way.WorkflowStageTopicandWorkflowStageVieware#[non_exhaustive], so future fields are not a breaking change.Topics::move_to_box(topic_id, box_id)mirrors Go'sTopics.Moveand sends the same body the generatedmove_topiccarries.PARITY.mdmaps all 202 Go service methods to their Rust counterparts, records how each SDK honours idempotency, empty-on, pagination, retry, and HTML behaviour, and lists the two waivers.Written for commit 228f747. Summary will update on new commits.