Skip to content

List journal entries - #110

Merged
robzolkos merged 1 commit into
mainfrom
concept/journal-feed-api
Aug 22, 2026
Merged

List journal entries#110
robzolkos merged 1 commit into
mainfrom
concept/journal-feed-api

Conversation

@robzolkos

@robzolkos robzolkos commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Give Go SDK consumers typed, cursor-based access to personal Journal history and scoped search. The server contract is merged and verified in production; existing per-day Journal reads and mutations remain unchanged.

Review readiness: ✅ Yes — generated contract, wrapper coverage, CI, and production availability are verified
Risk: 🟡 Medium — this adds a generated API surface and cursor parsing consumed by the dependent TUI
Decision: None

✅ Change — Go callers can list, page, and search Journal entries

Before

Go SDK consumer
└── Journal service
    ├── read one known day
    └── ❌ cannot discover or search Journal history

After

Go SDK consumer
└── Journal.ListPage(page, query)
    ├── ✅ receive newest-first entries  ← CHANGED
    ├── ✅ pass NextPage to read older entries  ← CHANGED
    └── ✅ provide q to search Journal content  ← CHANGED

JournalPage returns typed recordings plus the geared cursor parsed from HEY's Link header. The caller starts with an empty page and decides whether to follow NextPage.

✅ Evidence — generation, conformance, wrapper behavior, and production compatibility are verified
  • make check passed at this head, including 156 conformance checks.
  • ✅ Unit coverage verifies query encoding, typed decoding, next-page extraction, and an empty cursor on the final page.
  • ✅ Current-head GitHub checks cover Smithy verification, spec drift, API compatibility, Go tests/lint, conformance, CodeQL, Trivy, govulncheck, and gosec.
  • ✅ A read-only production probe using this exact SDK head called JournalService.ListPage(ctx, "", "") successfully after the Haystack deployment.
make check
passed — 156 conformance checks

GOWORK=off go test ./pkg/hey -run Journal
passed

production JournalService.ListPage(ctx, "", "")
journal feed: ok entries=3 has_next=false

Behavioral proof: Journal wrapper tests · path conformance cases

✅ Scope — additive Journal listing only; existing SDK operations remain compatible

Included:

  • Smithy ListJournalEntries operation with page and q
  • OpenAPI and Go client generation
  • JournalService.ListPage and JournalPage
  • route, behavior, shape, coverage, and conformance artifacts

Preserved:

  • JournalService.Get, GetContent, and Update
  • existing authentication, account scope, retries, and response limits
  • every existing generated client operation

Not included:

  • automatic all-page collection
  • a separate search method; search is the optional query argument
  • server-side search pagination, which is outside this SDK PR
✅ Delivery — Haystack is merged and responding in production; no SDK runtime prerequisite remains

The server dependency, haystack#8655, is merged. A non-mutating call from this SDK head to production returned a valid JournalPage, confirming deploy ordering before review.

There are no migrations, backfills, feature flags, credentials, configuration changes, or new runtime dependencies. Rollback is removal of the additive operation before publishing, or a subsequent SDK release if already published.

⚠️ Review decision — focus on generated contract fidelity and cursor boundaries

Please begin with:

  1. whether the Smithy operation accurately models HEY's query parameters, response, and retry behavior
  2. whether JournalService.ListPage handles the first, intermediate, and final page without hiding pagination policy from callers

The deliberate boundary is one page per call. Search results use the server's bounded, unpaginated response and therefore return no NextPage.

✅ Review path — model, generated surface, wrapper, then drift/conformance artifacts
  1. Smithy model — operation, inputs, output, pagination, and retry contract.
  2. OpenAPI, behavior model, and generated Go client — generated contract surfaces.
  3. Journal wrapper and tests — public Go API and cursor behavior.
  4. Conformance runner, path cases, URL routes, excluded routes, route coverage, and shape fingerprint — generated drift and behavioral proof.

Origin and supporting links: Basecamp concept card · merged Haystack endpoint · dependent hey-cli draft and demo

@robzolkos
robzolkos marked this pull request as ready for review August 22, 2026 14:34
Copilot AI balanced review requested due to automatic review settings August 22, 2026 14:34

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 typed, cursor-based Journal listing and search to the Go SDK.

Changes:

  • Models and generates ListJournalEntries.
  • Adds JournalService.ListPage with cursor extraction.
  • Adds unit and conformance coverage plus drift artifacts.

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 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/hey.smithy Defines the new operation and query parameters.
openapi.json Adds the generated OpenAPI contract.
behavior-model.json Records pagination and retry behavior.
spec/shape-fingerprint.json Tracks the new operation shape.
spec/route-coverage.json Adds route coverage metadata.
spec/excluded-routes.json Removes the former route exclusion.
go/pkg/generated/client.gen.go Adds generated request and response types.
go/pkg/hey/journal.go Exposes paginated listing through the public service.
go/pkg/hey/journal_test.go Tests parameters, decoding, and cursors.
go/pkg/hey/url-routes.json Registers the Journal listing route.
conformance/runner/go/main.go Enables conformance execution.
conformance/tests/paths.json Verifies generated request routing.

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

@robzolkos
robzolkos merged commit 69a129e into main Aug 22, 2026
19 checks passed
@robzolkos
robzolkos deleted the concept/journal-feed-api branch August 22, 2026 14:41
@robzolkos robzolkos mentioned this pull request Aug 22, 2026
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.

2 participants