Skip to content

chore: pin redocly and run it through bun - #456

Merged
retr0h merged 1 commit into
mainfrom
chore/pin-redocly-through-bunx
Aug 16, 2026
Merged

chore: pin redocly and run it through bun#456
retr0h merged 1 commit into
mainfrom
chore/pin-redocly-through-bunx

Conversation

@retr0h

@retr0h retr0h commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Closes the last open task in specify-agent-tool-invocation"confirm every repository declares the tools its recipes invoke."

The problem

redocly was invoked bare from the path:

redocly join --prefix-tags-with-info-prop title -o internal/controller/api/gen/api.yaml ...

It was declared in no .mise.toml, no package.json, and no tool directive. The version came from whatever the developer happened to have installed — and versions differ in how they quote YAML scalars, so the committed combined spec changes under whoever runs just generate. Nothing in CI runs generate, so this was invisible.

The fix

bun is already declared in .mise.toml, and bunx already runs prettier for the React app. So this follows the pattern md.just uses for mdformat — pin the version beside the recipe, run it through the package runner:

redocly_version := "2.19.1"

bunx @redocly/cli@{{ redocly_version }} join ...

No .mise.toml npm backend needed, and the version now lives in the repository rather than on a laptop.

Zero regeneration

Pinned to the version that produced the committed spec, verified:

diff <(bunx @redocly/cli@2.19.1 join ...) internal/controller/api/gen/api.yaml
→ identical

Diff is the justfile alone. just just-fmt-check passes.


Separate finding: just generate is broken on main

Not caused by this change — reproduced on a clean checkout before it:

internal/controller/api/agent/handler.go:50:4: cannot use ... as gen.StrictMiddlewareFunc value
internal/controller/api/agent/mocks/generate.go:24: running "go": exit status 1
error: recipe `go-generate` failed

oapi-codegen regenerates agent/gen with types the committed handler no longer matches, so the intermediate state does not compile and mockgen fails loading the package. It also churns 26 files before failing.

The committed generated code is stale relative to the tool versions go.mod pins, and no CI job runs generate, so nobody found out. That is the same class of problem this PR fixes, one layer down — worth its own change rather than being folded in here.

🤖 Generated with Claude Code

redocly was invoked from the path. It was declared in no .mise.toml, no
package.json, and no tool directive, so the version came from whatever
the developer happened to have installed -- and the versions differ in
how they quote YAML scalars, so the combined spec changes under whoever
runs just generate.

bun is already declared in .mise.toml and bunx already runs prettier for
the React app, so this follows the pattern md.just uses for mdformat:
pin the version beside the recipe and run it through the package runner.

Pinned to the version that produced the committed spec, so the combined
spec is byte-identical and nothing regenerates.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #456   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files         484      484           
  Lines       24935    24935           
=======================================
  Hits        24921    24921           
  Misses         14       14           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bffef2...d514b17. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@retr0h
retr0h merged commit 63dd1cf into main Aug 16, 2026
12 checks passed
@retr0h
retr0h deleted the chore/pin-redocly-through-bunx branch August 16, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant