feat(docs): ship the benchmarks and the schema in the doc package - #1039
Conversation
There was a problem hiding this comment.
One blocking finding in the workflow change, plus a nit on the hook script.
Checked and fine: benchmark-aggregate is in release's needs, so the gate resolves; the hyperfine-baseline artifact does contain latest.json (FerrLabs/Benchmarks action.yml:406); docs/site/data/schema.json is byte-identical to schema/ferrflow.json at this SHA; postBump output is auto-staged (src/monorepo/run/mod.rs:621), so the generated files do reach the release commit; @ferrflow/doc has no files field, so data/ ships.
Worth noting rather than fixing: hyperfine-baseline is only uploaded on push to main (action.yml:403), so on a workflow_dispatch release the download fails, continue-on-error swallows it, and the committed numbers are published as-is. That matches the stated intent, but it means the dispatch path never refreshes benchmarks.
SonarQube — 2 issue(s) introduite(s) par cette PR
Comparaison entre le projet bac à sable de cette PR et la branche par défaut : SonarQube Community n'analyse pas les PR, ce delta est calculé côté CI. Détail |
|
Both taken, in The duplicate I wrote a loader that rejects duplicates rather than trusting the default, which reproduces it and now passes: The unguarded On the dispatch path, which you raised without asking for a change: agreed, and I have made the comment say it rather than leave it implied. A |
## [7.20.0] - 2026-09-05 ### Features - feat(docs): ship the benchmarks and the schema in the doc package (#1039)
First half of FerrLabs/FerrFlow-Cloud#929:
@ferrflow/docnow carries the benchmark numbers and the JSON schema alongside the pages, so one version bump moves all three together.Today ferrflow.com assembles those three from three routes at three cadences, and they disagree: docs from
@ferrflow/docpinned at 7.17.0, benchmarks from a six-hourly sync at 7.18.0, and a schema copied from this repository'smain, so the site can advertise config keys no published binary accepts.Where the data is written.
scripts/embed-release-data.jsruns as part ofpostBumpand writesdocs/site/data/. It has to be a hook rather than a step before ferrflow:auto_stage_new_filesdiffs the dirty set around each hook, so anything already modified when ferrflow starts is invisible to it and never reaches the release commit.collect_dirty_filescounts??entries, so files the hook creates are staged like modified ones.Where the data comes from. The release job downloads
hyperfine-baselinebefore running ferrflow and passes the path inFERRFLOW_BENCHMARK_JSON. That artifact already exists at that moment:releasedeclaresneeds: [..., benchmark-aggregate], so the benchmark matrix for this exact commit has finished. The existingbenchmark-release-summarydownload stays where it is, since it feeds the draft release notes rather than the package.The download is
continue-on-errorand the step is gated onbenchmark-aggregatehaving succeeded. A release without benchmark data keeps the previously published numbers rather than failing or shipping an empty file, and the script says which of the two happened.The version in the embedded JSON is overwritten with
FERRFLOW_NEW_VERSION, so it names the version being released rather than the one the benchmark run measured, which is the same commit but the older number.docs/site/data/is committed rather than generated-only, so the directory is tracked and the package is complete from the first publish. Both files are regenerated on every release;schema/ferrflow.jsonremains the source of truth anddocs/site/data/schema.jsonis a copy of it.The consuming half stays in FerrLabs/FerrFlow-Cloud and needs a release carrying this before it can land:
sync-docs.mjspicks both files out ofnode_modules,sync-ferrflow.ymland its org-admin PAT go away, and theSchema parityjob becomes unnecessary because the served copy stops being a copy.Ref FerrLabs/FerrFlow-Cloud#929