Skip to content

Add workflow stage reader - #141

Merged
jeremy merged 2 commits into
basecamp:mainfrom
almirsarajcic:feature/workflow-stage-topics
Sep 10, 2026
Merged

jeremy merged 2 commits into
basecamp:mainfrom
almirsarajcic:feature/workflow-stage-topics

Conversation

@almirsarajcic

@almirsarajcic almirsarajcic commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Adds the generated GetWorkflowStage HTML operation and parses its stage cards into thread metadata.

CLI: basecamp/hey-cli#380

Copilot AI balanced review requested due to automatic review settings September 1, 2026 11:31

Copilot AI 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.

Pull request overview

Adds HTML parsing support for reading workflow stage cards through Workflows.GetStage.

Changes:

  • Adds workflow stage view/topic models and HTML parser.
  • Adds a happy-path service test.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
go/pkg/hey/workflows.go Implements stage retrieval and HTML parsing.
go/pkg/hey/services_test.go Tests parsing a populated stage card.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread go/pkg/hey/workflows.go Resolved
Comment thread go/pkg/hey/services_test.go Resolved
Comment thread go/pkg/hey/services_test.go Resolved
@almirsarajcic
almirsarajcic force-pushed the feature/workflow-stage-topics branch from f11ccd3 to bd038c4 Compare September 1, 2026 11:36

@cubic-dev-ai cubic-dev-ai 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.

Review completed against the latest diff

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread go/pkg/hey/workflows.go Resolved
Comment thread go/pkg/hey/workflows.go Resolved
Comment thread go/pkg/hey/services_test.go Resolved
Comment thread go/pkg/hey/services_test.go Resolved
Comment thread go/pkg/hey/services_test.go Resolved
@almirsarajcic

Copy link
Copy Markdown
Contributor Author

Addressed both reviews: the route is now modeled and generated; the wrapper requests HTML without a manually constructed path; conformance and unit coverage cover the HTML representation, Accept header, sparse cards, and malformed card IDs.

@almirsarajcic
almirsarajcic force-pushed the feature/workflow-stage-topics branch 4 times, most recently from 7b51031 to 8ed022f Compare September 1, 2026 12:43
@almirsarajcic
almirsarajcic force-pushed the feature/workflow-stage-topics branch from 8ed022f to ada48dc Compare September 1, 2026 12:44
@jeremy
jeremy merged commit 188a6f8 into basecamp:main Sep 10, 2026
13 checks passed
jeremy added a commit that referenced this pull request Sep 10, 2026
* Make the gates green after the workflow stage reader

#141 added GetWorkflowStage, HEY's first modelled route that answers HTML, and
was merged on checks that had never run on it. Three gates went red on main:

Go Tests and Go Lint: go/pkg/hey imports golang.org/x/net/html, which go.mod
never declared. `go mod tidy` in go/ and in conformance/runner/go.

Rust Tests: rust/hey-sdk/src/generated was not regenerated, and the generator
had no notion of a text/html response, so it would have emitted a unit-returning
method that sent `.json` with a JSON Accept. The model now reads a text/html 2xx
as Response::Html, the service emitter asks for the page as HEY serves it
(Operation::html_representation) and answers the body as a String through
Client::send_text. The routes test pins the modelled-route count, now 131.

Conformance Tests (Rust): the fixture #141 added had a Go dispatch arm only. The
Rust runner gains the arm, serves an HTML fixture body as wire text the way the
Go runner already does, and leaves the expected path of an HTML case alone
rather than putting `.json` on it.

* Let the route say it answers HTML, and name the stage it reads

A Route now carries `html`, so Operation::for_route asks for such a page as
written with `Accept: text/html` on its own, the emitter has nothing extra to
say per method, and the conformance runner can tell from the operation rather
than from what the mock happened to answer: an error case for the stage read
mocks JSON and still goes to the bare path.

GetWorkflowStage names a workflow_stage, as the Go wrapper and the hand-written
stage writes already do.

* Build the apidiff baseline from a tidied base checkout

A main whose go.mod a merge left untidy gives apidiff nothing to load, so the
PR repairing it fails the compatibility check on the base side and can never
pass. The base checkout is throwaway; tidy it before reading its surface.
@jeremy jeremy mentioned this pull request Sep 10, 2026
3 tasks done
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.

3 participants